Unable to use Beta with new devices id's for XCode 8.3.2 - twitter-fabric

Fabric mac app 2.6.11 will not get new provisioning profiles from xcode 8.3.2. After adding new device ids to developer.apple.com, going to Xcode File -> Preferences -> Accounts and clicking on Download All (no other option is offered) and going into Fabric, Archive, Distribute - the devices are still showing as not being added to the provisioning profile.
There is no longer the option of deleting profiles in XCode. There is only Download All.

Mike from Fabric here. Based on similar questions in SO, it appears that the way to do this is to close Xcode, then run the following command:
rm ~/Library/MobileDevice/Provisioning\ Profiles/*.mobileprovision

Related

How to distribute iPad app as in-house app?

I developed some 3 apps for my organization and we want to distribute it to some 30 iPads in the office. I am tying to find a step by step process to do it. But didn't find any so far. The methods I tried and failed are the following,
I took the app (with .app extension which can be found in ~/Library/Developer/../IOs_Release) and provisional certificate and dropped them in iTunes library. After that I connected a new iPad (not a registered as development device) to my mac book. Through itunes, I tried to sync the app. But an alert appeared on the ipad showing "xyz app is failed to install"
I tried the ad hoc distribution. First I archived app in the xcode archive and clicked distribute button. A wizard appeared asking for what kind of distribution do I want. I selected ad-hoc distribution and it automatically selected my iPhone distribution certificate and processed and gave me .ipa file. I tried installing it in the iPad by itunes sync and it gave me same error.
It would be great to get steps for in-house app distribution since they are nowhere to be found.
Check out my answer to another person's SO question HERE
This assumes that your organization is setup with an Enterprise developer account.
There is a project called iOS Beta Builder, check the below links:
Introducing iOS Beta Builder
iOS Beta Builder GitHub page
iOS Beta Builder Mac AppStore
The provisioning profile used for the adhoc build must have a reference to the 30 devices.
Go to the Provisioning Portal and add all 30 devices under the Devices section.
Then add those devices to the adhoc provisioning profile (Provisioning, Distribution).
Once added, download the updated provisioning profile and install it in Xcode. Delete any previous profile.
Build and Archive the app. Make sure the archive build is properly setup to use your adhoc provisioning profile.
Use the Organizer to save the ipa file from the archive build.
Drop the ipa file into iTunes. Now sync each of the 30 devices to include the app.
Xcode - Product -> Archive
Distribute -> (Select) Save for enterprise or Ad-Hoc Development (Next)-> Code sign identity (select your profile)-> save File on disk -> distribute project.ipa file.

Xcode 4.3.1 "A valid provisioning profile for this executable was not found"

Tonight I upgraded from Snow Leopard to Lion, and upgraded to Xcode 4.3.1 (iOS 5.1). And now when I try and run debug mode on my device (iPad) I get "A valid provisioning profile for this executable was not found". I have tried every suggestion in past posts on this issue. I have generated a new certificate. I have set my code signing to use the new certificate. I have updated the provisioning profile to use the new certificate. I have gone into the .pbxproj file and deleted all references to the provisioning profile. I have cleaned and closed Xcode a million times. No matter what I do, I still get the same error when trying to run on the device.
In Organizer, the provisioning profile shows up as "Valid profile" in my Library, but under the Provisioning Profiles listed for the device there are none listed. I have tried clicking the Add button and importing it manually - nothing happens. It doesn't show up. When I click on the device icon in Organizer is says "Provisioning No provisioning profiles". However when I go to my iOS Provisioning Portal online and click on the device, the provisioning profile shows up there as being associated to the device.
Any ideas? I am pulling my hair out here.
Do you by chance have two developer accounts with different sets of devices/apps? I encountered this situation (see what "iOS Team Provisioning" profile is matching "iPhone Developer"). The only way I have found to switches teams, so to speak, is to select your device and click "Add to Portal" and log in with the correct Apple ID.
The solution that worked for me was:
-Deleted all references to provisioning profile in .pbxproj.
-Deleted all certificates in keychain.
-Imported my certificate to keychain.
-Created new provisioning profile and configured it in developer portal.
-Refreshed provisioning profiles in xcode organizer.
-Deleted the wildcard provisioning profile that xcode automatically adds.
-Went into code signing and selected the signing account associated to the correct provisioning profile.
-Plugged in a different iOS device (switched iPad with for fresh iPhone)
-Built for a new iOS device.
And it worked. Not sure which step was the magic one. I did not reinstall xcode.
Make sure there is a valid private and public key generated for the profile. More importantly make sure the keys are stored in the right place in keychain.
They should be under login, not system or any other spot. This was causing and issue for me, and it took me a while to find the solution.
Hope this helps.
I have seen this problem before, and my "standard" solution is
a) make a new dummy iOS project , using Xcode menu - file - new - project. Check code signing is your developer certificate. Compile and see if it can run on your iPhone/ipad hardware.
If a) fails, it is something with your certificates and keychain. Clear all and make new certificates
If b) works, it is something in the .xcodeproj file or build folder for your problem project. Remove all files and folders in build. Use your backup (sure you have a daily backup for your project!!!), and copy an "old" .xcodeproj file to your problem project. Use Xcode - project - clean, xcode - project - build as - testing , and hereafter "run".
Before trying above solution, make an extra backup.
good luck, and remember you are not the first having certificate problems.
In my case the problem was not at all related to keys, certificates, provisioning profiles or any other of the reasons mentioned here and everywhere else. It turns out that some other developer in a different team borrowed the iPad we use and changed the device's date to one year in the future! After I set the correct Date and Time and ran the application on the device everything worked just fine.
Unfortunately Xcode didn't warn me about this, and it was until I needed to fix another unrelated problem that Instruments informed me of this situation about the wrong date on the device.
Simply check "Code Signing" section in "Build Settings". If you previosly build your app for appstore publication maybe you forgot change from distribution profile to development profile.
If you are on Xcode 6, and running into this problem when adding a new device (iPhone 5/6), you can follow the steps here:
https://stackoverflow.com/questions/22993092/a-valid-provisioning-profile-for-this-executable-was-not-found-error-when-tryi/26153171#26153171

Ad hoc distribution: App failed to install

I have created an ad hoc archive and a .ipa file for the application I am trying to distribute. I have also created a distributing provisioning profile with the UDIDs of the devices that I plan on distributing my application to. When I drag the .ipa and .mobileprovision files into iTunes and try to sync the application to the device, an error message on the phone pops up reading "'myapp' failed to install". By the way, I have a standard iOS developer's license ($99 per year) and am using Xcode version 4.2.1. I am pretty new to the developer program, so please try to keep your answers as simple as possible. Let me know if you need any extra information. Thank you!
I had the exact same issue. My issue was simple to fix. Check your Code Signing Identities for Project & Target in your project Build Settings. Mine were pointing to my Development Profile.
The Code Signing Identities need to point to the Ad hoc Distribution Profile that you created.
Make this change and then recreate the Archive and .ipa file. I then deleted the old App in iTunes, and then dragged the .ipa file onto the iTunes icon (Windows). Then I was able to use iTunes to install the App successfully.
My problem seemed to be Xcode. I had multiple copies of the Ad_Hoc profile with different expirations (all valid) and a few with different names from the days. I deleted them all and the app still failed to install, but I noticed all the Ad_Hoc profiles had been resurrected by iTunes. Tried it several times and including deleting them from the Organizer, but they always resurrected (reappeared installed on the device). Finally I drug out a copy of the supposedly extinct iPhone Configuration utility and used it to delete the app and all Ad_Hoc profiles. Then tried to install just the profile. That got it down to 2. Finally got all deleted and got iTunes to install the right profile. Still took 2 more attempts for iTunes to finally install my archive file!
Check this .
Don't need to drag both .ipa and Provisioning Profile.
Just Drag the .IPA File Follow Further steps as you.
Set install owner param in Xcode project / Deployment to the name you specified in apple dev license. I set both install owner and alternative install owner and Install Group and Alternative Install Group to my name which the 100% exactly as in my apple development license.
And the error was gone.
I was having a similar issue where my project was stored on a secondary NTFS drive. After moving the project over to my desktop [aka MacOS Extended (Journaled) drive], I was able to load the ipa file via itunes.
Another point: If the store version of the app installed on your device (or a version deployed another provision), you have to remove it from your device before installing the ad-hoc version.
I solved the issue by not trying to sync with iTunes but instead to sync it within Xcode (from the window->devices menu)

Using provision profile for Lite version of App

I've released an app and now i'm planning to release a Lite version of the app. So i copied and pasted the project folder in Documents - Xcode Projects, and the renamed it Lite. I've amended the relevant code and can run it in the simulator, but as soon as i come to put it on an actual device it says errors like A valid provisioning profile for this executable was not found. and various others. Does anyone have a quick bit of advice about developing a second app and what provisioning profiles to use for it or what would someone do in my situation (having essentially duplicated a Xcode project folder - did that cause a mess?)
Thanks
You need a new provisioning profile since each application is unique. If you right click on your project in the left sidebar and select get info after downloading and opening your new provisioning profile, you can select the new one.
Every application (and device) requires its own provisioning profile to run on an iDevice. You'll have to go thru the process again to get a provisioning profile for your lite app.

A valid provisioning profile for this executable was not found for debug mode

I am getting this error while I am trying to debug my app on device.
I created development provisioning profile as it is mentioned at the developer portal. My development device is selected in the profile and I am selecting the correct profile from Target's code signing identity menu. I recreated provisioning profile for several times and also removed and reinstalled it and recreated the project but I am getting that whenever I try to debug on device.
Btw, the adhoc distribution provision profile works.
I spent my whole day to find out a solution but nothing. Anyone have a solution?
It could be because your iphone is not recognized by the provisioning portal.
Solution:
In Xcode, Goto --> Build --> clean all targets.
In "Groups & Files" -->Target --> expand it --> right click your app and select Clean "your app"
Goto->Window-->Organizer
In the Devices tab on the left, select your iphone
In the Provisioning section of the selected iphone delete all the current profiles (if any)
Unplug your iPhone and replug it in.
Goto->Window-->Organizer-->right click your iPhone -->Add device to provisioning portal
Now make sure you have selected the appropriate code signing identity in edit project settings -> build --> code signing
Build and run.
In Xcode 10, I solved this by switching the project's build system from "new build system" to "legacy build system" (File -> project Settings).
I had the same problem. Everything was ok:
the device was registered in IOS Provisioning Portal; the certificate was downloaded and the Development Provisioning Profiles for my app was downloaded.
So the solution!!!
Target> Get Info
Select Configuration to Release (here's the devil)
In code signing, Code Signing Identity check iPhone Developer. Close.
On Target chose Clean Target and then Run the app.
Good Luck.
In my case this was because there where a couple of versions of the developer certificate in the keychain.
Deleting the iPhone Developer cert from both My Certificates and Certificates and then downloading the latest one from the dev centre and installing that (double click on the .cer file)
sorted my problem
Finally i could solve the problem. One of my colleagues has revoked the developer certificate at iOS Provisioning Portal for his test apps. for fixing; i removed the existing developer certificate at my keychain, requested a new certificate with the existing private key, revoked the certificate from provisioning portal and submitted the newly requested certificate.then i downloaded and installed it.
now i can debug my app on my device :)
This caught me out because someone had changed the "Run" configuration's "Build Configuration" setting to "Release" (under "Product" > "Edit Scheme.." > "Run *.app").
This is normally set to "Debug" and hence it was NOT using the developer certificate and provisioning profile that I was expecting, it was using the distribution certificates instead.
In addition to this I found that if you look in the Console Log for the device (via Organiser), there may be an error code that better indicates your problem. For example I had...
Mon Sep 5 09:39:56 unknown installd[304] <Error>: profile not valid: 0xe8008012
I then googled "0xe8008012" and got the following page which indicates a "0xE8008012 - The UUID of the device does not match any in the Provisioning Profile being loaded" error.
MobileInstallation
Xcode->Click your app -> TARGETS -> click the app-> Build Setting-> Code Signing : Make sure that both Debug and Any iOS SDK are set to iPhone Development
Xcode -> Product -> Scheme -> Edit Scheme: Make sure Build Configuration is set to Debug.
I had the same issue with Xcode 10.0 beta 5 (10L221o) and a device running iOS 12.0 (16A5345f) - that's also beta.
After installing the app alert titled "App installation failed" showed up, "A valid provisioning profile for this executable was not found.".
I got rid of it by going to: ~/Library/MobileDevice/Provisioning Profiles and finding the certificate Xcode was trying to use. Then in the "Devices and Simulators" window in Xcode, I right clicked on my device, choose "Show Provisioning Profiles" and with a plus button added the provisioning profile to the device there.
I don't remember when I've done it last time, it's been years. I guess that Xcode normally does it for us but for some reason, it fails when we see that message.
In my case this problem occurred because another provisioning profile was selected for the unit tests. Just took me hours to find this ...
With Xcode 6 and a new device:
Press cmd + shift + 2 to open devices.
Press the "register device" button. If there is no such button (like in the screenshot) go to developer.apple.com and add it manually. Copy the Identifier into the field.
Go to Xcode -> Preferences -> Accounts -> Doubleclick on your account -> Press the little refresh button on bottom left to refresh the profiles
Go to Code Signing and set the new profiles.
We can try this: This has solved my problem . You need to reset the profile for which your device id has been added into your member area of Apple.com . .
Assuming you have your development and distribution certificate installed correctly:
Under Project your main code signing identity should be the developer profile for that app.
Under Targets your main code signing identity should be the distribution profile for that app, except that you should change Debug > Any iOS SDK to your Development profile... and make sure Release > Any iOS SDK is your Distribution profile. This should build and run on your provisioned phone and should archive without any codesign warnings.
Only thing that worked for me when my phone crashed and I had to restore it from a previous iTunes image.
This solution worked for me
Go to Xcode --> Preferences --> Account.
In the provisioning profiles section, right click and open with finder.
Delete all provisioning profiles from the provisioning profile folder.
Finally, go back to Xcode and click the refresh button.
I hope that helps!
I had the same problem. what I did is:
1. clean the target
2. exit the xcode
3. restart xcode
4. rebuild.
and it worked.
Another cause (verified):
Apple has a major bug in Xcode going back to version 3.x, where it magically overwrites the OS X keychain with a fake keychain from inside Xcode, re-installing certs (and private keys!) that you already deleted
...so, if you have "new cert" installed, and nothing else, Xcode will sometimes get into an infinite loop where it will keep ALSO installing "old cert" (that doesn't exist anywhere except inside XCode!).
...and because of ANOTHER bug in Xcode (unfixed for 3+ years now...), Xcode sometimes automatically selects the "oldest cert I can find" (whcih, by definition, is incorrect - I think someone at Apple got mixed up between "oldest" and "newest" :( )
...and EVEN THOUGH you've selected the correct provisioning profile, Xcode sends the "old" provisioning profile to the device, then signs with the "new" profile, causing this error
Solution: you have to un-FUBAR Xcode's FUBAR of your Keychain.
This is harder than it sounds (there are multiple SO posts on this topic) - it involves multiple reboots of your machine, deleting the key every time.
Eventually, Xcode gives up on corrupting your OS, and accepts the reality you present it with :).
Changing the provisioning profile to automatic then running prompted Xcode to "fix" the issue. I then changed back to my original provisioning profile and everything worked fine.
In my case a valid provisioning file is because I didn't add the device to the very provisioning file.
Had the same problem. My solution was very easy. I checked If I have my device's UDID in developer.apple.com and it was absent. After I added it, it starts working. It is very annoying that Apple developers give error "A valid provisioning profile for this executable was not found" instead of "UDID is not found". Actually I mentioned it first in XCode 6...
In my case, it was the problem when I setup my time manually two month earlier on my iPhone. But when I changed to set time automatically, it worked fine.
Setting -> General -> Date & Time -> set time automatically
If it does not work set time automatically of both mac & iPhone, will work fine.
Remove certificate, profiles and recreate it. Install it. Thats the best soultion.
In my experience this problem happens if you try to build on a device that is not registered in your developer center or is not enabled inside provisioning profile that you are using.
1) Add the device to the developer center.
In XCode 5 you'll still find a button "add to member center" inside the Organizer window.
In XCode 6 i suggest to copy the device ID and manually add it to the device section of your member center.
2) Edit the provisioning profile you're using to include the device you have just added. Save and synchronize provisioning profiles from XCode.
Clean, and it is on.
One of the cause could be your "project => Build Settings => Signing => Development Team" is different from your "target => Build Settings => Signing => Development Team", just make them same
After select auto manager signing
You may still need to check the selection in settings. Sometime, it's not correct there.
I had a certificate that expired (which generated the error).
Step 1. Go to developer.apple.com, login, and go to IOS provisioning portal
Step 2. Go to certificates (which is now empty), and follow the instructions listed to create a new certificate (open keychain on your computer, create a signing request, save it to disk, upload it to apple)
Step 3. Download and install the files created by apple to your keychain
Step 4. Problem: all of your previous provisioning profiles were associated with your OLD certificate, so you need to go back to developer.apple.com->IOS provising portal-> provisioning profiles and 'modify' each profile you care about. You will see that your identity is no longer assicated with the profile, so just click the check box
Step 5. Download all the profiles you changed
Step 6. Plugin your phone and drag and drop the .mobileprovision file onto xcode icon in the dock bar to install them on the device
I saw this problem because I had obtained a new Mac, and was still using my old Computer's certificate. I had created a new certificate for the new Mac, but had both certificates in my keychain.
In the Organizer, the profile warned that "XCode could not find a valid private-key/certificate pair for this profile in your keychain" even though the old certificate existed in my Keychain.
The solution was to delete the old certificate from my Keychain and delete/revoke of all the profiles which used this old certificate. Then create a new profile with the new certificate and use this.
Hope this helps!
Bringing an app up from Xcode 3 to 4.3 I found the Bundle name and Bundle identifier had to be set to match the AppId.
If all else fails, give that a whirl.
I faced same issue there may some other reasons too:
While testing i set my date to some future date and profile got expired. As result this issue was generated.
But i solved by setting date of iphone to current date as a result profile was not expired.
I'm compiling my app in Adobe Air for iOS, not Xcode. I was trying to copy the .ipa using iTunes, and got a mysterious "Error installing app" message. It wasn't until I used the iPhone Configuration Utility (iCU) that I got the real error message.
The problem was that I was compiling the app with a provisioning profile for ad hoc distribution and a certificate for development. I didn't understand that there are 2 types of certificates, and 2 types of provisioning profiles. There's one of each for development and one for distribution. If they don't match... then you get that error message. It's obvious once you understand it...
The solution was to download the distribution certificate (.cer), double click to open in Keychain, and export that as P12 from KC directly. Then use that P12 distribution certificate in the publish settings (Flash IDE or Flash builder), and also use the provisioning profile used for ad hoc distribution (.mobileprovision). Then finally install the provisioning profile and the .ipa file using the iPhone Configuration Utility.
That did it for me.
In my case my provisioning profile was invalid because apple has changed some of its terms and conditions. To fix problem I had to
delete previous profile.
I had to accept terms and condition from this website of apple.
Click Your app from Xcode Under Targets. (Under project.) Here you see Summary info, build settings, Build phases, build rules.
Okay go to Build Settings. Go down to Code Signing.
You see you have two fields Debug and Release. You have two profiles to choose from in each of those fields, Distributing and developing.
Let distributing be the one from the Release field. Let Developing be the one from the Debug field.
Doing this solved this problem, and let that error message go away. Now I can run my application fine.