Using my device as an Emulator: "Archive" button is greyed out - ios

I am trying to create an IPA from my device (Iphone app) that was written in XCode. While doing so I encountered a little problem, "product -> archive" is grey and blocked.
As I saw in Xcode 4 - "Archive" is greyed out? in the top bar after the play/stop btn there should be: "project name > iOS device" to allow to iPA the project (press here to see the picture), but i don't find such an option on my mac!?
If this might help to answer my question i should say that I do have an option to select "Generic iOS Device" but then I have an error while building "No code signing identities"
I will be very happy for help :)
Thanks,
Tomer

The "Generic iOS Device" is the correct option to do an archive. If you dont have any code signing identities, go to the Xcode preferences account tab, and add your apple developer account. You may have to make a provisioning profile for your app

Related

Xcode Failed to create a provisioning profile

I have an iOS app I am trying to develop and test in Xcode. However, I get the error below. I do not have a physical Apple device, but would like to test this on an iOS Simulator. I thought this should launch a Simulator if I press the play button, as I have selected iPhone 6s Plus for example, but it just says "Build Succeeded" and does nothing.
Question
How do I resolve the errors below, and test the app on a Simulator?
Thanks
and
This is not because of Provisioning profile or Automatic manage signing.
You've selected the wrong target, Please select the target as 'theWhoZoo' (which is beside Run & Stop button at the top) and run on Simulator again.
While running on Simulator, you don't need the Provisioning profile or Automatic manage signing.
As shown in image below:
Hope this helps!
For me, it worked just turning off 'Automatically manage signing'.
Maybe they didn't give you full account access. Check if this link:
https://developer.apple.com/account/ios/certificate/
Show this pop-up

Xcode error: Code signing is required for product type 'Application' in SDK 'iOS 10.0'

I have Xcode 8 installed on OS X El Capitan.
I get this error:
Signing for "target" requires a development team. Select a development team in the project editor.
Code signing is required for product type 'Application' in SDK 'iOS 10.0'
To add developer account to Xcode:
Press Cmd ⌘ + , (comma)
Go to Accounts tab
Follow the screen shot below to enable development team:
At least in some cases, it might also be necessary to trust your Developer Profile on the mobile device. If you see the "Untrusted Developer" error dialog on the mobile device, see this Q&A.
With Xcode-8.1 & iOS-10.1
Add your Apple ID in Xcode Preferences > Accounts > Add Apple ID:
Enable signing to Automatically && Select Team that you have created before:
Change the Bundle Identifier:
Code Signing to iOS Developer:
Provision profile to Automatic:
You can now run your project on a device!
In case you are still having this problem, click on the Tests and select a team for them too.
To run your app on a real device, you need to have an Apple ID, and have registered your device with that ID. That is why you are getting this error.
Here's how you do it.
Go to the project Navigator. Cmd-1 if you can't find it.
Click the project target dropdown and pick Target.
Click on the Team dropdown and pick add an account.
Sign in with your Apple ID that is linked to your developer account, or just your Apple if you don't have a dev account.
If you haven't registered your device with that account yet, a button will appear, something like 'Register device'. Click that and Apple will register the device and do the certificates and code signing. (Oh my unicorns certificates and signing is so much easier than it used to be)
Pick your physical device and hit run and it should load onto your device without error.
Well, after I did all those things I still got the errors so I closed Xcode and opened it up again and then it worked.
Xcode 11.4
Click on:
Your project
Signing & Capabilities
Select your Team.
Make sure you add the team on both Debug and Release tabs.
For those that are going to come here after me, if it's Xcode 11 and iOS 13 then your layout might look a little different than what you see in the main answer to this question.
Firstly, do this as it was mentioned in the answer: Add your Apple ID in Xcode Preferences > Accounts > Add Apple ID.
Then click on the project name which is located in the left panel. Then you'll get a window of settings. Then look for "Signing & Capabilities" and that's where you'll be able to see "Team" and select your name as the option.
Recently had the issue on Xcode 11 beta 2:
Select your project on the left side panel
Find the "Signing & Capabilities" tab for your target
If your target doesn't have the "Signing & Capabilities" tab (in my case only the test target had it), open the build settings for your project and click "All" instead of "Basic"/"Customised". Find signing under the settings and make sure you've got a Development team set up.
Repeat the same step for your test target if needed
If you need to disable the team for now, as you don't have a development account, just change the target at the top menu to iPhone instead of a generic iOS device or real device.
For those using Ionic and receiving this error - you need to open your $project_dir/platform/ios/$project_name.xcodeproj - then follow the steps listed in the "answer"
Select team in the general settings of the target
Select the development team in both project and target. For the rest, set to "automatic" and then it will work.
I had this error on my React Native project, weirdly enough I thought I was NOT editing the correct .xcodeproj file! I went into my project directory './appname/ios' and opened the project file and edited my team name into the project and it started working.
Go to the bar where you have file, edit, view etc
Go on view -> Navigators -> Show Project Navigator -> Click on team -> Select yours.
Enjoy 😁
Downgrading the iOS development Target from 12.1 to 12 fix the issue for me as I don't have a dev team configured.
in Xcode13: select your project -> in Navigatr bar you will see TARGETS -> Click on the project name below the TARGETS -> you will see the Signing& Capabilities
For me just change in the build settings to release from debug
enter image description here

None of the valid provisioning profiles include the devices

I have removed some of the devices from the provisioning profile from apple portal for adhoc distribution and downloaded and installed it in xcode 6.
But upon archiving the project it shows the error for missing devices and invalid provisioning profile .
I have wasted 3-4 hours regarding this issue but found no luck.
Any kind of help would be greatly appreciated.
I just had this error as well. I am not sure if all of these steps are required, but the is exactly what I did to fix it, and it worked for me...
On the device, I removed the provisioning profile that was in General -> Profile.
In Xcode, under window tab open up the "Devices" window. (shift+cmd+2)
Choose the device and copy its identifier
Login to developer.apple.com and go to the "Certificates, Identifiers & Profiles" area
If the device in question is not registered, register it in the "Devices" area. (My device was not registered, so I registered it)
In Xcode preferences under Xcode tab, go to the Accounts tab and choose your Apple ID.
Choose the identity from the list and then hit the "View Details..." button.
Under "Signing Identities", only "iOS Development" was listed.
Click the "refresh" button on the lower-left of this details page.
I was informed that I didn't have a distribution certificate and asked if I wanted Xcode to request one for me. I chose Yes (or Request)
'iOS Distribution" then showed up also, just under the "iOS Development" entry
Hit the "Done" button
Exit from the Xcode preferences
Choose the Target for your project, then choose the "General" tab
Choose the "Team" dropdown and pick your team, even if it is already selected. This causes Xcode to refresh its info about the Team.
At this point, my warning next to "Team" went away. I then tried to run my app on the problem iOS device again and it worked as expected.
I hope that by following these steps, it will at least help you get closer to fixing your problem.
I only have this problem when archiving so I do not bother to investigate, unplug the iPhone and archiving works just fine.
In my case I needed to remove the Team ID from the bundle identifier in targets settings > General.
If you have the Team selected below this id will be added automatically.
I followed a lot of the instructions out there about resetting profiles and restarting xcode but still had no luck. Eventually I set team to 'none' and reset the build configuration as indicated here:
https://developer.apple.com/library/ios/qa/qa1814/_index.html
Bingo.
This was for a project I hadn't updated in a year or so and I had just updated to xcode 7.3.
I had a similar problem where my device was properly registered and had been working for some time before suddenly stopping. All of the provisioning profiles were up to date and I was still able to download other Xcode projects onto my device. My developer account was listed as the Team under Targets -> General -> Team but it still wouldn't work. So I switched Team to None and attempted to build the Project again. It gave me an error for not selecting a valid Team, but then an option popped up to choose one of the ones registered earlier in Accounts. I just clicked on my developer ID and that seemed to fix the problem.

Submitting iOS app to app store invalid code signing entitlements

I'm desperate! I have a deadline and I can not post! Please someone help me
According to Joe Regan from possible duplicate post:
Xcode Preferences
Accounts tab
Select your Apple ID
Hit the View Details button in the Apple ID detail panel
Hit the Refresh button in the lower left corner
This post from the iOS Developer Library may also help you:
Setting up Xcode to automatically manage your provisioning profiles.
I have also faced this issue when i try to make ipa file for App Store.
- only you have to check whether "Any iOS SDK" is selected or "Any OS X SDK" is selected in Build settings?
If you have selected "Any iOS SDK" then it will always shows this error message again and again in new XCode. So, go to your app->Target->Code Siging-> and remove "Any iOS SDK" and select "Any OS X SDK".
follow same process for Project section also. Now, clean and rebuild your project. It will be done.

iOS- Provisioning profile issues.

OK, so I have tried everything possible but still having issues.
I am testing on two devices. An iPhone and an iPad. When I connect the iPhone to Xcode and hit run it builds on the iPhone without any problems but when I connect the iPad to Xcode and hit run it fails and gives me this
This product type must be built using a provisioning profile, however
no provisioning profile matching both the identity
I used to be able to test very easily before I upgraded to Xcode5.
Now it works on one device but not the other. Can anyone please tell me how I can fix this?
All my devices are upgraded to iOS 7.1 as well.
In order to fix this problem, please follow these steps:
I. Go to Xcode Settings (Xcode -> Preferences), and select "Accounts." Make sure you are signed in to your developer account.
II. Click on the first tab under the run button, and then click on the name of the project (circled in red)
III. Under "Identity" select the account that matches your build identifier, or click "Fix Issue"
IV. If this does not fix your issue, go to "Build Settings" -> "Code Signing"
V. Finally: If this does not fix your issue, go back to the Certificate Center in the iOS Developer Center (developer.apple.com) and reprovision the certificate, then repeat these steps.

Resources