修补Manifest / Plist以使用不同的平台特定设置进行构建 [英] Patching Manifest/Plist to build with different platform-specific settings

查看:198
本文介绍了修补Manifest / Plist以使用不同的平台特定设置进行构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在升级我们已经发布的所有三家商店的原生应用程序,新版本使用用于Apache Cordova的Visual Studio工具开发。



为了能够在商店中升级应用程序,我们需要发布它们,指定正确的版本并更正每个平台的package-id。



我们需要编译我们的解决方案,指定自定义清单/ plist,我们将设置正确的版本和包。



用于Apache Cordova的VisualStudio工具具有以下常规设置:所有平台:





阅读可用文档,似乎也可以指定特定于平台的配置文件:


Android

将自定义AndroidManifest.xml文件放在
res / native / android文件夹中,以配置自定义
意图等设置。在为Android构建项目的Debug
配置后,在
bld / Debug / platforms / android文件夹中使用生成的文件版本。



iOS

在res / native / ios / config.xml显示名称中放置一个自定义Info.plist文件文件夹
覆盖诸如splashscreens或图标之类的设置。必须按如下方式重命名Info.plist
文件名:config.xml display
name-Info.plist。您可以在
cordova-ios GitHub存储库中找到这些文件的示例版本,或者您可以从Mac上的build文件夹中为您的应用程序使用生成的版本
(使用远程
时)代理商)在内部版本号/ cordovaApp文件夹下。



Windows Phone 8

将自定义WMAppManifest.xml文件放入
res / native / wp8 / Properties文件夹。在为Windows Phone 8构建
项目之后,在bld / Debug / platforms / wp8 / Properties文件夹中使用生成的
文件版本。


我们已经开始尝试使用IOS尝试添加修补 XXX-Info.plist ,如文档中所述,但我们得到了编译时出现此错误:


自动配置配置文件选择不可用:自动配置配置文件选择需要捆绑包
标识符。
在Info.plist中输入一个包标识符,或选择要在构建设置中使用的
配置文件


删除XXX-Info.plist,解决方案构建没有任何问题。

任何提示?

解决方案

尝试将以下密钥添加到您的Info.plist中:

 < key> CFBundleIdentifier< / key> 
< string> your.bundle.id.goes.here< / string>

此捆绑包ID应与在iOS开发人员中心生成iOS配置文件时使用的捆绑ID相匹配。 / p>

We are in the process of upgrading our already published native apps available on all the three stores,with a new version developed with Visual Studio Tools for Apache Cordova.

In order to be able to upgrade the app in the stores, we need to publish them specifying the correct versions and correct package-id for each platform.

We need to compile our solution specifying a custom manifest/plist where we will set the correct version and package.

VisualStudio Tools for Apache Cordova has a general settings for all the platforms:

Reading the available documentation, it seems that it is also possible to specify platform-specific configuration files:

Android
Place the custom AndroidManifest.xml file in the res/native/android folder to configure settings such as custom intents. Use the generated version of the file in the bld/Debug/platforms/android folder after building a Debug configuration of the project for Android.

iOS
Place a custom Info.plist file in the res/native/ios/config.xml display name folder to override settings like splashscreens or icons. The Info.plist filename must be renamed as follows: config.xml display name-Info.plist. You can find sample versions of these files in the cordova-ios GitHub repository, or you can use the generated version for your app from the build folder on your Mac (when using the remote agent) under the build number/cordovaApp folder.

Windows Phone 8
Place the custom WMAppManifest.xml file in the res/native/wp8/Properties folder. Use the generated version of the file in the bld/Debug/platforms/wp8/Properties folder after building the project for Windows Phone 8.

We have started our experiment with IOS trying to add a "patched" XXX-Info.plist as stated in the documentation, but we get this error on compile time:

Automatic provisioning profile selection unavailable: A bundle identifier is required for automatic provisioning profile selection. Either enter a bundle identifier in the Info.plist, or select a provisioning profile to use in the build settings

Removing the XXX-Info.plist, the solutions builds without any problem.
Any hints?

解决方案

Try adding the following key to your Info.plist:

<key>CFBundleIdentifier</key>
<string>your.bundle.id.goes.here</string>

This bundle id should match the one used when generating your iOS provisioning profile on the iOS Dev Center.

这篇关于修补Manifest / Plist以使用不同的平台特定设置进行构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆