two applications with xojo with appwrapper

Good evening I would like to understand how to create a pkg file with appwrapper containing 2 applications the 1 said mother application and 2 also called daughter application, I created the 2 applications and inserted daughter into Mother resource resources only when the daughter application is not executed when it is signed , but only the mother installation works. I also tried to sign the daughter app first with appwrapper first and then later to insert it in that mother again to re-sign it but equally the 2 application is not executed.

AppWrapper .pkg creation may be a little too simplified for your specific needs. You may need to create an installer package yourself. The best tool that I know of for that is called Packages http://s.sudre.free.fr/Software/Packages/about.html

I’m sorry I don’t have anything more specific for you, I haven’t encountered this situation before. Hopefully Packages can help!

I may be wrong, but I don’t think creating a pkg will assist you in running helpers.

How do you launch your helpers from the main app ?

[quote=458783:@Michel Bujardet]I may be wrong, but I don’t think creating a pkg will assist you in running helpers.

How do you launch your helpers from the main app ?[/quote]

  1. Button Event Click: (“main application”)
    dim f as FolderItem
    f=SpecialFolder.Resources.Child(“test.app”)
    f.Launch()

the application is located in the Resource folder once signed with appwrapper is no longer executed!

I encountered a similar issue under Catalina.
See https://forum.xojo.com/55109-f-launch-does-not-work-under-catalina/0

  1. Executable code SHOULD never be in the resources folder, this is for other things. Move your helper application to “Helpers” or “MacOS” folder. This is an Apple guideline, that’s only enforced once you want to distribute the application.

  2. Is the application Sandboxed?

And as @Michel Bujardet says additional security on Catalina also causes a problem. I know how to do this for a console application, but I’ll be honest and say I’ve tried it with a GUI app. Which version of the macOS are you running and I’ll investigate this as soon as I can.

To summarize, I was never able to folderitem.launch applications in Catalina, except with executables compiled with 2019R2.

the two applications are with graphical interface not console applications

I am using: xojo 2018r2
Mac OS : High Sierra 10.13.4

Both applications are in sendbox!

inside appwrapper or selected “Use Apple’s temporary engine (fastest)” for both applications both the mother and the daughter

“I’m doing the test to put the daughter applet in the MacOS folder as you indicated and remove it from the resource!”

I tried to send the second application to the Macos folder once signed it does not start, but if I leave it in the Resources folder on my Mac it starts but then it is not accepted by the store!!

I just conducted a quick test with an app built with 2017R2.1. It is even older than 2018R2…

It works just fine when the app is simply signed, but when the app is signed and sandboxed for the app store, I get a dialog from High Sierra.

You are opening the application “pickaboo” for the first time. Are you sure you want to open this application?
The application is in a folder named “MacOS.” To see the application in the Finder without opening it, click Show Application.
[Show Application] [Cancel] [Open]

That is not very nice… But indeed, the helper is launched.

Then the child app terminates early.

Here is part of the error report :

[code]Process: pickaboo [1416]
Path: /Users/USER/Documents/*/Mother.app/Contents/MacOS/pickaboo.app/Contents/MacOS/pickaboo
Identifier: com.matchsoftware.pickaboo
Version: ??? (1.0.0.0.0)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: pickaboo [1416]
User ID: 501

Date/Time: 2019-10-17 13:16:57.540 +0200
OS Version: Mac OS X 10.13.6 (17G8037)
Report Version: 12
Anonymous UUID: 0481450D-9B37-0477-FE38-0201C320C133

Time Awake Since Boot: 28000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [0]

Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
Sandbox registration failed: Process is not in an inherited sandbox.

Application Specific Signatures:
Registration error: Process is not in an inherited sandbox.[/code]

It would seem the helper needs some capability which is not set by default in App Wrapper to execute in High Sierra. I did verify that the box is set to allow inheritance in the Capabilities pane.
Contained executables [ ??] Use “Inheritance” for entitlements

Perhaps Sam has more insight into this than I do. I have to confess this is beyond what I know. It would seem indeed running helpers has become less easy than in the past…

However, there is another way to launch an app : go directly for the Unix executable inside the bundle, and launch with a shell.

If you launch the app store signed and sandboxed app, and click on launch the executable, it works smooth as silk.

Note that as I close the shell upon quit, it also terminates the child process, so you won’t end up with an orphan app.

Here are the projects and executables I created, if someone feels like experimenting.

Pickaboo

if I use [??] use “Inheritance” for rights and I sign both apps and leave the app also in Resource even from the sendbox app is started. the problem with the app store was not properly signed. On my osx work both but when I start for the publication Apple Store gives me problems and not public.

It would greatly help if you studied the projects I posted above. I believe an app using the Unix launch can be uploaded to the MAS. Don’t forget the MAS signed and sandboxed version works just fine under High Sierra.

I did what I could to help with it.

Unless you get more specific than “for the publication Apple Store gives me problems and not public.”, in particular with precise error messages encountered, it is impossible to assist further.

So first test of @Michel Bujardet projects (thank you for creating them), fails when they’re sandboxed as you saw before.
I have a solution:

  1. The daughter application (pickaboo.app) needs to be processed separately, you need to enable “Backgound mode” by clicking on the Action icon next to “Make 64-Bit only” on the General pane. I codesigned it using the App Sandbox.

  2. The signed copy of the daughter is then moved into the MacOS folder of the “Mother” application.

  3. The Mother is then signed using the App Sandbox and “Use Inherited Entitlements” is selected.

  4. Running the Mother application, the “Launch Unix exec.” works, not the other option.

Please note that once this is done, you cannot launch the pickaboo application from the Finder, nor can it be launched from the Terminal. The only way to open it is via the Mother application.

Edit: Testing on macOS 10.14 didn’t appear to work to start with. re-copying the Mother app to the macOS 10.14 partition, and it works as expected.