In the export of xCode archive how disable target signing from command line

Viewed 781

I have an xCode project generated with Unity for iOS.

Once the build is finished and the archive is generated I try to export the archive with the Enterprise method from the command line.

When I distribute app from xCode directly and I get to the signing step, we can see this: UnityFramework.framework: No profile required. If I click next, the export will be done without problems and I will have an .ipa

enter image description here

The concern is that I want to do this as part of CI/CD pipeline with command line.

Here is the command : xcodebuild -exportArchive -exportOptionsPlist /path/exportOptions.plist -archivePath '/pathToArchive' -exportPath /exportPath

Here is the plist :

<?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>enterprise</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>com.inhouse.test</key>
        <string>In House Test Profile</string>
    </dict>
    <key>signingCertificate</key>
    <string>Apple Distribution</string>
    <key>signingStyle</key>
    <string>manual</string>
    <key>teamID</key>
    <string>XXXXXXXX</string>
</dict>
</plist>

Here is the error message :

error: exportArchive: UnityFramework.framework does not support provisioning profiles.

I have the impression that the problem I am having is that from the command line there is UnityDesign.app which is signed but also the UnityFramework.framework which does not require a profile. So I always come across the same error at the signing stage.

Does anyone have a solution to deactivate UnityFramework.framework signing or another solution ?

UPDATED SOLUTION :

The solution was to use Fatlande update_code_signing_settings

the script looks like this :

      update_code_signing_settings(
        path: "./Build_iOS/Unity-iPhone.xcodeproj",
        use_automatic_signing: true,
        team_id: "TEAM ID",
        bundle_identifier: "BUNDLE ID",
        code_sign_identity: "iPhone Developer",
        targets: "Unity-iPhone"
      )
0 Answers
Related