I have a number of Cordova apps being built by Bitrise but I still donât think that I have achieved the perfect process. We currently have ignored all of the compiled âplatformsâ directory except for the .xcodeproj because it needed to save the project setup when more than one dev works on the project. Is this correct?
Unfortunately cordova doesnât like it when these files already exist when adding platforms, a step that is run on each Bitrise build. FYI, I am using fastlane + match, gym & cert as well.
What files should I be ignoring/adding to my repo. What other tips do you have to improve my build process? Any other advice on the best approach would be gratefully received.
So far this is the best setup we could come up with:
I know itâs for Ionic 2, but the same things apply for Cordova (AFAIK), as the Xcode project is generated by Cordova, Ionic (again, as far as I know) just wraps these cordova CLI calls.
Note: the key to make the cordova/ionic generated Xcode project to work with Xcode 8 is to force a team id and âiPhone Developerâ as the identity:
If you have any questions, just let us know! Also, if someone else has a better setup / some insights, please share it with us!
Hi @viktorbenei, thanks for your help and the link. As I mentioned already, my build uses fastlane and some of itâs tools, which generates the ipa I need for which is then passed to Appaloosa. I donât think I need to switch out this part of the build, but I do want to clarify if the platforms directory is ignored by git for the build that you linked to, can you answer that?
Yes it is ignored, itâs always generated during the build (in the linked How To / config), but because the cordova/ionic generated Xcode project is not compatible with Xcode 8âs new code signing mechanism you need to force the Team ID and the Code Signing Identity (as you can see it at:[quote=âviktorbenei, post:2, topic:885â]
Note: the key to make the cordova/ionic generated Xcode project to work with Xcode 8 is to force a team id and âiPhone Developerâ as the identity
[/quote]
)
How you can force that depends on the tool, our example demonstrates how you can do it with our Xcode Archive step.
Correct, thereâs nothing Bitrise specific here, forcing the Team ID and Identity is done through passing these as parameters for the xcodebuild Xcode command line tool which does the archive. How you can do that (to pass these params) depends on the tool.