Skip to content
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

feat(wallet-mobile): Add remote notifications #3744

Merged
merged 30 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a708e6e
WIP
michaeljscript Nov 13, 2024
efae07b
WIP
michaeljscript Nov 18, 2024
71bc6b6
Update build.gradle
michaeljscript Nov 18, 2024
4d0727d
Remove unused libs
michaeljscript Nov 18, 2024
e671e24
Fix android build
michaeljscript Nov 18, 2024
7879992
Fix lint
michaeljscript Nov 18, 2024
cef7dcb
Make notifications work on android
michaeljscript Nov 20, 2024
15531e3
Improve parsing
michaeljscript Nov 21, 2024
b24f0f8
WIP
michaeljscript Nov 22, 2024
e0ca044
WIP
michaeljscript Nov 26, 2024
7d41192
Fix iOS build
michaeljscript Nov 26, 2024
09656b5
WIP
michaeljscript Nov 27, 2024
ca4e1ca
Register remote notifications
michaeljscript Nov 27, 2024
ff05e57
Merge branch 'develop' into feat/remote-notifications
michaeljscript Dec 5, 2024
6dfeb59
fix ios build
michaeljscript Dec 6, 2024
00de30a
Merge branch 'develop' into feat/remote-notifications
michaeljscript Dec 6, 2024
76f66df
Merge branch 'develop' into feat/remote-notifications
michaeljscript Dec 6, 2024
2a4be64
Merge branch 'develop' into feat/remote-notifications
michaeljscript Dec 16, 2024
b873cbd
Merge branch 'develop' into feat/remote-notifications
michaeljscript Dec 19, 2024
1c694a1
Add env specific google services file for android
michaeljscript Dec 19, 2024
ee25e40
Merge branch 'develop' into feat/remote-notifications
michaeljscript Dec 19, 2024
21a791b
Add iOS notification settings
michaeljscript Dec 20, 2024
f5d0648
Merge branch 'develop' into feat/remote-notifications
michaeljscript Dec 20, 2024
dbbcf82
Update build.gradle
michaeljscript Dec 20, 2024
a41d76c
Merge branch 'feat/remote-notifications' of https://github.com/Emurgo…
michaeljscript Dec 20, 2024
63bdd5c
Merge branch 'develop' into feat/remote-notifications
michaeljscript Jan 1, 2025
f8fdd80
Remove artifacts
michaeljscript Jan 2, 2025
717c861
Remove old google services file
michaeljscript Jan 2, 2025
106246d
Use other project for dev
michaeljscript Jan 2, 2025
4a91780
Update yoroi.entitlements
michaeljscript Jan 2, 2025
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
15 changes: 11 additions & 4 deletions apps/wallet-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id 'com.google.gms.google-services'
}

apply plugin: "com.android.application"
apply plugin: "com.facebook.react"

Expand Down Expand Up @@ -186,16 +190,21 @@ android {

dependencies {

implementation project(':react-native-notifications')

implementation platform('com.google.firebase:firebase-bom:33.6.0')
implementation "com.google.firebase:firebase-messaging"

androidTestImplementation('com.wix:detox:+')
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'

// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

// implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')

// If your app supports Android versions before Ice Cream Sandwich (API level 14)
implementation('com.facebook.fresco:animated-base-support:1.3.0')

Expand All @@ -217,8 +226,6 @@ dependencies {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

implementation project(':react-native-notifications')

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
Expand Down
29 changes: 29 additions & 0 deletions apps/wallet-mobile/android/app/src/dev/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"project_info": {
"project_number": "1028338182097",
"project_id": "yoroi-mobile-dev-1",
"storage_bucket": "yoroi-mobile-dev-1.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1028338182097:android:19a81ded2005af76bca2f0",
"android_client_info": {
"package_name": "com.emurgo.dev"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is dev, yet 99140 looks prod.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a look

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Also made restrictions to production keys.

}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyABpYF2WWAlu66c_1UmyCA9VcBgg8RcLRA"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
67 changes: 67 additions & 0 deletions apps/wallet-mobile/android/app/src/main/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"project_info": {
"project_number": "526970676782",
"project_id": "yoroi-mobile-99140",
"storage_bucket": "yoroi-mobile-99140.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:526970676782:android:7eafa93ccb53f41ca021bf",
"android_client_info": {
"package_name": "com.emurgo"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDRxPyhvvI1QSSE7cjc12ac7uJnOa7SY1w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:526970676782:android:ca69aadf225bb5e1a021bf",
"android_client_info": {
"package_name": "com.emurgo.dev"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDRxPyhvvI1QSSE7cjc12ac7uJnOa7SY1w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:526970676782:android:ce7b04c50c003146a021bf",
"android_client_info": {
"package_name": "com.emurgo.nightly"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDRxPyhvvI1QSSE7cjc12ac7uJnOa7SY1w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
48 changes: 48 additions & 0 deletions apps/wallet-mobile/android/app/src/nightly/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"project_info": {
"project_number": "526970676782",
"project_id": "yoroi-mobile-99140",
"storage_bucket": "yoroi-mobile-99140.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:526970676782:android:ca69aadf225bb5e1a021bf",
"android_client_info": {
"package_name": "com.emurgo.dev"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDRxPyhvvI1QSSE7cjc12ac7uJnOa7SY1w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:526970676782:android:ce7b04c50c003146a021bf",
"android_client_info": {
"package_name": "com.emurgo.nightly"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDRxPyhvvI1QSSE7cjc12ac7uJnOa7SY1w"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"
}
2 changes: 2 additions & 0 deletions apps/wallet-mobile/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ buildscript {
classpath "org.mozilla.rust-android-gradle:plugin:0.9.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
classpath 'com.google.gms:google-services:4.3.15'
}
}

Expand Down Expand Up @@ -77,3 +78,4 @@ allprojects {
}
}
}

2 changes: 1 addition & 1 deletion apps/wallet-mobile/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ apply from: new File(["node", "--print", "require.resolve('expo/package.json')"]
useExpoModules()

include ':react-native-notifications'
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../../../node_modules/@jamsinclair/react-native-notifications/lib/android/app')
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-notifications/lib/android/app')
10 changes: 9 additions & 1 deletion apps/wallet-mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
"name": "yoroi",
"slug": "yoroi",
"plugins": [
"sentry-expo"
"sentry-expo",
[
"expo-build-properties",
{
"ios": {
"useFrameworks": "static"
}
}
]
],
"sdkVersion": "48.0.0",
"entryPoint": ".vscode/exponentIndex.js",
Expand Down
30 changes: 30 additions & 0 deletions apps/wallet-mobile/ios/GoogleService-Info-Nightly.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?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>API_KEY</key>
<string>AIzaSyD_QC_z6o8rY8Ui5g_Zl0clkUz8PxiHMss</string>
<key>GCM_SENDER_ID</key>
<string>526970676782</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.emurgo.yoroi-nightly</string>
<key>PROJECT_ID</key>
<string>yoroi-mobile-99140</string>
<key>STORAGE_BUCKET</key>
<string>yoroi-mobile-99140.firebasestorage.app</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:526970676782:ios:f2e0566b5e14585ca021bf</string>
</dict>
</plist>
30 changes: 30 additions & 0 deletions apps/wallet-mobile/ios/GoogleService-Info-Production.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?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>API_KEY</key>
<string>AIzaSyD_QC_z6o8rY8Ui5g_Zl0clkUz8PxiHMss</string>
<key>GCM_SENDER_ID</key>
<string>526970676782</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.emurgo.yoroi</string>
<key>PROJECT_ID</key>
<string>yoroi-mobile-99140</string>
<key>STORAGE_BUCKET</key>
<string>yoroi-mobile-99140.firebasestorage.app</string>
<key>IS_ADS_ENABLED</key>
<false></false>
<key>IS_ANALYTICS_ENABLED</key>
<false></false>
<key>IS_APPINVITE_ENABLED</key>
<true></true>
<key>IS_GCM_ENABLED</key>
<true></true>
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:526970676782:ios:91560a3aea4e90e9a021bf</string>
</dict>
</plist>
13 changes: 6 additions & 7 deletions apps/wallet-mobile/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ if linkage != nil
use_frameworks! :linkage => linkage.to_sym
end

use_frameworks! :linkage => :static

target 'yoroi' do
$RNGoogleMobileAdsAsStaticFramework = true
use_expo_modules!
post_integrate do |installer|
begin
Expand Down Expand Up @@ -53,13 +56,9 @@ target 'yoroi' do
:app_path => "#{Pod::Config.instance.installation_root}/.."
)

permissions_path = '../../../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-BluetoothPeripheral', :path => "#{permissions_path}/BluetoothPeripheral"
pod 'Permission-FaceID', :path => "#{permissions_path}/FaceID"
pod 'Permission-LocationAccuracy', :path => "#{permissions_path}/LocationAccuracy"
pod 'Permission-LocationAlways', :path => "#{permissions_path}/LocationAlways"
pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"
pod 'RNPermissions', :path => '../../../node_modules/react-native-permissions'
pod 'GoogleUtilities', :modular_headers => true


target 'yoroiTests' do
inherit! :complete
Expand Down
Loading
Loading