How to launch a Cocoa app at login with ServiceManagement - cocoa

I'm build an agent app in Cocoa which needs to be launched at login.
I did exactly what TIMSCHROEDER said. It was prefect in debug mode. But, since I archived and export my app to a macOS Application, I can't launch it anymore.
I'm using Xcode 8.3 on macOS 10.12.4.

I had the same issue when I was testing launch at log in and changing the Bundle Identifier of helper app did the trick.
Try it. It will work

Related

How can I test a standalone watchOS application?

I can't figure out how to test running my watchOS app as a standalone app. When I run it on the simulator it never works unless I also have the associated iOS app. Running the watch scheme shows that the iOS app is running along with the watchOS app. I created a scheme which just builds the watch and it will cause the watch app to start, but it doesn't actually update the compiled binary.
First of all, you have to create certificates for all project targets and upload on Testflight, Through Testflight (mobile application) you can install the app and it will sync automatically in the watch.
The second option will, Connect your watch with mobile and install that watch application via Xcode on mobile, it will sync automatically in the watch.

LLDB RPC server freezes app

For the past months I have not been able to debug macOS or iOS apps through Xcode. What happens is the following:
Build and run app from Xcode.
Xcode says app is running, but no app has appeared and no debug output from app either.
Kill the process lldb-rpc-server.
App appears and runs as normal, but Xcode is no longer debugging.
Start a new debugging session by attaching it to the app's process.
App freezes again, until lldb-rpc-server is killed.
This OpenRadar has the same description.
I have tried re-installing Xcode (including command-line tools), but it didn't help. Any ideas?
Xcode: Version 9.3.1 (9E501)
MacOS: 10.13.4 (17E199)
The cause of this was that I had installed a GDB/LLDB-extension called Voltron. I was unaware that the installation also created/modified the .lldbinit in the home folder. Removing this file fixed the issue. See also this issue for Voltron.
Got some very good help from Apple.
I had received this warning msg when device was locked and I was running app on device, so when device is unlocked this warning goes

Archive Watch app application without iOS application

Ive builded a watch application for OS 2.x, and i wanted to submit the watch app to the app store without the iOS application. how can i do that ? what targets do i need to remove and so i can send the watch app standalone app without iOS ?
Do i have to submit both of them and apple will decide to take the apple watch application without iOS app ?
i tried to remove iOS application from targets. then the app stopped running on simulator. and couldn't be archived.
You can't do it. A watchOS application doesn't currently exist without a corresponding iOS application. If you are only updating the watch app, you still have to resubmit the whole thing, and the version of the iOS app must be incremented as well.

Provisioning: Install a Mac app with iCloud for testing

I am working on a Mac app which works with iCloud KVS & CloudKit container of my iOS app which is already in production. All works fine when I run the app from Xcode directly. However, I need to Archive > Export and move it to the /Applications folder because that's how the system picks up Safari Extension Companion.
But when I try to run the exported app, it immediately crashes and the following error is printed in Console:
When exporting the app, I tried to choose between Development-signed Application (as required here in the CloudKit docs) and Developer ID (as required in SO answer linked above), also between iCloud Development / Production modes. I tried to recreate Certificates and provisioning profiles, making sure that I have iCloud enabled for my App ID (and iOS container is selected).
When I do export, there are a few folders titled "A" and I don't remember having them before enabling iCloud for my project:
What am I missing here? Thanks!

Could not launch console app with xCode 4.4

I have a project with two targets -- an iOS app and an OSX console app. The latter was created using Xcode File->New Target and selecting "Command Line Tool". This console app is used to prep a default database needed by the iOS app -- using CoreData. This has been working fine until I upgraded to Mountain Lion and xCode 4.4. Now when I try to run the command line tool I get a "Could Not Launch -- permission denied" error. I have tried playing around with signing certificates, to no avail. Interestingly if I create a new "hello, world" command line tool in a new project it works just fine -- and it is not signed at all.
I checked the file and it has -rwxr-xr-x permission. In the debugger the app fails on startup even before it tries to access the moms. If I try to run this outside of the debugger at the command line, it ends with a kill 9 message.
Any ideas would be greatly appreciated.
I just had the same problem in my iOS/Mac project. None of the above suggestions helped but I managed to find the correct answer so I'm sharing for future ref.
I had to set code signing to Don't codesign for the MacOSX target. The rest works fine no matter if your deployment target is set to default or not. Don't forget to set your Base SDK to Current OSX and supported platforms to "x86_64 i386".
HTH! Cheers
Also you can get "Could Not Launch -- permission denied" error when trying to launch app on device with password which not unlocked at launch time.
Found the answer. On the Info page I had to change OS X deployment target from Default to 10.8. Default I guess no longer defaults correctly. Anyway it now works.
I also saw this error message when attempting to run a newly created Cocoa app target. The problem was that I had created my app target in an iOS app project, but instead I needed to create a subproject and create the app target in the new project.
Ran into this when I tried to run before creating and installing the provisioning profile.
in my case, I changed deployment target to 10.8(previous is 10.6),and it works.

Resources