1
votes

How do I set the provisioning profile int he export_options for gym in fastlane? I have my profiles in my Documents folder. Does gym automatically locates it or I need to specify the path to the file? I know using match is the preferred way but right now I'm still asking permission if I can upload provisioning profiles and certs in git. So in the meantime I'm doing it without match. Can someone help me with this. I'm new to fastlane and I'm not a swift dev.

2

2 Answers

2
votes

Do a manual build, export with Xcode and copy the generated ExportOptions.plist file

1
votes
  1. How do I set the provisioning profile int he export_options for gym in fastlane? A: If you run xcodebuild -help you will see the available keys for the export options and their configuration:

    provisioningProfiles: For manual signing only. Specify the provisioning profile to use for each executable in your app. Keys in this dictionary are the bundle identifiers of executables; values are the provisioning profile name or UUID to use.

  2. Does gym automatically locates it or I need to specify the path to the file? A: Yes it does, in the same way than Xcode does, since gym is kind of a wrapper for "xcodebuild" command (the one that Xcode uses of course). So by providing the name or UUID should be enough. Of course this means that the provisioning profiles should be downloaded on your machine, Xcode -> Preferences -> Accounts -> Download Manual Profiles should do it.

You can see this lane as example:

desc "your description"
lane :release do
  gym(
    workspace: YourApp.xcworkspace",
    scheme: "YourApp",
    configuration: "Production",
    output_name: "YourApp.ipa",
    export_method: "app-store",
    export_options: {
      signingStyle: "manual",
      provisioningProfiles: {
        "YourApp.bundle.id" => "The name of the provisioning profile",
        "YourApp.bundle.id.OtherExecutable" => "The name of the provisioning profile"
      }
    }
  )
end

I don't want to create another repro to host only the certificates and stuff so I prefer to do it manually too.

Understanding how the signing works fro iOS can be a little tricky, this article helped me a lot to fully understand it. If you want mode details feel free to ask :)