Can't run app from Xcode on iPhone - iphone

I have app which is running fine on iPhone 7Plus simulator but fails when I try it on real iPhone 7Plus device. Error I get is
Debug-iphoneos/MyTDM.app/Frameworks/libswiftCore.dylib'
/Users/username/Library/Developer/Xcode/DerivedData/MyTDM-gokgkswhipemjzaepsulniokxpvp/Build/Products/Debug-iphoneos/MyTDM.app/Frameworks/libswiftCore.dylib: unknown error -1=ffffffffffffffff
error: Task failed with exit 1 signal 0 {
/usr/bin/codesign '--force' '--sign' 'C90533B5B5B3E397F0328467315FAC758CD1EEA3' '--verbose' '/Users/daliborondra/Library/Developer/Xcode/DerivedData/MyTDM-gokgkswhipemjzaepsulniokxpvp/Build/Products/Debug-iphoneos/MyTDM.app/Frameworks/libswiftCore.dylib'
}
Note that my Provisioning Profile seems to look good and I was able to run apps on device in the past without any issue.

After three hours of frustration I deleted all iOS Developer certificates and started to build app signing from the scratch. Also XCode access to Keeychain to be allowed for all actions = it's important to press such button in the dialog - not only "allow access" but "always allow access".

Related

Error launching remote program

I am new to iPhone application. i just started with xcode. My problem is: I have created an app using xcode & phonegap, it's running without any problem in simulator but when i try to test it on my iPad it throws an error.
Error launching remote program: failed to get the task for process 6074.
i dont know why this happens. i have searched it on StackOverflow but its kind of confusing (as i am new in iPhone app.)
please help me where i goes wrong & how can i solve this?
Application also open. After the application launched completely, after few seconds I got this error. after that My Application get crashed.
One more thing.
if i delete my old application then it reinstall it but it throws same error. but if i open that installed application then it will be my updated application.
The problem is because you are trying to debug your application using distribution provisioning profile. If you want to run your application in debug mode, you have to sign it with development provisioning profile and certificate (both in build settings and in target). If you are trying to create a distributable, sign it with distribution credentials and add Entitlements.plist (again both in build settings and target).
That’s because you put the get-task-allow = NO entitlement into ad-hoc builds, to stop your beta testers from being able to run the app in a debugger.
"Error launching remote program: failed to get the task for process"

Error installing iOS app with Ad Hoc Profile

I have finished developing a big and heavy app. It is universal (for iPhone and iPad), and now I am trying to publish it in App Store. I have done this other times, so I know how annoying it is.
I'm using Xcode 4.2 and devices with many iOS versions (4.2.1, 5.0, 5.1). My app is enabled to send Push Notifications, and it doesn't use iCloud.
I have tested it with development certificate, and it works OK. Now I've generated and downloaded Ad Hoc Distribution Provisioning Profile in order to test it in my iPhone and iPad. It seem like all is OK, but when I'm going to install the app (with the Ad Hoc Distribution Provisioning profile) with Xcode in any device, Xcode shows an error: "Error launching remote program: failed to get the task for process".
I've read this link it suggests two causes:
I am using Ad Hoc Distribution Provisioning profile when debugging the app in my device. This is not the problem, because I'm not debugging the app.
I specify a code signing entitlements property list in my build settings which does not include a "get-task-allow" or "Can be debugged" property. This is not the problem, because I'm not specifying any entitlements property list because I don't need it (or I think so).
Some people that have the same problem solve it adding the "get-task-allow" property to the entitlements property list. But I haven't that file. So the question is, Do I need to create it just for add the "get-task-allow" property?
If I don't , which is the problem? I'm not trying to debugging and I haven't entitlements p-list in my app.
Although my app doesn't need entitlements p-list, I tried to create it and add the "get-task-allow" property in OFF following this, but it didn't solve the problem.
I have also to say that althought Xcode shows the error during the installation in the device and the app shut off, when I start again the app, the installation is done and the app runs without problem.
I read the following similar thread, but they didn't solve my problem:
iPhone Debugging: How to resolve 'failed to get the task for process'?
Profile bug (Error launching remote program: failed to get the task for process XXX.)
iPhone Debugging Error launching remote program: failed to get the task for process 907
Error launching remote program: failed to get the task for process 699
Thank you so much.
I am using Ad Hoc Distribution Provisioning profile when debugging the app in my device. This is not the problem, because I'm not debugging the app.
This is exactly the problem.
You are trying to run an ad-hoc application from the XCode - it means to debug it.
You should archive your app and install it (an ipa file) together with the correct provisioning profile.
There are few ways to install the app:
Using iTunes - not trivial
Using an iPhone Configuration Utility - easier
Using some OTA (over the air) installation service (e.g. TestFlight site) - I use this all the time, after a couple of times it gets really easy and you can distribute your Beta version to remote devices (e.g. clients, friends etc.)
The problem look like you are running App from Xcode with Ad Hoc Distribution Provisioning profile.
After Archiving (Product menu > Archive ) the App from Xcode, you can get ipa.
You can install ipa via iTunes if you device already sync with your iTunes app.
https://testflightapp.com/ , I am using testflightapp for testing the app. It's easy to use and we can distribute to for test user.

Can't Launch Xcode App Without Code Signing on iPad, Can on iPhone

I am trying to deploy an Xcode app to my iPad without code signing. To do so, I have edit the SDKSettings.plist file, changed my project settings to do not run, and installed AppSync. This is the error I receive:
Error launching remote program: failed to get the task for process 1019.
This is the error in the debug screen:
Error launching remote program: failed to get the task for process 1396.The program being debugged is not being run.
The number keeps changing. On my iPhone, once I hit "ok" to dismiss the error on my computer, I can launch the app from the springboard and use it perfectly. However, on my iPad, this is not the case. It just crashes if I attempt to open it.
Has anyone ever had this program, or know how to solve it?
Also, my iPhone is on 5.0.1, and my iPad is on 5.1.1. The app works fine in the simulator, though.
You must have a valid provisioning profile, which requires enrollment in the iOS Developer Program. There is no way to run apps on an iOS device without a provisioning profile. For more information: https://developer.apple.com/programs/ios/

Why won't instruments execute my Monotouch application?

I'm trying to use Instruments to look at resource usage in my Monotouch app. However, I can't get the app to launch through Instruments.
When I hit the record button in Instruments, the app launches on my iPhone, buzzes (signifying it's a debug build), then crashes - and Instruments reports:
Target failed to run: Remote exception encountered : 'Failed to get task for pid 384'
The app runs fine when I launch it directly on the phone.
I've tried it with debug builds and ad hoc builds (using the parameters defined on the Monotouch support page). Always the same.
I'm using Monotouch 3.2.5, iOS 4.3.1 (on a 3GS), Xcode 4 and Snow Leopard.
I've see this issued mentioned in a few places around the web, but haven't seen a resolution. Anyone know how to resolve it?
It's a signing problem: to run under the control of Instruments, the app is compiled with the Release build settings, not the Debug build settings, which usually means the app is signed with your Distribution certificate instead of your Developer certificate.
The app needs to be signed with a Developer certificate for Instruments to be able to control it.
Change your signing option to Developer on the Release build and you should be fine.
I also ran into this issue with Xcode 4. What worked for me was...
From Xcode 4, run on the connected iOS device.
Launch the Instruments app manually.
Choose my template (in this case TIme Profiler).
Choose my app from the Target menu (to the right of the Record button).
Click the Record button.
The suggested Entitlements solution did not work for me (since Entitlements are evidently no longer required in Xcode 4).
The suggested signing solution did not work either. Also, it would be inconvenient to change this every time I wanted to test with Instruments.
Check your Entitlements.plist for the signed app. If get-task-allow is false, it will prevent Instruments from attaching to the process.
How about launching Instruments from inside XCode? If you're using Xcode 3, it's in the Build menu and then Run with performance tools. This will fire up Instruments and automatically start recording.

Dreaded "The executable was signed with invalid entitlements"

i have the "The executable was signed with invalid entitlements" error. The error only occurs when im trying to set TRUE to the Entitlements.plist of get-task-allow. The reason for trying to do this is because im trying to get the device token to be shown in the console, using the device token later for push notifications.
Though, if i set false to get-task-allow, the app would build in the iPad.
Currently using XCode SDK 3.2.3, iPad iOS 3.2.1
I Have tried everything from removing all the keys,certificates from the Mac. Revoking the certificates in the iPhone Provisioning Portal. Removing the provisioning profiles in the iPad. Then redoing everything all over again.
I also have checked in the Project "Application" Info that under the Code Signing Identity , it is set to iPhone Distribution : "Name".
Also have checked in the Target "Application" Info for the same thing. Then done a clean build and run but still having this error.
The simulator cannot get you a device token, (just in case you didn't know).
On the device, if you have jailbroken it, I am not able to get a token. You need to have an untainted phone.
The error you are getting is because you a selecting the wrong certificate.
Follow these instructions carefully
http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/
Your certificate could also have expired for push notifications, check that as well.
i solved it, The organiser window of XCode > Window > Organiser . In the Devices tab, when you click on a device that is connected, there is a console pane on the right. you can then use that to find out your device token if "get-task-allow" is not allowed.