# Building and deploying iOS app for Appium tests (CI)

**URL:** <https://discuss.appium.io/t/building-and-deploying-ios-app-for-appium-tests-ci/3732>\
**Category:** Support\
**Created:** [April 4, 2015, 7:05am UTC](https://discuss.appium.io/t/building-and-deploying-ios-app-for-appium-tests-ci/3732 "2015-04-04T07:05:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aki](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@Aki](https://discuss.appium.io/u/Aki)\
**Post date:** [April 4, 2015, 7:05am UTC](https://discuss.appium.io/t/building-and-deploying-ios-app-for-appium-tests-ci/3732/1 "2015-04-04T07:05:16Z")

</div>

Hi there,

My regular Appium testing pattern is: build the app to the real device via Xcode and run tests. In this case all works good, no probs. But…

Now I want to move the build process to Jenkins and run tests on CI server. What I have now: Jenkins is building the app and I’m able to deploy it to device but I got “No access to debug” while running tests. I know that it’s because of code signing and provisioning profile but I can’t figure out what I’m doing wrong.

What certiciate and provisioning profile I should use? Currently I’m using “iPhone Developer” cert and Ad Hod provisioning profile. I tried Company Development prov. profile witn no luck.

Please share your thoughts/solutions/success stories if you’re able to build your app with tools like xcodebuild, deploy via command line tools like fruitstrap or ios-deploy and get tests work.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mobile\_Test\_Test](https://discuss.appium.io/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@Mobile\_Test\_Test](https://discuss.appium.io/u/Mobile_Test_Test)\
**Post date:** [April 6, 2015, 7:31am UTC](https://discuss.appium.io/t/building-and-deploying-ios-app-for-appium-tests-ci/3732/2 "2015-04-06T07:31:50Z")

</div>

It should be an enterprise distribution version and should be signed as a debug .ipa.

you can do this in you xcode. “change the version from release to debug”

It should work!

---

<div class="post-metadata">

**Author:** ![Aki](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/ac91a4/32.png) [@Aki](https://discuss.appium.io/u/Aki)\
**Post date:** [April 6, 2015, 5:26pm UTC](https://discuss.appium.io/t/building-and-deploying-ios-app-for-appium-tests-ci/3732/3 "2015-04-06T17:26:08Z")

</div>

Thanks for the reply. I was building in debug of course and finally could find a solution. It might be kinda dump, but it works 🙂

1. My Code singing setting in Xcode (Build settings): [http://note.io/1abBm8S](http://note.io/1abBm8S)

2. Set Archive to Debug in scheme settings (Manage schemes): [http://note.io/1abC4mw](http://note.io/1abC4mw) (nut sure if this step is necessary)

3. Navigate to your project path and archive the project with xcodebuild (sorry, I work with workspace):  
`xcodebuild -sdk iphoneos -scheme {SCHEME_NAME} -workspace {WORKSPACE_NAME} clean archive -archivePath build/{ARCHIVE_NAME}`

4. Create \*.ipa from created archive:  
`xcodebuild -exportArchive -exportFormat ipa -archivePath "build/{ARCHIVE_NAME}.xcarchive" -exportPath "/Users/{YOUR_USERNAME}/Desktop/{IPA_FILE_NAME}.ipa" -exportProvisioningProfile "{DEVELOP_PROVISIONING_PROFILE}"`

5. Deploy to device with any tool you use (fruitstrap in my case):  
`/usr/local/lib/node_modules/fruitstrap/fruitstrap install --id {DEVICE_UDID} --bundle /Users/{YOUR_USERNAME}/Desktop/{IPA_FILE_NAME}.ipa`

---

<div class="post-metadata">

**Author:** ![Mobile\_Test\_Test](https://discuss.appium.io/letter_avatar_proxy/v4/letter/m/a9a28c/32.png) [@Mobile\_Test\_Test](https://discuss.appium.io/u/Mobile_Test_Test)\
**Post date:** [April 7, 2015, 6:52am UTC](https://discuss.appium.io/t/building-and-deploying-ios-app-for-appium-tests-ci/3732/4 "2015-04-07T06:52:45Z")

</div>

Thats great!. Now i have a doubt here, basically when we try to install a .ipa via appium. It throws “fruitstrap error”/

Is their anyway to deploy builds parallel in four devices,using command line or something,without intervening appium

---

<div class="post-metadata">

**Author:** ![Simon\_K](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@Simon\_K](https://discuss.appium.io/u/Simon_K)\
**Post date:** [April 7, 2015, 11:49am UTC](https://discuss.appium.io/t/building-and-deploying-ios-app-for-appium-tests-ci/3732/5 "2015-04-07T11:49:44Z")

</div>

Yes -\> [https://github.com/libimobiledevice/ideviceinstaller](https://github.com/libimobiledevice/ideviceinstaller)
