How to clean xcode user specific settings (organizer, provisioning profiles)? - xcode

My xcode is crashing when i press the Refresh button in organizer. Seems there is some problem with certificate and provisioning profile.
If i log in as another user in the same mac, everything is working fine.
So, can I clean the user specific settings without affecting the xcode installation? Like cleaning the organizer settings, provisioning profiles, etc.?

Here's Apple's official workaround:
Run /Applications/Utilities/Terminal.app and execute the following statement:
mkdir ~/Library/Developer/Xcode/OldPortalDBs; mv ~/Library/Developer/Xcode/connect1.apple.com* ~/Library/Developer/Xcode/OldPortalDBs
See: Xcode 4.6.1 crashing while interacting with the developer portal

Related

Xcode 8: Your account does not have sufficient permissions to modify containers

I'm getting this error with code signing with Xcode 8:
Your account does not have sufficient permissions to modify containers
What does it want from me?
I also faced this issue in XCode 8.3.3 (8E3004b). I just went to Project Settings → Capabilities tab, then toggled iCloud off and on. Once I went back to the General tab, the errors were gone.
This seems like it may be a bug with XCode 8.
To resolve this, I unchecked the "automatically manage signing" checkbox in the of my target's General settings. I then archived my project by manually setting the provisioning profiles. After that succeeded, I went back and again checked the "automatically manage signing" checkbox and it stopped complaining with errors that made no sense.
Just had this issue with XCode 8.3.2 after we enabled iCloud Capabilities and the entitlements changed. We use automatic signing - xcode managed profile. Going into Xcode -> Preferences -> Download All Profiles wouldn't fix the problem UNTIL we temporarily made team members Admin and repeated the process. At that point XCode realized the new provisioning profile and the problem was solved.
Just goto Xcode capabilities section and see if any of the capability showing error then disable that and enable again. Then come to your Signing section in General. The issues will go now
1) Remove all automatically created provision profiles from
~/Library/MobileDevice/Provisioning Profiles/
2) In Xcode 11.1 and higher remove and add capabilities
I faced this issue in XCODE Version 8.3.3 (8E3004b). To resolve this go to project settings. In capabilities tab -> iCloud -> containers. Verify whether valid iCloud containers are selected and you have permission to access these containers. This should resolve the issue.
I was having the same problem too after I added a new device with Xcode 8.3.3 (same issue present in Xcode beta 9.0 as well). My Apple Developer account wasn't an administrator at the time either. I tried deleting my provisioning profiles and re-downloading them but that didn't work. I tried manually downloading and installing the provisioning profiles from developer.apple.com, but that didn't work either. I had my Apple Developer account made an Administrator following advice from dchappelle https://stackoverflow.com/a/43812123/5760384 and voila! The provisioning errors went away. (I'd reply to his post, but I don't have enough reputation.)
Full text of error:
Your account does not have sufficient permissions to modify
containers. Provisioning profile "myApp" doesn't include the currently
selected device "myDevice". Code signing is required for product type
'Application' in SDK 10.3
Another potential solution, depending on your needs, is to upgrade to the paid version of the Apple Developer Program; this gives you access to the iCloud container features. Once paid and activated (the membership application takes a few hours to go through if you're an individual... sometimes a few days if you're a business) you'll need to enable iCloud features via the online dashboard or via XCode as per Apple's instructions. You may then have to restart XCode.
I had the same issue with Xcode 9.2. But in my case, the problem was in Keychain: my dev certificate was saved into login keychain by default. I was able to build an app on a device only when I moved it to System keychain.
So the steps are next:
Open Keychain Access
Open login keychain (you can see the list of all keychains on the left top corner of the window)
Drag and drop your dev/distribution certificate into System keychain
You may need to input password.
PS: while doing this steps you also may need to unlock locks on the keychains.
I had this problem and I fixed it by logging in to the iTunes development portal and accepted the new Terms & Conditions. I was basically locked out until these were accepted.
I was getting this error because I was in another team (my university team account), which was severely limiting my access to developer.apple.com features. Once I left that team (I added an answers here because even this was a bit of a pain), I was able to remove & re-add my account to XCode. It then worked.
EDIT: It happened again on a new machine (an M1 mac), and this time I had left the university account. By removing and adding back "Apple Pay" capability in Signing & Capabilities, it immediately fixed itself.
None of the other answers worked for me. E.g. The app doesn't even use iCloud, and enabling-disabling it didn't help. Deleting profiles, revoking certificates, disabling/re-enabling automatically manage signing also didn't help.
Go to Xcode -> preferences -> Accounts.
Remove your Apple ID & login back. Refresh the signing in on your project target
I had the same issue using Xcode 9.3
Solution:
1 - Deselect "Automatic manage signing"
2 - Created a Provisioning profile for dev and dist and added in Keychain.
3 - Again when you come back to Sighing (debug and release) you can see your created provisioning profile in a dropdown
4 - Crate archive by selecting "Generic iOS devices" in the project schema

Xcode crashing when fetching team list

So basically Xcode 6.1 is crashing whenever it's trying to get team list. From the general tab in the main screen, when trying to submit the app to iTunes, trying to validate the app.. whenever it tries to get team list, it crashes. It is working fine an hour ago but when we added some team members in the iTunes account for internal testing, it started crashing.
Any ideas?
Same problem here, however it's possible to compile and generate a .ipa file by the command line interface:
xcodebuild archive -project $projectname.xcodeproj -scheme $schemename -archivePath projectname.xcarchive
xcodebuild -exportArchive -archivePath $projectname.xcarchive -exportPath $projectname -exportFormat ipa -exportProvisioningProfile “Provisioning Profile Name”
Hope this could help.
I was crashing too (while fetching teams) and I finally got it fixed...
Open Xcode -> Preferences -> Accounts
Check that each of the accounts is valid. I had two there that were expired/old developer accounts, no longer in use. I removed both of them and now the crash is gone for me.
Hope this works for you :O
We find a solution.
You could use Shenzhen. This is a command line util developed by Mattt Thompson.
Install:
$ gem install shenzhen
If you see permission errors, you can execute the command with sudo
After install, go to project folder and:
$ ipa build
Before, you need to configure your build settings on the XCode Project like usual.
More info and examples here: https://github.com/nomad/shenzhen
These save my day, I hope the same for you :)
Try uploading with Application Loader
Xcode -> Open Developer Tools -> Application Loader
Enter the iTunes Connect details.
TL;DR: If you think old accounts are to blame, try 'fixing' them by joining the Safari Developer Program (free).
Why I tried this:
I couldn't open the accounts tab or any dropdowns related to accounts. I had an old iOS Developer account, that had expired.
Ultimately I decided my old account was corrupt on Apple's side (somehow) and logged into their certificates page.
Not wanting to pay the $99 --to join the iOS program--, just to fix a crashing xcode I signed up for the free Safari Developer program.
Instantly my account in xcode stopped causing crashes.
Looks like Apple "fixed" the problem by Sunday (11/16). I was experiencing it too, and none of the suggestions worked for me. On Sunday it was magically working again.
I followed #cclogg's advice and saw that there was an expired account that was crashing. However, it wouldn't let me select the account without crashing XCode. I was only able to do this by selecting two accounts together and this prevented XCode from trying to fetch account information.
After that, I clicked on the minus button to delete both accounts. I figured it would be easier to re-add the second account. And now, the crashing problem is gone.

Xcode tries to install Distribution Profile to device

So, I built my app for App Store submission using my distribution profile and submitted it fine.
Now, i come to test my new update on my iPhone, and Xcode keeps telling me
"Cant run 'my app' on iPhone 'Joes iPhone'.
The iPhone “Joe’s iPhone” doesn’t have the provisioning profile with
which the application was signed.
Click “Install and Run” to install the provisioning profile
“Distribution Profile” on “Joe’s iPhone” and continue running “myapp.app”.
My configuration is Debug, and the code signing identity is set to iPhone Developer, in both the project and target settings.
How can i get Xcode to start using the developer profile again?
Thanks
I had to go to the Project menu and select "Edit Active Target" -- even though my provisioning profiles were right, that target was still set to my App Store release profile, not my development profile. I don't know the root cause of this, but it did fix the problem.
This is okay. If you click on "Install and Run" XCode will install the provisioning profile to the phone, then will install the application and run it.
Moszi
Redownloaded certificates and cleaned all targets

xcode build to iphone chooses old invalid provisioning profile

I've just gone through some pain with iphone and xcode upgrades and keychain failures etc and decided to uninstall xcode completely and re-install. This fixed my keychain issues however the project I am working on appears to be linked to an old invalid provisioning profile.
I've deleted the profile from "Provisioning Profiles" in organiser, and removed it from Provisioning on the Iphone section of Organiser. However when I build an go with the iphone sdk rather than simulator i get the pop up "codesign wants to sign using key "OldKey" in your keychain".
It appears the actual app is associated with the old key and I can't seem to find how to point it to the new valid one.
Crazy thing is at some point I managed to get it to work and install but the application crashed and won't open. I've not managed to get it to install again.
Any ideas?
I ran into a similar problem. To fix:
1) In organizer, delete the profile from the phone.
2) Also in organizer, delete the profile from the Provisioning Profile list.
3) Finally, search your computer for provisioning profiles and delete the old ones directly.
After that, drag in the new profile and it will work.
This caused me all manner of problems! Open the app.xcodeproj package and drag & drop the project.pbxproj file into text-edit. Do a search for "PROVISIONING_PROFILE" and delete the profile ID. restart xcode and build, hopefully it should pick up the new provisioning profile and forget about the old one that was causing you issues.
Note: Be sure to do a backup of the project.pbxproj file before editing it.
xCode 4 -reinstalls keychain certs that I delete

iPhone Debugging: How to resolve 'failed to get the task for process'?

I have just added a provisioning profile to XCode (needed to support notifications and in app purchase), setup as needed the build configuration for ad hoc distribution, and tried to run the app on the device (I have done this several times in the past, without any problem).
The app is installed, but it does not start. On the console, I see the following message:
Error launching remote program: failed to get the task for process 82.
Error launching remote program: failed to get the task for process 82.
The program being debugged is not being run.
The program being debugged is not being run.
However, if I start the application on the device manually, it works as expected. I have recently installed the latest XCode 3.2 for Snow Leopard. Is this a known bug of this version of XCode or am I doing something wrong?
EDIT: It works fine with release distribution using the development provisioning profile.
I have checked again the ad hoc provisioning profile to make sure it includes the device I am using.
The ad-hoc profile doesn't support debugging. You need to debug with a Development profile, and use the Ad-Hoc profile only for distributing non-debuggable copies.
I have had problems debugging binaries on the device via XCode when the app includes an Entitlements.plist file, which is not necessary to install onto the device for debugging. In general, then, I have included this file for release builds (where it is required for the App Store) and removed it for debugging (so I can debug the app from XCode). That may be your problem here.
Update: As of (at least) August 2010 (iPhone 4.1 SDK) the Entitlements.plist is no longer necessary to include in your application in many cases (e.g., distribution through the App Store.) See here for more information on the cases when Entitlements.plist is required:
IMPORTANT: An Entitlements file is generally only needed when building for Ad Hoc Distribution or enabling Keychain data sharing. If neither of these is true, delete the entry in Code Signing Entitlements. (emphasis mine)
I Had the same issue, but resolved it by following simple following steps :
Make sure you have selected debug rather than release.
In Debug configurations, in project settings, you should have selected developer's profile & no need of specifying the entitlements plist.
Also same setting are there under: Targets: , if not manuall change them to the above for the debug config. It will work.
All the best.
This took me a while to figure out.
If you are using a distribution / ad hoc/ profile you cannot test it through xcode. You will get the error: The program being debugged is not being run.
You can build the app, go to the products folder in your app in xcode, click on the file with your project name and choose reveal in finder. You can drag this app into into iTunes and sync and that point you can test your app on your device.
If you are getting such error, the only reason could be you using a Distribution profile rather than a development profile in Xcode or a missing Entitlement property. If you are not using the Entitlements.plist, then the only possible error could be the app is getting packaged with a distribution profile. You could verify this confirming the build logs. To change this, go to Build Setting of the project and verify Code Signing Entity setting. For debugging to work, this setting should be a developer profile for the configuration that you are currently using.
https://developer.apple.com/library/ios/#qa/qa1682/_index.html
For instant results, delete all mobile provisioning profiles from xcode and install the developer profile that you intend to use.
Almost 2hrs on this issue! And finally I solved it by replacing the
iPhone Developer
to
iPhone Developer: My Dev Account Name
for Debug's CODE_SIGN_IDENTITY:
Select Project Target
Build Settings
Search by "code sign"
Modify CODE_SIGN_IDENTITY section's Debug row with "iPhone Developer: My Dev Account Name", not just "iPhone Developer".
I've no idea why it works, but it does! At least for me!
Environment: Xcode 5.0 (5A1412).
Check ur code signing section.make sure that the code signing is iPhoneDeveloper code signe
Open Entitlements.plist and set the boolean value get-task-allow to YES - the debugger can attach now!
Go to Edit Schemes and under Run -> Info -> Build Configuration, change from Ad-Hoc to Debug. Click OK to save.
It might be that you have an expired development profile on your phone.
My development provisioning profile expired several days ago and I had to renew it. I installed the new profile on my phone and came up with the same error message when I tried to run my app. When I looked at the profile settings on my phone I noticed the expired profile and removed it. That cleared the error for me.
I received this error when I tried to launch app from Xcode as I figured I had selected distribution profile only. Build was successful so I created .ipa file. I used testflightapp.com to run the app. You can use iTunes as well.
As stated by Buffernet, you cannot use a distribution provisioning profile to debug. When I switched to a developer provisioning profile, I got the error "A Valid Provisioning Profile For This Executable Was Not Found".
A quick google for this lead me to the article listed below. From there, I realised that I hadn't got a valid development provisioning profile as my iPhone hadn't been added to the Provisioning Portal and all the other stuff involved.
Make sure you run an iPhone developer provisioning profile and your device has been added to the provisioning portal!
http://iosdevelopertips.com/xcode/a-valid-provisioning-profile-for-this-executable-was-not-found.html
Yes , Provisioning profiles which are for distribution purpose, i.e. Distrutions provisioning profiles do not support debugging and gives this error. Simply create and use debug provisioning profile (take care of this when creating provisioning profile from developer.apple.com account).
I just changed my bundleIdentifier name, that seemed to do the trick.
I've patched my project with JailCoder http://jailcoder.com/ and problem resolved.
Just download It and drag your xcode project to It.

Resources