From 758ea75c8aaa665c78bac025a2e65fcee2f2e508 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 24 Mar 2021 10:10:47 -1000 Subject: [PATCH 1/7] add apple-app-site-association --- apple-app-site-association | 16 +++ ios/ExpensifyCash/AppDelegate.m | 22 +++- ios/ExpensifyCash/Chat.entitlements | 5 + ios/ExpensifyCash/Info.plist | 185 +++++++++++++++------------- 4 files changed, 137 insertions(+), 91 deletions(-) create mode 100644 apple-app-site-association diff --git a/apple-app-site-association b/apple-app-site-association new file mode 100644 index 000000000000..4e6aeb8f4a3a --- /dev/null +++ b/apple-app-site-association @@ -0,0 +1,16 @@ +{ + "applinks": { + "apps": [], + "details": [ + { + "appID": "368M544MTT.com.chat.expensify.chat", + "paths": [ + "/r/*", + "/settings/*", + "/setpassword/*", + "/details/*" + ] + } + ] + } +} diff --git a/ios/ExpensifyCash/AppDelegate.m b/ios/ExpensifyCash/AppDelegate.m index 63afe3635692..7c07c1045495 100644 --- a/ios/ExpensifyCash/AppDelegate.m +++ b/ios/ExpensifyCash/AppDelegate.m @@ -2,6 +2,7 @@ #import #import +#import #import #import @@ -32,7 +33,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( { // Configure firebase [FIRApp configure]; - + #ifdef FB_SONARKIT_ENABLED InitializeFlipper(application); #endif @@ -49,11 +50,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; - + // Define UNUserNotificationCenter UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self; - + return YES; } @@ -66,4 +67,19 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge #endif } +- (BOOL)application:(UIApplication *)application + openURL:(NSURL *)url + options:(NSDictionary *)options +{ + return [RCTLinkingManager application:application openURL:url options:options]; +} + +- (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity + restorationHandler:(nonnull void (^)(NSArray> * _Nullable))restorationHandler +{ + return [RCTLinkingManager application:application + continueUserActivity:userActivity + restorationHandler:restorationHandler]; +} + @end diff --git a/ios/ExpensifyCash/Chat.entitlements b/ios/ExpensifyCash/Chat.entitlements index 903def2af530..e7d36342775d 100644 --- a/ios/ExpensifyCash/Chat.entitlements +++ b/ios/ExpensifyCash/Chat.entitlements @@ -4,5 +4,10 @@ aps-environment development + com.apple.developer.associated-domains + + applinks:www.expensify.cash + applinks:expensify.cash + diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist index fdead45afb12..b266ee79cdbd 100644 --- a/ios/ExpensifyCash/Info.plist +++ b/ios/ExpensifyCash/Info.plist @@ -1,99 +1,108 @@ - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - $(PRODUCT_NAME) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0.5 - CFBundleSignature - ???? - CFBundleVersion - 1.0.5.28 - ITSAppUsesNonExemptEncryption - - LSApplicationQueriesSchemes - - venmo - - LSRequiresIPhoneOS - - LSSupportsOpeningDocumentsInPlace - - NSAppTransportSecurity - NSAllowsArbitraryLoads + CFBundleDevelopmentRegion + en + CFBundleDisplayName + $(PRODUCT_NAME) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0.5 + CFBundleSignature + ???? + CFBundleVersion + 1.0.5.28 + ITSAppUsesNonExemptEncryption + + LSApplicationQueriesSchemes + + venmo + + LSRequiresIPhoneOS - NSExceptionDomains + LSSupportsOpeningDocumentsInPlace + + NSAppTransportSecurity - localhost + NSAllowsArbitraryLoads + + NSExceptionDomains - NSExceptionAllowsInsecureHTTPLoads - - NSIncludesSubdomains - + localhost + + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + + + www.expensify.com.dev + + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + + - www.expensify.com.dev + + NSCameraUsageDescription + Your camera is used to create chat attachments. + NSLocationWhenInUseUsageDescription + + NSPhotoLibraryAddUsageDescription + Your camera roll is used to store chat attachments. + NSPhotoLibraryUsageDescription + Your photos are used to create chat attachments. + UIAppFonts + + GTAmericaExp-Bold.otf + GTAmericaExp-Light.otf + GTAmericaExp-Medium.otf + GTAmericaExp-Regular.otf + GTAmericaExp-Thin.otf + GTAmericaExpMono-Rg.otf + GTAmericaExp-BdIt.otf + GTAmericaExp-MdIt.otf + GTAmericaExp-RgIt.otf + + UIBackgroundModes + + remote-notification + + UIFileSharingEnabled + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + + UIViewControllerBasedStatusBarAppearance + + CFBundleURLTypes + - NSExceptionAllowsInsecureHTTPLoads - - NSIncludesSubdomains - + CFBundleURLSchemes + + expensify-cash + - + - NSCameraUsageDescription - Your camera is used to create chat attachments. - NSLocationWhenInUseUsageDescription - - NSPhotoLibraryAddUsageDescription - Your camera roll is used to store chat attachments. - NSPhotoLibraryUsageDescription - Your photos are used to create chat attachments. - UIAppFonts - - GTAmericaExp-Bold.otf - GTAmericaExp-Light.otf - GTAmericaExp-Medium.otf - GTAmericaExp-Regular.otf - GTAmericaExp-Thin.otf - GTAmericaExpMono-Rg.otf - GTAmericaExp-BdIt.otf - GTAmericaExp-MdIt.otf - GTAmericaExp-RgIt.otf - - UIBackgroundModes - - remote-notification - - UIFileSharingEnabled - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - UIInterfaceOrientationPortraitUpsideDown - - UIViewControllerBasedStatusBarAppearance - - - + \ No newline at end of file From e14d72aa9b3bd7768c42160c7d78f8a686359781 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 24 Mar 2021 11:10:57 -1000 Subject: [PATCH 2/7] fix webpack config --- config/webpack/webpack.common.js | 1 + 1 file changed, 1 insertion(+) diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 2c7084eb1ac5..6f52e4ea0a13 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -46,6 +46,7 @@ const webpackConfig = { {from: 'assets/css', to: 'css'}, {from: 'node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css', to: 'css/AnnotationLayer.css'}, {from: 'assets/images/shadow.png', to: 'images/shadow.png'}, + {from: 'apple-app-site-association'}, // These files are copied over as per instructions here // https://github.com/wojtekmaj/react-pdf#copying-cmaps From 9048e1836e4fffef6be4aa1c3aa4f66f44eef605 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 24 Mar 2021 11:17:04 -1000 Subject: [PATCH 3/7] fix plist --- ios/ExpensifyCash/Info.plist | 165 ++++++++++++++--------------------- 1 file changed, 65 insertions(+), 100 deletions(-) diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist index 799d41abdaff..1ad2f11fc656 100644 --- a/ios/ExpensifyCash/Info.plist +++ b/ios/ExpensifyCash/Info.plist @@ -1,8 +1,6 @@ -<<<<<<< HEAD -======= CFBundleDevelopmentRegion en @@ -35,109 +33,76 @@ LSSupportsOpeningDocumentsInPlace NSAppTransportSecurity ->>>>>>> origin - CFBundleDevelopmentRegion - en - CFBundleDisplayName - $(PRODUCT_NAME) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0.5 - CFBundleSignature - ???? - CFBundleVersion - 1.0.5.28 - ITSAppUsesNonExemptEncryption - - LSApplicationQueriesSchemes - - venmo - - LSRequiresIPhoneOS + NSAllowsArbitraryLoads - LSSupportsOpeningDocumentsInPlace - - NSAppTransportSecurity + NSExceptionDomains - NSAllowsArbitraryLoads - - NSExceptionDomains + localhost - localhost - - NSExceptionAllowsInsecureHTTPLoads - - NSIncludesSubdomains - - - www.expensify.com.dev - - NSExceptionAllowsInsecureHTTPLoads - - NSIncludesSubdomains - - + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + - - NSCameraUsageDescription - Your camera is used to create chat attachments. - NSLocationWhenInUseUsageDescription - - NSPhotoLibraryAddUsageDescription - Your camera roll is used to store chat attachments. - NSPhotoLibraryUsageDescription - Your photos are used to create chat attachments. - UIAppFonts - - GTAmericaExp-Bold.otf - GTAmericaExp-Light.otf - GTAmericaExp-Medium.otf - GTAmericaExp-Regular.otf - GTAmericaExp-Thin.otf - GTAmericaExpMono-Rg.otf - GTAmericaExp-BdIt.otf - GTAmericaExp-MdIt.otf - GTAmericaExp-RgIt.otf - - UIBackgroundModes - - remote-notification - - UIFileSharingEnabled - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - UIInterfaceOrientationPortraitUpsideDown - - UIViewControllerBasedStatusBarAppearance - - CFBundleURLTypes - + www.expensify.com.dev - CFBundleURLSchemes - - expensify-cash - + NSExceptionAllowsInsecureHTTPLoads + + NSIncludesSubdomains + - + - \ No newline at end of file + NSCameraUsageDescription + Your camera is used to create chat attachments. + NSLocationWhenInUseUsageDescription + + NSPhotoLibraryAddUsageDescription + Your camera roll is used to store chat attachments. + NSPhotoLibraryUsageDescription + Your photos are used to create chat attachments. + UIAppFonts + + GTAmericaExp-Bold.otf + GTAmericaExp-Light.otf + GTAmericaExp-Medium.otf + GTAmericaExp-Regular.otf + GTAmericaExp-Thin.otf + GTAmericaExpMono-Rg.otf + GTAmericaExp-BdIt.otf + GTAmericaExp-MdIt.otf + GTAmericaExp-RgIt.otf + + UIBackgroundModes + + remote-notification + + UIFileSharingEnabled + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationPortraitUpsideDown + + UIViewControllerBasedStatusBarAppearance + + CFBundleURLTypes + + + CFBundleURLSchemes + + expensify-cash + + + + + From 6637c087093ca0aac13354f8c8b7871a19e38889 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 24 Mar 2021 11:18:15 -1000 Subject: [PATCH 4/7] remove useless change --- ios/ExpensifyCash/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ExpensifyCash/Info.plist b/ios/ExpensifyCash/Info.plist index 1ad2f11fc656..a09976013ced 100644 --- a/ios/ExpensifyCash/Info.plist +++ b/ios/ExpensifyCash/Info.plist @@ -57,7 +57,7 @@ NSCameraUsageDescription Your camera is used to create chat attachments. NSLocationWhenInUseUsageDescription - + NSPhotoLibraryAddUsageDescription Your camera roll is used to store chat attachments. NSPhotoLibraryUsageDescription From e9db231bf17f4456960d4da194dc48508bf745d4 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 24 Mar 2021 12:18:56 -1000 Subject: [PATCH 5/7] add intent filter for android --- android/app/src/main/AndroidManifest.xml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 235fc3ea6c23..350c5981a638 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -25,8 +25,15 @@ + + + + + + + + - From df34d35d288f2ce8960c95869718f024c307b309 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 24 Mar 2021 12:52:46 -1000 Subject: [PATCH 6/7] add links to staging.expensify.cash --- android/app/src/main/AndroidManifest.xml | 1 + ios/ExpensifyCash/Chat.entitlements | 1 + src/libs/Navigation/linkingConfig.js | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 350c5981a638..2ed9c00a3145 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -31,6 +31,7 @@ + diff --git a/ios/ExpensifyCash/Chat.entitlements b/ios/ExpensifyCash/Chat.entitlements index e7d36342775d..2f8be2ab354b 100644 --- a/ios/ExpensifyCash/Chat.entitlements +++ b/ios/ExpensifyCash/Chat.entitlements @@ -7,6 +7,7 @@ com.apple.developer.associated-domains applinks:www.expensify.cash + applinks:staging.expensify.cash applinks:expensify.cash diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 7424877aa595..2e7375a7b56b 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -1,7 +1,13 @@ import ROUTES from '../../ROUTES'; export default { - prefixes: ['expensify-cash://', 'https://expensify.cash', 'https://www.expensify.cash', 'http://localhost'], + prefixes: [ + 'expensify-cash://', + 'https://expensify.cash', + 'https://www.expensify.cash', + 'https://staging.expensify.cash', + 'http://localhost', + ], config: { screens: { Home: { From b7c7d22bcd58483bb29607dc4d0d2c45804aa074 Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 24 Mar 2021 14:10:15 -1000 Subject: [PATCH 7/7] add intent filter per url --- android/app/src/main/AndroidManifest.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 2ed9c00a3145..ee0d714124fd 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -30,9 +30,24 @@ + + + + + + + + + + + + + + + + -