Skip to content

Instantly share code, notes, and snippets.

@rnagarajanmca
Last active September 12, 2017 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rnagarajanmca/df06d87196688dc327d68e931fe85cf9 to your computer and use it in GitHub Desktop.
Save rnagarajanmca/df06d87196688dc327d68e931fe85cf9 to your computer and use it in GitHub Desktop.
Setting up jenkins for ios build

Troubleshooting

  • When jenkins build throws following error

     Going to invoke xcodebuild:target: Sampleapp, sdk: DEFAULT, workspace: Sampleapp, clean: YES, archive:NO, symRoot: DEFAULT, buildDir: DEFAULT, developmentTeamID: XXXXXXX
    [Sampleapp] $ /usr/bin/xcodebuild -target Sampleapp -workspace Sampleapp.xcworkspace clean build DEVELOPMENT_TEAM=XXXXXXX
    xcodebuild: error: You cannot specify targets with a workspace.
    xcodebuild: error: If you specify a workspace then you must also specify a scheme.  Use -list to see the schemes in this workspace.
    Build step 'Xcode' marked build as failure
    Skipped archiving because build is not successful
    Finished: FAILURE

    This happens because of scheme not generated/available in your project . You need to launch xcode Go to Manage Scheme -> Check the scheme which you want to share. Once scheme generated it will be there under xcshareddata/scschemes, These files needs to be checked and available along with your code. Once scheme generated you can list the scheme by using following command xcodebuild -list and configure the required scheme in xcode jenkins plugin

  • When you find the similar error while building from jenkins

    faptxbmxubkpkugegsdrzqaoivnx/Build/Intermediates/ArchiveIntermediates/Sampleapp/InstallationBuildProductsLocation/Applications/Sampleapp.app/Frameworks/Alamofire.framework: unknown error -1=ffffffffffffffff
    Command /bin/sh failed with exit code 1
    
    ** ARCHIVE FAILED **
    
    The following build commands failed:
      PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/trackx/Library/Developer/Xcode/DerivedData/Sampleapp-faptxbmxubkpkugegsdrzqaoivnx/Build/Intermediates/ArchiveIntermediates/Sampleapp/IntermediateBuildFilesPath/Sampleapp.build/Release-iphoneos/Sampleapp.build/Script-76DB843B3E9936FF4A6648B5.sh
    (1 failure)
    Build step 'Xcode' marked build as failure
    Skipped archiving because build is not successful
    Finished: FAILURE

    That denotes keychain needs to be unlocked , Eventhough You unlock the keychain from xcode plugin following command needs to be executed in the mac node

    security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k keychainPass keychainName

    Here my kechainName is login.keychain and password is ***** :)

  • When you find the simlar error while building from jenkins

     Exported Sampleapp.xcarchive to: /Users/naga/Jenkins/workspace/Sampleapp/Builds/36/36
     ** EXPORT SUCCEEDED **
    
     Archiving dSYM
     No dSYM file found in /Users/naga/Jenkins/workspace/Sampleapp/build/-iphoneos/-iphoneos!
     Archiving artifacts
     ERROR: No artifacts found that match the file pattern "*.ipa". Configuration error?
     ERROR: ‘*.ipa’ doesn’t match anything, but ‘Builds/36/36/*.ipa’ does. Perhaps that’s what you mean?
     Build step 'Archive the artifacts' changed build result to FAILURE
     Finished: FAILURE

    Means you have not configured 'Files to archive' under post build action. Make sure you have configured as **/*.ipa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment