Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Deep linking #928

Draft
wants to merge 18 commits into
base: master-qa
Choose a base branch
from
Draft
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
1 change: 0 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import ThemeManager from './src/custom-theme/ThemeManager';
import BaseProps from './src/types/BaseProps';
import { ThemeType } from './src/types/Theme';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import RNBootSplash from 'react-native-bootsplash';

export interface Props extends BaseProps {}

Expand Down
142 changes: 85 additions & 57 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,72 +1,100 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.emobility">
package="com.emobility">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/BootTheme">
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/BootTheme">

<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAkTPaxSFLk2UJEf0IJd3exWzoAgd3DZPk"/>
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAkTPaxSFLk2UJEf0IJd3exWzoAgd3DZPk"/>
<uses-library android:name="org.apache.http.legacy" android:required="false"/>

<!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
See README(https://goo.gl/l4GJaQ) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_ic_notification" />
<!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
See README(https://goo.gl/l4GJaQ) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_ic_notification"/>

<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/primary_dark" />
<!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
notification message. See README(https://goo.gl/6BKBk7) for more. -->
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/primary_dark"/>

<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="e-Mobility"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="e-Mobility"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="e-Mobility notification channel"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="e-Mobility"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_name"
android:value="e-Mobility"/>
<meta-data android:name="com.dieam.reactnativepushnotification.notification_channel_description"
android:value="e-Mobility notification channel"/>

<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="io.invertase.firebase.messaging.RNFirebaseMessagingService"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>

<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService"/>

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="eMobility" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"/>
<data android:host="*.e-mobility-group.com"/>
<data android:host="*.qa-e-mobility-group.com"/>
<data android:host="*.e-mobility-labs.com"/>
<data android:host="*.e-mobility-labs.org"/>
<data android:pathPrefix="/auth/verify-email"/>
<data android:pathPrefix="/auth/define-password"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"/>
<data android:host="*.e-mobility-group.org"/>
<data android:host="*.e-mobility-group.eu"/>
<data android:host="*.e-mobility-group.fr"/>
<data android:host="*.qa-e-mobility-group.org"/>
<data android:host="*.qa-e-mobility-group.eu"/>
<data android:host="*.qa-e-mobility-group.fr"/>
<data android:host="*.e-mobility-labs.eu"/>
<data android:host="*.e-mobility-labs.fr"/>
<data android:pathPrefix="/auth/verify-email"/>
<data android:pathPrefix="/auth/define-password"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="eMobility"/>
</intent-filter>
</activity>
</application>
</manifest>
12 changes: 8 additions & 4 deletions ios/eMobility.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -998,10 +998,12 @@
CODE_SIGN_ENTITLEMENTS = eMobility/eMobility.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 3;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = SG7N28T3A2;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = eMobility.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/Frameworks @executable_path/Frameworks";
Expand Down Expand Up @@ -1045,7 +1047,7 @@
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-splash-screen\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/yoga\"",
);
MARKETING_VERSION = 2.7.1;
MARKETING_VERSION = 2.7.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1073,9 +1075,11 @@
CODE_SIGN_ENTITLEMENTS = eMobility/eMobility.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 8;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = SG7N28T3A2;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = eMobility.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/Frameworks @executable_path/Frameworks";
Expand Down Expand Up @@ -1119,7 +1123,7 @@
"\"${PODS_CONFIGURATION_BUILD_DIR}/react-native-splash-screen\"",
"\"${PODS_CONFIGURATION_BUILD_DIR}/yoga\"",
);
MARKETING_VERSION = 2.7.1;
MARKETING_VERSION = 2.7.2;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
12 changes: 9 additions & 3 deletions ios/eMobility/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,19 @@ - (UIInterfaceOrientationMask)application:(UIApplication *)application supported
return [Orientation getOrientation];
}

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler

- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity
restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
return [RCTLinkingManager application:application
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
@end
Loading