I am wanting to submit a new desktop app to the MAS which has an inbuilt helper application (e.g. in the Resources folder). Do I need to copy the Helper app out from this Resources folder into my virtual Documents folder (or other folder) to run it, or can I (i.e. should I) run it ‘in situ’ from within the main desktop application’s Resources folder?
Oliver, thank you for the link. The consensus seems to place the Helper app inside “/Contents/Helpers”.
I assume from the link (since it’s not mentioned) that it is OK to run the application from this internal sub-folder, rather than copy it outside the application to launch.
Don’t forget to give your helper app the same name as the main app with a " " at the end. The bundle IDs also need to be the same.
May I ask why? I have helper apps with different names than the main applications, and different bundle IDs.
If you want the helper application to be able to access the same files as your main application, and have the same entitlements you’ll need to use inheritance on the helper application. With App Wrapper 3 simply select “Use Inheritance for entitlements” on the “Capabilities” pane.
You can’t use the shell class to work with the helper application once it’s been correctly Sandboxed. If you don’t use IPC or XPC, then use OWShell from the Sandbox Kit.
The bundle ID should be the same because the mothership said so. When you use notifications they are shown - at least for me - with the name of the helper app. This looked odd so I switched to the name of the main app + space. I asked here if there is another solution, but there isn’t. Confuses some users because they don’t see the space at the end of the name.
Ah, okay, if you’re posting NSUserNotifications, I can understand why. But be advised that if you ever start to work with Resume, it will get broken by an app having the same bundle identifier.
I would still expect it to work with a different bundle identifier, if you need the helper application to have access to the same preferences and shared support folders then you should use an App Group.
quote=182327:@Beatrix Willius]Don’t forget to give your helper app the same name as the main app with a " " at the end. The bundle IDs also need to be the same.[/quote]
[[quote=182398:@Beatrix Willius]The bundle ID should be the same because the mothership said so. When you use notifications they are shown - at least for me - with the name of the helper app. This looked odd so I switched to the name of the main app + space. I asked here if there is another solution, but there isn’t. Confuses some users because they don’t see the space at the end of the name.[/quote]
I have an app that uses VDSC Helper, with a helper that starts the app upon boot. The helper does not have the same name, nor the same bundle ID. But it does not use notifications. It went through the MAS reviewers.
There is another way than having identical names for notifications: have the main app do the display by communicating with it from the helper with IPCSocket.
Whatever works best for you, though.
@Sam: what is an app group? So far I don’t need resume.
@Michel: the problem with the notifications was that they showed up with the helper app name. That looked very odd.
I would still expect it to work with a different bundle identifier, if you need the helper application to have access to the same preferences and shared support folders then you should use an App Group.[/quote]
I have the same question like Beatrix: AppGroup. How can I create and use an “AppGroup”?
I’ll be adding support for App Groups into the next App Wrapper, and some code for your application. I need to use them for an application in development.
That would be great help!
In the meantime I found this: Adding an App to an App Group
Does this mean, that one has to enroll as a company in order to get a Team ID? If I understand right, then a team ID is required in order to create an App Group :
The Google is your friend:
Note: The development team ID that precedes each container ID string is the unique identifier associated with your development team. You can find this string in the Member Center of the Apple Developer website (http://developer.apple.com/membercenter). From the Member Center home page, select the Your Account tab and then select Organization Profile from the column on the left of that tab. Your team’s identifier is in the Company/Organization ID field.
The first time you call this method for a given container directory, iOS extends your application sandbox to include that container directory. Thus, it is important that you call this method at least once before trying to search for files in iCloud. And if your application accesses multiple container directories, you should call the method once for each directory.
Instead of “Organization Profile” I find “Professional Profile”. It was about 8 years ago when I opened my Apple Member account. I guess there was a choice to register as company or as individual. Until now I did not notice any difference for myself. Now I notice that one of the consequences seems to be that I cannot create App Groups, because I do not have a team ID.
I have a personal account, and my Team ID is at https://developer.apple.com/membercenter/index.action#accountSummary in the My Account part.
App groups registration is at https://developer.apple.com/account/ios/identifiers/applicationGroup/applicationGroupLanding.action
[quote=189426:@Michel Bujardet]I have a personal account, and my Team ID is at https://developer.apple.com/membercenter/index.action#accountSummary in the My Account part.
Thanks! I must have been blind …
This is for iOS. For OSX apps it does not seem to be required to register App Groups? At least, I did not find something for it.
AFAIK your Team ID is the code that’s in brackets after your name, of your code signing certificate.
3rd Party Mac Developer Application: Ohanaware Co., Ltd (<teamIDHere>)
Okay, so I have App Group support in App Wrapper and have written a module that will get added to the Sandbox Kit, for dealing with the App Group. If you would like to test App Groups, then please PM me and I’ll send you a test build and the test code.
Apple keep warning developers to not store user content in the application group, to keep what is stored there to a bare minimum. I was planning to store user created content there and then it would allow several applications to share said content. So now I need to reconsider…