0
votes

I am trying to Continuous integrate using Jenkins for Ios project. i am using below command to manually specify the code signing identity and provisioning profile.

/usr/bin/xcodebuild -workspace "Project.xcworkspace" -scheme "projectTest" -archivePath build/Project -configuration Release archive CODE_SIGN_STYLE=Manual PROVISIONING_PROFILE=”CompanyNameQAAdhocDistribution” CODE_SIGNING_IDENTITY="iPhone Developer: xxxxxxx xxxx (xxxxxxxxxx)"

** ARCHIVE SUCCEEDED **

For Exporting the IPA I am using below command.

/usr/bin/xcodebuild -exportArchive -archivePath "build/Project.xcarchive" -exportPath "build/Project.ipa" -exportOptionsPlist "Build/Project.xcarchive/Info.plist"

Error Message:

Error Domain=IDEProvisioningErrorDomain Code=9 ""ProjectTest.app" requires a provisioning profile with the Push Notifications and Apple Pay features." UserInfo={NSLocalizedDescription="ProjectTest.app" requires a provisioning profile with the Push Notifications and Apple Pay features., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

** EXPORT FAILED **

Able to Export from IDE, But unable to do it via from command. Any help is Appreciated.

3
Your statement telling (requires a provisioning profile with the Push Notifications and Apple Pay features) : push notifications and apple pay features are not included in your provisioning profile. - Shivam Tripathi
@shivam it is included working fine from IDE. but unable to do it via command line. - kalyan

3 Answers

2
votes

You can try specify correct profile in exportOptions.plist example:

<?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>teamID</key>
    <string>xxxxx</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>*com.xxxxxx*</key>
        <string>*profile name*</string>
    </dict>
    <key>method</key>
    <string>development</string>
</dict>
</plist>

And then load it with: xcodebuild -exportArchive -exportOptionsPlist "path/to/this.plist" ...

And make sure you use correct one. Its better to use IDs of profiles than names or delete all old profiles from disk.

1
votes

In my case...I had the wrong bundle identifier under targetapp.plist --> provisioning profile(i.e targetapp bundle id and provisioning profile bundle id is different). After changing it to the correct one ( targetapp bundle id to provisionig profile) this issue got resolved

1
votes

Try this solution. I am successfully Exported IPA in Xcode 9.0 and 9.2

Xcode Plugin of Jenkins not working with Xcode9.0