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.
Set Archive to Debug in scheme settings (Manage schemes): http://note.io/1abC4mw (nut sure if this step is necessary)
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}
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}"
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