简体   繁体   中英

Set Xcode automatic signing to false and set provision profile and certificate with fastlane match and gym

We use Fusetools to build an app. Using the command uno build --target=ios --configuration=Release we generate a new myapp.xcodeproj file for the app.

When I open the .xcodeproj in Xcode IDE manually I see the Automatically manage signing checkbox is selected. We then use Fastlane match to get certificates and select appstore certificate manually in Xcode. This all works fine.

Now - we try to build this using a CI provider like Bitrise using a headless build process. Then everything stops at the same point. our .xcodeproj has Automatically manage signing checkbox is selected.

Our Fastfile looks like this:

disable_automatic_code_signing(path: "../myapp.xcodeproj")

match(git_url: "git@github.com:MyRepo/match.git",
      app_identifier: "com.myapp.myapp",
      type: "appstore",
      readonly: true)

gym(
      workspace: "myapp.xcworkspace",
      scheme: "MyApp",
      export_method: "app-store",
      xcargs: "PROVISIONING_PROFILE_SPECIFIER='match AppStore
      com.myapp.myapp'"
)

In our Fastfile we try to disable automatic signing first, the in gym - pass in parameter xcargs: "PROVISIONING_PROFILE_SPECIFIER='match AppStore com.myapp.myapp'" to set the provisioning profile before build.

I then get this from Bitrise CI monitor:

Code signing is required for product type 'Application' in SDK 'iOS 10.3'

I can reproduce this if running locally trying to set automatic signing to false and do the same.

Any idea?

xcargs: "PROVISIONING_PROFILE_SPECIFIER='match AppStore com.myapp.myapp'"

This approach doesn't work well any more since apps might have multiple targets. Instead check out the Xcode setup guide that describes that you can use environment variables, that are being filled by match , for each target's provisioning profile name option

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM