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.
Related
I have a simple goal I would like to achieve, manually create a provisioning profile in Xcode.
So, I was trying to use the Pythonista Template in Xcode, and I wanted to flash it to one of my devices so that I could test it on a real device and not just the iOS simulator.
So I enter in what I want the app ID to be, and it says, No profiles for 'com.cartercoding.getnpostserver' were found. So I need to manually create a provisioning profile for it, which I have looked up, but the answers I have found are not relevant.
I am using Xcode 11, stable release.
I don't really know what a provisioning profile does...
A provisioning profile grants permission for one or more iOS devices to run an app signed with a specific certificate. Normally, an iOS device will only run apps that are signed by Apple; a provisioning profile tells the device that it may also run apps signed with a key corresponding to the certificate specified in the profile.
I am trying to put an app that I downloaded from the internet on my phone, so I can't do it the usual way.
The whole iOS code signing infrastructure is designed to prevent you from doing that. Short of jailbreaking your device (which is a whole other conversation) you can't just install an app that you've downloaded onto your phone.
I have a simple goal I would like to achieve, manually create a provisioning profile in Xcode.
You can't create a provisioning profile "manually," if by that you mean to construct one on your own; you have to get one from Apple (whether that's automatically through Xcode or via the developer portal).
For users who need to manually create a provisioning profile (in some companies every app has to have its own provisioning profile)
Sign in to your Apple Developer account and navigate to Certificates, IDs & Profiles > Identifiers > Provisioning Profiles.
https://developer.apple.com/account/ios/profile/production
Add a new provisioning profile.
Activate App Store.
Click Continue.
From the dropdown menu, select the app ID you just created.
Click Continue.
Select the certificate you just created.
Click Continue.
Fill in a name of your choice. The name is not visible to end users.
Click Generate.
Download the provisioning profile.
Click Done.
The provisioning profiles overview with your new provisioning profile is displayed.
If you need a Provisioning Profile of Type Ad Hoc
Is everything the same except point 3
These instructions were copied from this page
https://support.staffbase.com/hc/en-us/articles/115003598691-Creating-the-iOS-Provisioning-Profiles
I want to allow my users to install my iOS app with ad-hoc distribution. I want to get their UDIDs and add them to the provisioning profile automatically. I know how to do it manually in the developer portal but what I need is an api to do this process automatically not manually.
Does apple provide any api or other means to add devices to provisioning profile automatically?
(Note that I do not have any device available. I just have their UDIDs)
Xcode will automatically add your devices into your provisioning profile. You will see a warning about that on xcode. You can click "Register" button on it.
Try the below steps
Login to your iphone provisioning portal through developer.apple.com
Add the UDID in devices
Go back to XCode, open up the Organizer and select "Provisioning Profiles", ensure that "Automatic Device Provisioning" is checked on the top right pane, then click on the "Refresh" button, and magically all your devices set in the provisioning portal will be automatically added.
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.
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
I know how to add from the web portal, but this particular provisioning profile is marked as "Managed by Xcode", therefore, I need to either stop managing from xcode or add a UDID into the profile from Xcode.
I cannot find any way to "stop managing" in Xcode.
In Xcode, I know how to add the device by tethering to my laptop and refreshing, but I don't see any option to add a UDID.
Here is what worked (multiple times now) ...
(Web) Login to Apple Developer > Member Center > iOS Provisioning > Add Devices
Add UDID with a meaningful name
Create a Provisioning Profile that includes all of your registered devices
(Xcode) Go back to the Organizer
Select the Provisioning Profiles section and select the specific profile
Check the box "Automatic Device Provisioning"
Press the Refresh button
Voila!
If you simply add the device's UDID to the developer portal, it will be automatically be added to ALL provisioning profiles. You can confirm this by downloading the profile and inspecting it (in plain text editor).
Go to: https://developer.apple.com/account/ios/profile/edit
Click All
Pick profile
Click edit
Select missing device
Click generate
Go to Xcode -> Preferences -> Accounts
Select your account and click View Details
Click Download All
Connect the phone to your mac and open XCode. Then click under Window->Organizer under Devices you must see your connected phone. There is an Button named "use for Development". Click this and after a few seconds the UDID must be in your team profile and you can install the app.
IMO you cant add devices to your team-provisioning-profile without connected to your mac, if this profile is managed by xcode. Alternative make an ad-hoc-provisioning-profile.
Hope that helps?