Skip to content

feat: support rn 0.76 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request 💡
url: https://github.com/ieow/react-native-google-acm/discussions/new?category=ideas
url: https://github.com/Metamask/react-native-acm/discussions/new?category=ideas
about: If you have a feature request, please create a new discussion on GitHub.
- name: Discussions on GitHub 💬
url: https://github.com/ieow/react-native-google-acm/discussions
url: https://github.com/Metamask/react-native-acm/discussions
about: If this library works as promised but you need help, please ask questions there.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ The [example app](/example/) demonstrates usage of the library. You need to run

It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.

If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/GoogleAcmExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-google-acm`.
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/GoogleAcmExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > @metamask/react-native-acm`.

To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-google-acm` under `Android`.
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `@metamask/react-native-acm` under `Android`.

You can use various commands from the root directory to work with the project.

Expand Down
2 changes: 1 addition & 1 deletion GoogleAcm.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Pod::Spec.new do |s|
s.authors = package["author"]

s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/ieow/react-native-google-acm.git", :tag => "#{s.version}" }
s.source = { :git => "https://github.com/MetaMask/react-native-acm.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm,swift}"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# react-native-google-acm
# @metamask/react-native-acm

Google ACM for react-native

Expand Down
16 changes: 5 additions & 11 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ def supportsNamespace() {
return (major == 7 && minor >= 3) || major >= 8
}

kotlin {
jvmToolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}

android {
if (supportsNamespace()) {
namespace "com.googleacm"
Expand Down Expand Up @@ -68,8 +62,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_1
targetCompatibility JavaVersion.VERSION_1_1
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

Expand All @@ -84,9 +78,9 @@ dependencies {
implementation "com.facebook.react:react-android"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

implementation "androidx.credentials:credentials:1.2.0"
implementation "androidx.credentials:credentials-play-services-auth:1.2.0"
implementation "com.google.android.libraries.identity.googleid:googleid:1.0.1"
implementation "androidx.credentials:credentials:1.5.0"
implementation "androidx.credentials:credentials-play-services-auth:1.5.0"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
}
Expand Down
4 changes: 2 additions & 2 deletions android/src/main/java/com/googleacm/GoogleAcmModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class GoogleAcmModule(reactContext: ReactApplicationContext) :
val nonce = requestObject.getString("nonce") ?: ""
val serverClientId = requestObject.getString("serverClientId") ?: ""
val autoSelectEnabled = requestObject.getBoolean("autoSelectEnabled") ?: false
// val filterByAuthorizedAccounts = requestObject.getBoolean("filterByAuthorizedAccounts") ?: false
val filterByAuthorizedAccounts = requestObject.getBoolean("filterByAuthorizedAccounts") ?: false

val googleIdOption = GetGoogleIdOption
.Builder()
.setFilterByAuthorizedAccounts(false)
.setFilterByAuthorizedAccounts(filterByAuthorizedAccounts)
.setServerClientId(serverClientId)
.setAutoSelectEnabled(autoSelectEnabled)
.setNonce(nonce)
Expand Down
102 changes: 51 additions & 51 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1556,7 +1556,7 @@ DEPENDENCIES:
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- GoogleAcm (from `../..`)
- GoogleAcm (from `../node_modules/@metamask/react-native-acm`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
Expand Down Expand Up @@ -1638,7 +1638,7 @@ EXTERNAL SOURCES:
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
GoogleAcm:
:path: "../.."
:path: "../node_modules/@metamask/react-native-acm"
hermes-engine:
:podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
:tag: hermes-2025-01-13-RNv0.78.0-a942ef374897d85da38e9c8904574f8376555388
Expand Down Expand Up @@ -1768,69 +1768,69 @@ SPEC CHECKSUMS:
FBLazyVector: e32d34492c519a2194ec9d7f5e7a79d11b73f91c
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
GoogleAcm: a007eafe954093a66f8c72e2cc03ac0d033b0706
GoogleAcm: 6800eea1922bc30585892a2ec2a665823c680638
hermes-engine: 2771b98fb813fdc6f92edd7c9c0035ecabf9fee7
RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
RCTDeprecation: be794de7dc6ed8f9f7fbf525f86e7651b8b68746
RCTRequired: a83787b092ec554c2eb6019ff3f5b8d125472b3b
RCTTypeSafety: 48ad3c858926b1c46f46a81a58822b476e178e2c
React: 3b5754191f1b65f1dbc52fbea7959c3d2d9e39c9
React-callinvoker: 6beeaf4c7db11b6cc953fac45f2c76e3fb125013
React-Core: 88e817c42de035378cc71e009193b9a044d3f595
React-CoreModules: dcf764d71efb4f75d38fcae8d4513b6729f49360
React-cxxreact: 8cdcc937c5fbc406fe843a381102fd69440ca78a
React-Core: 8a10ac9de53373a3ecb5dfcbcf56df1d3dad0861
React-CoreModules: af6999b35c7c01b0e12b59d27f3e054e13da43b1
React-cxxreact: 833f00155ce8c2fda17f6d286f8eaeff2ececc69
React-debug: 440175830c448e7e53e61ebb8d8468c3256b645e
React-defaultsnativemodule: 4824bcd7b96ee2d75c28b1ca21f58976867f5535
React-domnativemodule: a421118b475618961cf282e8ea85347cc9bb453c
React-Fabric: 6ac7de06009eb96b609a770b17abba6e460b5f45
React-FabricComponents: e3bc2680a5a9a4917ff0c8d7f390688c30ef753c
React-FabricImage: 8bad558dec7478077974caa96acc79692d6b71f5
React-defaultsnativemodule: a970effe18fe50bdbbb7115c3297f873b666d0d4
React-domnativemodule: 45f886342a724e61531b18fba1859bb6782e5d62
React-Fabric: 69f1881f2177a8512304a64157943548ab6df0cf
React-FabricComponents: f54111c8e2439fc273ab07483e3a7054ca1e75af
React-FabricImage: 9ad2619dfe8c386d79e8aaa87da6e8f018ab9592
React-featureflags: b9cf9b35baca1c7f20c06a104ffc325a02752faa
React-featureflagsnativemodule: dc93d81da9f41f7132e24455ec8b4b60802fd5b0
React-graphics: aaa5a38bea15d7b895b210d95d554af45a07002a
React-hermes: 08ad9fb832d1b9faef391be17309aa6a69fad23b
React-idlecallbacksnativemodule: aacea33ef6c511a9781f9286cc7cdf93f39bba14
React-ImageManager: c596c3b658c9c14607f9183ed0f635c8dd77987c
React-jserrorhandler: 987609b2f16b7d79d63fcd621bf0110dd7400b35
React-jsi: afa286d7e0c102c2478dc420d4f8935e13c973fc
React-jsiexecutor: 08f5b512b4db9e2f147416d60a0a797576b9cfef
React-jsinspector: 5a94bcae66e3637711c4d96a00038ab9ec935bf5
React-jsinspectortracing: a12589a0adbb2703cbc4380dabe9a58800810923
React-jsitracing: 0b1a403d7757cec66b7dd8b308d04db85eef75f3
React-logger: 304814ae37503c8eb54359851cc55bd4f936b39c
React-Mapbuffer: b588d1ca18d2ce626f868f04ab12d8b1f004f12c
React-microtasksnativemodule: 11831d070aa47755bb5739069eb04ec621fec548
React-NativeModulesApple: 79a4404ac301b40bec3b367879c5e9a9ce81683c
React-perflogger: 0ea25c109dba33d47dec36b2634bf7ea67c1a555
React-performancetimeline: f74480de6efbcd8541c34317c0baedb433f27296
React-featureflagsnativemodule: 7f1bc76d1d2c5bede5e753b8d188dbde7c59b12f
React-graphics: 069e0d0b31ed1e80feb023ad4f7e97f00e84f7b9
React-hermes: 63df5ac5a944889c8758a6213b39ed825863adb7
React-idlecallbacksnativemodule: 4c700bd7c0012adf904929075a79418b828b5ffc
React-ImageManager: 5d1ba8a7bae44ebba43fc93da64937c713d42941
React-jserrorhandler: 0defd58f8bb797cdd0a820f733bf42d8bee708ce
React-jsi: 99d6207ec802ad73473a0dad3c9ad48cd98463f6
React-jsiexecutor: 8c8097b4ba7e7f480582d6e6238b01be5dcc01c0
React-jsinspector: ea148ec45bc7ff830e443383ea715f9780c15934
React-jsinspectortracing: 46bb2841982f01e7b63eaab98140fa1de5b2a1db
React-jsitracing: c1063fc2233960d1c8322291e74bca51d25c10d7
React-logger: 763728cf4eebc9c5dc9bfc3649e22295784f69f3
React-Mapbuffer: 63278529b5cf531a7eaf8fc71244fabb062ca90c
React-microtasksnativemodule: 6a39463c32ce831c4c2aa8469273114d894b6be9
React-NativeModulesApple: fd0545efbb7f936f78edd15a6564a72d2c34bb32
React-perflogger: 5f8fa36a8e168fb355efe72099efe77213bc2ac6
React-performancetimeline: 8c0ecfa1ae459cc5678a65f95ac3bf85644d6feb
React-RCTActionSheet: 2ef95837e89b9b154f13cd8401f9054fc3076aff
React-RCTAnimation: 33d960d7f58a81779eea6dea47ad0364c67e1517
React-RCTAppDelegate: d9a3d89b3dd9bcfed7d7c55b0b7e48a97e5cb31e
React-RCTBlob: 74c986a02d951931d2f6ed0e07ed5a7eb385bfc0
React-RCTFabric: bf6790a26671e95d9fd680000db641488fc0d0d4
React-RCTFBReactNativeSpec: 5fe1cdf377ffb52bb3833e9f8f5cc03765b6a22e
React-RCTImage: 2c58b5ddeb3c65e52f942bbe13ff9c59bd649b09
React-RCTLinking: b6b14f8a3e62c02fc627ac4f3fb0c7bd941f907c
React-RCTNetwork: 1d050f2466c1541b339587d46f78d5eee218d626
React-RCTSettings: 8148f6be0ccc0cfe6e313417ebf8a479caaa2146
React-RCTText: 64114531ad1359e4e02a4a8af60df606dbbabc25
React-RCTVibration: f4859417a7dd859b6bf18b1aba897e52beb72ef6
React-RCTAnimation: 46abefd5acfda7e6629f9e153646deecc70babd2
React-RCTAppDelegate: 7e58e0299e304cceee3f7019fa77bc6990f66b22
React-RCTBlob: f68c63a801ef1d27e83c4011e3b083cc86a200d7
React-RCTFabric: c59f41d0c4edbaac8baa232731ca09925ae4dda7
React-RCTFBReactNativeSpec: 3240b9b8d792aa4be0fb85c9898fc183125ba8de
React-RCTImage: 34e0bba1507e55f1c614bd759eb91d9be48c8c5b
React-RCTLinking: a0b6c9f4871c18b0b81ea952f43e752718bd5f1d
React-RCTNetwork: bdafd661ac2b20d23b779e45bf7ac3e4c8bd1b60
React-RCTSettings: 98aa5163796f43789314787b584a84eba47787a9
React-RCTText: 424a274fc9015b29de89cf3cbcdf4dd85dd69f83
React-RCTVibration: 92d9875a955b0adb34b4b773528fdbbbc5addd6c
React-rendererconsistency: 5ac4164ec18cfdd76ed5f864dbfdc56a5a948bc9
React-rendererdebug: 3dc1d97bbee0c0c13191e501a96ed9325bbd920e
React-rendererdebug: 710dbd7990e355852c786aa6bc7753f6028f357a
React-rncore: 0bace3b991d8843bb5b57c5f2301ec6e9c94718b
React-RuntimeApple: 1e1e0a0c6086bc8c3b07e8f1a2f6ca99b50419a0
React-RuntimeCore: d39322c59bef2a4b343fda663d20649f29f57fcc
React-RuntimeApple: 701ec44a8b5d863ee9b6a2b2447b6a26bb6805a1
React-RuntimeCore: a82767065b9a936b05e209dc6987bc1ea9eb5d2d
React-runtimeexecutor: 876dfc1d8daa819dfd039c40f78f277c5a3e66a6
React-RuntimeHermes: 44f5f2baf039f249b31ea4f3e224484fd1731e0e
React-runtimescheduler: 3b3c5b50743bb8743ca49b9e5a70c2c385f156e1
React-RuntimeHermes: e7a051fd91cab8849df56ac917022ef6064ad621
React-runtimescheduler: c544141f2124ee3d5f3d5bf0d69f4029a61a68b0
React-timing: 1ee3572c398f5579c9df5bf76aacddf5683ff74e
React-utils: 0cfb7c7fb37d4e5f31cc18ffc7426be0ae6bf907
ReactAppDependencyProvider: b48473fe434569ff8f6cb6ed4421217ebcbda878
ReactCodegen: 78b64f0ad96ef733616f54d0c20923f6c67287fd
ReactCommon: 547db015202a80a5b3e7e041586ea54c4a087180
React-utils: 18703928768cb37e70cf2efff09def12d74a399e
ReactAppDependencyProvider: 4893bde33952f997a323eb1a1ee87a72764018ff
ReactCodegen: 99ea3536c05be3c18d0c517acb56b5a6d726fc7b
ReactCommon: 865ebe76504a95e115b6229dd00a31e56d2d4bfe
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
Yoga: 66a9a23a82dd4081b393babe509967097759b3d6
Yoga: e14bad835e12b6c7e2260fc320bd00e0f4b45add

PODFILE CHECKSUM: 156d47fb2b5b2c14bab4d09166adb4b87340ef29

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
Loading
Loading