Ewan
Ewan

Reputation: 1

Remove Wave XR permissions from AndroidManifest in Unity

I am building onto both Vive and Oculus platforms in my Unity project. I need the VIVE Wave XR plugin in my packages to build to Vive. However, this means when I build to Oculus, I have Vive permissions in the AndroidManifest within my APK so I am blocked from uploading it by Oculus. What is the best way to remove them?

Tried solutions:

  1. I can use Android Studio to 'Analyze APK...' then edit it manually but this is not suitable for me as I need the process to be automated.
  2. I can use a pre and post build processor to remove and then replace the offending file from the Vive package so that when Gradle merges all of the manifests it will not detect the Vive one. This sort of works but is rather hacky and the post-processor doesn't run if the build fails, leaving the offending file in the incorrect location.
  3. I have looked into using a 'Custom Main Manifest' in (Project Settings -> Player -> Publishing Settings -> Build) but this only seems to add to the final manifest rather than remove from. There are other options to change Gradle templates in the Publishing Settings but I don't understand how to use them. Would any of those be helpful?

Upvotes: 0

Views: 276

Answers (1)

Ewan
Ewan

Reputation: 1

I found the solution here.

Specifically this section:

Upvotes: 0

Related Questions