Error when importing ad-hoc distribution of iPhone app into iTunes - iphone

I'm trying to make a ad-hoc beta distribution of my app, but get this error whenever I try and import it into iTunes:
'A provisioning profile named "embedded.mobileprovision" already exists on this computer. Do you want to replace it?'
If I click Replace, the profile named embedded.mobileprovision appears in the iTunes profiles folder, but the app doesn't appear in iTunes.
The app builds with no errors, and I have already imported my ad-hoc distribution provisioning profile into iTunes.
Has anyone else had this problem, or know how to solve it? I'm using iTunes 9.2, Xcode 3.2.3 and iPhone SDK 4.0
Thanks.

I had this problem as well, and got around it by selecting "Application Requires iPhone Environment" in the info.plist. (also known as "LSRequiresIPhoneOS" for raw key value)

I have solved this problem.
Even though, as I explained in one of my comments, I was not able to select "Application Requires iPhone Environment" when editing Info.plist, if I make a new project in Xcode this option does appear.
After finding this I copied the Info.plist file from the new project into the project I'm currently working on. I then deleted the original one, and renamed the new one as appropriate.
After updating some of the other settings to match my project (e.g. the Bundle identifier), and building the project, I could then import the app into iTunes.

Related

Invalid WatchKit Support - The bundle contains an invalid implementation of WatchKit

I am trying to upload my apple watch app to iTunes, every time i am uploading my binary i am getting following mail from apple team.I have done with my following checklist.
Created separate App id and profile for watchapp and extension.
I have the correct set of images for apple watch as well as iOS app.
my app was initially built with Xcode 6.2 SDK and now i am submitting with 6.3 SDK.
Don't know where i am doing wrong. can anyone with experience help me out here.
We have discovered one or more issues with your recent delivery for
"XXXXX". To process your delivery, the following issues must be
corrected:
Invalid WatchKit Support - The bundle contains an invalid
implementation of WatchKit. The app may have been built or signed with
non-compliant or pre-release tools. Visit developer.apple.com for more
information.
Once these issues have been corrected, you can then redeliver the
corrected binary.
The problem for me was that the "IOS Deployment Target" in Build Settings for my WatchKit App and my WatchKit Extension were not both the same. My extension was set to 8.3 and my WatchKit App was set to 8.2. Once I set them both to 8.2 the error went away and the WatchKit App installed just fine.
While uploading apple watch app, it need to have apple watch extension into embedded binary of iOS app. But if you are habbitat to delete derived data then xcode6 will delete that target. and when you submit it to apple it will only get ios app not apple watch app.
Adding Embedded Binaries fails in Xcode
Xcode won't link framework form separate project
App crashes on device because of missing framework, works in simulator
Overview
After deleting the "DerivedData" folder (or performing a "Product > Clean") in xcode6, I cannot add CocoaTouch frameworks from another project to the "Embedded Binary" section (under General tab).
Or, Xcode hits a linker error because it cannot find a framework that if previously could.
Other symptoms
Clicking on the + under "Embedded Binaries" shows the Framework selector but selecting a framework in different project in the workspace does nothing.
I've been tearing my hair out over this one too. Here's what I've tried:
I've generated new provisioning profiles for the app, the watchkit extension, and the watchkit app, using unique bundle identifiers for each (com.example.app, com.example.app.watchkitextension & com.example.app.watchkitapp) and a distribution certificate. Downloaded, installed, and set each target to its own provisioning profile in Build Settings > Provisioning. Tried explicitly setting signing authority AND leaving it on automatic.
I've confirmed that the xcarchive contains a WatchKitSupport directory and WK file when I Show Package Contents of the archive
I've ensured that WatchKit Extension, WatchKit app, and IOS app all have matching build and version numbers
I ran Edit > Convert > To Latest Swift Syntax... on the app, extension, and watchkit targets (no source changes were required in my case..)
I've compiled from scratch, cleaned, built, & archived, rinsed and repeated, restarted system and looped again.
In my case, none of those worked. Hope one of them helps you. And if any other kind soul out there has fixed this without going bald, share the hair, man, share the hair.

Preparing Ad Hoc Distribution for my app

I have been reading several tutorials and watching some iTube videos to see how I best prepare my app for Ad Hoc distribution. However the information I got is not really consistent, it goes from the 5 step explanation from the Developer Center of Apple to a almost 3 minutes video, where I would have to set some Code Signing options in XCode, create and zip the Archive etc.
My questions:
1.
Is there a tutorial available, which explains everything required, but not too much? I somehow feel, for instance, that code signing is not really required.
2.
After I tried to install the app using iTunes, the synch claimed that it was not able to install it. Is there some log available in iTunes, so I can check for further error details?
3.
How about switching from Ad Hoc distribution mode to normal developer mode? After I followed the steps from the video and prepared my app for Ad Hoc distribution, I was not able to install it on my device anymore, I got the error
Build target Abiliator
Check dependencies
[BEROR]CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 5.0'
This is the video tutorial on iTube I followed: Demo of iPhone app Ad Hoc distribution
Thanks for your feedback and have a great weekend.
OK, looked up the Error
" the following job tried to hijack the service..." and saw that a reboot of the iPhone may solve the issue... and guess what, I was chasing a phantom all day long.....
It works perfectly.
So last hint for anyone, having a similar issue, after installing an app via Ad Hoc the first time: Reboot iPhone, otherwise the app may crash.
Cheers and now good nite :-)
PS: Just to round this thread up here the steps I did at the end (as mentioned, I am using XCode 4.2.1) :
Added my device on the Provisioning Portal (this had been done long time ago, however it is an important step, as the beta testers device IDs also need to be registered here before you re-create and download the distribution profile)
Created and downloaded an iOS Distribution Certificate in the Provisioning Portal
Imported the certificate in my Keychain
Created a Ad Hoc Provisioning File in the Provisioning Portal
Downloaded that profile
Double clicked the profile, which added it to the XCode Organizer Provisioning Profile Section)
Added the options Any SDK and Any iOS SDK in for Ad Hoc Distribution Code Signing Identity in the Code Signing section of my project AND my target and set the values with my Ad Hoc Provisioning File I just created and imported
Made sure the option in my app .plist file "Application requires iPhone environment" was set to true
Ran a clean (Product / Clean) and then a build only (Product Build)
Made sure the app was not installed on my iPhone (as I was testing before via XCode)
Copied the target (group Products via Show in Finder) to iTunes via Drag and Drop (I dropped it into the Media section)
Copied the Ad Hoc Provisioning File into iTunes via Drag and Drop (also to the Media section)
Made sure the app was checked for the synch, synched iTunes with the iPhone
Lastly rebooted my iPhone! However, I am pretty sure, that this might occur on the Developers device only. I assume that the reason for that was a process, still remaining on the iPhone, from my last test via XCode.
I did not use an entitlements file. I have actually to find out, what that file is really for, I have read that it might be required only, if using iCloud. And XCode 4.2 developers, there is nothing like File / New / Entitlement Template anymore in XCode. The file is created as soon as you check the option Entitlements and give the file your desired name in the Summary tab of your target.
You may also want to download the iPhone Configuration Utility from apple
I will also recommend this to my beta testers, as it allows you to see the console log of the iPhone, which of course might be very helpful in case of errors.
Hope this summary helps others, setting up their app for the first Ad Hoc distribution.
Cheers, René
code signing is simple.
first you create a mobileprovisioning profile for your apps bundle identifier also add the devices you want to built the app for. for adhoc build do it in distibution tab. download it, double click add it to keychain.
now you tak your app in xcode.select coreect profile(code signing). set command line build to distribution, oh i forgot create a new file(entitlements.plist) set debug inside it to false, add its relative path in the target, just above codesigning specified. now select the iosdevice on top left(where you select the simulator) press command+b to build the app. the app would be in the products folder(at the bottom) locate it in finder drag it to itunes, may be provisioning profile too, and sync it. done.
Go to https://developer.apple.com/devcenter/ios/index.action and login. You can find 'iOS provisioning portal'. And after going there, choose 'Distribution' section. Select "HOW TO", you can find necessary steps there.

The entitlements specified...profile. (0xE8008016). Error iOS 4.2

I am getting the 'dreaded' error The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.
(0xE8008016). when trying to deploy my first app to an un-jailbroken device on iOS 4.2.6 (Verizon). The thing is, I do not have a Entitlements file in my project, as I am not distributing it at all, only putting it on one device. I have gone through all the hoops and loops apple puts you through (certificate, device, provisioning) down to the letter, and I cannot figure out what is going wrong.
Can anyone please help me with this problem?
Just came across this issue myself, the problem was that I had a Entitlements.plist file in the project as part of an ad hoc distribution, and its get-task-allow (ie. 'can be debugged') property was set to NO - setting this to YES fixed the issue and allowed the app to run from Xcode4 on the device in development.
Naturally need to set it back to NO for ad hoc distributions, but just thought I'd mention it in case anyone else comes across the same problem.
I had this issue with Xcode 4.2.1.
For me it was nothing to do with Entitlements file, or Ad-hoc...
I was returning to and old project, and I'd forgotten to add my new iPhone to the provision.
Silly mistake, but also a silly corresponding error message... :-/
If you're using react-native, make sure that the Test target has the same provisioning profile as the main one.
I've had this issue with the iCloud entitlements. My problem was that I forgot to enable iCloud for my App ID in the Provisioning Portal.
After enabling iCloud for your App ID, you will need to recreate the provisioning profiles.
Keep your entitlements file in Target> Build Settings > Code Signing > Code Signing Entitlements.
Go to Target > Capabilities.
Toggle On/Off or Off/On one of the capabilities.
Run.
What worked for me was to completely delete the entitlements file, from the groups list, and from the Build Settings in both Project and Target. Then I recreated the entitlements from the Summary tab in the target, and it loaded fine without any error messages.
Just putting in my 5 cents here. For me none of the above worked, so I was forced to stress down and actually look at every part of the process with fresh eyes.
In rushing this I forgot that I was trying to install my app on a totally new device.
So my error was that I hadn't updated my provisioning profile by ticking off my new device int the "Devices" section of the provisioning profile setup in the Provisioning Portal.
Apparently not including your device in the provisioning profile also generates this error message.
None of the many answers fixed the 0xE8008016 Error for me.
But when I chose "Automatic Device Provisioning" in Xcode 4 > Organizer > Devices > Provisioning Profiles, it finally worked.
In my case it was a stupid mistake. I incorrectly set the "Run" scheme to use the "Distribution" build configuration instead of the "Debug" or "Release" one.
Stupid mistake, but it took a while to debug it, so I'm going to add my answer to improve the knowledge base inside stack overflow!
Delete your provisioning profiles, do a 'Clean All', make sure that your provisioning setting are correct, redownload, and try to run again.
Open 'iOS Provisioning Portal' in Safari.
Tap 'Devices' in the sidebar.
Register your device's UDID
Tap 'Provisioning Profiles'
Edit your apps profile.
Select the device your have just added.
Download the .mobileprovision file.
Install it.
Build again.
I had the same problem in my app, after a few month this specific app worked fine.
The problem was that the Capabilities configured in my Xcode project (under Targets -> {ProjectName} -> Capabilities) were not the same as the Capabilities configured in the provisioning profile (you can check that in the Apple member centre under Identifier -> App Ids -> {your app ID}. In the member centre I saw that Game Center is enabled and so in my project I also enabled Game Center. Then the app was able to launch.
I don't know how it worked until now. That's still a mystery :)
For me check the "Automatically manage signing" option in Target solve the problem!
Upgrading to XCode 4 fixed the issue.
Deleting the xcuserdata folder solved my issue. More on that here: https://stackoverflow.com/a/9968884/300694
If you didn't change anything related to certificates (didn't replace or update them) just do a Product -> Clean. It helped me several times. (Xcode 6.2)
I ran into this problem today and I was pulling my hair out trying to figure it out. Like many people here, it would work if I removed the iCloud options in my entitlement file. When I would go to debug the app with the iCloud options enabled then I would get the 0xe8008016 error. This was right after revoking and regenerating new certificates.
So what solved it for me was to turn on iCloud support for the automatically generated Xcode team profile. Log onto the online provisioning tool, go to App IDs, click on Xcode iOS Wildcard App ID, click on edit, enable iCloud by checking the checkbox, and finally clicking Done. Refresh your profiles in Xcode and then it will start to work.
This makes some sense - when you're debugging it defaults to the team profile and the team profile needs to have iCloud turned on.
Happened to me when I was trying to use an app store distribution provisioning profile for local test by mistake. When I used the proper development profile it worked just fine. Maybe this helps somebody too.
This worked for me...
I deleted the Entitlements file from the target.
Deleted the app off all my devices
Cleaned the build in Xcode
*optional delete the provisioning profile and re-add it
Hope it works for you guys too :)
This is what solved my problem: Deleting the path in the Code Signing Entitlements section of the Targets build settings.
My provisioning profile from Apple developer matched my Xcode capabilities but it still wouldn't build onto my device until I did the following:
Remove/Delete the entitlements file from your Xcode project.
Go back to the Xcode capabilities tab
Hit "Fix Issue" button to get Xcode to re-add the entitlements file.
Worked for me, hope it helps someone.
Happened to me on Xcode 8, it was partially caused by the new Provisioning Profile build setting, as in this Xcode version there are two entries for provisioning profile:
Provisioning Profile
Provisioning Profile (Deprecated)
My fault was that I updated only the first one, and the deprecated entry was still pointing to an invalid provisioning profile. Changing both to the same value solved the issue (clearing the deprecated entry should also have the same effect).
In my case, it looks like Xcode (secretly) reset the Scheme.
I found that the build configuration for Archive was set to Release instead of distribution one, and after I changed it to the correct one, it worked.
I think it is better to check the Schemes as well as the build settings.
I had old project and same problem and I solved .
1.Go to summary
2.Summary have keychain groups and delete keychanin
groups's object.
I hope it's will work for you .
Regards.
i'm using xcode 6 and encounter this issue for one particular iphone 4
finally , i go to device => provision profile =>
and then add the profile manually and problem is fixed .
For me in Xcode 5.1 I was getting The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. when trying to test the app on my device. Device Development Certificate has to expire Feb 2015.
Issue was resolved:
Selected Target->Capabilities, under GameCenter, here I was getting error on GameCenter entitlement as it was not added to project, although first version of application was released via same XCode 5.1 but there were no errors like this before.
Below, a button was given with title Fix Issue. When clicked it added the GameCenter entitlement and issue was resolved.
After wards the screen looks like:
For me, there was nothing to do with certificate. App now runs successfully on the device.
One more potential problem that will throw this error message: If you're using a perfectly valid provisioning profile for you main app, but have an expired or otherwise invalid provisioning profile for your Today widget extension. I imagine it'd be the same for an Apple watch extension as well.
Check all the profiles!
Check KeyChain Access!
In my case I was using the wrong distribution certificate associated with the provisioning profile.
The code I was working on had a different bundleid in the Info-plist than in the Product Bundle Identifier build setting.
I found this because I noticed this message in the device console in the devices view:
MIS: entitlement 'application-identifier' has value not permitted by provisioning profile 'iOS Team Provisioning Profile: com.xxx.yyy'
If you are trying to activate iCloud syncing, you will need to enable iCloud for the AppID that is used to create the development provisioning profile (which Xcode does automatically). You'll also need to enable this for distribution profiles as well.
The tricky part is that when you refresh profiles in Xcode, this does not trigger a renewal of the profiles; they are simply re-downloaded. So in your iOS Provisioning Portal under Provisioning/Development, you'll need to check the profile that is labeled (Managed by Xcode) and delete it (Remove Selected button). Do this for ALL profiles, development & distribution, that you need to regenerate.
Now, in Xcode in the Organizer, delete provisioning profiles that you are about to replace.
Now to get new ones. If you develop for more than one team and only want to refresh a particular one, select the appropriate Team in the left pane under TEAMS, otherwise select Provisioning Profiles under LIBRARY, then select Refresh.
Finally, remove any old provisioning profiles on your device that could conflict with the new ones since profiles are never deleted automatically; newer profiles are simply added to the list.

Ad-hoc distribution odyssey - not valid signer

I am totally aware of billions how to and forum discussions out there about this issue. Because I could not find the solution I'm writing here.
Typical situation: I want a co-worker to test my App. I thought on Ad-Hoc distribution. I followed every kind of tutorials. But I receive always a "valid signer" issue in iTunes.
Basically:
1) have a distribution certification which works like a charm to upload apps to iTunes;
2) add UUID number of my friend's iPhone in the portal
3) use the same App ID I used till now for the AppStore xxxxxx.* so that in the Bundle Identifier I can insert, like always for the appstore, com.mydomain.nameoftheapp
4) create a provisioning file, Distribution, where I check my and my friend's iPhone
5) add it to xCode, dragging it to icon in the dock
6) create the Entitlements.plist and uncheck the only field in it
6) create a copy of Release, named Distribution and set it active
7) leave untouched the parameters in the PROJECT
8) in the TARGET, add the Entitlements.plist in Code Signing Entitlements and the provisioning file (which is present and black, not gray) under Any OS Device, leaving blank Code Signing Identity
9) Add an icon, like always, PNG 57x57
Now, I clean all the targets and then I build. Drag both the mobile provisioning file and the .app to iTunes. Rather than to send it to my friend, I try with my iPhone. But the error is always the same. Can't install because of not valid signer...
Can you help me? I can provide you with screenshots and everything it may help...
Thank you so much!
Fabio
I had the same problem, the process described in this post from the Apple developer forums solved it for me:
Remove any versions of the
application from iTunes.
Drag the mobile provision file to iTunes (it seems like nothing happened but continue on)
Sync the iPhone (again nothing should appear any different)
Drag the app to iTunes
Sync the iPhone a second time.
Good luck!

How do I build an xcode project for the itunes store?

I've got my apps running on my iphone, great, however to list on the itunes store I need the "universal binary" thing.
I've tried finding answers, but I can't seem to find a concise useable explanation to doing this in xcode. I always get errors when I try to build a binary. Can anyone point me towards a basic step-by-step procedure I can follow to creating a universal executable binary which can be uploaded on the itunes store?
One more thing, is there some type of app, like the rename project app, or applescript thing, that can do this for me with a few clicks?
Try this:
Prepare a new provisioning profile for App Store
Make sure you have Ad Hoc distribution working OK.
Go onto the Program Portal > Provisioning > Distribution
New Profile button
Distribution Method: App Store
Profile Name: MyApp App Store (or whatever)
App ID: MyApp (you have already created one right?)
Submit button
Set up the new profile/configuration in XCode
Download the certificate (you can click on the Distribution tab to reload that tab while it's being generated) and load it into XCode
In XCode, open your project and go to Project > Edit Project Settings (or double-click on the first item under Groups & Files panel)
Configurations tab, click on your existing Ad Hoc distribution configuration, that already works, and click Duplicate button. Call the new one "App Store"
Click on Build tab, then under Code Signing > Code Signing Entity in the popup choose "iPhone Distribution - MyCompanyName" under "MyApp App Store"
Build & Upload to iTunes Connect
Clean all for good luck, then set Active Configuration to "App Store", build & go. Test it on your iPhone.
Find your built app in the Finder, in your project directory > build > App Store-iphoneos > MyApp.app ... right click and "Compress MyApp.app"
Upload resulting MyApp.zip to iTunes Connect.
A Universal Binary has nothing to do with it. To distribute through the App Store, you need to create a Distribution provisioning profile. The iPhone developer portal has step-by-step directions for this. look under the "Distribution" tab.
I followed the instructions listed by sbwoodside but had problems with the last part (Build & Upload to iTunes Connect). I realized that the built version didn't run on the device. This is what worked for me:
Build & Upload to iTunes Connect
Clean all for good luck.
Go to "Edit Scheme" and in the Archive menu, select the App Store
build configuration.
Select iOS Device or a specific device in the drop down menu and go
to Product->Archive.
Once Xcode is done archiving, it will open the organizer window and
show the archives section. Select the last archive and click
"Submit".
You will be asked to enter your distribution certificate. Select
the one created for the App Store.
XCode will upload the app to iTunes Connect without the need of
using Application Loader. For this to work, the app has to be in
"Ready to Upload" status in iTunes Connect.
You won't get to test the last version with the device. Therefore it's best to make an ad hoc version before to be able to test all features and once everything is working, duplicate the ad hoc configuration for the app store.
Once you have your provisioning profiles downloaded and installed you need to make some changes within XCode to get the app to work on your iPhone and eventually to submit to the iTunes store. You'll also need to add an Entitlemests.plist object to your project. You also need to tweak your build profile and your info.plist to point to your application name.
But as Mark B already said, just got through the developer portal and follow those instructions. Just make sure your define the right provisioning profile for the purpose.