Exporting an archive for Enterprise Deployment in XCode 6 - ios

I can archive my project in XCode 6 and choose the Enterprise Deployment Option. In XCode 5 when you go to choose the location of the archive on the file system you get a check box that says "Save for Enterprise" and you get several other options to complete like url. This generates the plist file. I dont get that in Xcode 6, just the ipa. Is this because XCode 6 is Beta? Or do you no longer get a plist as well as the ipa?

I couldn't get a plist either so I used a trick.
To distribute my app Over The Air anyway, I used a plist formerly generated with XCode 5 and changed manually the link to my newly generated IPA.
Once you managed to do that, there is one last thing to know. When you'll open the link to the plist, you'll have the impression that nothing happens because iOS don't close you current window + slide to the downloaded app anymore. But it doesn't necessarily mean that nothing happen! Go to your home screen manually and check.
UPDATE
If that still doesn't work, try this workaround: change your bundle ID, generate your new App ID and provisioning profile accordingly, regenerate your IPA and redo the above. For some, it works only the first time for a given bundle ID!

Related

Xcode couldn't find any iOS App Store Provisioning Profiles

I'm using a beta of Xcode 9. I've archived my iOS Project and whenever I try to validate it, I get this error for every one of the targets in my app:
And I'm getting this error for every target like I said. The provisioning profile for each of the targets is an Xcode Managed Profile. What am I doing wrong?
You should try two options:
1) In Developer.Apple.com create a distribution provisioning profile, download it, and select it. Then re-archive your project and validate. This should dismiss the error.
2) If option 1 doesn't work for you, click the Export button beside archive and save your .app file to your Desktop. Then open Application Loader (In Xcode, click Xcode > Open Developer Tool > Application Loader). Enter your credentials, then upload the app using the .app file you generated and saved to your Desktop.
Note: Sometimes Xcode shows fake errors when validating and Application Loader will ignore those and allow you to upload a build successfully.
When Application Loader is finished, you should then be able to see your build in iTunesConnect after about 15-30 minutes.
It happened to me when I wanted to make an enterprise build but I accidentally selected to upload build to App Store.
Mine worked on a simple second attempt with no changes or rebuild.

App installation failed due to application-identifier entitlement

I am unable to install a watchOS 2 WatchKit app due to an application-identifier entitlement. This happened after turning on App Groups in the Capabilities tab.
Full error:
App installation failed
This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.
This is running the app in debug mode on a physical device. Running just the iOS app works fine.
I have turned App Groups off again and removed the entitlements files that were added, but same error.
I had this problem with an iPhone app, and fixed it using the following steps.
With your device connected, and Xcode open, select Window->Devices
In the left tab of the window that pops up, select your problem device
In the detail panel on the right, remove the offending app from the "Installed Apps" list.
After I did that, my app rebuilt and launched just fine. Since your app is a watchOS app, I'm not sure that you'll have the same result, but it's worth a try.
I had this problem and was not able to resolve it without deleting and reinstalling the app (messing with provisioning profiles, as some here suggested, did not help).
However, I did not lose my existing test data. Here's how to do that, for anyone having this problem in the future:
Before removing the app, open the Xcode "Devices" window (that's cmd-shift-2).
Select your device and find your app in the "Installed Apps" list.
Click on the gear icon and select "Download Container...". This will copy all of the app's data to your Mac. Save that somewhere for now.
Delete the app and reinstall it from Xcode. Kill the app from Xcode (click the stop button), so it's not running.
Back in the "Devices" window, click the gear icon and select "Replace Container...". Select the data that you downloaded to your Mac in step 3.
Xcode will then restore your previously saved app data.
You now have your old test data back, and the app should run.
Delete any previous versions of App from your iPhone and then Clean->Build and Run again. Your app should run smoothly on your Device.
Also, please make sure you have not selected Distribution Certificate in your Project Settings while trying to run your project directly on your device.
You will get this error when your AppID prefix does not match the prefix of the previously installed app. If your app is already in the App Store, you will not be able to submit updates without restoring the original AppID prefix or contacting Apple.
Apple's instructions for handling this problem: https://developer.apple.com/library/content/technotes/tn2319/_index.html#//apple_ref/doc/uid/DTS40013778-CH1-ERRORMESSAGES-UPGRADE_S_APPLICATION_IDENTIFIER_DOES_NOT_MATCH_THE_INSTALLED_APP
If you did not intend to change the AppID prefix then Xcode is signing your app with the wrong provisioning profile.
If you do intend to change the AppID prefix (because the app was transferred to a new developer, or you are migrating from an old pre-2011 AppID) you must contact Apple to migrate an existing AppID to a new prefix.
You must also add the previous-application-identifiers entitlement to your app, listing all previous AppIDs (with old prefixes). And you must ask Apple to generate a provisioning profile for you that includes the previous-application-identifiers entitlement.
I solved this without deleting the app
With the project open in xcode.
Project -> Build Settings -> Code Signing -> Provisioning Profiles (drop down)
It is probably set to automatic and is choosing the wrong profile. Open the drop down and choose the correct one, then re-run the app.
I faced the same problem and was stuck for several minutes and after a search, the simplest solution that i found is just remove the previously installed app from your device manually and try to run the app from Xcode again.
Hope it helps you.
All the Best...
Steps
With your device connected, and Xcode open, select Window->Devices
Now select the app and download the container using setting icon
Delete the app
Install app again using Xcode
Stop from Xcode
Go to Window->Device and select the app and replace the container that is backup from previous app
This can be caused by App ID prefix, when you switching different developer accounts. See https://developer.apple.com/library/content/technotes/tn2311/_index.html for Apple's support.
Explanation
For me, this issue happened because I have signed in with a different account than the account I have installed the app on the iPhone with.
Solution
Just delete the app from the iPhone and run it again from Xcode.
I tried a few thing myself like updating/making new provisioning profiles, fixing entitlements in Apple Member Center and in project but in my case, I simply had to delete the application and re-run it.
o_O
This application's application-identifier entitlement does not match
that of the installed application.
NOTE: it says "...does not match the installed application"
I guess it happened for me because we added a new app extension and there must have been some target related migration issues? Not sure but anyways
I found that I had accidentally changed the provisioning profile to have a wildcard in it.
Ie., it went from com.companyname.appnickname to com.companyname.*
I made a new provisioning profile with the full name correctly named, downloaded it, set the Target->build settings->provisioning profile to that new profile, restarted xcode, got a bizarre error from xcode (it seemed to confuse my various app developer logins), restarted xcode again, and it worked!
I didn't want to delete the existing app, because I was trying to test what happens when a user upgraded their app to a newer version, so I had installed the app store version and then run my xcode with the newer version (which acts like 'upgrading' the app without removing any user data).
I had the same error and I solved it by changing Bundle Identifier to something new. After that it build project with no problem.
My steps:
Open Xcode
Go to General tab
Find Identity
Change Bundle Identifier to something new.
This happened when I tried installing over top of an adhoc build.
In most of the responses to this issue, there's one critical aspect being overlooked that was brought up by the original asker. The app needs to be installed without deleting the existing install. In my case, the app uses an SQLite database that stores quite a bit of data for the user. Obviously, if you delete the app, then you delete the data. A solution that allowed me to test it in the same way a user will update it was a must.
In my case, the issue was Xcode using a provisioning profile automatically generated by Xcode. This probably happened because I got a new computer and didn't transfer the distribution provisioning profile over. Not to mention, I had not updated the app in almost 2 years. So my original provisioning profile (which contains the Entitlements application-identifier) was long gone. Solution: in Xcode preferences-> Accounts-> Select the appropriate Apple ID-> View Details-> Under Provisioning Profiles, right-click on the Xcode-generated profile for that app (it's prefixed with XC iOS), and select Move to Trash.
On the developer website, create a new distribution profile with your App's ID. Download the new profile, double click and Xcode should automatically install it. Conversely, you could return to the profiles listed in Xcode and tap the Download button next to your newly created profile. Build the app and try running again. By the way, my Xcode is set to automatically manage code signing, which other than this issue works great.
I had the same issue. The bundle.identifier and the name of the project has to be the same. At least that was my issue.
I had the same error until I restored the watch to factory defaults as per https://forums.developer.apple.com/thread/17948
"Apparently if you have and existing WatchOS 1 app and try to update it to WatchOS 2 the bundle identifier changes and causes this error. If you update your watch you will need to do reset it if you had installed WatchOS1 app before updating that app to WatchOS2."
Even though I followed some few logical steps: uninstall app, rebuild project, the only solution that worked for me was: restart XCode. (XCode 8.1)
TLDR - delete the app from the device and run again.
In my case :
1. I compiled and run the app on the iPhone device.
2. I open in the setting the Capabilities and turn on the iCloud
3. Then I try to run the app again, boom, error : "App installation failed
This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.
4.Then I deleted to app from the iPhone (after I read the answers here)
5.Everything works O.K
For the people who might be part of more than one team, this can be your problem:
If the app's bundle id is hard coded in your Info.plist then Xcode can get confused and throw this tantrum.
To fix:
Make sure that the bundle id is set as:
$(PRODUCT_BUNDLE_IDENTIFIER)
The accepted answer didn't work for me. To make it work I had to reset the Apple Watch to the last available backup.
Uninstall the main iPhone app, Watch app and build them again solves the problem.
I received this error after I moved from a 5s to a 6s.
I recovered the new 6s from a backup of the old iPhone.
Because of this on the new iPhone the old app was installed.
The old app did not show up in the 6s "Installed Apps" list!
I manually deleted this old app from the 6s and everything was fine.
I encountered this issue because I built to the phone with my code signing turned off from another machine, so you need to uninstall the app from the phone before installing/building to the phone with code signing on.
I faced the same issue today and resolving it by just changing the Display Name and Bundle Identifier from the previous App that also installed on my iPhone.
Steps:
Xcode -> General tab -> Find Identity -> Change Bundle Identifier
So, now I have two same Apps with same functionality but with two different names and identity.
In my case it was because of the certificate.
because my own certificate to sign the app wasn't part of the developper team (new employee), upgrading the app from the App Store to a new version wasn't allow.
So in case it happen to you and you can't manage to obtain a "good" certificate, just clone the git appStore version, open two Xcode projects, compile the old version, update the settings as you wish, the compile the new one and you're done.
a little bit dirty and tricky but I hope it could help someone.
My problem was the App ID in combination with the certificate used to create the provisioning profiles. None of my provisioning profiles were working because none of them were "Elgible" (created with a certificate that matched the App ID). I had moved development to a new machine, so perhaps this was the deeper reason. At any rate I had to create a new certificate, then new provisioning profiles with that certificate being careful to choose the right App ID when creating them. Good luck.
None of the answers above worked for me.
My problem: I had installed an App Version from Testflight, so, I just deleted both, the old app and the Testflight version, and is working again.
Accepting the pending agreements from the developer website and iTunes Connect website and reopening the project in X-Code solved the situation for me.
For me, this occurred after updating to XCode 11,
like the others have said, it is a signing issue.
What fixed it for me was to go to Developer portal > Certificates & Identifiers
Edit the provisioning profile you are using
List of certificates Screenshot
You'll see that there's certificate for XCode 11 (as seen on screenshot)
Just tick that box, re download the profile, and update your projects signing with the new profile.
With MacOS Catalina, your iPhone will be displayed in the 'Locations' sidebar of Finder windows (as long as you've got the Finder preferences set up to show external devices) - you can then access the files via the 'Files' option which is available from the bar near the top of the window, just below the title (in my case I had to click the '>' at the right).

Testflight doesn't show "Update Profile" Option anymore

I often had to change the provisioning profiles for my ios builds due to new testers/udids.
I had no problems following this guide Adding more testers to a build?
I updated my profile in the devcenter and made the upload, everything works perfect. But from today on I miss this option completely, the Update Profile Button and the complete row is just gone.
I googled changes regarding testflight but couldn't find anything.
Someone has a clue?
iOS 8 doesn't support installing provisioning profiles individually any longer. So this doesn't work on iOS 8 devices any more and you have to create a new build using the updated profile to add new devices.
I emailed TestFlight about that this morning and this was their response. Looks like it's for iOS8 as others have pointed out :
"Due to the changes in iOS 8, it's no longer possible for testers to install provisioning profiles from the iOS Settings app. App developers will now need to rebuild their Ad Hoc beta apps to update the embedded provisioning profile in the app's IPA file. If you need any help with this process, please let us know.
You can also find more information about updating provisioning profiles from the link below:
http://help.testflightapp.com/customer/portal/articles/829818"
I was able to change a particular build's embedded provisioning profile manually. Here's how I did it.
Download the build's IPA file from the testflightapp website. You can download it by accessing the build's share address in your browser. That's the https://www.testflightapp.com/install/BUILD_ID link that's shown on the Build Permission page.
Change the ipa file's extension to zip and unzip the archive.
Right-click and Show Package Contents on the single file inside the Payload folder.
Replace the embedded.mobileprovision file with your updated provisioning profile.
Recreate the zip archive and change its extension to ipa.
Upload that ipa file to test flight.
The option has dissappeared for me as well. I was also using the option frequently.
However, I did notice problems and the feature was no longer working once the iOS 8 GM was released on iOS 8 devices.
Even though I updated the profile, the build failed to install every time. (And now that you asked I noticed it's gone).
I also browsed through all the settings/permissions/etc, but it seems they removed the feature.
Since Apple acquired TestFlight, they changed the whole process for iOS 8:
No more provisionning profiles, only Apple ID's email.
1,000 beta testers and 25 internal testers per application.
https://itunesconnect.apple.com/ is the new testflightapp.com/dashboard/
I have successfully replaced my old process following this one: http://code.tutsplus.com/tutorials/ios-8-beta-testing-with-testflight--cms-22224

Xcode 6 archive for AdHoc distribution

I have to distribute an app via AdHoc distribution. With Xcode 5 after the archiving, I select the option "Save for enterprise distribution" and then insert the web url where I upload the .ipa and the .plist.
Now in Xcode 6 this option is disappeared and I can't able to generate .ipa and .plist, but only the .ipa.
There is someone that know how to create .ipa and .plist in Xcode 6 for upload this files on a web site to allow an easy way for tester to install the app on iOS7 where testglight doesn't run?
Solution 1):
Download Xcode 5.1.1. and install it separately from Xcode 6.1. (in a different folder).
This way you can generate .plist files easily since you mentioned that you need it for iOS 7.
You can always keep Xcode 5.1.1. around and open your current project from it.
Solution 2):
Use your old .plist files or create a new one :
Xcode 6 Save for Enterprise Deployment does not create plist for ipa anymore?
Solution 3):
Wait for apple to fix this "bug" in the upcoming Xcode versions :).
If you have a plist from previous exports, you can use the same one. I distribute an app using enterprise deployments and all I do is create the ipa and upload it to the server. I created my plist file quite some time ago. You can also update the data in there if you need to, but so far I have not run into any issues with pushing a new version with out updating that file.
When you press export you get 3 options one of them is save for enterprise deployment.
But you can use testflight instead and save the app for adhoc deployment.

TestFlight beta-testing iOS app

I completed to develop my first app. Right now i want to distribute my beta throught https://testflightapp.com
I tried to create .ipa file with this tutorial - http://help.testflightapp.com/customer/portal/articles/402782-how-to-create-an-ipa-xcode-4
In the very beginning i should select Entitlements, but there is not such category as Code Signing..
Any helps? Thnx.
PS I have a developer account.
UPD. Does somebody create ipa files for TestFlight on XCode 4.3? How do you do that?
I skipped entitlements altogether. With Xcode 4.2 and later I have not needed them.
Make sure your Archive Scheme uses your Debug configuration. Then just do an Archive of the project (under the Product menu). Save the Archive someplace. Then drag that Archive file onto the TestFlightApp's green "Upload Build" button. That easy. No messing around with entitlements, etc.
Before you do this, make sure you can actually build a correctly formed archive by building, and e-mailing it to one of your testers and see if it can be loaded. There are a bunch of things that have to work before you can use TestFlightApp. Just because you can Build and Run from Xcode doesn't mean that it will work on a remote device that doesn't already have your provisioning file. For example, you have to have your App ID, provisioning profiles and Device ID's all configured correctly via the Provisioning Portal. Once I did that, and verified that my .ipa files can be installed manually, then just uploading to TestFlightApp.com worked without having to do entitlements.
I wrote this up and put it on TestFlightApp's support forum, but for some reason TestFlightApp.com won't let me into the support area so I can find it - I can't use my login to access their "Tender" account.
That's because that tuturial was done for another version of Xcode.
Just create a new property list file (Entitlements.plist) in your Xcode project and it let you edit it as a Entitlements file just fine.
The What's New in Xcode (pdf) documentation states that:
The iOS platform has supported entitlements for a while, and with Lion, Mac OS X does as well. With Xcode 4.1, the project editor provides a UI for setting up entitlements for Mac OS X applications. You can set entitlements for each target in the project editor. There is also a default code-signing entitlements file available in the file templates in the utilities pane.
In the Summary tab of your project editor is a section titled Entitlements. Check the "Enable Entitlements" box to have Xcode automatically create an Entitlements plist for you. This section also governs the entitlements' interaction with iCloud and Keychain.

Resources