Xcode Server 7

Trying to create a Xcode 7 server. The archive and everything are being created perfectly by the bot, however the user installable .ipa file is not. Xcode is returning the following error:


exportArchive: exportOptionsPlist error for key 'uploadSymbols': expected a value of class NSNumber, but found (null)


Has anyone seen this before?

Fairly positive this is a bug. See: rdar://21407210

I'm also with that issue. Any workaround?

I just found a small workaround that seemed to work. Under editing the bot I removed the create a user installable product. Then from there I added the following trigger to manually create the ipa without the help of the bot.


#!/bin/bash
/usr/bin/xcrun xcodebuild -exportArchive -archivePath $XCS_ARCHIVE -exportPath $XCS_OUTPUT_DIR -exportOptionsPlist /Library/Developer/XcodeServer/ExportOptions.plist -IDEPostProgressNotifications=YES -DVTAllowServerCertificates=YES -DVTSigningCertificateSourceLogLevel=3 -DVTSigningCertificateManagerLogLevel=3 -DTDKProvisioningProfileExtraSearchPaths=/Library/Developer/XcodeServer/ProvisioningProfiles


This will create the ipa file in the specified directory. Note that you have to make an ExportOptions.plist file in the directory /Library/Developer/XcodeServer/. That ExportOptions.plist file should look like:


<?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>method</key>
  <string>same-as-archive</string>
  <key>uploadSymbols</key>
  <false/>
  <key>uploadBitcode</key>
  <false/>
</dict>
</plist>


Luckily Xcode does recognize this ipa as a valid installable product and treats it the exact same way it does if it actually worked. If I find anything else I'll keep updating this thread.

Thanks so much Jackson. With your suggestion I'm able to export but not able to automatically deploy it to Crashlytics or iTunes Connect... Although I've noticed that using a "Debug" build configuration and checking the "create a user installable product" the bot is able to create the ipa. Have you noticed that? Only getting the error if using Release build configuration...

Thanks for you comments. I was able to get an ipa to build following jackson.taylor's advice.


Any luck being able to upload to iTunes Connect?

If I run fastlane deliver (https://github.com/KrauseFx/deliver) in the post trigger i get the following error:

"Terminated xcodebuild since it produced no output for too long."


Thanks!

I did see that solution and unfortunately it wasn't working because of the exportOptionsPlist file not being correct. However in the latest beta of Xcode 7 the create user installable product is now working. Which is perfect.

Jackson, I was wondering where you found the documentation for exportOptionsPlist? Would really like to know all of the values we can utilize in that plist.

Hi migs647,


All I found was actually on $ xcodebuild -help command output:


$ xcodebuild -help
...
Available keys for -exportOptionsPlist:
  compileBitcode : Bool
  For non-App Store exports, should Xcode re-compile the app from bitcode? Defaults to YES.
  embedOnDemandResourcesAssetPacksInBundle : Bool
  For non-App Store exports, if the app uses On Demand Resources and this is YES, asset packs are embedded in the app bundle so that the app can be tested without a server to host asset packs. Defaults to YES unless onDemandResourcesAssetPacksBaseURL is specified.
  iCloudContainerEnvironment
  For non-App Store exports, if the app is using CloudKit, this configures the "com.apple.developer.icloud-container-environment" entitlement. Available options: Development and Production. Defaults to Development.
  iTunesConnectAccountUsername : String
  The iTunes Connect account used for App Store communication.
  manifest : Dictionary
  For non-App Store exports, users can download your app over the web by opening your distribution manifest file in a web browser. To generate a distribution manifest, the value of this key should be a dictionary with three sub-keys: appURL, displayImageURL, fullSizeImageURL. The additional sub-key assetPackManifestURL is required when using on demand resources.
  method : String
  Describes how Xcode should export the archive. Available options: app-store, package, ad-hoc, enterprise, development, and developer-id. The list of options varies based on the type of archive. Defaults to development.
  onDemandResourcesAssetPacksBaseURL : String
  For non-App Store exports, if the app uses On Demand Resources and embedOnDemandResourcesAssetPacksInBundle isn't YES, this should be a base URL specifying where asset packs are going to be hosted. This configures the app to download asset packs from the specified URL.
  teamID : String
  The Developer Portal team to use for this export. Defaults to the team used to build the archive.
  thinning : String
  For non-App Store exports, should Xcode thin the package for one or more device variants? Available options: <none> (Xcode produces a non-thinned universal app), <thin-for-all-variants> (Xcode produces a universal app and all available thinned variants), or a model identifier for a specific device (e.g. "iPhone7,1"). Defaults to <none>.
  uploadBitcode : Bool
  For App Store exports, should the package include bitcode? Defaults to YES.
  uploadSymbols : Bool
  For App Store exports, should the package include symbols? Defaults to YES.
Xcode Server 7
 
 
Q