feat: [SDK-4774] add Unity location opt-out plumbing#878
Open
fadi-george wants to merge 1 commit into
Open
Conversation
Generate OneSignal native dependency manifests per project and allow CI builds to disable the location module via ONESIGNAL_DISABLE_LOCATION without mutating package files. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Adds the Unity SDK plumbing for flag-controlled no-location native dependency resolution.
Details
Motivation
Unity builds need the same native location opt-out pattern as .NET, Capacitor, and Cordova without mutating shared package files. This lets apps exclude the native location module from iOS and Android builds while keeping the public
OneSignal.LocationAPI available as a graceful no-op path.Scope
ONESIGNAL_DISABLE_LOCATIONsupport layered over the Editor setting, with the environment variable taking precedence for CLI and CI builds.Assets/OneSignal/Editorinstead of rewriting packageEditorfiles.Testing
Unit testing
Not added; this is Unity Editor build-pipeline and native dependency resolution behavior.
Manual testing
examples/demo/run-ios.sh --no-installgenerated umbrella iOS and Android manifests.examples/demo-no-location/run-ios.sh --no-installgenerated granular iOS pods withoutOneSignalLocation.xcodebuildfor the no-location iOS simulator build completed withEXIT=0and noOneSignalLocation.frameworklinked.examples/demo-no-location/run-android.sh --no-installbuilt an APK with granular Android dependencies../run-all.sh --sdk=unity --platform=iospassed with 34 tests.Affected code checklist
Checklist
Overview
Testing
Final pass
Made with Cursor