App distribution on macOS 10.14


#1

Dear oF fellows,

Until macOS 10.14 Mohave I could build solid apps with oF and distribute them including code signing. But since 10.14 and Xcode 10, it is a mess. There are a couple of issues and I wonder if others have solved this already:

  • No (local) access to the camera [solved]
  • Still seeing errors in the console when opening and closing the oF app [open]
  • Building a signed bundle with camera access fails. [open]

No (local) access to the camera

I’ve updated the plist file and it looks now like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</string>
	<key>CFBundleIconFile</key>
	<string>${ICON}</string>
	<key>CFBundleIdentifier</key>
	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1.3.4</string>
	<key>NSCameraUsageDescription</key>
	<string>Please allow to use the camera.</string>
</dict>
</plist>

After this step, you can run the app locally.

Still seeing errors in the console when opening and closing the oF app

When opening the app…

2018-11-06 10:04:51.677132+0100 Projectify[17307:957483] [default] Unable to load Info.plist exceptions (eGPUOverrides)
2018-11-06 10:04:51.851738+0100 Projectify[17307:957472] MessageTracer: Falling back to default whitelist
2018-11-06 10:04:58.345174+0100 Projectify[17307:957353] [] CMIO_Unit_ScopeElement.h:200:SafeGetElement Throwing err: -67454
2018-11-06 10:04:58.346590+0100 Projectify[17307:957353] [] CMIOUnitFigBaseObjectImpl.c:246:CMIOUnitCreateFromDescription Invalid paramater
2018-11-06 10:04:58.360944+0100 Projectify[17307:957353] [] CMIO_Unit_Input_Device.cpp:244:GetPropertyInfo CMIOUInputFromProcs::GetPropertyInfo() failed for id 102, Error: -67456

After closing the app…

2018-11-06 10:05:32.318673+0100 Projectify[17307:957353] [] CMIOHardware.cpp:938:CMIODeviceStopStream the System is exiting
2018-11-06 10:05:32.318764+0100 Projectify[17307:957353] [] CMIOHardware.cpp:1374:CMIOStreamCopyBufferQueue the System is exiting
2018-11-06 10:05:32.318872+0100 Projectify[17307:957353] [] CMIOHardware.cpp:339:CMIOObjectGetPropertyData the System is exiting
2018-11-06 10:05:32.318935+0100 Projectify[17307:957353] [] CMIO_DALA_System.cpp:264:GetPropertyData error 1970171760 (unop) getting property selector (inot) scope (glob) element 0
2018-11-06 10:05:32.319130+0100 Projectify[17307:957353] [] CMIOHardware.cpp:339:CMIOObjectGetPropertyData the System is exiting
2018-11-06 10:05:32.319196+0100 Projectify[17307:957353] [] CMIO_DALA_System.cpp:264:GetPropertyData error 1970171760 (unop) getting property selector (inot) scope (glob) element 0

The app works, so it might be warnings only. But I don’t like the feeling of having a potential crashing app without knowing what to do to avoid it.

Building a signed bundle with camera access fails

To make the app run on other computers with macOS 10.14, more steps have to be performed. But until now I was not successful. These are the steps I did so far:

  1. In the App Target Settings, go to Hardened Runtime -> Resource access and enable the camera. This step creates a [myapp].entitlements file.

  2. In the build settings, go to signing -> Enable hardened runtime and set to true if not set already.

  3. Select from the menu Product -> Archive

  4. In Xcode Organizer, click on the freshly build Archive, click on Distribute App

  5. In the wizard, select Developer ID, distribute directly to customers

  6. Next screen: Upload (Send to Apple Notary)

Now it stops with an error, telling that the App should be rebuild with Hardened Runtime enabled.

When you don’t choose for uploading the app to the notary, you can build successfully an app bundle, but it will crash on another computer when you try to start it.

I’m running in circles. Did someone solve this problem already? Without proper signing and hardened runtime, our ofApps do not work anymore on someone else’s computer.

Cheers!


Xcode 10 / mojave issues