I have a Cocoa application that usually runs in full 64-bit mode on any Mac that supports this architecture.
Now I have an external API that is only available as a 32-bit plug-in to be loaded into the main program. This API is for a third-party input device that only a small percentage of my users will ever purchase, but that is important for that small percentage.
My problem is that the program can only use this API if executed in 32-bit mode. The easiest thing to do is of course to:
Scenario 1: ask the user to start the program in 32-bit mode by changing its information via the Finder's Get Info dialog.
This is easily done, but hardly elegant..
Scenario 2: always run in 32-bit mode thus avoiding the problem
Hardly what I want to do either.. penalizing 98% of users for the sake of an exotic feature.
Scenario 3: automatically change the application's launch attributes so that it starts in 32-bit mode next time it is launched and every time afterwards
or
Scenario 4: at launch time, establish which architecture is being used, then re-launch in 32-bit mode if necessary
Scenarios 3 & 4 have the problem that very little is documented on how to do this and it might get me into trouble with the Mac App Store guidelines.
So far, I've established:
So far I can see only these options, none of which seem particularly great:
Solution 1 could get me into trouble with the MAS submission. Solution 2 would almost certainly do so at some stage.. only solution 3 would be perfect from a user's perspective but add a huge amount of complexity for minimal pay-off.
Any advice on how to do this "cleanly" and with reasonable effort would be highly appreciated!
Option 5: Create another executable that always runs as 32 bit and its sole purpose is to drive the 32 bit component in question. Launch that executable from your primary application and use some type of processor independent io to communicate with each other, probably sockets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With