ios - what is the right code signing configuration for an Ad-Hoc build meant to be transfered from itunes to device? - ios

I am learning how to create an ad-hoc version of the app so that I can put it on my local iTunes and from that, to transfer it to the device.
I created a distribution provisioning profile and named it Production Provisioning AdHoc. Then I added the device I am testing on to that profile. Then in code signing, for the distribution setting, I set it to that provisioning profile, but what should be the develop setting? Does that matter?
The problem I am experiencing is that when I archive my project and distribute it as AdHoc, I am able to see the app in iTunes, but when I do the sync and apply to transfer it to the device, even though iTunes says the app is on the device, the app never gets installed on the device.
Please help me understand what I may be doing wrong and how to fix it. I have been stuck on this since yesterday.
Thanks,
Alex

Not sure about iTunes allow .ipa transfer or not. But you can use Xcode to transfer .ipa to device.
Here is steps to install .ipa to your device.
« Open Xcode->Window->Organisor.
« Click on devices tab
« Drag your .ipa to your device listed in side bar.

Related

Do I need an iPhone for TestFlight? [duplicate]

I have enrolled to Apple Developer Program to release my first app. My app's bundle ID is the same at developer.apple.com, at appstoreconnect.apple.com and in my XCode project. However, XCode still gives the error in "Signing & Capabilities" tab:
Failed to create provisioning profile.
There are no devices registered
in your account on the developer website. Plug in and select a device
to have Xcode register it.
And another error:
No profiles for ‘com.xxx.yyy’ were found
Xcode couldn't find any iOS
App Development provisioning profiles matching ‘com.xxx.yyy’.
First error message made me think that a physical connection to an iPhone is required to create a provisioning profile.
I have never connected a physical device to my Mac before. I made my tests by iOS simulator. I was planning to do my physical device testing via Testflight.
Do I have to physically (via a USB cable) connect an iPhone to my Mac in order to create a provisioning profile? If not, what might be wrong?
Is it required to have provisioning profile in XCode to be able to use Testflight or publish an app to App Store?
Do I have to physically (via a USB cable) connect an iPhone to my Mac in order to create a provisioning profile?
Yes, if you want to use automatic signing. An automatic provisioning profile unites a computer and a device and an app; it says that this computer is allowed to build this app onto this device. Until Xcode sees the device, it can’t create the profile.
The alternative is to switch to manual signing. It’s more work but now you can generate the profiles yourself.
You do NOT need a physical iOS device (iPhone or similar) to upload an app to App Store! Whether for real or TestFlight.
I realize this qn is old now, but I'm writing this for people like me, who stumble in here fighting the same problem... 😏
What you need to upload apps on App Store:
A MacOS machine (not too old)
A paid Apple Developer Account
An app signing certificate from the above account
A provisioning profile, with or without a physical device
When trying to create a new provisioning profile in your Apple Developer Account, the first option is:
iOS App Development
Create a provisioning profile to install development apps on test devices.
See:
If you chose this option, you need a physical device! In fact, the way I understand it, you are supposed to register the UDIDs of ALL the phones and tablets that you want to test your app on...
If, like me, you don't have an iOS device, you can instead chose the last option in the list:
Developer ID
Create a Developer ID provisioning profile to use Apple services with your Developer ID signed applications.
See:
This one only requires an Apple Developer ID!
At the end of your create-provisioning-profile process, you have to download your profile and open it in Finder to install it (in XCode or whatever you're using). In your project, you have to switch from "automatic signing" to "manual signing". In XCode, this is done here:
If, like me, you had already downloaded your app signing certificate and installed it in your KeyChain app, you may run into this error when trying to apply your provisioning profile:
"Provisioning profile 'your profile name' doesn't include signing certificate 'your certificate name'".
The way I solved this error was:
In KeyChain:
Exporting my Apple Developer certificate to a .p12 file.
Deleting my Apple Developer certificates.
Re-importing the exported certificate file to keychain.
In XCode:
Close and re-start XCode
In the "Signing & Capabilities" tab in the project, de-select the newly downloaded profile and then select it again.
Now, it works! 🙂 From there, you should be able to follow any tutorial for uploading an app to App Store.

Xcode 8 asks for a device to be registered to create provisioning profile

I am trying to publish an app for testing, without having to connect a device in my mac.
I have created a developer account, created an app in itunes, generated bundle id, signed into xcode with the developer account, generated a distributor certificate.
When I tried to archive the app, I got the error "conflict provisioning setting. app is automatically signed for development ..."
I read in this post and followed the tip of unchecking and rechecking the option "Automatically manage signing". After re-choosing my team, I get the error "There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it".
The goal all along was that I wouldn't need an ios device, because I intended to immediately publish the application and invite people to test it via testflight. Is it not possible to do it like this? Am I missing something.
I have read lots of documentation, but being a first timer in this, everything seems confusing.
Edit: I created a provisioning profile as distributor. Even after creating and installing the distributor profile (it now appears also in xcode at Account -> provisioning profiles), I still get that same error. I also noticed that in signing, The signing certificate is iOS Developer. I am sure
I fixed it by plugging in my iPhone and going to the Product menu > Destination > iPhone (my device).
Then after clicking Try Again on this properties page the warnings went away.
Source
The solution (though I would welcome more elaborate, insightful explanations):
#General -> Signing, disable the option "Automatically manage signing"
#General -> Signing and certificates choose your team
Though in my case that was not the issue, I would recommend making sure that in the device list, you choose Generic iOS device in your target devices.
This really sucked to figure out.
What you do is add a distribution profile in https://developer.apple.com/account/resources/profiles/add. Don't choose development! Don't let the Xcode Automatically manage signing!!
Then, you download the provision.
Then, in the Signing & Capabilities -> Signing Section of the project.xcodeproj file, turn off Automatcially manage signing, choose import and import the file you just downloaded.
Then, in the top, you choose Any iOS Device (arm64, armv7) and then you go Product -> Archive.
What happened to me was that I was about to run my app on a physical device for the first time and I didn't have a Team. So I created it in the process before connecting my phone with the USB cable. After I created the team a message like the listed above appeared. I did some research on internet but nothing found.
So here's what I did: I connected my phone, did all the trusted process, then restarted Xcode, and it worked. I am not sure what happened, but it was some of my first experiences using Xcode. It could sounds silly but it helped me. Hope to you too.
If you do not wish to register a device follow this advice:
https://stackoverflow.com/a/44157307/499581
* In short use "Generic" as the device while archiving.
If you do wish to register a device then the solution to:
"There are no devices registered in your account on the developer
website. Plug in and select a device to have Xcode register it".
Is to physically plug-in your device (an actual iPhone, or iPad) so that Xcode can register it for development use (note: this will not affect the normal everyday use of the device). After the device is registered it can then be used for development testing, load provisioning profiles onto it, etc.
↳ Disabling and Enabling Devices Using Your Developer Account
For those who are trying to develop without a mac computer using MacInCloud don't follow the standard advice out there. Its will lead you down a hole. I have wasted hours of my time.
The reason it say something about "a device to be registered to create provisioning profile" is that you need to provision an iOS device that you can test on before you can get it signed. If you are using MacInCloud you probably can't physically connect an iPhone or iPad to the MacInCloud and therefore it can't automatically provision devices for you.
Before you get to far into this you will need to get your iPhone/iPad UDID. Which I was able to do with https://get.udid.io/ on my iPhone, but it didn't work on my iPad. Instead, with the iPad I had to download iTunes from the Windows store and connect my iPad. Then click on the little gray square in the menu that's inline with Library tab.
image of itunes
Then when it pops up with your device info (mine didn't come up with my info at first, I had to sync my device). You will see your SN. Click on your SN and it will change to your UDID. Once you have your UDID you are ready to create a provisioning profile. What is confusing is this isn't done in the appstoreconnect section of your account online. Its done in your developer account: https://developer.apple.com/account
developer.apple.com account screen shot
When you go there you will want to click: Certificates, Ids & Profiles
Here you will need to add your devices and then with auto signing checked in Xcode that made the problem go away. NOTE: I originally tried to create a profile, download it, and import into Xcode under the Provisioning Profile dropdown in Signing & Capabilities. As described in another answer here, but that proved more problematic and wasn't necessary.
Then you can chose Any iOS Device from emulator device drop down then go to Product > Archive > Distribute App and create a certificate to place it on the app store (TestFlight).
you can also plug an iphone, run the app the app on your iphone as the target, it will ask you to register the device and then the certificates will be generated
Have you paid the $99/year developer fee? TestFlight is only available for paid developers. I would highly recommend plugging in an iOS device, though. It's more fun and rewarding testing that way.

Ad Hoc distribution app is gray, after transfer from iTunes to iPhone

I've been develoming an app and is at a stage now where i want to make other ppl able to tst out my app. I've created a Ad Hoc provisioning profile and build an .ipa file with archives. After that i added the .ipa file to iTunes apps library and sync'ed iTunes with my iPhone. After this i look at my phone and the app is grayed out and if i press it it writes installing, but never gets done installing.
I've tried to recreate my certificat + profile + ipa file. And i did uninstall the debug app that was on my device, before i transferred the one with a ad hoc profile.
Ov, and as a side note the app works 100% if i just build a release build through xCode, and use xCode to transfer it, but i NEED that .ipa file so that solution wont cut it for me.
What am i doing wrong here, plzzz help?^^
SOLUTION: Don't use " "(space) in the file name of the .ipa file
Are you 'distributing' the application and saving for ad-hoc/enterprise deployment ? The chances are the provisioning profile you created doesn't have the device UDID in it. Check on the dev portal that your ad hoc profile has that device included.
If you instal the app from xCode and you can see the log in the console debugger, that's mean that you are not in "distribution" mode but in debug mode.
Verify your provisioning profile and the build mode.

App stuck on installing ipa from iTunes

Since moving to ios7 I am unable to distribute my app to my iPad using the ipa and provisioning profile (the same ones that worked just before I upgraded to ios7 do not work either).
This is what I have tried:
Remove all profiles from iPad
Deleting existing app from iPad and iTunes
Add ipa and prov profile to iTunes
Reinstalled app from iTunes
The app installs on the iPad saying 'installing' until it appears to have loaded and the app name is shown below the icon. However in iTunes it still says 'installing' and never changes to 'remove'.
If I then unplug the iPad and tap the app to start it it reverts back to 'installing' and then nothing else happens.
You most likely built your archive with an App Store provisioning profile instead of an Ad-Hoc Provisioning profile
Here are the steps that seemed to fix the problem for me:
Deleting all profiles from device (iPad in my case)
Settings - General - Profile
delete any relating to your app
Deleting all profiles from iTunes on iMac
Finder - Library (GO with ALT pressed displays this) - Mobile Device - Provisioning Profiles
delete all provisioning profiles you see here. This is where Xcode sees any when choosing your profile.
In Xcode - in both Projects and Targets
Set all code signing to None
Archive your project - in Xcode Product - Archive
You will be told no profiles exist - choose Fix Issue. Your provisioning profiles will be downloaded into the Library - Mobile Device - Provisioning Profiles (the folder we previously cleared.) In future these will be your options when setting your Project and Target code signing.
In Organiser
Export your archived product and choose the team Profile (or any that have been downloaded) as code signing.
Drop the ipa into iTunes and install.
For Ad Hoc provisioning - check the device UDIDs.
We used an app called UDID+ to get the device UDIDs. Don't! The app gives you the wrong UDID with iOS7.
Apple's developer site accepted the faulty UDIDs and everything proceeded normally until the issue described above occurred. It took a looong time and lots of starting from scratch to figure that one out.
I had the same problem. I had archived with the wrong code signing identity selected in XCode. Changing that and creating a new archive solved it straightaway.
I just did 'clean' and 'build' in the xcode product menu (then archive, export ipa, etc) and it works now.
I had a similar issue and turned out the reason was because I was trying to distribute an .ipa file without first adding the recipient device UDIDs to my developer account settings. It used to be possible in some earlier iOS versions to distribute an .ipa without adding the UDIDs but apparently not anymore. More info here: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/TestingYouriOSApp/TestingYouriOSApp.html
And I also needed to change the code signing settings from Xcode from "iPhone developer" to "iPhone distribution".

Archived IPA won't install onto my phone

I've done this a few times before with my own apps.
I've started working for a client and using there account I've created the necessary files on the dev portal. Downloaded and install them on my machine.
Followed the instructions to create an archived IPA for adhoc distribution.
Drag it into iTunes.
Then drag it to my device in iTunes. When i start dragging the app icon a red badge appears, but the app never starts to sync onto the phone.
I opened the ipa and looked at the mobile provisioning file and I see that my phones UDID is
included there.
Can anybody give me some insight into what the problem may be?
I had this happen when I could see myself in the provisioning profile under its code-signing identity but I was not on the distribution profile. And the issue relied on the build settings.
Go to your project -> Build Settings and check under Code Signing. Confirm that you are using the correct developer profile. Pay extra attention to mismatches between bundle identifiers.
Check the validity of the distribution profile in the same area.
Archive and make sure you are using the correct build configuration. When creating the ipa file confirm for the correct distribution profile again.
Hope that helps
There can be many reasons for that. one thing that cross my mind:
Check if their device iOS version is not higher then the SDK you are using or lower then your deployment target.
I can also recommend to use Testflight service (search Test Flight iOS in google), it is perfect for distributing builds to customers.

Resources