Frankie
Frankie

Reputation: 11928

Jenkins succeeds without producing IPA file

I have setup an mac mini slave on jenkins. The build process succeeds and my .app file and .dysm files etc are all created successfully.

I have Pack application and build .ipa? checked and defined a ipa filename pattern and an output directory.

When I run the build process, it actually creates the full path of my output directory, but at the end of the path, there is nothing in the final folder. No IPA. Again, the .app and other files are created successfully in the workspace build folder.

Also doesn't work if I leave the output directory blank or change it to other locations.

Jenkins succeeds with this message:

** BUILD SUCCEEDED **

Cleaning up previously generated .ipa files
Cleaning up previously generated .dSYM.zip files
Packaging IPA
Finished: SUCCESS

But alas, no IPA. Any ideas?

Upvotes: 5

Views: 4224

Answers (3)

andrei
andrei

Reputation: 1403

Had exactly the same problem as you.

Besides "Pack application and build .ipa", you also have to check "Unlock Keychain?" which can be found at "Code signing & OS X keychain options".

Furthermore, set the keychain path to: ${HOME}/Library/Keychains/login.keychain

The keychain password for me was the same as my user password. If you leave that field empty, you will see that your build freezes at a certain point. Inside the terminal where you started jenkins, you will see that it waits for you to type the password.

Hope it helped.

Upvotes: 0

brad.roush
brad.roush

Reputation: 607

So I was having the same problem and this is how I solved it:

In the Jenkins job, in the configure interface, under Advanced Xcode build options, I specified a Build output directory: ${WORKSPACE}/builds.

I also added a shell script to execute prior to the Xcode build phase:

mkdir -p "${WORKSPACE}/builds"

Now when I click the check box for "Pack application and build .ipa?", specify a .ipa filename pattern and use the output directory: ipa , the job runs, succeeds, and gives me a .ipa I can see in the Workspace at /builds/ipa/{name}.ipa

I hope this helps.

Upvotes: 0

Frankie
Frankie

Reputation: 11928

I was not able to solve the issue directly, so I am still interested in answers from someone who might have a more direct solution using the Xcode plug in with the pack and build ipa option.

Instead, I removed this option (unchecked it) and added another build phase for execute shell script.

I then added the script from this SO answer (modified for my use) and was able to export the ipa successfully.

/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app" -o "${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa" --sign "${DEVELOPER_NAME}" --embed "${PROVISONING_PROFILE}"

RELEASE_BUILDDIR and BUILD_HISTORY_DIR were changed to my own paths, and -sign and -embed were not needed because i'm using the same profile as the one that created the original .app file

I did have to use mkdir -p to make the path or it wouldn't succeed for me

Upvotes: 1

Related Questions