SHARE
TWEET

Jenkins/Xcode build command for IPA creation

priore Oct 4th, 2017 (edited) 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Jenkins Build section:
  2.  
  3. . ~/.profile
  4. xcode9
  5.  
  6. export LC_ALL="en_US.UTF-8"
  7. #/usr/local/bin/pod install
  8.  
  9. cd MyApp
  10. pod update
  11.  
  12. security default-keychain -d user -s "${HOME}/Library/Keychains/login.keychain"
  13. security unlock-keychain -p $keychain "${HOME}/Library/Keychains/login.keychain"
  14.  
  15. xcodebuild -scheme "MyApp" -workspace "${WORKSPACE}/MyApp/MyApp.xcworkspace" \
  16. -configuration Release archive \
  17. -archivePath "${WORKSPACE}/MyApp/Build/MyApp.xcarchive" \
  18. CONFIGURATION_BUILD_DIR="${WORKSPACE}/MyApp/Build" \
  19. CODE_SIGN_IDENTITY="iPhone Distribution" \
  20. DEVELOPMENT_TEAM=XXXXXXXXXX
  21.  
  22. xcodebuild \
  23. -exportArchive \
  24. -archivePath "${WORKSPACE}/MyApp/Build/MyApp.xcarchive" \
  25. -exportOptionsPlist "${WORKSPACE}/MyApp/MyApp/ConfigurationFile/archive_property.plist" \
  26. -exportPath "${WORKSPACE}/MyApp/Build/ipa"
  27. CODE_SIGN_IDENTITY="iPhone Distribution" \
  28. DEVELOPMENT_TEAM= XXXXXXXXXX
  29.  
  30. Archive the artifacts secion:
  31. **/*.ipa
  32.  
  33. archive_property.plist :
  34.  
  35. <?xml version="1.0" encoding="UTF-8"?>
  36. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  37. <plist version="1.0">
  38.     <dict>
  39.         <key>compileBitcode</key>
  40.         <true/>
  41.         <key>method</key>
  42.         <string>enterprise</string>
  43.         <key>signingCertificate</key>
  44.         <string>iPhone Distribution</string>        
  45.         <key>teamID</key>
  46.         <string> XXXXXXXXXX </string>
  47.         <key>stripSwiftSymbols</key>
  48.         <true/>        
  49.         <key>signingStyle</key>
  50.         <string>manual</string>    
  51.         <key>thinning</key>
  52.         <string>&lt;none&gt;</string>
  53.         <key>provisioningProfiles</key>
  54.         <dict>
  55.             <key>com.myorganization.MyApp</key>
  56.             <string>MyApp Distribution</string>
  57.         </dict>
  58.     </dict>
  59. </plist>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top