Search code examples
iosprovisioning-profilebitrise

How to get local path in bitrise


I have an iOS project in bitrise in which I have set manually manage signing. So I have to provide my certificate in bitrise code signing section. I put my certificate and provisioning profile in each subsection and now I have to provide the path from which me workflow step will take these certificates.

The step I use is the Certificate and profile installer

This is what it says:

URL of the certificate to download. Multiple URLs can be specified, separated by a pipe (|) character.

You can specify a local path as well, using the file:// scheme. For example file://./Cert.p12

In my case I want to take the local path but whatever I tried didn't work (for example I tried with file://cert_id or file://cert_id.mobileprovision or file://cert_name etc)

Note: I don't want to do it via GENERIC FILE STORAGE.

Thank you in advance


Solution

  • As bitrise support helped me you cannot take the path like this.

    My problem started when I had to provide more than one profile and certificate as I had more than one target and bitrise support up to 5 generic files. So the answer is:

    First of all upload all of your provisioning profiles (ad-hoc development appstore enterprise, if you will use one you can upload just one) in code signing section (you don't need anything in generic file storage).

    Then add only one certificate and profile installer step and don't change anything.

    Finally in Xcode Archive & Export for iOS step you have to navigate in Debug section and add a value in Custom export options plist content (this can be found when you archive and export an ipa locally in your machine by opening ExportOptions.plist file).

    This is a sample of the value you will have to put:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>destination</key>
        <string>export</string>
        <key>method</key>
        <string>app-store</string>
        <key>provisioningProfiles</key>
        <dict>
            <key>bundleID</key>
            <string>bundleID-provisioning profile</string>
            <key>target-bundleID</key>
            <string>target-bundleID-provisioning profile</string>
            <key>target2-bundleID</key>
            <string>target2-bundleID-provisioning profile</string>
        </dict>
        <key>signingCertificate</key>
        <string>Apple Distribution</string>
        <key>signingStyle</key>
        <string>manual</string>
        <key>stripSwiftSymbols</key>
        <true/>
        <key>teamID</key>
        <string>yourTeamID</string>
        <key>uploadBitcode</key>
        <true/>
        <key>uploadSymbols</key>
        <true/>
    </dict>
    </plist>