How to get ipa file from Xcode to run an iPhone app in real device? - iphone

My client asked me to get the review of the app on which I am working. So, I want to get the ipa file and mobile provision file from Xcode 4.2 to share my app to run in real device. I have a paid account of apple with me. Please tell me the procedure to get it.
Thanks in advance.

STEP-1:
You need to refer steps for AdHoc Distribution
I think you need to login with your credentials at Developer Apple Login
Once you are logged in go through this link and read through it step by step.
I think this is the best solution you can get as this documentation guide is given by Apple
https://developer.apple.com/ios/manage/certificates/team/howto.action
This has multiple steps like:
1. Generating a Certificate Signing Request
2. Submitting a Certificate Signing Request for Approval
3. Approving Certificate Signing Requests
4. Downloading and Installing Development Certificates
5. Saving your Private Key and Transferring to other Systems
I think if you read all this steps on the apple documentation at the given link then you don't need to refer to any other guide.
STEP-2:
Then just you need to download your certificates and provisioning profile.
STEP-3:
Just set the profile into your Project and Target Settings and then put proper Entitlements using "Entitlements.plist".
STEP-4:
Once you have done that, just set up your project in AdHoc Scheme.
STEP-5:
Clean your Project.
STEP-6:
Go to Product -> Click on Build For -> "Build For Archiving"
STEP-7:
Product -> Archive
Now your Archive can be obtained in your Organizer where in you can save it to disk with an IPA extension and send it your client.
EDIT:
Here are some of the useful links you can refer to for creating provisioning profile and IPA file:
Create IPA file in Xcode 4.2, iOS 5.0 Beta
http://www.makebetterthings.com/iphone/how-to-create-ipa-file-for-your-iphone-app-xcode-build-and-archive/
http://www.wikihow.com/Create-a-Provisioning-Profile-for-iPhone
Create provisioning profile in iphone application
Hope this helps you.

If you want to test application on device, then you need to create debug profile for it. You need to get it for your device from the provisioning section of developer portal. If you are creating the distribution profile, then you need to put the generated ipa file from build folder to itunes to install it on device.
Then you can install the application on device. But in that case you will not be able to see the logs.
So if you want to see the logs in Xcode console, Create a developer provisioning profile for the device & install it on XCode & then run the code on device using Xcode.
Maybe I think this is the entitlements.plist problem please follow the steps
In XCode, go to "new file" and select "code signing" in left box. Select the "Entitlements" file type. And change the name to "Entitlements.plist". Give the name in project getinfo entitlements plist please check the image below

• Get their device ID and add their device to "Devices" in your iOS Provisioning Portal
Create or edit a distribution profile to include their device (wildcard app id or your app's app id)
• In Xcode: Product -> Archive
• In Xcode's Organizer: Go to archives and "Share" your archive. This creates an ipa that you can give to your client
• The client can install it in iTunes by adding the ipa and syncing apps (I haven't done this last step in a while)
OR
Get to know testflight. Using testflight will replace the final step above and streamline the installation process for your client.

After build with your provisioning profile or distribution for device(not simulator). You can follow this tutorial.

It can be done, in fact I just did it.
After Xcode 6 you have to go to:
Product-->Archive
Then wait for it to finish. Then on the screen that pops up right click on your newly created archive-->Show file in finder
Then head there with a terminal and run this command on that dir:
xcodebuild -exportArchive -archivePath <PROJECT_NAME>.xcarchive -exportPath <PROJECT_NAME> -exportFormat ipa -exportProvisioningProfile "Name of Provisioning Profile"
DONE
For example this command for me was:
xcodebuild -exportArchive -archivePath ACCESS\ 04-02-16\ 02.21.xcarchive/ -exportPath MyTestApp -exportFormat ipa -exportProvisioningProfile "iOS Team Provisioning Profile: eu.sudoplz.myTestApp"
This created a MyTestApp.ipa file for me.

Related

Unable to install ipa file using testflight or diwali in xcode 4.5.1 and ios 5.1

Hy.
I have developed an IOS app in version 5.1 and xcode 4.5.1. After completing the app when I try to run it in the device using ad hoc distribution, the app is unable to install on device.
It shows popup "Unable to download application. ' could not be downloaded at this time'".
I have added distribution and developer certificate and it does not give any such alert when installing directly from the xcode but the problem occurs only when installing app from the testflight.
Could someone tell me where I m making a mistake.
You must Archive the application using your AdHoc Distribution Cert, then from the Archives tab of the Organizer click Distribute and again select your AdHoc cert. The .ipa that this produces is what must be uploaded to TestFlight and you must authorize your device through TestFlight. Here's some tutorials that will help:
Create and Upload an IPA to TestFlight
Setting up Permissions for Distribution on TestFlight
If your IPA and permissions are all correct then according to this article the error could be related to one of many other factors:
Device storage is full
The provisioning profile is a developer provisioning profile
The ad hoc distribution provisioning profile is corrupted and the device is having an issue with it.
The device was restored from a backup and is causing a conflict for over-the-air distribution
There was a network timeout
See the referenced article for details on how to get a console log on the device. If you still are unable to resolve the issue then edit your question and include the relevant parts of the console log from the device.
Go to Product -> Edit Schema -> Build Configuration
Change Debug to Release and try it.

Failed to install iphone application for ad hoc

I followed the stepped to create a ad hoc carefully:
Added the testers team devices to the devices list in iOs Provisioning profile page
Created a new distribution profile for ad-hoc
In xcode I chose the project and clicked on product->archive.
I sent both the archive (ipa file) and mobile provision to the testers team.
The application failed to install.
I saw an answer of a developer to set in build settings the provisioning file to Code Signing Identities to the distribution profile here
In the list I can see only iOS Team Provisioning Profile that was created by xcode.
This is probably not the distribution profile.
What is missing? How can I set the build settings to the distribution ones?
In the IOS Provisioning Portal, in the Provisioning page, click the 'Download' button by your new distribution profile and it should get added to XCode.
To check you have it, go to XCode Organizer, Devices, then Library / Provisioning Profiles on the left.
You may also use https://testflightapp.com.
This is a free service and works very reliably - you can manage your testers and test ipa's easily.
First I also tried testing my app without such a service - but I ended up using this, since it's also very easy for the testers.
Create Distribution certificate and Provisioning profile.
You should have the Distribution certificate in key-chain.
Download Distribution Provisioning profile and double click on that profile.
Confirm you are having the profile in XCode -> Organizer.
In case the Add-Hoc deployment won't install on a testing device, and you have the device added to the profile, and the app signed correctly ...
Ok, what I did is to add an Entitlements.plist file and set the Can be debugged option to NO and set it on the target as the Code Signing Entitlements, but actually I don't know if this was the fix because I won't try again and again, now that it worked.
Then, actually I didn't archive the app and save the .ipa file from Organizer - Archives, but instead I've sent the .app file from the build/Release-iphoneos as it is, together with the profile downloaded from dev account. It will install in iTunes and it just worked, after couple of hours of frustration.

iPhone Development - Running apps on device

I am trying to run the app on my device and there seems to be a problem with the code signing entity. If I choose the developer profile in the code signing entity, it runs fine but if I choose the distribution profile (I've tried both the Adhoc and Appstore distribution) it says "Build Succeeded" but it gives a popup error message saying -
Error Starting Executable “App Name : Device Name”
Error launching remote program: failed to get the task for process 3273
Am I supposed to see this or am I doing something wrong again ?
Thanks
You can not test and run the application with distribution profile at your end. The distribution profile is just for signing the project ipa and upload it to the app store. For running onto your device, only developer profile will work.
If you want to test application on device, then you need to create debug profile for it. You need to get it for your device from the provisioning section of developer portal. If you are creating the distribution profile, then you need to put the generated ipa file from build folder to itunes to install it on device.
Then you can install the application on device. But in that case you will not be able to see the logs.
So if you want to see the logs in Xcode console, Create a developer provisioning profile for the device & install it on XCode & then run the code on device using Xcode.
I think this is the entitlements.plist problem please follow the steps
In XCode, go to "new file" and select "code signing" in left box. Select the "Entitlements" file type. And change the name to "Entitlements.plist". Give the name in project getinfo entitlements plist please check the image below

Building iPhone App for Distribution

I have a question on how exactly to do the final distribution build for my app. I have actually successfully built this app already but now I am trying to make an updated version and to remember what I did right the first time. It all seemed to go wrong when my provisioning profile expired....
Anyway, I have my distribution certificate and distribution provisioning profile. I have followed the instructions from Apple, an iPhone programming book and several online sources to create a build that checks against the right certificate etc. But the build always fails unless I connect a device, which is strange as the distribution provisioning profiles do not allow the inclusion of a device (which makes perfect sense in itself). However when I build with a device connected I am asked
'Can’t run XXX on the iPod “iPod
touch”
The iPod “iPod touch” doesn’t have the
provisioning profile with which the
application was signed.
Click “Install and Run” to install the
provisioning profile XXX on “iPod
touch” and continue running XXX.'
When I click install and run it fails with the message that
A valid provisioning profile for this
executable was not found.
So my basic question is how exactly should the final distribution build be done? An new executable appears, but it has a forbidden symbol on top of the application icon suggesting the build was unsuccessful.
Any help massively appreciated.
Don't click "Build and Go".
Either just build, and then locate the app and upload it, or use Xcode's "Build and Archive" option.
It is best to use "Build and Archive" as Xcode will look after the app bundle, and the important .dSYM file which is used to symbolicate crash reports for your app.
And you cannot upload and execute app that signed with 'Distribution' certificate on your device. Such app can only be uploaded to AppStore.

Certificate in iPhone App

I'm working with iPhone application and i want put it in my iPhone.
In xcode there is a overview "device - 3.1.3 | debug" but when i "build and go" the project there is an certificate error.
I have download a certificate "mobileprovision" with a correct "Identifier" but i don't know how put it in my xcode project.
First, you need to have a subscription with apple to develop iPhone applications. I assume you do. That said, once you generate a certificate (through key chain) and upload it to the apple developers site, you can generate a provisioning profile and input the identifier of your iPhone: download that provisioning profile and installing it is as easy as dragging it to xcode. If everything matches, you can select device and build and go and it will download to your device
After downloading your provisioning profile on your mac, you first install it. Then check your installed profile in : admin/Library/MobileDevice/Provisioning Profiles folder. If it exists, it automatically attached to your xcode project. Open XCode> Window > Organizer > On left-side of Organizer, select "Provisioning Profiles" tab. There, you can find list of profiles you have.