IPA has to be regenerated if there is new trusted devices? - ios

I've first generated IPA and distributed to few iPhone devices and later found out that there are few iPhones that doesn't have the signing Certificate from my mac, so I added them via XCode and try to distribute the early generated IPA but none of them successfully installed. It only works after I run thru the whole process again (build -> archieve -> validate -> export)? Am I understand correctly that IPA only meant for trusted devices before the IPA generated?

Definitely, whenever you add any new device and created new profile you must create new archive so newly added device will be able to instal the ipa.
As Apple restrict the untrusted device to use the apps code signing is must and when you code sign the profile matches the certificate.
As while creating archive the profile is used while exporting. The old ipa created do not include the new Profile hence the new devices too.
So whenever you add even single device new ipa creation is required.

Related

iOS: Bundle format unrecognized, invalid, or unsuitable

When I try to run an iOS app on real devices it give me the following error, but it works on simulator, also I uploaded test build on TestFlight successfully, I tried to use another bundle identifier but no luck.
The project is built using Swift and using CocoaPods to include Alamofire and other libraries.
Without having all the details it sounds like you need to update your Provisioning Profile for Distribution or Development.
You will first need to go to the Apple Developer portal and login in to your account. Then select "Certificates, Identifiers and Profiles", followed by "Devices". Add your iPhone's name and UDID to the list if it is not there already.
After your device is registered to your account you will need to update the Distribution Profile (to allow devices to open your app through the beta distribution channel of Test Flight) as well as your Development provision profile to allow team members to build and run the app through xcode on their device instead of the simulator.
First select Distribution and click on the preexisting Distribution Profile for your application. Select the edit option and make sure the check mark next to your device is selected. Then generate a new Distribution profile. This will cause a download to automatically occur in your browser window. Once its complete you should click the download and this will automatically add it to xcode.
Now create a new provisioning profile for your application. Add the appropriate App Bundle Id and select your device from the list. Generate the new profile and a download will again be triggered in the browser window. Once the download is complete again click the download which will automatically add the profile to xcode.
Your application should now be able to run on your device when building and running through xcode as well as when it is downloaded from your beta distribution channel.

Deploying iOS app for development on multiple devices

I'm working on developing an application for iPhone. I recently acquired a new development device, and would like to deploy the application to this device for testing, in addition to the device I have already been using.
When I try to deploy the application, I get an error saying that:
No matching provisioning profiles found: None of the valid provisioning profiles include the device "name of my device"
I have read the documentation on Apple's official developer portal, but it's unclear to me what I can re-use on this new device and what has to be created for it uniquely.
Can I use the same AppId? (I would hope so, since I can only have one app Id for a given Bundle ID)
I generated a new certificate request and named it something different. I also tried to add the new development device as a device allowed to use the provisioning profile I am already using in the application. Apparently, my code signing identity is still not found when trying to build on the new device. Any suggestions?
You have to add your new device identifier to the Provisioning Profile in the Development Portal. The process should be automated if you connect the device while Xcode is open, check out the Organizer for registration progress.
Delete old profile from xcode and download fresh copy of provisioning profile with new device identifier. Add this profile to xcode.
Go to Project -> Build settings-> Code Signing -> there select latest downloaded profile.
It will work

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.

how to get .mobileprovision to build phonegap iphone app at windows?

I'm using windows 8 to building applications with phonegap,
every thing is good except building apple application at:
https://build.phonegap.com
this appears:
phonegap build "no key selected"
how to get the key or .mobileprovision file?
You have to create them on https://developer.apple.com/, as AJD mentioned.
Go to your Apple developer portal
Click Devices to register your iOS device. You need to connect your device to iTunes to obtain your UUID
Click Certificate
Create a certificate for Production (to use PhoneGap Build, otherwise Development)
Download the certificate
Convert the certificate to a p12 file (See the screenshots below) - Double-click the .cer file to open it in Key Chain Access. Then click My Certificates under the category, Ctrl-click the certificate and export. When you save the .p12 file, you are asked to create a password that you will need later.
Create a provision file on Apple developer portal, then download. Again, to make this work on PhoneGap Build, you need one for Distribution, otherwise Development.
Actually, I blogged about it because using PhoneGap Build is not as easy as it should to develop iOS apps.
http://www.pubnub.com/blog/converting-your-javascript-app-to-an-ios-app-w-phonegap/
I know this question is made a year ago, but I hope this helps to everybody who has the same question.
You create and download the provisioning profile and an associated certificate on the Apple developer site.
Go
https://developer.apple.com/
Go member center > manage certificates and profiles...
A valid provisioning profile is connected to a valid distribution certificate. You will need both active.
Building for iOS
We're now able to offer support for building to iOS devices through Adobe® PhoneGap™ Build. The process for completing iOS builds is slightly different than that for other platforms: all iOS builds need to be signed by a developer certificate and a provisioning profile, that is tied to your Apple developer account and the device you wish to test on. This document covers how to set this up.
Note: Since PhoneGap Build uses Apple's standard development process to build applications, you will need to sign up for their developer program to build iOS applications on PhoneGap Build. You will also need a Mac to configure your certificate and provisioning profile.
When you upload a new application to PhoneGap Build, if you don't have a default certificate-profile pair attached to your account, you will be alerted that the iOS build can not be completed:
iOS Key Required
Your key will actually consist of two files: a certificate and a provisioning profile. Apple has extensive documentation for setting up your environment locally: the best approach is to ensure you can build an iOS application to your iOS device locally, to be sure that both your certificate and your provisioning profile are set up correctly for code signing.
Once you have these set up, you can export them for upload to PhoneGap Build. For the provisioning profile, you will need a file with the mobileprovision extension, which looks like this:
Provisioning Profile in Finder
Ensure that this provisioning profile is correctly paired with the device(s) you wish to test on.
Note that when you create your profile, you will specify the App IDs that are linked to the profile. This is important when using PhoneGap Build: the package name you specify for your app, in your config.xml (the id attribute of the widget element) or through the Edit App page, will have to match the ID for the provisioning profile. If they fail to match, your app will not be built correctly.
Apple appends a "Bundle Seed ID," or "App ID Prefix," to the provisioning profile when you generate it through the iOS Developer Center. Note that you do not to include this App ID Prefix in your config.xml for PhoneGap Build to build successfully. You just need the reverse-domain style Bundle Identifier - com.domainname.appname. This will also be best compatible with building for other platforms.
To prepare your certificate, you will need to open the Keychain Access utility on your Mac, and identify the certificate that you use for iOS development. Right click on that certificate and select Export ...
Export from Keychain Access
Save the certificate in a location you can remember, and enter a password. Remember the password: you will need to give it to PhoneGap Build, otherwise we cannot use your certificate.
Enter Certificate Password
Now back to the website. On the app detail page, simply select the "new key..." option from the signing key dropdown for the app in question, and then, from the list of platforms with signing available, hit add a key for iOS. Fill out the form: add your p12 certificate file and your mobileprovision file, and enter the password associated with your certificate.
Add Certificate to PhoneGap Build
Once your key is added, we'll attempt to rebuild the application for iOS. If all goes well, you should see a link for the built ipa file available.
You can then download the ipa file and use iTunes to install it directly on your provisioned iOS device.
Happy building!

How to add provisioning profile to IPA file

I downloaded an IPA off the web and I want to upload it to Diawi or TestFlight for demo testing, but I keep getting errors like No provisioning profile found in the application bundle or Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc?
How can I edit the IPA so I can successfully upload them to the demo sites?
PS: I don't have XCode.
You can't.
When the .ipa was built, it had to have been built with a provisioning profile in order to be distributed. In addition, your test device's UDID has to be on the list of valid devices for that provisioning profile. Once the .ipa has been created, you can't go back and edit it. If you want to be able to run it on your device, you need to create a new one--or have the original person who created the .ipa make a new one, since you don't have XCode.
You can not sign .IPA file with any other way, you need to prepare new build signed with updated provisioning profile, where devices ID's are included in it.
Make sure that while creating an .ipa file you must need to select Generic iOS Device as a

Resources