2

I'm using Fastlane to automatically generate an IPA. I have a provisioning profile and a production certificate from a team of which I am a member (but not an administrator).

The problem arises when I try to generate the IPA with Fastlane, which does not find the certificate and tries to download a new one. As I am not an administrator, I am not allowed to download another certificate and the operation returns an error.

I tried adding the option "skip_certificate_verification" in the hope that the verification was failing but could be signed if continued. In doing so something interesting happens, because it seems that the entire generation process is executed and even the file comes to appear in the Organizer window of the Xcode, but returns error saying that it has not found a profile for this id app (even though at the beginning of the operation the logs say that the provisioning profile has been downloaded and installed correctly).

Here's my Fastfile

default_platform(:ios)

platform :ios do

  lane :docuten_release do
      sigh(development:false,
        cert_id:"CERTID",
        filename:"my_profile.mobileprovision",
        ignore_profiles_with_different_name:true,
        skip_certificate_verification:true)
      gym(
        scheme: "MyScheme",
        workspace: "myapp.xcworkspace",
        output_directory: ".",
        configuration: "Release"
      )
  end

end

Searching in the logs the main error seems to be:

Code Signing Error: No profiles for 'com.company.myapp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.company.myapp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.3'

Jaime Alcántara Arnela
  • 2,062
  • 5
  • 25
  • 56
  • As you are not an administrator on the apple developer portal, you can't generate provisionning profiles. And i think that the already existing provisionning is not valid (or expired). So please check the provisionning validity, and ask the administrator to renew that provisionning. – Mourad Brahim Sep 07 '18 at 11:54
  • Thanks for answering @Mourad. The profile has not expired, but I have asked myself if it is incorrect for some other reason. The profile is a distribution one and the xcode log says "Xcode couldn't find any iOS App DEVELOPMENT provisioning profiles". Maybe fastlane is looking for a development profile instead of a distribution profile? What's wrong with my configuration to have this behavior? I do have the "development" option set to false at the "sigh". – Jaime Alcántara Arnela Sep 07 '18 at 12:29

1 Answers1

3

Is "Automatically manage signing" enabled in your Xcode project? If it is, you need to add export_xcargs: "-allowProvisioningUpdates" to your call to gym as described in the Fastlane Docs.

It is also stated in the error message that is presented to you

To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.3'

vastopa
  • 201
  • 2
  • 8