当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript ios-mobileprovision-finder.provision类代码示例

本文整理汇总了TypeScript中ios-mobileprovision-finder.provision的典型用法代码示例。如果您正苦于以下问题:TypeScript provision类的具体用法?TypeScript provision怎么用?TypeScript provision使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了provision类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: queryProvisioningProfilesAndDevices

	private async queryProvisioningProfilesAndDevices(projectId: string): Promise<{ devices: string[], match: mobileprovision.provision.Result }> {
		const certificates = mobileprovision.cert.read();
		const provisions = mobileprovision.provision.read();

		const query: mobileprovision.provision.Query = {
			Certificates: certificates.valid,
			Unique: true,
			AppId: projectId
		};

		let devices: string[] = [];
		if (this.$options.device) {
			devices = [this.$options.device];
		} else {
			await this.$devicesService.initialize({
				platform: "ios",
				skipEmulatorStart: true
			});
			devices = _(this.$devicesService.getDeviceInstances())
				.filter(d => this.$mobileHelper.isiOSPlatform(d.deviceInfo.platform))
				.map(d => d.deviceInfo.identifier)
				.toJSON();
		}

		const match = mobileprovision.provision.select(provisions, query);

		return { devices, match };
	}
开发者ID:NativeScript,项目名称:nativescript-cli,代码行数:28,代码来源:ios-provision-service.ts

示例2: getDevelopmentTeams

	public async getDevelopmentTeams(): Promise<{ id: string, name: string }[]> {
		const teams: { [teamName: string]: Set<string> } = {};
		// NOTE: We are reading all provisioning profiles and collect team information from them.
		// It would be better if we can check the Apple ID registered in Xcode and read the teams associated with it.
		mobileprovision.provision.read().forEach(provision =>
			provision.TeamIdentifier && provision.TeamIdentifier.forEach(id => {
				if (!teams[provision.TeamName]) {
					teams[provision.TeamName] = new Set();
				}
				teams[provision.TeamName].add(id);
			})
		);
		const teamsArray = Object.keys(teams).reduce((arr, name) => {
			teams[name].forEach(id => arr.push({ id, name }));
			return arr;
		}, []);
		return teamsArray;
	}
开发者ID:NativeScript,项目名称:nativescript-cli,代码行数:18,代码来源:ios-provision-service.ts


注:本文中的ios-mobileprovision-finder.provision类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。