Use xcodebuild (Xcode 8) and automatic signing in CI (Travis/Jenkins) environments

前端 未结 8 1295
野的像风
野的像风 2020-11-29 15:47

With the release of Xcode 8, Apple introduced a new way of managing the signing configuration. Now you have two options Manual and Automatic.

相关标签:
8条回答
  • 2020-11-29 16:47

    If you are using Xcode 8.x and Jenkins for CI. Then probably you would face issue with "Signing for “YourProjectName" requires a development team. Select a development team in the project editor.

    Code signing is required for product type 'Application' in SDK 'iOS 10.1’”.** BUILD FAILED ** when running the job.

    What is the solution?.

    Solution is:

    1. set Provisioning profile to None in Xcode project build settings.

    2. In jenkins, Create a execute shell before the Xcode setting and write the below command

      sed -i '' 's/ProvisioningStyle = Automatic;/ProvisioningStyle = Manual;/' ProjectName.xcodeproj/project.pbxproj 
      

      Remember: keep that execute shell before Xcode settings in Build section of jenkins.

    This works.

    0 讨论(0)
  • 2020-11-29 16:47

    There is a tool called fastlane which makes using xcodebuild much easier and it is maintained meaning new updates will continue to provide support for changes to xcode. It makes it much easier to create scripts and config for building and codesigning your app among many other xcode automation tools it supports. I'd recommend giving it a look into.

    0 讨论(0)
提交回复
热议问题