M1 and iOS Apps

There aren’t many details around about how iOS works on an M1 mac. Here are some things I have found:

A promo code for an iOS app can’t be redeemed from the App Store on an M1 Mac
This code must be redeemed on an iOS device.
Please try redeeming this code on your iOS device
[ OK ]
Redeeming a promo code in the App Store on an M1 Mac
Once redeemed on an iOS device under your Apple ID, you can then install it on your M1 Mac

I did this experiment using my app, where any options I had (e.g. allow/disallow VPP, allow family sharing) were set to be the most permissive option. It is plausible that there are settings I wasn’t aware of, or settings which would change this behaviour.

Running OpenGL ES apps in the Xcode simulator is slow, but fast when run outside

Disappointingly for me, I was hoping that having an M1 Mac would mean that my app would run in real time in the simulator, but I believe that the simulator does software rendering for OpenGL ES applications still. Now, I still have to jump through many hoops to record videos of my application running at the screen resolutions wanted by Apple.

The folder structure

When I ran my application in a debugger, argv[0] gave a path like this:

/private/var/folders/js/cdhpdw5j6jg_4dgpxpkppz340000gn/X/4468895A-B8ED-5034-846F-682385795C24/d/Wrapper/twobirds.app/twobirds

You can navigate to this location, but it is a read only filesystem:

% cd /private/var/folders/js/cdhpdw5j6jg_4dgpxpkppz340000gn/X/4468895A-B8ED-5034-846F-682385795C24/d/Wrapper/twobirds.app/
% touch foo
touch: foo: Read-only file system

The writable folder looked like this:

/Users/andy/Library/Containers/72A69E08-1B7C-4DD7-A84B-29A4B56354F5/Data/Documents/

In here, I could create new files just fine, and I could also view the files for the app:

% ls -l
 total 104
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-throw-1767.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 22:21 best-throw-187.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-throw-292.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-throw-506.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-throw-559.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-throw-807.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-win-1767.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 22:21 best-win-187.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-win-292.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-win-506.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-win-559.dat
 -rw-r--r--@ 1 andy  staff  32 12 Dec 21:27 best-win-807.dat
 -rw-r--r--@ 1 andy  staff  88 12 Dec 22:22 game.dat

(the game records your best “time before launching the stone” and “time before hitting all the birds” for each level… these might be used one day, but are unused – they are very small, as I only needed to save the time the stone was thrown, the angle and any fudge factors done by the physics engine)

Seeing that all these files give the user read and write permission, it seems like they should be editable – and indeed, I could edit them and save them just fine using vim.

Zoom and Full Screen

With my app, clicking on the green full screen icon does nothing:

Screenshot showing the green full screen icon.

Similarly, choosing Window->Zoom does nothing:

Screenshot showing Window menu with Zoom highlighted

I would guess that this is because of my project’s settings in Xcode:

Deployment info:
iOS 12.4 iPhone (checked)
iPad (checked)
Mac (unchecked)

Main interface (blank)
Device Orientation: Portrait (unchecked)
Upside Down (unchecked)
Landscape Left (checked)
Landscape Right (checked)

Status Bar Style: Default
Hide status bar (unchecked)
Requires full screen (checked)
Supports multiple windows (unchecked)
The “Requires full screen” checkbox seems suspicious.

I unchecked “Requires full screen” to see if that is what was the problem, but it did nothing. Not sure what determines whether an App can be resized.

Unexpected prompts

When doing some experiments with “Zoom”, I read that the Overcast app worked well. So, I installed it and had a play. Indeed, it did work well with resizing. Now I seem to be getting this prompt occasionally:

You are opening the application "Overcast" for the first time. Are you sure you want to open this application?
This application is in a folder named "Wrapper". To see the application in the Finder without opening it, click Show Application.
[ Open ]
[ Show Application ]
[ Cancel ]
This prompt appears occasionally when I log in. I have opened this application before.

When it happened the first time, I needed to click “Cancel” three times before it stopped reappearing. The second time, it just appeared once.

I don’t know what this is about.

Other

Happy to try other simple experiments if you have questions. I didn’t really poke around in /Applications, but I can confirm there is a “Two Birds.app” living there.

Leave a Reply

Your email address will not be published.