Publishing an app on the Oculus Quest Store on a Mac

Since the Quest OS is based on Android, I expected publishing my app would be as easy as on the Play Store. I was wrong.

Web upload is broken

My first step was to head to https://developer.oculus.com/manage and create an app. Then I proceeded to the page where you set up a release and upload your apk. However the web tool said it was being deprecated, and I should use the command-line tool or head over to another release creation page.

The App Submission page was replaced.
But the new experience's upload feature was deprecated.

Oculus Developer Hub

The dialog mentions the Oculus Developer Hub. It's a native application that supposedly lets you upload to the Store. I followed the instructions and got it to "upload", but in the end, it only got installed on my Quest locally, and never ended up showing up on the Store.

Clicking the Upload button on the ALPHA row actually uploads to the device, not the ALPHA channel.
When I drag an APK to it, it requires that my Quest be connected beause it actually uploads to the device, not the ALPHA channel.

So I couldn't find a way to actually upload to the store with it.

Oculus tool in Unity

It turned out to be a wild goose chase, as explained very well in this post. At the end they mention using the Oculus Integration package. This package adds an Oculus menu and an upload tool in it.

This package supposedly includes an apk uploading tool.

Installing this package performed a few migrations. I didn't have the motivation to read what it was all about, since my primary goal was to upload my first apk to the Alpha channel so that a friend of mine could test it without having to turn on developer mode on their device (also a chore of its own).

Migrations...
Migrations...
Migrations...
Migrations...
Migrations...

The migrations actually took a while. Did you notice how the package is 400 MB large? At last I opened the OVR Platform Tool. And to my surprise, the Upload button, which should have been at the bottom of the dialog, according to the post I was reading, was not here on my version of Unity.

There is no Upload button.

Also I noticed Unity mentioned this about my assets:

A meta data file (.meta) exists but its asset 'Assets/Oculus/VR/Editor/Tools/ovr-platform-util.exe' can't be found. When moving or deleting files outside of Unity, please ensure that the corresponding .meta file is moved or deleted along with it.
UnityEditor.AssetDatabase:Refresh ()

It looks like the Oculus Integration package ships with the Windows version of the ovr-platform-util command-line tool. I'm running Unity on my Mac. Hence the silent error.

Last resort: command-line tool

Upon running the tool, it tells me that my build is 32-bit only, and that my command-line tool is out of date. The 32-bit only thing didn't prevent me from building an apk and installing it on my Quest in developer mode. I guess for optimization reasons, they want published apps to be more optimized.

% ./ovr-platform-util upload-quest-build --app-id [app id] --app-secret [app secret] --apk ~/my_path/my.apk --channel ALPHA

Logs are written to: /var/folders/ym/....log
***************************************************************
* Your copy of Oculus Platform Command Line Utility is old.   *
* Version 1.67.0.000001 has been released on Fri Oct 08 2021. *
* Please use the following command to update it:              *
*   $ ovr-platform-util self-update                           *
***************************************************************

Validating build...


ERROR: Validation identified the following errors:
This app includes the following 32-bit only (armeabi-v7a) libraries: libMonoPosixHelper.so, libOVRPlugin.so, libOculusXRPlugin.so, libmain.so, libmono-native.so, libmonobdwgc-2.0.so, libunity.so, libvrapi.so

I tried to update, but it turns out my version wasn't out of date like I misunderstood. It's just literally old.

% ./ovr-platform-util self-update

Logs are written to: /var/folders/ym/....log
Checking for the latest version
Already running the latest version 1.67.0.000001

I'm used to enabling ARM64 now, since I had to do it in my previous game for Android (see post).

Building in 64 bit

Now the built fails.

BuildFailedException: Oculus Utilities Plugin with OpenXR only supports linear lighting. Please set 'Rendering/Color Space' to 'Linear' in Player Settings
OVRGradleGeneration.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at Assets/Oculus/VR/Editor/OVRGradleGeneration.cs:141)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:436)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/bokken/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:402)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
Changing the Color Space to Linear.

And finally:

% ./ovr-platform-util upload-quest-build --app-id [app id] --app-secret [app secret] --apk my_app.apk --channel ALPHA

Logs are written to: /var/folders/ym/...
***************************************************************
* Your copy of Oculus Platform Command Line Utility is old.   *
* Version 1.67.0.000001 has been released on Fri Oct 08 2021. *
* Please use the following command to update it:              *
*   $ ovr-platform-util self-update                           *
***************************************************************

Validating build...
NOTE: 
Your manifest includes the following permissions restricted by Oculus:
 - android.permission.RECORD_AUDIO
Please remove these permissions if they are not needed by your application. If they are needed, you must include justification in the “Notes for the Reviewer” field when submitting your application for review. Failure to provide justification will result in the rejection of your application.
This app contains both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) libraries. This consumes extra storage and increases download times.  Consider updating your build to target 64-bit only.



Preparing for upload...

Uploading APK...

Uploading...
100% [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   

Waiting for processing to begin...

패키지 콘텐츠 확인 중 (2 / 3)
100% [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   

CDN으로 푸시 중 (3 / 3)
100% [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   

Total time: 1m 0s.
Total bytes: 70073454
Uploaded bytes: 70073454

Created Build ID: [buildid]


Your build has been successfully uploaded, and is now running validation and compatibility tests. For details please visit:
https://dashboard.oculus.com/application/[app id]/build/[buildid]/tests

https://developer.oculus.com/resources/publish-release-channels/

Initially, the Alpha, Beta, and Release Candidate channels are empty and contain no users, not even yourself

But it's impossible to find. There's even a thread on Reddit about that.

Fast forward a few minutes, and I did indeed find it on my Quest in the Store. I had to scroll all the way down, past a few extra page queries. My friend also found and installed it ok.