简体   繁体   中英

Error: no provisioning profile matches xcode build

BuilSettings [REFERENCE IMAGE1 ][1] I'm creating an script to automate ios build to generate .ipa ... Below is my script,

# xcodebuild -workspace "project.xcworkspace" -scheme "Schemename" clean

# xcodebuild -workspace "project.xcworkspace" -scheme "Schemename" build

# xcodebuild archive -workspace "project.xcworkspace" -scheme "schemename" -archivePath "project.xcworkspace.xcarchive"

# xcodebuild -exportArchive -archivePath "project.xcworkspace.xcarchive" -exportPath "project.xcworkspace" -exportFormat ipa -exportProvisioningProfile "Digi Form Development": *"

while executing above script getting an error of,

--- xcodebuild: WARNING: -exportArchive without -exportOptionsPlist is deprecated error: no provisioning profile matches 'Digi Form Development: *' ** EXPORT FAILED **

Since I'm new to this ios build deployment using xcode cli kindly help me on to correct my problems,

You need to create a exportOptions.plist file, then add the command line flag as so:

-exportOptionsPlist exportOptions.plist

The export options plist should look something like the following:

<?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>compileBitcode</key>
  <false/>
  <key>method</key>
  <string>ad-hoc</string>
  <key>provisioningProfiles</key>
  <dict>
    <key>my.bundle.idenifier</key>
    <string>My Provisioning Profile Name</string>
  </dict>
  <key>signingCertificate</key>
  <string>iPhone Distribution</string>
  <key>signingStyle</key>
  <string>manual</string>
  <key>stripSwiftSymbols</key>
  <true/>
  <key>teamID</key>
  <string>YOURTEAMID</string>
  <key>thinning</key>
  <string>&lt;none&gt;</string>
</dict>
</plist>

Note that signing style can be manual or automatic. If you are explicitly setting the provisioning profile, which I tend to do, use manual and specify the provisioning profile name explicitly. If automatic, Xcode will try to automatically find a matching profile.

For the method field, the options are: development, ad-hoc, distribution and enterprise.

Here is a link with a more general description on this feature: http://devcenter.bitrise.io/tips-and-tricks/xcodebuild-export-options/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM