IPA file extraction - ios

How to extract IPA file from project to run it on a real device to check the functionalities .I'm extracting it through the product folder and compressing it but it is showing error in iPhone that this file can't run.

To test an app on real device ,you must have development and adhoc provisioning profile for the app.
To know how to create certificates and provisioning profile, you can check this link: App id, certificates and provisioning profile
Then set the provisioning profile to your app target. If everything is right so far, then create an archive by Choosing Product -> Archive in Xcode and follow the steps. When Organizer window open in this process, tap on Export, appears on the right side of the window to extract the IPA file.

To test your app on real device you need a developer account,once you got a developer account just go to general on project target and enable automatic signing,it will create automatic provisional profile and certificate for you.i will let you know the steps below.
1)Get developer account with 99 dollars per annum.
2)Import your developer account by selecting Xcode->Preferences->Accounts and add your account by entering account name and password.
3)Now goto general and enable automatic signing,it will register your device and create provisional profile with certificate automatically.
4)Clean build and run your project with your device by connecting to Xcode.
Enjoy.....

You need to reverse work .
1 . You need to change .ipa extension to .zip
2 . Now you can watch .app file now drag this file to your device from Windows > Device
Another way for creating of ipa
If you want to work this ipa file then you need to create ipa as below:
Add necessary profiles and adjust build settings.
Set device as target to run the application.
Build the product.
Go to Products->yourAppName.app. Right click and show in finder.
Drag & drop to itunes profile and binary file.
Select app in iTunes and right click to show in Finder. And there you can get the .ipa file.

Related

Distributing to client via IPA with UDIDs?

A client is asking me to send an IPA file to them.
"You can send the file via email and it can be installed as a developer device"
I tested creating an IPA file for the project and archived it allowing XCode to automatically manage signing. This, as expected, only has my one device's UDID stored in the IPA.
I've gone into the apple developer portal and created an Ad-Hoc provisioning profile for this app. I am not seeing how to add in devices to the profile. When I go to edit the profile, the devices only show the option to select iPhone, Mac, or both.
I'm using Testflight, but the client also wants the IPA.
How can I correctly create an IPA file of my project with the provided device UDIDs?
Log into your apple account and go inside "Certificates, IDs and Profiles" section. There you'll see a section named "Devices", select the option "All" under it. Now you'll see + button top right corner, press it and add the udid of your client and name that device whatever you want and press continue.
Now open your xcode,
press the small i button in front of provisioning profile and drag and drop your provisioning profile (circled in black) anywhere on your desktop. Check the name of your provisioning profile and now go to Library / MobileDevice / ProvisioningProfiles. There you'll see all your provisioning profiles. Now just delete the one that has same name as the one that you just dropped on the desktop. After that Xcode will automatically generate the new provisioning profile for you with all the newly added udids inside it. Now you can archieve your project and generate the ipa file. It will now run on your client's device.
P.S. instead of doing all this you can also generate a new provisioning profile from your apple account and double click on it to insert it into xcode.

ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."

When I upload to Application Loader I receive the following message:
ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."
I have this contained in my app folder. When I compress no matter how obvious I make the provisioning profile, I receive this error trying to upload my app for Apple.
If you are using Ionic / Cordova like I am see this announcement...
https://github.com/apache/cordova-ios/issues/407
It's just one setting, then re-run your Archive to Submit to the Apple Store like normal.
Go to "File" > "Project Settings..."
then select "Legacy Build System"
To upload a archive to AppStoreConnect I had to change the default build system in xcode10 within "File > Project / Workspace Settings" and change it to the Legacy Build system.
This worked for me
Access https://developer.apple.com/account
1 - Certificates, IDs & Profiles
2 - Provisioning Profiles
3 - Distribution
4 - Add Button
5 - Distribution -> App Store -> Continue
6 - Choose Apple Id -> Continue
7 - Select certificates -> Continue
8 - Set Profile Name -> Continue
9 - Download
10 - In Xcode -> Product -> Archive, In Re-sign "App Name" make option Manually manage signing -> choose the Distribution certificate and import your provisioning profile downloaded on step 9.
Sorry for my English, I'm from Brazil
If you submit your build to the AppStore in an IPA archive format (example: Game.ipa), make sure that the Payload folder is at the root of the archive, otherwise you'll get the error: Missing Provisioning Profile - - Apps must contain a provisioning profile in a file named embedded.mobileprovision.
in .plist add
Application requires iPhone environment , Yes !
I tested this , really worked !
I've faced same problem and solved by following below points.
For our clarification, please re-download your distribution provisional profile.
Please make sure you are generating ipa by setting "Generic iOS Device" in xcode.
Clean and build your project.
Place your product file in "Payload" folder and compress this folder and change .zip to .ipa
Now upload your ipa. It worked for me.
Hope this helps.
For those that are using the command line to build, and were using the flag (UseModernBuildSystem=0) to avoid this problem, seems that since the release of package cordova-ios 5.0.0, it's no longer needed. So if you update your Ionic / Cordova App dependency, will work normally.
I can confirm your solution works. To summarize the hacks so far:
1. While building, we need to do (if using ionic) ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"
2. When you open it in Xcode, you can continue using "Automatic Sign" for the project, but when you upload the archive to App Store (for TestFlight or App Store) , you need to select "manually manage signing". When you select manual signing you will see there is no associated provisioning profile (huh...) so select one, and the right distribution profile.
I've managed to upload and distribute successfullly.
To locate the embedded provisioning profile in the app binary:
In Xcode, select your project in the project navigator.
Click the disclosure triangle next to the project to reveal the contents.
Click the disclosure triangle next to Products to reveal the binary.
Control-click the binary file, and choose “Show in Finder” from the shortcut menu to go to the Xcode build location in the Finder.
In the Finder, Control-click the binary file, and choose Show Package Contents from the shortcut menu.
For iOS apps, a provisioning profile called embedded.mobileprovision appears in the Finder window.
For Mac apps, the embedded file is called embedded.provisionprofile.
To verify the entitlements of the embedded provisioning profile
Launch Terminal (located in /Applications/Utilities), and enter this text (do not press Return):
security cms -D -i
In the Finder, drag the provisioning profile in the app binary to Terminal.
Press Return.
This command outputs a property list in XML format.
If you don't have an embedded.mobileprovision file, that seems to be the problem and you probably did not build the app properly for app store distribution.
I redid the 'Upload to App XStore..." and it worked the second time.

Xcode 6.0/6.1 and building with client's provisioning profile

I downloaded the latest Xcode 6.1 and with having my client's provisioning profile/certificate, I tried to build IPA file for them (for ad-hoc deployment) but in the new Xcode 6.1 when you start archiving, it tries to connect to my apple developer account and since my client's App Id doesn't exist, it says:
Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues: An App ID with identifier 'com.myclient.something' is not available. Please enter a different string.
I used to do the same thing in Xcode 5.1.1 and I could archive and create the IPA file for my client with their provisioning profile. DO you know guys how can I build the IPA file for their in-house distribution in Xcode 6.1?
Thanks in advance,
Cam
Locate your .xcarchive file. Right click on it and select Show Package Contents. In the Products/Application folder you will find your app. Drag it onto the iTunes. iTunes will add it to the Applications tab. Go to the Applications tab in iTunes. Right click on your app and select Show In Finder. There you have your .ipa file

How to install an unsigned IPA file on my device using an Apple Developer account?

I need to install an .ipa file that I own onto my device, an iPhone 5.
I have the device, the iOS developer account (complete access), Xcode, etc. Now, how should I "codesign" it, add certificates, provisioning profiles and finally how do I install it in my device?
Since you have an .ipa, what you need to do is extract the .ipa (basically a ZIP file), pull out some files related to the old signing, swap in your new provision profile, and then re-sign. Simply zip it back up and you should be good to go.
IPA="/path/to/file.ipa"
PROVISION="/path/to/file.mobileprovision"
CERTIFICATE="Name of certificate: To sign with" # must be in keychain
# unzip the ipa
unzip -q "$IPA"
# remove the signature
rm -rf Payload/*.app/_CodeSignature Payload/*.app/CodeResources
# replace the provision
cp "$PROVISION" Payload/*.app/embedded.mobileprovision
# sign with the new certificate
/usr/bin/codesign -f -s "$CERTIFICATE" --resource-rules Payload/*.app/ResourceRules.plist Payload/*.app
# zip it back up
zip -qr resigned.ipa Payload
This is all assuming that you're not trying to change the bundle ID or anything with entitlements. Note that the new profile must have the necessary entitlements for this to work on a device.
For a pre-made script that also does this, see the following:
https://github.com/RichardBronosky/ota-tools
I got very nice linked from internet that you can create certificates, provisioning profile and co-design using following steps.
As you said you have complete access of you iOS developer account with 99$ yearly subscription. then you have to your system.
Create Developer cer from you with your certificate signing request or CSR. Download it and install it in to you key Chain by Double clock on Cer. that shoul appear in to you keyChain like following screenshot with private key. If with your Dev cer if there is no private-key then there is some mistake in to you system authority cer.
Now for testing app in to your device you have to add your device UDID in to this dev cer. You cannot run an iOS application on a random device. You need to specify on which devices your iOS application should run by adding one or more iOS devices to the iOS Dev Center.
Browse to the Certificates, Identifiers & Profiles section of the iOS Dev Center, click the Devices tab in the iOS Apps section, and click the plus button in the top right. To register a device, enter a name for the device and he device's UDID. The UDID is an identifier that uniquely identifies an iOS device. Note that the UDID is not the same as the device's serial number.
You can find the UDID of a device by connecting the device with your machine and launching Xcode's Organizer. You can open the Organizer by selecting Organizer from the Window menu. Select the Devices tab at the top and select the device you're interested in. The 40 character alphanumeric string next to the label Identifier is the device's UDID.
After add your device UDID then you need to create AppID for you application. To create a new app ID in the iOS Dev Center, navigate to the Certificates, Identifiers & Profiles section, click iOS Apps, and choose App IDs from the menu on the left. To create a new app ID, click the plus button in the top right. like following screenshot
After cratering AppId then you need to Create a Provisioning Profile that use for code Signing. With the development certificate and the app ID in place, it's time to create a provisioning profile for your application. Before we start, it might be useful to explain what a provisioning profile is, because this is something that confuses a lot of new iOS developers.
It will become clearer if we create a provisioning profile for your application so let's do that now. In the Certificates, Identifiers & Profiles section of the iOS Dev Center, select the Provisioning Profiles tab in the iOS Apps section. Click the plus button in the top right to create a new provisioning profile. Select iOS App Development in the section labeled Development and click Continue. like following screenshot:
Click on continue In the next step, select the app ID you created a few minutes ago.
Select the development certificate from the list of certificates to associate the new provisioning profile with the correct certificate and click Continue.
You then need to select the devices you wish to link to the provisioning profile. Remember that only these devices will be able to run your application during development.
Give the provisioning profile a descriptive name so you can easily find it later. Click Generate and download the provisioning profile to your development machine. Double-click the provisioning profile to add it to Xcode.
Open the Xcode project that you created during the previous tutorial and select the project from the Project Navigator on the left. Select the first item in the list of targets and click the tab labeled Build Settings at the top. search for the subsection titled Code Signing Identity
After setup code sign, certificates,provisioning profiles create IPA by select device that connected Via Cable with Xcode. Run your project with your Device.
For Creating IPA Go to Top Bar of mac-screen--->Product-->Archive like following screenshot.
This process might be take some time for creating Build wait a while then you got new window with look like following.
Tap on distribute Button you get multiple option like following screenshot:
You have to select second option as same as above screenshot and click on Next Button. Then next screen with one drop-down. Select correct Identifier that you are using as a code sign And click on export.
After some process there is one window appear for location of save ipa file like following screenshot.
Yuhoo your IPA file is created now you can install by many thing for example using iTunes, using Test Flight using Diawi

How can I test a production iOS App Store build?

I'm new to iPhone development and i'm not sure how to test the actually binary that will be sent to Apple. Today I released a build that works great on my local device but the released App Store version did not work and hung on launch.
I'm trying to figure out how I can test my production builds so this doesn't happen again.
I tried creating an ad-hoc binary and saved the ipa to my desktop, then imported into iTunes. The app synced and downloaded but remained dark and said 'waiting..'.
I signed up for Test Flight and it said my IPA was created for production and the sdk could not be found.
Do I need to research ad-hoc builds and profiles? This seems to be getting confusing really quickly and i'm not sure where to start looking/learning.
When you create an archive to submit to the AppStore, it is saved under the organizer (Press Command + Shift + 2 to open Organizer).
You can save the same archive for Ad-hoc distribution as a .IPA file, and then install it using iTunes or TestFlight.
In the Organizer, just select the right archive, click 'Distribute', and select 'Ad-hoc distribution' and sign the IPA with your Ad-Hoc distribution profile (if you haven't created an ad-hoc distribution profile, create one at developer.apple.com, download it and double-click on it to import it to your Mac OS Keychain) to generate the .IPA file.
As long as you re-sign your AppStore archive with an ad-hoc distribution profile, it should install and execute on your test devices.
Follow these steps hopefully it will work
Delete the application from your iPhone.
Create a new Adhoc Distribution provisioning profile, make your the devices you want to run on are included in that profile.
Make sure the certificate associated with the newly created profile has a valid private/public key pair.
After creating an archive, see the build must be created with the newly created profile(From a drop down that comes after archive).
If the problem persists, to verify rename the .ipa to .zip go to payload folder right click .app and show package contents see the embedded profile shows the correct profile and have the devices added.

Resources