I'm having a problem trying to run a compiled app on a real iPhone device through Xcode. When I try to start, I get a message:
is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to “Apple Development” in the build settings editor, or switch to manual signing in the Signing & Capabilities editor.
My application uses ionic, cordova. Xcode quietly sees the device. In the Xcode section: “Signing & Capabilities -> Signing -> Team” I set my developer account. I also tried changing from “iOS Developer” to “Apple Developer” in the “Build Settings -> Code Signing Entitlements” section, but it still didn’t fix the problem. Tell me, what could be the cause of the error? And what else needs to be additionally configured to run the compiled application on a real device?
It has nothing to do with ionic, you need a development certificate for that app. Your app has a package name (ex: com.mycompany.myapp), that app ID must be registered in Apple (https://developer.apple.com), then you need to open XCode and log in with the same account with which you created the app ID.
If you mark Automatic signing, Apple should handle the rest for you (creating a development certificate and all) so you will be able to just run your app. However, if you choose manual signing, you'll have to go to developer.apple.com -> certificates -> create a new development certificate for that app -> download it -> double click to add that certificate to your Mac -> then run in xcode.
By the way, XCode has an annoying bug since a long time ago, where sometimes it does not detect the automatic signing and displays an error (a red little message). If you switch to manual signing and then return to automatic signing, it should disappear.
Related
I want to submit a new application to the App Store. The application is build with IBM MobileFirst Platform 6.3 so the application itself is a Cordova application. When trying to validate before submitting it to the store, I get the following error message:
After searching for several hours. I can't find any solution which helps for me. The code signature seems to be OK, at least, I think so.
Does anyone know how to solve this problem? I tried to run the application on an iPad 2 with iOS 7.2 and this works great. When connecting my iPhone 5s with iOS 8.3, I can't run the application as Xcode throws an error, he doesn't recognize my iOS version or something while Xcode is completely updated. The archive creation was successful, but the validation not.
New Signing:
Your provisioning profile doesn't seem right.If there are so many "junk numbers" then we can say something's wrong.So I recommend you to check your steps or make everything from scratch:
Steps to make your app ready for App Store submit:
1-You create an App ID from member center
2-You create a Distribution Certificate
3-You create a Distribution Provisioning Profile with this App ID and Distribution Certificate included
4-Download this Provisioning Profile to your Mac
5-Double Click on this Provisioning Profile
6-in xCode make sure you selected the right team under Target -> General -> Team (This must be the team that includes App ID and Distribution Certificate that you just created)
7-Click xCode -> Preferences (or cmd,)
8-Under Accounts section, choose your team
9-Click "View Details" button
10-Click the "Refresh" button and wait for refreshing to finish
11-If you see the recently-created and downloaded provisioning profile, it is ok to click 'Done' button
12- Now, under Project and Targets, choose the recently-downloaded provisioning profile for "release" and "distribution" (also for the 'Any iOS SDK')
13- Then choose the right code signing identities that are derived from this provisioning profile (for release and distribution and also for 'Any iOS SDK')
14- Now it must be successsful
The problem had nothing to do with the incorrect settings of the project, but with IBM Mobile First Platform. This platform creates an buildtime.sh file which is not signed. Apple won't allow this anymore, so this is why the error message keeps appearing.
For future reference: https://mobilefirstplatform.ibmcloud.com/blog/2015/05/01/recent-changes-in-apples-app-submission-process/
I have my devices registered in my Apple developer account, I have an App ID and I created Provisioning profile that includes all my devices. Now when I try running the project on my iPhone, it gives me this error, "Valid provisioning profile not found for this executable." But when I try on other devices in the provisioning profile, it works!!
All other projects and provisioning profile show similar behaviour to this device. I have confirmed that my device is added and has not been DISABLED on my developer account. What can be the issue?
Thanks Ronit. This is the solution if your Provisioning profiles are working good to all its containing device but one of it is giving the issue described in the question.
Simply Back-up your device, and reset all settings from your iPhone
Goto iPhone's Settings App -> General -> Reset (Very bottom) -> Reset All Settings.
And later I tried running the App without any changes in my projects and certificates and it works...
Though I would like to highlight it for Apple Engineers... :P
In my case, I had an app with explicit app ID and got the same error when using the wildcard profiles, created by Xcode. I could fix it the following way:
Point Safari to https://developer.apple.com/account/ios/profile/ and create a development profile with all needed devices
Open Xcode's preferences > Accounts
Select your Apple ID and click on "View Details…"
"Download All"
(This downloads to ~/Library/MobileDevice/Provisioning Profiles)
After that I could use Xcode's Run command and get a running app on my device.
I signed up with Apple's $99 development for iOS program today.
Under Certificates, Identifiers & Profiles in Xcode, no matter what I click on it tells me to:
Connect your device to your Mac and click Use for Development in Xcode's Organizer window. Sign in with the Apple ID associated with your iOS Developer Program membership and Xcode will automatically generate your certificates.
In Xcode 6.1, I go to Window then Organizer and I only see projects and Archives. No device next to it and no button to click "Use For Development" and I have my iPhone connected.
Funny thing is I already connected my iPhone app game to work on an iPhone device yet I still have no button to click on "Use For Development".
What am I missing? This is all I'm being told to do by Apple and I don't see the button.
Xcode 6.1 removed 'Devices' from 'Organizer'.
Now you can go to Window > Devices to get all the connected and registered devices.
What I find, although it's hard to get into a total zero state in order to test, is that if you just connect the device to the computer and try to build-and-run with the device as destination, Xcode puts up a dialog offering to help you and, if you accept, it does all the work: it registers the device at the member center and downloads the universal provisioning profile.
So there is no "Use For Development" button because there doesn't need to be one: it was superfluous.
automatic signing
Automatic signing is a target setting that allows Xcode to manage signing assets for you. The signing settings are located in the General pane under the heading Signing in the project editor. To enable automatic signing, select “Automatically manage signing.”
If you enable automatic signing, Xcode does the following for you when needed:
Creates your certificates and signing identities
Registers connected devices
Creates and edits App IDs
Manages provisioning profiles
Edits the entitlements and information property list files
If you choose manual signing, you’ll need to sign in to your developer account at developer.apple.com/account to perform some of these steps yourself.
Important: All targets in a bundle should use the same signing identity. If you select automatic signing for one target, you should select automatic signing for all targets in your project.
screenshot for more details
Automatic Signing:
As of XCode 9.3, there is no more dialog, as in Matt's answer. Instead, with your device connected, review your Build Target(s) page - under Signing, there is a "Register Device" button. Use that to have XCode automatically handle adding the new device and updating your provisioning profile.
Manual Signing:
If you're not allowing XCode to manage signing for you, or if you have multiple devices to register, then Manual Signing is the way to go. In Window > "Devices & Simulators" > Devices, look for the UDID (aka Identifier) for your connected device (40-character alphanumeric string). Copy that string, and keep it handy.
Log in to your Apple Developer Account, go to Certificates, Identifiers & Profiles > Devices. Click the "+" to add one (or multiple) devices, and paste in the device name and the UDID/Identifier you copied earlier.
I'm working on developing an application for iPhone. I recently acquired a new development device, and would like to deploy the application to this device for testing, in addition to the device I have already been using.
When I try to deploy the application, I get an error saying that:
No matching provisioning profiles found: None of the valid provisioning profiles include the device "name of my device"
I have read the documentation on Apple's official developer portal, but it's unclear to me what I can re-use on this new device and what has to be created for it uniquely.
Can I use the same AppId? (I would hope so, since I can only have one app Id for a given Bundle ID)
I generated a new certificate request and named it something different. I also tried to add the new development device as a device allowed to use the provisioning profile I am already using in the application. Apparently, my code signing identity is still not found when trying to build on the new device. Any suggestions?
You have to add your new device identifier to the Provisioning Profile in the Development Portal. The process should be automated if you connect the device while Xcode is open, check out the Organizer for registration progress.
Delete old profile from xcode and download fresh copy of provisioning profile with new device identifier. Add this profile to xcode.
Go to Project -> Build settings-> Code Signing -> there select latest downloaded profile.
It will work
I've run in release mode my app on a iPhone with Xcode 4.
Everything worked great until when I switch to the simulator and I switched back to the iPhone. After switching back, the app is launched on the iPhone, but the home screen is displayed immediately after and in Xcode I get:
failed to get the task for process
I've tried to remove/add Entitlements file, delete app and restart Xcode but nothing to do.
I am betting that your release mode includes compiling with your distribution certificate, which disallows this behavior (you wouldn't want some random fool hooking into your app after downloading it from the app store). Compile with the development certificate instead. You can change this in the building settings under code signing.
Change the profile for code signing. Select your project, go to Build Settings > Code Signing Identity. Switch to other developer profile.
I had this error while running from Xcode
Edit Scheme
Choose Run
Uncheck “Debug executable”
Clean Derived Data: ⌘ Cmd + ↑ Shift + K
Run the app again: ⌘ Cmd + R
If anyone is having this issue but is sure they have their certificates and code signing correctly set up, check the capabilities tab when you click on the project (i.e. next to build settings tab, build phases tab, etc).
In my case there were broken links for Game Center and In-App Purchases that needed fixing (by clicking the "fix me" buttons) to solve this issue.
I had a the same issue and after reading the above answers all I had to do was go to Build Settings > Code Signing > Provisioning Profile > None and was able to ran the app on my devices again. Hope this helps someone else out
To anyone who comes across this:
After reading this, I attempted to solve the problem by setting the Debug signing to my Development certificate only to find that deployment was still failing.
Turns out my target was Release and therefore still signing with the distribution certificate - either go back to Debug target or change the release signing to Development temporarily.
If you've set the correct code signing certificate under Build Settings->Code Signing, then make sure you are also using the correct provisioning profile for Debug/Release mode as well.
I was having this issue because I was using an Ad-Hoc provisioning profile for both Debug/Release modes, which doesn't allow for a development profile to be used when doing a debug build.
I switched back to "Automatic" on the build settings provisioning profile for "Debug" and left the release certificate profile unchanged, mine worked. Tried the other answers. nothing worked. Didn't want to have to reconfigure my certificates. Automatic on the provisioning profile did the trick
Just get the same problem by installing my app on iPhone 5S with Distribution Profile
-> my solution was to activate Capabilities wich are set in Distribution Profile(in my case "Keychain Sharing","In-App Purchase" and "Game Center")
Hope this helps someone...
Just had the same problem - app was being installed OK, but won't run from Xcode with the "process launch failed: failed to get the task for process".
Turns out my development certificate expired during the night. Regenerating the certificate and the provisioning profiles solved the problem.
Having the developer code signing id is correct for sure, but also make sure you device is added to the Member Center via organizer, or through the developer portal.
A few days ago I reset my device list, and today I was suddenly getting this for an iPod I debug with all the time. About 15 mins later I realized the problem.
I had this problem after I created a new developer certificate.
The following was already correct:
The old private key was deleted from the keychain, all profiles where up to date, the build configuration and signing settings were correct. Yet I had this problem.
Solution:
I had to restart Xcode (5.1.1), because it was not aware of my new developer certificate. I also deleted the obsolete profiles from my devices just to be sure and to clean up.
I had this issue when trying to debug an App on a device I hadn't used before. Developer profile was correctly set. The device was part of our teams account but wasn't included in my profile.
Simply had to open Organizer -> Select the Device -> Add to Member Center
I had this same problem, however in a little bit different situation. One day my application launches fine (using developer provision), then I do some minor editing to my Entitlements file, and after that it stops working. The application installed fine on my device, however every time I tried to launch it, it exited instantly (after the opening animation). (As I made edits to other files too, I did not suspect the following problem)
The problem was in the Entitlements file format, seems so that the following declarations are not the same:
Correct:
<key>get-task-allow</key>
<true/>
Incorrect:
<key>get-task-allow</key>
<true />
Altough it's an XML format, do not use spaces in the tag or the Xcode will not be able to connect to the process.
I was using developer provisioning profile all along.
Edit: Also make sure the line ending in your Entitlements file are \n (LF) instead of \r\n (CRLF). If you edit the entitlements file on Windows using CRLF line endings may cause your application to fail to launch.