问题
When using Visual Studio Cordova, I am following these instructions to publish the app to the Apple App Store:
http://taco.visualstudio.com/en-us/docs/tutorial-package-publish-readme/
After successfully creating the Certificate and Provisioning Profile, and then successfully downloading the Provisioning Profile (*.mobileprovision) file to my Mac, the instructions then say to "Double-click that file to install it and then add it to the Code signing section of Build Settings for Xcode."
But when I doubleclick, Xcode is launched but my project is not loaded. Now keep in mind that up until this point, I have only used the Mac as a dummy machine for remote build - I haven't actually used the Mac directly to do any coding in XCode directly. So I have no idea where the project is that I'm assuming was created when I did my remote build via the Windows machine.
So am I supposed to open up the project on the Mac to install the Provisioning Profile? Where would it be stored? What kind of file am I looking for (like what file extension).
I did find an XCode project created by VS Cordova at the following location (Users/.taco_home/remote-builds/taco-remote/builds/XXX/cordovaApp/platforms/ios) but these xocde projects get created each time I make a new build in Visual Studio, so any changes I make to the XCode project from the Mac don't get used upon later builds.
回答1:
You can find provisioning profile setup information in this new document on the taco.visualstudio.com site. This is a fairly new article, so you may not have seen it yet:
http://taco.visualstudio.com/en-us/docs/ios-guide/#create-a-provisioning-profile
Specifically, it walks through how to install the provisioning profile in XCode.
回答2:
You could equip your provisioning profile to your Xcode application. You can use visual studio cordova for your development. Upon deployment use your remote access to "archive" the project on Xcode to upload to iTunes.
回答3:
I came across from your comment on my similar question Publish Apple App Store in Visual Studio Apache Cordova project and it turns out that Apache Cordova needs to upgrade the version to support XCode 7
--iOS 9.x version bug fix
sudo cordova platform upgrade –g ios@3.9.2
If this doesn't work then You may want to copy the entire project to your workplace which is generated by remotebuild located at
Users/.taco_home/remote-builds/taco-remote/builds/###/cordovaApp/platforms/ios
Open the project with XCode -> Build Settings -> Code Signing -> Provisioning Profile -> Make sure the Provisioning is set to Distribution Provisioning if you want to publish it otherwise set it to Development Provisioning for testing.
Please note that WHEN you upload the app to the App Store via XCode THE BITCODE thingy is checked by default and this caused error but it doesn't say the error is related to BITCODE and It will show the error message saying something like Code Signing is not signed correctly.
UNCHECK the BITCODE before Upload to App Store
Upload App from XCode
Xcode -> Product -> Archive -> Validate -> After Validation is done -> Upload to App Store -> Uncheck Bitcoin -> Hit Next
These issues were pulling my hair out for couple of weeks.
来源:https://stackoverflow.com/questions/34367393/visual-studio-cordova-when-packaging-the-app-for-ios-how-to-add-the-provisioni