Could not launch “Runner” Domain: IDEDebugSessionErrorDomain Code: 3 - xcode

Could not launch “Runner”
Domain: IDEDebugSessionErrorDomain
Code: 3
Failure Reason: failed to get the task for process 1189
User Info
DVTRadarComponentKey = 855031;
RawLLDBErrorMessage = "failed to get the task for process 1189";

I resolved this error by Trusting my developer account on the iPhone. This particular setting can be found at.
Settings > General > Device Management

The problem is in Code signing. Your App is signed with wrong provisioning profile and Xcode isn't allowed to attach debugger to app. For example if you wanna to attach debugger to app that's is signed with AdHoc provisioning profile, you can install&run your app on your device but you can't debug it (attach debugger). If you wanna to attach debugger to your app, you need to use App signed with Development provisioning profile. Check your Signing setting for your project and be sure you are using development Provisioning profile to signing the app.

Enabling WiFi/Cellular on my iPhone fixed the problem for me.

run the following command in terminal
sudo DevToolsSecurity -enable
ref :- https://developer.apple.com/forums/thread/120282

Related

nativescript: error when publishing via Local Build

I can do cloud builds successfully but I am having issues with Local Builds. I checked xCod under Signings & Capabilities and the provisioning profile is setup properly but when publishing a Local Build in Nativescript Sidekick, I keep getting this error in the Sidekick console:
Error Domain=IDEProvisioningErrorDomain Code=9 ""mathLearn.app" requires a provisioning
profile." UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription="mathLearn.app"
requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the
"provisioningProfiles" dictionary in your Export Options property list.}
Not sure how to resolve this since the provisioning profile is setup in xcode properly AND the cert/provisioning profile were selected in Sidekick when initiating the publish.
You may pass the provisional profile as an argument.
tns publish ios ... --provision <Your Mobile Provisioning Profile Identifier>
Read more at docs

Nativescript Sidekick Publish to App Store

I'm running Sidekick on my Windows 10 machine (64b).
I'm trying to publish my app to the Apple AppStore.
Certificate, provision is all ok.
When I publish, build is made, I can log in when asked and fill in the verication code.
But then I get error 'Spawn Failed'. Googled this error, but didn't find anything.
Erros in the log are:
[19-03-08 10:52:20.711] (CLI) Build machine host name:
administrators-Mac-16.local
[19-03-08 10:52:58.349] Spawn failed.
, Error: Spawn failed.
at CloudPublishService.getiOSError (C:\Users\bartad\AppData\Roaming.nativescript-cli\extensions\node_modules\nativescript-cloud\lib\services\cloud-publish-service.js:79:21)
at CloudPublishService.
(C:\Users\bartad\AppData\Roaming.nativescript-cli\extensions\node_modules\nativescript-cloud\lib\services\cloud-publish-service.js:96:29)
at Generator.next ()
at fulfilled
(C:\Users\bartad\AppData\Roaming.nativescript-cli\extensions\node_modules\nativescript-cloud\lib\services\cloud-publish-service.js:4:58)
at
Does anyone have an idea what's wrong here ?
Thanks
Bart
Issues I encountered:
1) Provisioning was not right. Went back through and checked that each step is for a Distribution certificate and profile, not a development profile.
2) I assumed that tns resources generate would create my icons and splashes. It did, but Sidekick ignores them. You must recreate them in Sidekick.

Appcelerator [ERROR] : Invalid "--pp-uuid" after provisioning certificate update

I'm new to Appcelerator and Stackoverflow, so pardon my ignorance.
I have just updated my iOS provisioning certificate and now I get the following error. Any ideas? I'm using SDK 5.0.0.GA and studio build 4.0.0.
[ERROR] : Invalid "--pp-uuid" value "d806f6cb-f67e-40e5-a9f3-88b8af3bcfae"
For help, run: titanium help build
2016-01-16T21:08:11.950Z | TRACE | titanium exited with exit code 1
2016-01-16T21:08:11.951Z | ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/rwhatcher/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/plugins/run.js:92:66)
at ChildProcess.emit (events.js:110:17)
at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
2016-01-16T21:08:11.952Z | TRACE | Sending exit signal to titanium process: 56550
Did you look at Run Configurations... menu. You can change provisions here. Make sure have green check all.
Good luck.
Welcome Robert, well you can try a fresh restart.
First look at your ~/Library/MobileDevice/Provisioning Profiles folder and delete the deprecated provisions.
Then you go to your membership Apple account and create a new certificate (dev/prod) and a new provision profile linked to the certificate and your app id (e.g device/production). Remember to open the files certificate/provision at least one time.
After all, run a appc ti clean at your project root followed by appc run -p ios -T device. The CLI will ask for you choose the certificate and provision, then you choose the new ones and then it should works.
Also check in your /library/mobileDevice/ProvisioningProfiles folder, this is where the files are located after you've downloaded them and double clicked.
Sometimes I find there are multiple versions of the same provisioning file and appcelerator isn't using the most up to date one. If you delete them, you'll need to download them again from ios dev center (this includes the development, distributon and app store files).

tvOS: Invalid Provisioning Profile. This provisioning profile is not compatible with iOS apps

When trying to publish to iTunes Connect via a altool for a tvOS app, I'm running into errors.
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --validate-app --file "/path/to/MyApp.ipa" -t ios --username xxx#example.com --password ********
2015-10-22 09:05:32.175 altool[8567:159593] *** Error: Unable to validate archive '/path/to/MyApp.ipa': (
"Error Domain=ITunesConnectionOperationErrorDomain Code=1176 \"Unable to process application at this time due to the following error: Invalid Provisioning Profile. This provisioning profile is not compatible with iOS apps..\" UserInfo={NSLocalizedRecoverySuggestion=Unable to process application at this time due to the following error: Invalid Provisioning Profile. This provisioning profile is not compatible with iOS apps.., NSLocalizedDescription=Unable to process application at this time due to the following error: Invalid Provisioning Profile. This provisioning profile is not compatible with iOS apps.., NSLocalizedFailureReason=iTunes Store operation failed.}"
)
All of the provisioning profiles are correct. I'm running Xcode 7.1 GM Build version 7B91b.
When I do this manually through Xcode it works. The same exact script works for iOS, but not for tvOS.
What gives?
I've managed to figure out a working solution. You archive as normal but instead of submitting to the store via the organiser create the ipa/pkg file by selecting | Export -> Save For AppStore Deployment | once the ipa/pkg has been created upload it via Transporter (new version of Application Loader, you can get it from the Mac App Store)
In Transporter you just log in, then select the ipa/pkg created using Xcode, and voila! it works.
You need to create a tvOS distribution provisional profile for your tvOS application.
If you're adding your tvOS application to an existing iOS application and want to take advantage of Universal Purchase, then use the same bundle ID for your tvOS application that your iOS application uses.

Code signing error running XCodeBuild in Jenkins

[Not a duplicate of similar questions as explained further down]
I'm getting a code signing error when running XCodeBuild from within Jenkins but it will build ok from the command line or from within Xcode.
Several people have had this problem in the past and the common theme with them is that Jenkins gets run at launch time as the daemon user and thus tries to access the system keychain.
The solutions that people have applied are copying credentials to the system keychain or running a command to set which keychain to use.
However in my case if I look at launchd in the Activity Manager the user is showing up as the user I am logged onto the machine as, therefore Jenkins should be running as this user and not as the daemon user.
I tried setting which keychain to use by adding this command to the Jenkins script before running XCodeBuild
security list-keychains -s /Users/[user]/Library/Keychains/login.keychain
But that did not solve the problem.
The error I am getting is:
Code Sign error: The identity 'iPhone Developer: NNNNN (9TYX5WAM63)' doesn't match any valid, non-expired certificate/private key pair in your keychains"
So I tried moving the credentials to the system keychain but now get this error in Jenkins, but its still fine from the command line:
Code Sign error: Provisioning profile 'F152C66E-B99A-47F6-B262-376CE4403D71' can't be found
Also when I move the credentials to the system keychain I am no longer able to build from within XCOde - I get the same error as the top error message above.
I've also tried editing the org.jenkins-ci.plist file to set the user as who I'm logged onto the machine as, in accordance with this, but that too had no effect.
Missing certificates and keys in the keychain while using Jenkins/Hudson as Continuous Integration for iOS and Mac development
Any ideas what I could try next?
I feel for you as the last time we messed with this it was quite the challenge. We did this when we set up a CI server for a project. If I remember correctly (broadly) we followed these steps:
1) Set Jenkins up as a developer on the Apple Dev account
2) Created a cert and dev provisioning profile specifically for Jenkins
3) Setup a Jenkins user on the CI Server and delete any previous certs/prov profiles from xcode for that user
4) Add the Jenkins cert to the AD-Hoc Dist Profile (If you are trying to distribute an .ipa to HockeyApp you will need to to this for an archive build.)
5) Go into the xcode project file and delete any existing references to Provisioning Profiles
6) Download and Install the certs for this user and the appropriate Prov Profiles.
7) Before the build unlock the Jenkins user keychain. Do this only if the Jenkins user is not the user running the xcode build.
Verify that Xcode shows the Prov Profile as valid in the organiser when logged in as the Jenkins user.
I know my answer is somewhat vague and my intent is to be helpful. This type of error is usually caused by one of three things. Xcode cant find the profile, Xcode cant find the cert or Xcode found more then one profile (supposed to produce a different error but doesn't always) and has a mismatch of some kind. Usually redoing the Prov Profiles is the least painful solution.
Best of luck man. You will solve it it's just a huge headache!
Probably not the answer you are looking for, but i gave up on the XCodeBuild plugin for a number of reasons, and running my build through "Execute Shell" step.
You said your command line build works, so you already know the commands that are required. Just put that into the shell.
xcodebuild -verbose -alltargets -configuration Debug clean build CODE_SIGN_IDENTITY="${CODE_SIGN_IDENTITY}" PROVISIONING_PROFILE=${PROVISIONING_PROFILE}
&&
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${WORKSPACE}/client_trunk/build/Debug-iphoneos/${Application}.app" -o "${WORKSPACE}/client_trunk/build/Debug-iphoneos/${Application}-Debug-${shortVer}.${revVer}.ipa" --sign "${CODE_SIGN_IDENTITY}" --embed "/Users/[youruser]/Library/MobileDevice/Provisioning Profiles/${PROVISIONING_PROFILE}.mobileprovision"
Above, ${CODE_SIGN_IDENTITY} is the one that looks like iPhone Developer: blah
And ${PROVISIONING_PROFILE} is the hex number for the profile like F152C66E-B99A-47F6-B262-376CE4403D71
Follow instruction on the Xcode Plugin home page :
If this prompt is not showing on the build machine, you can force it to appear by running the codesign command that failed from a terminal on the build machine: /usr/bin/codesign --force --sign "iPhone Distribution: .....
Execute failed signing command from the terminal as a Jenkins user and select "Always allow"
Using Jenkins I got this error:
/Users/Shared/Jenkins/Home/jobs/ExampleTabbed-Integration/workspace/build/Debug-iphoneos/ExamplesTabbed.app: User interaction is not allowed.
Command /usr/bin/codesign failed with exit code 1
I fixed it by doing the following:
Add Build Step before the XCode (jenkins plugin) step
Add the following as the execute command:
security unlock-keychain -p "passwordhere" ${HOME}/Library/Keychains/login.keychain
In the XCode (via plugin) configuration I'm using the following:
Unlock Keychaing ? (unchecked)
Keychain path: ${HOME}/Library/Keychains/login.keychain
Keychain password: (empty)
It might be possible to remove the pre-step and use the actual xcode config to do it, but it's working as described with no problems.
Note this doesn't take into account using a more secure solution yet, but this was my solution to the xcode signing issue. I'm running on OSX with the Jenkins installer and running as a launchctl command, used by the default Jenkins installer application. If that helps.
Subprocesses of Java/Jenkins will need to have unlocked access to the Keychain.
Let's say your build / code-sign / release process is working fine. The only blocker is when you try running the exact same process in Jenkins.
Chances are that the keychain is locked, not for the user, but for Jenkins sub-processes.
The security command to unlock the keychain will need to be run as a Jenkins job, just once. Even if the same logged in user has already unlocked the keychain in the terminal.
So setup a simple freestyle job in Jenkins and add the following shell command as a build phase.
security unlock-keychain -p $PASSWORD /Users/$MACOS_USER/Library/Keychains/login.keychain-db
Provide $PASSWORD as an input parameter for the Jenkins job.
$MACOS_USER the macos username of the Mac keychain owner.
Once you've run this job choose "Always Allow" from the keychain prompt. Now, try your regular build/release job & it should work. Assuming you have all the required certificates in the login keychain.
NEVER HARDCODE PASSWORDS INTO CONFIG/JOBS/CODE etc.

Resources