When is it worth to set in Xcode > General > Team and is it worth to leave empty? - ios

I am curious, when do I need to set / change Team setting in my project.
Is it Project based setting or relating all the projects opened in Xcode?

This allows Xcode to automatically download and create provisioning profiles, certificates, provision devices etc. If you're developing on the simulator you don't need to turn it on. If you have an iOS developer program account add it in Xcode's preferences and then select it here. In the old days all the stuff you had to do manually through the developer center now gets done automatically by setting the team in Xcode. The reason it is a dropdown is incase you are a member of multiple developer programs (e.g. a freelancer or a business account and a personal account). You can then choose the team based on the project you're working on.

Related

Development Team not populating in xcode

I recently got invited to an Apple Developer Team. When i log in via the apple.developer.com portal, I can clearly see the Apple Developer Program that I am apart of.
However, whenever I try to sign into xcode using my apple ID, I am only given the option of Name (Personal Team) and not the development team that I am apart of.
Has anybody had this issue before, and what are some troubleshooting steps I could take. I am an app manager role and have tried removing and re-linking my Apple ID and nothing has worked so far.
You can add multiple accounts in the Xcode > Preferences > Accounts pane. Click the + on the bottom left of the pane to add another account.
In your project settings, under signing, you can change your team there.

Unable to add device in Apple Developer Program

I am unable to add a new device in the Certificates, Identifiers, and Profiles section of the Apple Developer portal.
I have two developer accounts, one personal account and one account for a company. The account for the company, I am set as a 'member' for the team. This is the account that I am unable to add a new device for. (I am also not able to download the Distribution certificate, which I believe is a related issue that I need resolved too).
I have researched the other similar questions on SO, but neither of them applied to my scenario.
Here is a picture showing the + button disabled (greyed out)
From Apple documentation:
Team members can’t register devices and create development
provisioning profiles using their developer account.
Ask from someone who has Team admin or Team agent privileges to add you.
I figured it out. Team Members are unable to add a new device via the Developer Portal. However, they are allowed to add a new device to the provisioning file via XCode. I was working with Xamarin and didn't know that I needed to go back to XCode in order to add a new device to the provisioning file.
If you're working in Xamarin and experience this problem, you need to create a 'dummy app' in XCode with the same info as your Xamarin app. Then select your team and it should generate the correct provisioning file for you. After that, build and run your app on your device, then a pop up window should display telling you that the device is not in the provisioning file, then asks if you would like to add it. A simple click of 'Yes' will automatically add the device to the provisioning file which is then reflected on the Developer Account.
Hope that helps someone else! I spent many hours trying to figure this out.

Xcode 8 cannot run on physical device without membership

I used to have a membership to the Apple Developer Program (99$/year), but a couple of years ago I stopped renewing since I didn't have time to develop.
Now I got back playing with iOS and Xcode but I cannot have my apps running on a physical device (ps I do not have the membership now)
Basically Xcode outputs this
Unable to add device 'iPhone ***' because the team has
already reached the maximum number of iPhone devices.
Provisioning profile "iOS Team Provisioning Profile: ***"
doesn't include the currently selected device "iPhone ***".
Actually it looks like my Xcode is still tied to my old account. I tried to manage my account looking for the devices but had no luck, the only meaningful thing I can do on at https://developer.apple.com/account/ is to renew my membership.
Anyone knows how can I solve this issue without the need to create a new Apple ID?
Create a new apple id or use a different account. In Xcode, go to preferences > accounts > +. In your project general settings, go to Signing > Team and select your new account from the dropdown list. Then try to run from your device and you should be able to go through a couple of prompts to get it running just as if you were a new developer. Silly workaround.
I had the same problem and have a support ticket in with Apple to see if there's a better solution.

Invalid team ID in signature

We are working on an app, that was originally created by other developers. They added our account to iTunes Connect as Admin role and to Member Center as Admin too. We added that account to Xcode and we've chosen "Team" setting under Target to match the right team.
When we are trying to archive and upload new version, Xcode returns error:
No accounts with iTunes Connect access.
But if I try to log in to iTunes Connect, it works normally.
I tried uploading new version by exporting .ipa and uploading in via Application Loader. After unsuccessful upload, I get a mail like the following:
Invalid team ID in signature - The code signature in bundle 'com.example' at 'example.app' has a team identifier value that is different from your team identifier 'EXAMPLE'.
Under keychain certificates, there is iPhone Distribution Certificate with that team name. How to resolve this whole problem?
Under the target of your Xcode project in the main settings page (when you first click on the target) you will see a drop down called Team. You need to make sure you have the right team selected that goes with the proper bundle I'd
I am not sure if this question is still relevant.
So what you would normally need to do is:
Go to the developer portal, and in the Certificates, IDs and Profiles choose Certificates > Production. You should be able to download the Distribution certificate.
Go to the Provisioning Profiles > Distribution (same page, menu on the left) and choose and download and double click the provisioning profile for your app.
Now you should be able to choose this Distribution Certificate/Provisioning profile combo in xcode to build and sign your app.
We develop white labelled apps, so our account actually manages over 40 other apple dev accounts (since apple guidelines say that apps need to be submitted by content provider even when developed by 3rd party).
About the error you received: when we transfer app from our main apple dev account to respective apple account of the client, we do get the warning you mentioned as well. Yet even after receiving the warning, our apps get uploaded/approved. This happens because in past the app has been developed under a different team (and apple prefixes the team-id from dev portal to the bundle-id to finally identify apps on dev portal/appstore connect, it seems).
So what happens to you I think is that you dont have the distribution certificate/provisioning profile sorted out properly. Do you use just xcode, or a different tool to build/sign your app(s) - like Visual Studio for Mac? You would need to sort the provisioning combo there as well.
If you look to your keychain, in the "My Certificates" section you should see the team that invited you as admin to manage their apple account, and this entry should have a little arrow next to it, if you click it, you should also see that there is a private key associated to this certificate.
You might need to manually download all of the provisioning files in the xcode tho, in my experience double clicking the provisioning profile file downloaded from portal sometimes doesnt do the trick. If its the same for you, go to the xcode > Preferences > Account > click on your account in xcode, and on the right you should see all the teams that you are part of. Click on the team and click on "Download manual profiles".
If you use Visual Studio for Mac, you also need to add your account in the Visual Studio for Mac > Preferences > Publishing > Apple Developer Accounts. If this is empty, just add your Apple dev account, login, and you will also see a list of teams you are part of. If it syncs well, you can actually just leave the certificate/provisioning combo on Automatic in Visual Studio, and it will manage it for you.

Need Help Adding Device

What I need right now is some step-by-step guidance on setting up a new test device. Just got a new iPad Air and need to set it up to test with. I've done all the registration setup in the Apple dev console, and am told there's a way of getting XCode to automatically do the rest, but I get lost there. Or maybe there's a better way, I don't know.
I believe my next moves involve the Provisioning Profile settings in my Project Build Settings area, to better allow XCode to auto-update the new device. If I could get a hand on what to do from here, I'd appreciate it.
I've attached a screen shot of that area to show the current settings.
Here is how manual generation works. I usually goes for that one, sometimes Xcode bugs with automatic generation (creating a tons of them, especially when you use more complex setup including team working with different repos or/and Xcode server)
1/ Add device UDID on your developer console (developer.apple.com / iOS dev center)
2/ Go to provisioning profile section edit your provisioning profile (or create one if you do not have one, you might have to create a certificat first if you do not have one, but everything is well explained in that section). Select devices that you registered
3/ Download your newly (re)generated profile. Double click on it to open it with Xcode
4/ On Xcode > Preferences, find out your developer account and refresh all provisioning profiles (There is a refresh button)
5/ Go to your project settings under provisioning profiles, select your profile. (When you regenerate profil, the previous one will be displayed there only by its serial number as he disappeared from disk)

Resources