Patching Manifest/Plist to build with different platform-specific settings

ぐ巨炮叔叔 提交于 2019-12-19 04:04:08

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/28320904/patching-manifest-plist-to-build-with-different-platform-specific-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!