From 6d8365a5cea32f31d38bdf55672d050dc184b1df Mon Sep 17 00:00:00 2001 From: danielel Date: Thu, 27 Oct 2022 13:38:34 +0300 Subject: [PATCH 01/11] remove deprecated docs --- website/docs/docs/notifications-events.md | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/website/docs/docs/notifications-events.md b/website/docs/docs/notifications-events.md index 53f922393..f9ce529b7 100644 --- a/website/docs/docs/notifications-events.md +++ b/website/docs/docs/notifications-events.md @@ -41,25 +41,3 @@ constructor() { ### Notification Object When you receive a push notification, you'll get an instance of [Notification object](../api/notification-obj), contains the following methods: - -## Querying initial notification - -React-Native's [`PushNotificationsIOS.getInitialNotification()`](https://facebook.github.io/react-native/docs/pushnotificationios.html#getinitialnotification) allows for the async retrieval of the original notification used to open the App on iOS, but it has no equivalent implementation for Android. - -```jsx -import {Notifications} from 'react-native-notifications'; - -Notifications.getInitialNotification() - .then((notification) => { - console.log("Initial notification was:", (notification ? notification.payload : 'N/A')); - }) - .catch((err) => console.error("getInitialNotifiation() failed", err)); - -``` - -:::note -Notifications are considered 'initial' under the following terms: - -- User tapped on a notification, _AND_ - -- App was either not running at all ("dead" state), _OR_ it existed in the background with **no running activities** associated with it. -::: \ No newline at end of file From 507d08578ba76b0e9c1611fbbb003a34ee54e83b Mon Sep 17 00:00:00 2001 From: danielel Date: Thu, 27 Oct 2022 13:39:16 +0300 Subject: [PATCH 02/11] remove duplicated listener --- lib/src/adapters/NativeEventsReceiver.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/src/adapters/NativeEventsReceiver.ts b/lib/src/adapters/NativeEventsReceiver.ts index 2ddf13ff3..1d6e46ee6 100644 --- a/lib/src/adapters/NativeEventsReceiver.ts +++ b/lib/src/adapters/NativeEventsReceiver.ts @@ -13,34 +13,41 @@ export class NativeEventsReceiver { } public registerRemoteNotificationsRegistered(callback: (event: Registered) => void): EmitterSubscription { + this.emitter.removeAllListeners('notificationReceivedBackground'); return this.emitter.addListener('remoteNotificationsRegistered', callback); } public appNotificationSettingsLinked(callback: () => void): EmitterSubscription { + this.emitter.removeAllListeners('notificationReceivedBackground'); return this.emitter.addListener('appNotificationSettingsLinked', callback); } public registerPushKitRegistered(callback: (event: RegisteredPushKit) => void): EmitterSubscription { + this.emitter.removeAllListeners('pushKitRegistered'); return this.emitter.addListener('pushKitRegistered', callback); } public registerNotificationReceived(callback: (notification: Notification) => void): EmitterSubscription { + this.emitter.removeAllListeners('notificationReceived'); return this.emitter.addListener('notificationReceived', (payload: unknown) => { callback(this.notificationFactory.fromPayload(payload)); }); } public registerNotificationReceivedBackground(callback: (notification: Notification) => void): EmitterSubscription { + this.emitter.removeAllListeners('notificationReceivedBackground'); return this.emitter.addListener('notificationReceivedBackground', (payload: unknown) => { callback(this.notificationFactory.fromPayload(payload)); }); } public registerPushKitNotificationReceived(callback: (event: object) => void): EmitterSubscription { + this.emitter.removeAllListeners('pushKitNotificationReceived'); return this.emitter.addListener('pushKitNotificationReceived', callback); } public registerNotificationOpened(callback: (notification: Notification, actionResponse?: NotificationActionResponse) => void): EmitterSubscription { + this.emitter.removeAllListeners('notificationOpened'); return this.emitter.addListener('notificationOpened', (response: NotificationResponse) => { const action = response.action ? new NotificationActionResponse(response.action) : undefined; callback(this.notificationFactory.fromPayload(response.notification), action); @@ -48,10 +55,12 @@ export class NativeEventsReceiver { } public registerRemoteNotificationsRegistrationFailed(callback: (event: RegistrationError) => void): EmitterSubscription { + this.emitter.removeAllListeners('remoteNotificationsRegistrationFailed'); return this.emitter.addListener('remoteNotificationsRegistrationFailed', callback); } public registerRemoteNotificationsRegistrationDenied(callback: () => void): EmitterSubscription { + this.emitter.removeAllListeners('remoteNotificationsRegistrationDenied'); return this.emitter.addListener('remoteNotificationsRegistrationDenied', callback); } } From 38cfab268b86059241b465d849e9a6dbca6b5703 Mon Sep 17 00:00:00 2001 From: danielel Date: Thu, 27 Oct 2022 14:16:43 +0300 Subject: [PATCH 03/11] trigger notificationOpened after component mounted --- .../core/ReactAppLifecycleFacade.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java b/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java index 325ac5504..a52d06344 100644 --- a/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java +++ b/lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java @@ -4,6 +4,7 @@ import com.facebook.react.bridge.LifecycleEventListener; import com.facebook.react.bridge.ReactContext; +import com.facebook.react.bridge.WindowFocusChangeListener; import com.wix.reactnativenotifications.BuildConfig; import java.util.Set; @@ -20,11 +21,19 @@ public class ReactAppLifecycleFacade implements AppLifecycleFacade { public void init(ReactContext reactContext) { mReactContext = reactContext; + reactContext.addWindowFocusChangeListener(new WindowFocusChangeListener() { + @Override + public void onWindowFocusChange(boolean hasFocus) { + if(BuildConfig.DEBUG) Log.d(LOGTAG, "onWindowFocusChange"); + if (hasFocus) { + switchToVisible(); + } + } + }); reactContext.addLifecycleEventListener(new LifecycleEventListener() { @Override public void onHostResume() { if(BuildConfig.DEBUG) Log.d(LOGTAG, "onHostResume"); - switchToVisible(); } @Override From da033858e96b1556956a2cf66e4a647844098921 Mon Sep 17 00:00:00 2001 From: danielel Date: Sun, 30 Oct 2022 12:34:35 +0200 Subject: [PATCH 04/11] upgrade to rn 69 --- example/.ruby-version | 1 + example/NotificationsExampleApp.tsx | 2 + example/android/build.gradle | 4 +- example/android/myapplication/build.gradle | 17 +- .../app/MainActivity.java | 10 +- .../MainApplicationReactNativeHost.java | 4 +- example/android/settings.gradle | 2 + .../project.pbxproj | 52 +- .../ios/NotificationsExampleApp/AppDelegate.m | 123 +++- example/ios/Podfile | 17 +- example/ios/Podfile.lock | 566 +++++++++++------- package.json | 10 +- react-native.config.js | 2 +- 13 files changed, 555 insertions(+), 255 deletions(-) create mode 100644 example/.ruby-version diff --git a/example/.ruby-version b/example/.ruby-version new file mode 100644 index 000000000..49cdd668e --- /dev/null +++ b/example/.ruby-version @@ -0,0 +1 @@ +2.7.6 diff --git a/example/NotificationsExampleApp.tsx b/example/NotificationsExampleApp.tsx index d8774a201..b69ec0342 100644 --- a/example/NotificationsExampleApp.tsx +++ b/example/NotificationsExampleApp.tsx @@ -123,6 +123,8 @@ export default function NotificationsExampleApp() { const getInitialNotification = async () => { const initialNotification = await Notifications.getInitialNotification(); + console.log({initialNotification}); + if (initialNotification) { setNotifications([initialNotification, ...notifications]); } diff --git a/example/android/build.gradle b/example/android/build.gradle index 59288b7e9..17cc8c40c 100644 --- a/example/android/build.gradle +++ b/example/android/build.gradle @@ -24,9 +24,9 @@ buildscript { mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:7.0.4") + classpath("com.android.tools.build:gradle:7.1.1") classpath("com.facebook.react:react-native-gradle-plugin") - classpath("de.undercouch:gradle-download-task:4.1.2") + classpath("de.undercouch:gradle-download-task:5.0.1") classpath("com.google.gms:google-services:4.3.3") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") } diff --git a/example/android/myapplication/build.gradle b/example/android/myapplication/build.gradle index b7b7bcd17..e6bc95083 100644 --- a/example/android/myapplication/build.gradle +++ b/example/android/myapplication/build.gradle @@ -1,7 +1,6 @@ apply plugin: "com.android.application" import com.android.build.OutputFile -import org.apache.tools.ant.taskdefs.condition.Os /** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets @@ -153,16 +152,12 @@ android { "GENERATED_SRC_DIR=$buildDir/generated/source", "PROJECT_BUILD_DIR=$buildDir", "REACT_ANDROID_DIR=$rootDir/../../node_modules/react-native/ReactAndroid", - "REACT_ANDROID_BUILD_DIR=$rootDir/../../node_modules/react-native/ReactAndroid/build" + "NODE_MODULES_DIR=$rootDir/../../node_modules" cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1" cppFlags "-std=c++17" // Make sure this target name is the same you specify inside the // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable. targets "rn_68_appmodules" - // Fix for windows limit on number of character in file paths and in command lines - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - arguments "NDK_APP_SHORT_COMMANDS=true" - } } } if (!enableSeparateBuildPerCPUArchitecture) { @@ -282,9 +277,10 @@ dependencies { } if (enableHermes) { - def hermesPath = "../../../node_modules/hermes-engine/android/"; - debugImplementation files(hermesPath + "hermes-debug.aar") - releaseImplementation files(hermesPath + "hermes-release.aar") + //noinspection GradleDynamicVersion + implementation("com.facebook.react:hermes-engine:+") { // From node_modules + exclude group:'com.facebook.fbjni' + } } else { implementation jscFlavor } @@ -300,6 +296,9 @@ if (isNewArchitectureEnabled()) { resolutionStrategy.dependencySubstitution { substitute(module("com.facebook.react:react-native")) .using(project(":ReactAndroid")).because("On New Architecture we're building React Native from source") + substitute(module("com.facebook.react:hermes-engine")) + .using(project(":ReactAndroid:hermes-engine")) + .because("On New Architecture we're building Hermes from source") } } } diff --git a/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/MainActivity.java b/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/MainActivity.java index cf4c30398..9e62b6d99 100644 --- a/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/MainActivity.java +++ b/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/MainActivity.java @@ -12,7 +12,8 @@ protected String getMainComponentName() { /** * Returns the instance of the {@link ReactActivityDelegate}. There the RootView is created and - * you can specify the rendered you wish to use (Fabric or the older renderer). + * you can specify the renderer you wish to use - the new renderer (Fabric) or the old renderer + * (Paper). */ @Override protected ReactActivityDelegate createReactActivityDelegate() { @@ -31,5 +32,12 @@ protected ReactRootView createRootView() { reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED); return reactRootView; } + + @Override + protected boolean isConcurrentRootEnabled() { + // If you opted-in for the New Architecture, we enable Concurrent Root (i.e. React 18). + // More on this on https://reactjs.org/blog/2022/03/29/react-v18.html + return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; + } } } diff --git a/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/newarchitecture/MainApplicationReactNativeHost.java b/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/newarchitecture/MainApplicationReactNativeHost.java index 90af51f94..c019eab6f 100644 --- a/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/newarchitecture/MainApplicationReactNativeHost.java +++ b/example/android/myapplication/src/main/java/com/wix/reactnativenotifications/app/newarchitecture/MainApplicationReactNativeHost.java @@ -16,7 +16,7 @@ import com.facebook.react.bridge.UIManager; import com.facebook.react.fabric.ComponentFactory; import com.facebook.react.fabric.CoreComponentsRegistry; -import com.facebook.react.fabric.EmptyReactNativeConfig; +import com.facebook.react.fabric.ReactNativeConfig; import com.facebook.react.fabric.FabricJSIModuleProvider; import com.facebook.react.uimanager.ViewManagerRegistry; import com.wix.reactnativenotifications.app.BuildConfig; @@ -105,7 +105,7 @@ public JSIModuleProvider getJSIModuleProvider() { return new FabricJSIModuleProvider( reactApplicationContext, componentFactory, - new EmptyReactNativeConfig(), + ReactNativeConfig.DEFAULT_CONFIG, viewManagerRegistry); } }); diff --git a/example/android/settings.gradle b/example/android/settings.gradle index 850023eec..90a2fe00d 100644 --- a/example/android/settings.gradle +++ b/example/android/settings.gradle @@ -6,6 +6,8 @@ includeBuild('../../node_modules/react-native-gradle-plugin') if (settings.hasProperty("newArchEnabled") && settings.newArchEnabled == "true") { include(":ReactAndroid") project(":ReactAndroid").projectDir = file('../../node_modules/react-native/ReactAndroid') + include(":ReactAndroid:hermes-engine") + project(":ReactAndroid:hermes-engine").projectDir = file('../../node_modules/react-native/ReactAndroid/hermes-engine') } include ':react-native-notifications' diff --git a/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj b/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj index fa43202a8..71a385c9f 100644 --- a/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj +++ b/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj @@ -515,6 +515,7 @@ 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 6F86543B4FD42B3918DC5CDB /* [CP] Copy Pods Resources */, + F9A1BDBED81DCD225C7ACE4A /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -534,6 +535,7 @@ 50ABBFE524B3299900077ED8 /* Frameworks */, 50ABBFE624B3299900077ED8 /* Resources */, 4EE9B6D91798F98F34870463 /* [CP] Copy Pods Resources */, + C5DBA189F9CB6B3C8AB7AD7D /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -964,6 +966,50 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; + C5DBA189F9CB6B3C8AB7AD7D /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + F9A1BDBED81DCD225C7ACE4A /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-frameworks.sh", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -1016,7 +1062,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; - DEAD_CODE_STRIPPING = NO; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; HEADER_SEARCH_PATHS = ( "$(inherited)", @@ -1026,7 +1072,7 @@ ); INFOPLIST_FILE = NotificationsExampleApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1054,7 +1100,7 @@ ); INFOPLIST_FILE = NotificationsExampleApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/example/ios/NotificationsExampleApp/AppDelegate.m b/example/ios/NotificationsExampleApp/AppDelegate.m index 204171bb5..6aa033fdb 100644 --- a/example/ios/NotificationsExampleApp/AppDelegate.m +++ b/example/ios/NotificationsExampleApp/AppDelegate.m @@ -1,23 +1,58 @@ #import "AppDelegate.h" +#import +#import + +#import #import #import -#import -#import +#import + +#if RCT_NEW_ARCH_ENABLED +#import +#import +#import +#import +#import +#import + +#import + +static NSString *const kRNConcurrentRoot = @"concurrentRoot"; + +@interface AppDelegate () { + RCTTurboModuleManager *_turboModuleManager; + RCTSurfacePresenterBridgeAdapter *_bridgeAdapter; + std::shared_ptr _reactNativeConfig; + facebook::react::ContextContainer::Shared _contextContainer; +} +@end +#endif @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - NSURL *jsCodeLocation; + RCTAppSetupPrepareApp(application); + + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; - jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#if RCT_NEW_ARCH_ENABLED + _contextContainer = std::make_shared(); + _reactNativeConfig = std::make_shared(); + _contextContainer->insert("ReactNativeConfig", _reactNativeConfig); + _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer]; + bridge.surfacePresenter = _bridgeAdapter.surfacePresenter; +#endif - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"NotificationsExampleApp" - initialProperties:nil - launchOptions:launchOptions]; - rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; + NSDictionary *initProps = [self prepareInitialProps]; + UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"NotificationsExampleApp", initProps); + + if (@available(iOS 13.0, *)) { + rootView.backgroundColor = [UIColor systemBackgroundColor]; + } else { + rootView.backgroundColor = [UIColor whiteColor]; + } self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new]; @@ -42,4 +77,74 @@ - (void)application:(UIApplication *)application didReceiveRemoteNotification:(N [RNNotifications didReceiveBackgroundNotification:userInfo withCompletionHandler:completionHandler]; } +/// This method controls whether the `concurrentRoot`feature of React18 is turned on or off. +/// +/// @see: https://reactjs.org/blog/2022/03/29/react-v18.html +/// @note: This requires to be rendering on Fabric (i.e. on the New Architecture). +/// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`. +- (BOOL)concurrentRootEnabled +{ + // Switch this bool to turn on and off the concurrent root + return true; +} + +- (NSDictionary *)prepareInitialProps +{ + NSMutableDictionary *initProps = [NSMutableDictionary new]; + +#ifdef RCT_NEW_ARCH_ENABLED + initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]); +#endif + + return initProps; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +#if RCT_NEW_ARCH_ENABLED + +#pragma mark - RCTCxxBridgeDelegate + +- (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge +{ + _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge + delegate:self + jsInvoker:bridge.jsCallInvoker]; + return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager); +} + +#pragma mark RCTTurboModuleManagerDelegate + +- (Class)getModuleClassFromName:(const char *)name +{ + return RCTCoreModulesClassProvider(name); +} + +- (std::shared_ptr)getTurboModule:(const std::string &)name + jsInvoker:(std::shared_ptr)jsInvoker +{ + return nullptr; +} + +- (std::shared_ptr)getTurboModule:(const std::string &)name + initParams: + (const facebook::react::ObjCTurboModule::InitParams &)params +{ + return nullptr; +} + +- (id)getModuleInstanceFromClass:(Class)moduleClass +{ + return RCTAppSetupDefaultModuleFromClass(moduleClass); +} + +#endif + @end diff --git a/example/ios/Podfile b/example/ios/Podfile index e24e92aa3..e8275749b 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,11 +1,24 @@ require_relative '../../node_modules/react-native/scripts/react_native_pods' require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules' -platform :ios, '11.0' +platform :ios, '12.4' +install! 'cocoapods', :deterministic_uuids => false + +production = ENV["PRODUCTION"] == "1" def all_pods config = use_native_modules! - use_react_native!(:path => config[:reactNativePath]) + + flags = get_default_flags() + + use_react_native!( + :path => config[:reactNativePath], + :production => false, + :hermes_enabled => flags[:hermes_enabled], + :fabric_enabled => flags[:fabric_enabled], + :flipper_configuration => FlipperConfiguration.enabled, + :app_path => "#{Pod::Config.instance.installation_root}/../.." + ) pod 'react-native-notifications', :path => '../../' end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 93a5260c0..13c10f87c 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,17 +1,81 @@ PODS: - boost (1.76.0) + - CocoaAsyncSocket (7.6.5) - DoubleConversion (1.1.6) - - FBLazyVector (0.68.1) - - FBReactNativeSpec (0.68.1): + - FBLazyVector (0.69.6) + - FBReactNativeSpec (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - RCTRequired (= 0.68.1) - - RCTTypeSafety (= 0.68.1) - - React-Core (= 0.68.1) - - React-jsi (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) + - RCTRequired (= 0.69.6) + - RCTTypeSafety (= 0.69.6) + - React-Core (= 0.69.6) + - React-jsi (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - Flipper (0.125.0): + - Flipper-Folly (~> 2.6) + - Flipper-RSocket (~> 1.4) + - Flipper-Boost-iOSX (1.76.0.1.11) + - Flipper-DoubleConversion (3.2.0.1) + - Flipper-Fmt (7.1.7) + - Flipper-Folly (2.6.10): + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt (= 7.1.7) + - Flipper-Glog + - libevent (~> 2.1.12) + - OpenSSL-Universal (= 1.1.1100) + - Flipper-Glog (0.5.0.5) + - Flipper-PeerTalk (0.0.4) + - Flipper-RSocket (1.4.3): + - Flipper-Folly (~> 2.6) + - FlipperKit (0.125.0): + - FlipperKit/Core (= 0.125.0) + - FlipperKit/Core (0.125.0): + - Flipper (~> 0.125.0) + - FlipperKit/CppBridge + - FlipperKit/FBCxxFollyDynamicConvert + - FlipperKit/FBDefines + - FlipperKit/FKPortForwarding + - SocketRocket (~> 0.6.0) + - FlipperKit/CppBridge (0.125.0): + - Flipper (~> 0.125.0) + - FlipperKit/FBCxxFollyDynamicConvert (0.125.0): + - Flipper-Folly (~> 2.6) + - FlipperKit/FBDefines (0.125.0) + - FlipperKit/FKPortForwarding (0.125.0): + - CocoaAsyncSocket (~> 7.6) + - Flipper-PeerTalk (~> 0.0.4) + - FlipperKit/FlipperKitHighlightOverlay (0.125.0) + - FlipperKit/FlipperKitLayoutHelpers (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutTextSearchable + - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutPlugin (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitHighlightOverlay + - FlipperKit/FlipperKitLayoutHelpers + - FlipperKit/FlipperKitLayoutIOSDescriptors + - FlipperKit/FlipperKitLayoutTextSearchable + - YogaKit (~> 1.18) + - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0) + - FlipperKit/FlipperKitNetworkPlugin (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitReactPlugin (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0): + - FlipperKit/Core + - FlipperKit/SKIOSNetworkPlugin (0.125.0): + - FlipperKit/Core + - FlipperKit/FlipperKitNetworkPlugin - fmt (6.2.1) - glog (0.3.5) + - libevent (2.1.12) - OCMock (3.9.1) + - OpenSSL-Universal (1.1.1100) - RCT-Folly (2021.06.28.00-v2): - boost - DoubleConversion @@ -23,282 +87,311 @@ PODS: - DoubleConversion - fmt (~> 6.2.1) - glog - - RCTRequired (0.68.1) - - RCTTypeSafety (0.68.1): - - FBLazyVector (= 0.68.1) + - RCTRequired (0.69.6) + - RCTTypeSafety (0.69.6): + - FBLazyVector (= 0.69.6) + - RCTRequired (= 0.69.6) + - React-Core (= 0.69.6) + - React (0.69.6): + - React-Core (= 0.69.6) + - React-Core/DevSupport (= 0.69.6) + - React-Core/RCTWebSocket (= 0.69.6) + - React-RCTActionSheet (= 0.69.6) + - React-RCTAnimation (= 0.69.6) + - React-RCTBlob (= 0.69.6) + - React-RCTImage (= 0.69.6) + - React-RCTLinking (= 0.69.6) + - React-RCTNetwork (= 0.69.6) + - React-RCTSettings (= 0.69.6) + - React-RCTText (= 0.69.6) + - React-RCTVibration (= 0.69.6) + - React-bridging (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - RCTRequired (= 0.68.1) - - React-Core (= 0.68.1) - - React (0.68.1): - - React-Core (= 0.68.1) - - React-Core/DevSupport (= 0.68.1) - - React-Core/RCTWebSocket (= 0.68.1) - - React-RCTActionSheet (= 0.68.1) - - React-RCTAnimation (= 0.68.1) - - React-RCTBlob (= 0.68.1) - - React-RCTImage (= 0.68.1) - - React-RCTLinking (= 0.68.1) - - React-RCTNetwork (= 0.68.1) - - React-RCTSettings (= 0.68.1) - - React-RCTText (= 0.68.1) - - React-RCTVibration (= 0.68.1) - - React-callinvoker (0.68.1) - - React-Codegen (0.68.1): - - FBReactNativeSpec (= 0.68.1) + - React-jsi (= 0.69.6) + - React-callinvoker (0.69.6) + - React-Codegen (0.69.6): + - FBReactNativeSpec (= 0.69.6) - RCT-Folly (= 2021.06.28.00-v2) - - RCTRequired (= 0.68.1) - - RCTTypeSafety (= 0.68.1) - - React-Core (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-Core (0.68.1): + - RCTRequired (= 0.69.6) + - RCTTypeSafety (= 0.69.6) + - React-Core (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-Core (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.68.1) - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-Core/Default (= 0.69.6) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/CoreModulesHeaders (0.68.1): + - React-Core/CoreModulesHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/Default (0.68.1): + - React-Core/Default (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/DevSupport (0.68.1): + - React-Core/DevSupport (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.68.1) - - React-Core/RCTWebSocket (= 0.68.1) - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-jsinspector (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-Core/Default (= 0.69.6) + - React-Core/RCTWebSocket (= 0.69.6) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-jsinspector (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTActionSheetHeaders (0.68.1): + - React-Core/RCTActionSheetHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTAnimationHeaders (0.68.1): + - React-Core/RCTAnimationHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTBlobHeaders (0.68.1): + - React-Core/RCTBlobHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTImageHeaders (0.68.1): + - React-Core/RCTImageHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTLinkingHeaders (0.68.1): + - React-Core/RCTLinkingHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTNetworkHeaders (0.68.1): + - React-Core/RCTNetworkHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTSettingsHeaders (0.68.1): + - React-Core/RCTSettingsHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTTextHeaders (0.68.1): + - React-Core/RCTTextHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTVibrationHeaders (0.68.1): + - React-Core/RCTVibrationHeaders (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - React-Core/Default - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-Core/RCTWebSocket (0.68.1): + - React-Core/RCTWebSocket (0.69.6): - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-Core/Default (= 0.68.1) - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsiexecutor (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-Core/Default (= 0.69.6) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsiexecutor (= 0.69.6) + - React-perflogger (= 0.69.6) - Yoga - - React-CoreModules (0.68.1): + - React-CoreModules (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.68.1) - - React-Codegen (= 0.68.1) - - React-Core/CoreModulesHeaders (= 0.68.1) - - React-jsi (= 0.68.1) - - React-RCTImage (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-cxxreact (0.68.1): + - RCTTypeSafety (= 0.69.6) + - React-Codegen (= 0.69.6) + - React-Core/CoreModulesHeaders (= 0.69.6) + - React-jsi (= 0.69.6) + - React-RCTImage (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-cxxreact (0.69.6): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-callinvoker (= 0.68.1) - - React-jsi (= 0.68.1) - - React-jsinspector (= 0.68.1) - - React-logger (= 0.68.1) - - React-perflogger (= 0.68.1) - - React-runtimeexecutor (= 0.68.1) - - React-jsi (0.68.1): + - React-callinvoker (= 0.69.6) + - React-jsi (= 0.69.6) + - React-jsinspector (= 0.69.6) + - React-logger (= 0.69.6) + - React-perflogger (= 0.69.6) + - React-runtimeexecutor (= 0.69.6) + - React-jsi (0.69.6): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-jsi/Default (= 0.68.1) - - React-jsi/Default (0.68.1): + - React-jsi/Default (= 0.69.6) + - React-jsi/Default (0.69.6): - boost (= 1.76.0) - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-jsiexecutor (0.68.1): + - React-jsiexecutor (0.69.6): - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-perflogger (= 0.68.1) - - React-jsinspector (0.68.1) - - React-logger (0.68.1): + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-perflogger (= 0.69.6) + - React-jsinspector (0.69.6) + - React-logger (0.69.6): - glog - - react-native-notifications (4.3.1): + - react-native-notifications (4.3.2): - React-Core - - React-perflogger (0.68.1) - - React-RCTActionSheet (0.68.1): - - React-Core/RCTActionSheetHeaders (= 0.68.1) - - React-RCTAnimation (0.68.1): + - React-perflogger (0.69.6) + - React-RCTActionSheet (0.69.6): + - React-Core/RCTActionSheetHeaders (= 0.69.6) + - React-RCTAnimation (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.68.1) - - React-Codegen (= 0.68.1) - - React-Core/RCTAnimationHeaders (= 0.68.1) - - React-jsi (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-RCTBlob (0.68.1): + - RCTTypeSafety (= 0.69.6) + - React-Codegen (= 0.69.6) + - React-Core/RCTAnimationHeaders (= 0.69.6) + - React-jsi (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-RCTBlob (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - React-Codegen (= 0.68.1) - - React-Core/RCTBlobHeaders (= 0.68.1) - - React-Core/RCTWebSocket (= 0.68.1) - - React-jsi (= 0.68.1) - - React-RCTNetwork (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-RCTImage (0.68.1): + - React-Codegen (= 0.69.6) + - React-Core/RCTBlobHeaders (= 0.69.6) + - React-Core/RCTWebSocket (= 0.69.6) + - React-jsi (= 0.69.6) + - React-RCTNetwork (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-RCTImage (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.68.1) - - React-Codegen (= 0.68.1) - - React-Core/RCTImageHeaders (= 0.68.1) - - React-jsi (= 0.68.1) - - React-RCTNetwork (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-RCTLinking (0.68.1): - - React-Codegen (= 0.68.1) - - React-Core/RCTLinkingHeaders (= 0.68.1) - - React-jsi (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-RCTNetwork (0.68.1): + - RCTTypeSafety (= 0.69.6) + - React-Codegen (= 0.69.6) + - React-Core/RCTImageHeaders (= 0.69.6) + - React-jsi (= 0.69.6) + - React-RCTNetwork (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-RCTLinking (0.69.6): + - React-Codegen (= 0.69.6) + - React-Core/RCTLinkingHeaders (= 0.69.6) + - React-jsi (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-RCTNetwork (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.68.1) - - React-Codegen (= 0.68.1) - - React-Core/RCTNetworkHeaders (= 0.68.1) - - React-jsi (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-RCTSettings (0.68.1): + - RCTTypeSafety (= 0.69.6) + - React-Codegen (= 0.69.6) + - React-Core/RCTNetworkHeaders (= 0.69.6) + - React-jsi (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-RCTSettings (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - RCTTypeSafety (= 0.68.1) - - React-Codegen (= 0.68.1) - - React-Core/RCTSettingsHeaders (= 0.68.1) - - React-jsi (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-RCTText (0.68.1): - - React-Core/RCTTextHeaders (= 0.68.1) - - React-RCTVibration (0.68.1): + - RCTTypeSafety (= 0.69.6) + - React-Codegen (= 0.69.6) + - React-Core/RCTSettingsHeaders (= 0.69.6) + - React-jsi (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-RCTText (0.69.6): + - React-Core/RCTTextHeaders (= 0.69.6) + - React-RCTVibration (0.69.6): - RCT-Folly (= 2021.06.28.00-v2) - - React-Codegen (= 0.68.1) - - React-Core/RCTVibrationHeaders (= 0.68.1) - - React-jsi (= 0.68.1) - - ReactCommon/turbomodule/core (= 0.68.1) - - React-runtimeexecutor (0.68.1): - - React-jsi (= 0.68.1) - - ReactCommon/turbomodule/core (0.68.1): + - React-Codegen (= 0.69.6) + - React-Core/RCTVibrationHeaders (= 0.69.6) + - React-jsi (= 0.69.6) + - ReactCommon/turbomodule/core (= 0.69.6) + - React-runtimeexecutor (0.69.6): + - React-jsi (= 0.69.6) + - ReactCommon/turbomodule/core (0.69.6): - DoubleConversion - glog - RCT-Folly (= 2021.06.28.00-v2) - - React-callinvoker (= 0.68.1) - - React-Core (= 0.68.1) - - React-cxxreact (= 0.68.1) - - React-jsi (= 0.68.1) - - React-logger (= 0.68.1) - - React-perflogger (= 0.68.1) + - React-bridging (= 0.69.6) + - React-callinvoker (= 0.69.6) + - React-Core (= 0.69.6) + - React-cxxreact (= 0.69.6) + - React-jsi (= 0.69.6) + - React-logger (= 0.69.6) + - React-perflogger (= 0.69.6) + - SocketRocket (0.6.0) - Yoga (1.14.0) + - YogaKit (1.18.1): + - Yoga (~> 1.14) DEPENDENCIES: - boost (from `../../node_modules/react-native/third-party-podspecs/boost.podspec`) - DoubleConversion (from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../../node_modules/react-native/React/FBReactNativeSpec`) + - Flipper (= 0.125.0) + - Flipper-Boost-iOSX (= 1.76.0.1.11) + - Flipper-DoubleConversion (= 3.2.0.1) + - Flipper-Fmt (= 7.1.7) + - Flipper-Folly (= 2.6.10) + - Flipper-Glog (= 0.5.0.5) + - Flipper-PeerTalk (= 0.0.4) + - Flipper-RSocket (= 1.4.3) + - FlipperKit (= 0.125.0) + - FlipperKit/Core (= 0.125.0) + - FlipperKit/CppBridge (= 0.125.0) + - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0) + - FlipperKit/FBDefines (= 0.125.0) + - FlipperKit/FKPortForwarding (= 0.125.0) + - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0) + - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0) + - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0) + - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0) + - FlipperKit/FlipperKitReactPlugin (= 0.125.0) + - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) + - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`) - OCMock + - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../../node_modules/react-native/Libraries/RCTRequired`) - RCTTypeSafety (from `../../node_modules/react-native/Libraries/TypeSafety`) - React (from `../../node_modules/react-native/`) + - React-bridging (from `../../node_modules/react-native/ReactCommon`) - React-callinvoker (from `../../node_modules/react-native/ReactCommon/callinvoker`) - React-Codegen (from `build/generated/ios`) - React-Core (from `../../node_modules/react-native/`) @@ -327,8 +420,22 @@ DEPENDENCIES: SPEC REPOS: trunk: + - CocoaAsyncSocket + - Flipper + - Flipper-Boost-iOSX + - Flipper-DoubleConversion + - Flipper-Fmt + - Flipper-Folly + - Flipper-Glog + - Flipper-PeerTalk + - Flipper-RSocket + - FlipperKit - fmt + - libevent - OCMock + - OpenSSL-Universal + - SocketRocket + - YogaKit EXTERNAL SOURCES: boost: @@ -349,6 +456,8 @@ EXTERNAL SOURCES: :path: "../../node_modules/react-native/Libraries/TypeSafety" React: :path: "../../node_modules/react-native/" + React-bridging: + :path: "../../node_modules/react-native/ReactCommon" React-callinvoker: :path: "../../node_modules/react-native/ReactCommon/callinvoker" React-Codegen: @@ -398,40 +507,55 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 - DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 - FBLazyVector: 2c76493a346ef8cacf1f442926a39f805fffec1f - FBReactNativeSpec: 3fc6fbf67b2bc6ab4f1c3fd6a39cbaff17d1007e + CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 + DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + FBLazyVector: 739d2f9719faecb463c7aa191591af31c8c94182 + FBReactNativeSpec: 93bab6641166788356a87f1552c2d3354d76d8dc + Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 + Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c + Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 + Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b + Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3 + Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446 + Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 + Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 + FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85 + glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a + libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 - RCT-Folly: 803a9cfd78114b2ec0f140cfa6fa2a6bafb2d685 - RCTRequired: 00581111c53531e39e3c6346ef0d2c0cf52a5a37 - RCTTypeSafety: 07e03ee7800e7dd65cba8e52ad0c2edb06c96604 - React: e61f4bf3c573d0c61c56b53dc3eb1d9daf0768a0 - React-callinvoker: 047d47230bb6fd66827f8cb0bea4e944ffd1309b - React-Codegen: bb0403cde7374af091530e84e492589485aab480 - React-Core: a4a3a8e10d004b08e013c3d0438259dd89a3894c - React-CoreModules: bb9f8bc36f1ae6d780b856927fa9d4aa01ccccc0 - React-cxxreact: 7dd472aefb8629d6080cbb859240bafccd902704 - React-jsi: b25808afe821b607d51c779bdd1717be8393b7ec - React-jsiexecutor: 4a4bae5671b064a2248a690cf75957669489d08c - React-jsinspector: 218a2503198ff28a085f8e16622a8d8f507c8019 - React-logger: f79dd3cc0f9b44f5611c6c7862badd891a862cf8 - react-native-notifications: 33ec77006f7987bb22de8f1665889abc633b9196 - React-perflogger: 30ab8d6db10e175626069e742eead3ebe8f24fd5 - React-RCTActionSheet: 4b45da334a175b24dabe75f856b98fed3dfd6201 - React-RCTAnimation: d6237386cb04500889877845b3e9e9291146bc2e - React-RCTBlob: bc9e2cd738c43bd2948e862e371402ef9584730a - React-RCTImage: 9f8cac465c6e5837007f59ade2a0a741016dd6a3 - React-RCTLinking: 5073abb7d30cc0824b2172bd4582fc15bfc40510 - React-RCTNetwork: 28ff94aa7d8fc117fc800b87dd80869a00d2bef3 - React-RCTSettings: f27aa036f7270fe6ca43f8cdd1819e821fa429a0 - React-RCTText: 7cb6f86fa7bc86f22f16333ad243b158e63b2a68 - React-RCTVibration: 9e344c840176b0af9c84d5019eb4fed8b3c105a1 - React-runtimeexecutor: 7285b499d0339104b2813a1f58ad1ada4adbd6c0 - ReactCommon: bf2888a826ceedf54b99ad1b6182d1bc4a8a3984 - Yoga: 17cd9a50243093b547c1e539c749928dd68152da + OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c + RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a + RCTRequired: c8c080849a3670601d5c7056023a2176067a69d8 + RCTTypeSafety: 710aef40f5ae246bc5fff7e873855b17ed11c180 + React: b6bb382534be4de9d367ef3d04f92108c1768160 + React-bridging: 0fca0337cef9305026814907dd29254a833a2db7 + React-callinvoker: 700e6eb96b5f7f2fdd96d7263cd4627d2fa080ed + React-Codegen: fd21633c4b9f47d0681bbb54b173a203963a5e4d + React-Core: 8ec15c9727c8c01b1e4f14cad5bd21f7c1d56d49 + React-CoreModules: 79486447bf901292a83df52d4f7acbecda296723 + React-cxxreact: 9022135650dd9960a60a1361e9add424c6c37ab9 + React-jsi: 4ccb3599c422ad071e3895c5feab9b0afc40505d + React-jsiexecutor: c61b60de03b3474e5749b8a8fd8e6507630d62c4 + React-jsinspector: eaacb698c5af7a99131bc1933806372c20222dfd + React-logger: ebb4d31bbbe4f1a8a1a9b658d7429210b8f68160 + react-native-notifications: f3215821dfd74234f8f3910e2fe37e19fa8673b0 + React-perflogger: 1fb1ad5333b43a5137afd7608695f7a42c5efd27 + React-RCTActionSheet: a435bd67689433575a1e5d7614b021d2c17f0726 + React-RCTAnimation: d097c5ed2d00735958508617555abd85183b94e2 + React-RCTBlob: f43a0fceb328e1a40aa52701a4eba955635444ab + React-RCTImage: 08f4428e931efe0eefb94443c8ca08cfb250a556 + React-RCTLinking: 3a8851e818652582f87e5a7577302e6ad7e1de3e + React-RCTNetwork: 19f7c66b612e2336eefdfbc7ab3a9bd8ca4e21cf + React-RCTSettings: 9324e718a865ff01e4a96be4c65923581b2d5170 + React-RCTText: 9cadcd5d982c1d25f7439f47354b1c1b75e60105 + React-RCTVibration: 285f8538386c660e6b9497e204636acd93bf7fcc + React-runtimeexecutor: 0af71c94f968fa10015bf0119951bccd2e4d8865 + ReactCommon: fe7580b9d10f00249facf25659e0ec051320cc8a + SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 + Yoga: 75bf4b0131cfb46a659cd0c13309b79a6fcff66d + YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 6406485412bd691c219c78894ca02f40bcbd6ba2 +PODFILE CHECKSUM: fe30e6f497a776689c220b9a392fbb1b9fbfd5d9 COCOAPODS: 1.11.2 diff --git a/package.json b/package.json index 556d19d64..7cffe2817 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "@babel/plugin-proposal-export-namespace-from": "7.2.0", "@types/jest": "^27.0.0", "@types/lodash": "4.14.182", - "@types/react": "^17.0.0", - "@types/react-native": "0.67.6", + "@types/react": "^18.0.0", + "@types/react-native": "^0.69.0", "@types/react-test-renderer": "16.9.2", "babel-eslint": "10.0.3", "detox": "^19.4.2", @@ -62,10 +62,10 @@ "jest": "^27.0.0", "lodash": "4.17.21", "metro-babel-register": "^0.73.2", - "metro-react-native-babel-preset": "^0.67.0", - "react": "^17.0.0", + "metro-react-native-babel-preset": "^0.70.0", + "react": "^18.0.0", "react-autobind": "1.0.6", - "react-native": "^0.68.1", + "react-native": "^0.69.0", "shell-utils": "1.0.10", "ts-mockito": "2.5.0", "tslint": "6.1.3", diff --git a/react-native.config.js b/react-native.config.js index 437783be3..958f5533d 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -11,7 +11,7 @@ module.exports = { }, project: { ios: { - project: './example/ios/NotificationsExampleApp.xcworkspace', + sourceDir: './example/ios', }, android: { sourceDir: './example/android/', From 72840f7ac0aa738d96a30bf03fc6bb8e9d5e3b5a Mon Sep 17 00:00:00 2001 From: danielel Date: Sun, 30 Oct 2022 13:20:08 +0200 Subject: [PATCH 05/11] call onOpened if initialNotification empty --- .../wix/reactnativenotifications/RNNotificationsPackage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java b/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java index 850a9839f..a249c6ad3 100644 --- a/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java +++ b/lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsPackage.java @@ -66,7 +66,7 @@ public void onActivityCreated(Activity activity, Bundle savedInstanceState) { @Override public void onActivityStarted(Activity activity) { - if (InitialNotificationHolder.getInstance().get() != null) { + if (InitialNotificationHolder.getInstance().get() == null) { callOnOpenedIfNeed(activity); } } From 799f3073fe2299ac5f71238984ca5bfd75830d6a Mon Sep 17 00:00:00 2001 From: danielel Date: Sun, 30 Oct 2022 16:08:00 +0200 Subject: [PATCH 06/11] fix js-test --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 7cffe2817..7185c2fd5 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "devDependencies": { "@babel/plugin-proposal-export-default-from": "7.2.0", "@babel/plugin-proposal-export-namespace-from": "7.2.0", + "@babel/plugin-transform-regenerator": "^7.18.6", "@types/jest": "^27.0.0", "@types/lodash": "4.14.182", "@types/react": "^18.0.0", From aeb691667b03b3fb6f9bf2e04fc689e0eb3a4746 Mon Sep 17 00:00:00 2001 From: danielel Date: Mon, 31 Oct 2022 00:01:20 +0200 Subject: [PATCH 07/11] exclude arm64 --- .../project.pbxproj | 118 +++++++++++------- example/ios/Podfile | 17 +-- example/ios/Podfile.lock | 6 +- 3 files changed, 81 insertions(+), 60 deletions(-) diff --git a/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj b/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj index 71a385c9f..ec290e545 100644 --- a/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj +++ b/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -16,7 +16,7 @@ 50ABC01424B32ABE00077ED8 /* RNNotificationsStoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBFD924B3294200077ED8 /* RNNotificationsStoreTests.m */; }; 50ABC01524B32ABE00077ED8 /* RNNotificationEventHandlerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBFDA24B3294200077ED8 /* RNNotificationEventHandlerTests.m */; }; 50ABC02D24B32C6A00077ED8 /* RNCommandsHandlerIntegrationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ABC02C24B32C6A00077ED8 /* RNCommandsHandlerIntegrationTest.m */; }; - 86B6E1FE34FA8D2D24E5AAD4 /* libPods-NotificationsExampleAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B1FB78C4C15FDF7AC821B216 /* libPods-NotificationsExampleAppTests.a */; }; + 56995B62CBAED5D6C6AFDBF3 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7864C69CE88DD540D76B06 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */; }; A602BC62970AAC3CABB3FC9E /* libPods-NotificationsExampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B08A38CF5037E07CAB47E42F /* libPods-NotificationsExampleApp.a */; }; D84861182267695100E9103D /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D84861172267695100E9103D /* JavaScriptCore.framework */; }; /* End PBXBuildFile section */ @@ -271,6 +271,7 @@ 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = NotificationsExampleApp/main.m; sourceTree = ""; }; 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 33D24DE18AC038B943B8CBC8 /* Pods-NotificationsExampleApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsExampleApp.debug.xcconfig"; path = "Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp.debug.xcconfig"; sourceTree = ""; }; + 4FA5CBCC07C58749F5DB954C /* Pods-NotificationsExampleApp-NotificationsExampleAppTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsExampleApp-NotificationsExampleAppTests.release.xcconfig"; path = "Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests.release.xcconfig"; sourceTree = ""; }; 5004ABE1233BE75A00490132 /* CallKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CallKit.framework; path = System/Library/Frameworks/CallKit.framework; sourceTree = SDKROOT; }; 50ABBFD824B3294200077ED8 /* RNNotificationsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNotificationsTests.m; sourceTree = ""; }; 50ABBFD924B3294200077ED8 /* RNNotificationsStoreTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNotificationsStoreTests.m; sourceTree = ""; }; @@ -280,12 +281,13 @@ 50ABC02C24B32C6A00077ED8 /* RNCommandsHandlerIntegrationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RNCommandsHandlerIntegrationTest.m; path = ../../../lib/ios/RNNotificationsTests/Integration/RNCommandsHandlerIntegrationTest.m; sourceTree = ""; }; 50F1F08522CE3A9F00FD5829 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 50F1F0A022CE3B0600FD5829 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 5C5AACEDBE3CBFD21F5ABB3A /* Pods-NotificationsExampleApp-NotificationsExampleAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsExampleApp-NotificationsExampleAppTests.debug.xcconfig"; path = "Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests.debug.xcconfig"; sourceTree = ""; }; 716C1316CDE92F3D079D7F77 /* Pods-NotificationsExampleApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsExampleApp.release.xcconfig"; path = "Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp.release.xcconfig"; sourceTree = ""; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; B08A38CF5037E07CAB47E42F /* libPods-NotificationsExampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationsExampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - B1FB78C4C15FDF7AC821B216 /* libPods-NotificationsExampleAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationsExampleAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; C63BE97E85C8E8A543E447B0 /* Pods-NotificationsExampleAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsExampleAppTests.debug.xcconfig"; path = "Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests.debug.xcconfig"; sourceTree = ""; }; + CE7864C69CE88DD540D76B06 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationsExampleApp-NotificationsExampleAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; D84861172267695100E9103D /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; D85498C21D97B31100DEEE06 /* RNNotifications.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNNotifications.xcodeproj; path = ../../lib/ios/RNNotifications.xcodeproj; sourceTree = ""; }; /* End PBXFileReference section */ @@ -305,7 +307,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 86B6E1FE34FA8D2D24E5AAD4 /* libPods-NotificationsExampleAppTests.a in Frameworks */, + 56995B62CBAED5D6C6AFDBF3 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -478,6 +480,8 @@ 716C1316CDE92F3D079D7F77 /* Pods-NotificationsExampleApp.release.xcconfig */, C63BE97E85C8E8A543E447B0 /* Pods-NotificationsExampleAppTests.debug.xcconfig */, 0AE6D49F214694B794F29B8D /* Pods-NotificationsExampleAppTests.release.xcconfig */, + 5C5AACEDBE3CBFD21F5ABB3A /* Pods-NotificationsExampleApp-NotificationsExampleAppTests.debug.xcconfig */, + 4FA5CBCC07C58749F5DB954C /* Pods-NotificationsExampleApp-NotificationsExampleAppTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -488,7 +492,7 @@ 5004ABE1233BE75A00490132 /* CallKit.framework */, D84861172267695100E9103D /* JavaScriptCore.framework */, B08A38CF5037E07CAB47E42F /* libPods-NotificationsExampleApp.a */, - B1FB78C4C15FDF7AC821B216 /* libPods-NotificationsExampleAppTests.a */, + CE7864C69CE88DD540D76B06 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */, ); name = Frameworks; sourceTree = ""; @@ -564,7 +568,7 @@ }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "NotificationsExampleApp" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 12.0"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( @@ -923,7 +927,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-NotificationsExampleAppTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-NotificationsExampleApp-NotificationsExampleAppTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -935,17 +939,16 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests-resources-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; 6F86543B4FD42B3918DC5CDB /* [CP] Copy Pods Resources */ = { @@ -953,13 +956,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-resources-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -971,21 +973,16 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp-NotificationsExampleAppTests/Pods-NotificationsExampleApp-NotificationsExampleAppTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; F9A1BDBED81DCD225C7ACE4A /* [CP] Embed Pods Frameworks */ = { @@ -993,17 +990,12 @@ buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework", + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-NotificationsExampleApp/Pods-NotificationsExampleApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -1064,6 +1056,7 @@ CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -1071,8 +1064,12 @@ "$(SRCROOT)/../node_modules/react-native-notifications/lib/ios/**", ); INFOPLIST_FILE = NotificationsExampleApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1092,6 +1089,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -1099,8 +1097,12 @@ "$(SRCROOT)/../node_modules/react-native-notifications/lib/ios/**", ); INFOPLIST_FILE = NotificationsExampleApp/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + "@executable_path/Frameworks", + ); OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -1115,7 +1117,7 @@ }; 50ABBFF024B3299900077ED8 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C63BE97E85C8E8A543E447B0 /* Pods-NotificationsExampleAppTests.debug.xcconfig */; + baseConfigurationReference = 5C5AACEDBE3CBFD21F5ABB3A /* Pods-NotificationsExampleApp-NotificationsExampleAppTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -1137,7 +1139,11 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NotificationsExampleAppTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = rn.NotificationsExampleAppTests; @@ -1149,7 +1155,7 @@ }; 50ABBFF124B3299900077ED8 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0AE6D49F214694B794F29B8D /* Pods-NotificationsExampleAppTests.release.xcconfig */; + baseConfigurationReference = 4FA5CBCC07C58749F5DB954C /* Pods-NotificationsExampleApp-NotificationsExampleAppTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CLANG_ANALYZER_NONNULL = YES; @@ -1172,7 +1178,11 @@ GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NotificationsExampleAppTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 13.2; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = rn.NotificationsExampleAppTests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1184,6 +1194,7 @@ 83CBBA201A601CBA00E9B192 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = NO; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -1204,6 +1215,7 @@ COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1224,9 +1236,14 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; }; name = Debug; @@ -1234,6 +1251,7 @@ 83CBBA211A601CBA00E9B192 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = NO; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -1254,6 +1272,7 @@ COPY_PHASE_STRIP = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1267,8 +1286,13 @@ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, "$(SRCROOT)/../node_modules/react-native/React/**", ); - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD_RUNPATH_SEARCH_PATHS = ( + /usr/lib/swift, + "$(inherited)", + ); MTL_ENABLE_DEBUG_INFO = NO; + REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; diff --git a/example/ios/Podfile b/example/ios/Podfile index e8275749b..561383640 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -6,7 +6,7 @@ install! 'cocoapods', :deterministic_uuids => false production = ENV["PRODUCTION"] == "1" -def all_pods +target 'NotificationsExampleApp' do config = use_native_modules! flags = get_default_flags() @@ -21,13 +21,14 @@ def all_pods ) pod 'react-native-notifications', :path => '../../' -end -target 'NotificationsExampleApp' do - all_pods -end + target 'NotificationsExampleAppTests' do + inherit! :complete + # Pods for testing + end -target 'NotificationsExampleAppTests' do - all_pods - pod 'OCMock' + post_install do |installer| + react_native_post_install(installer) + __apply_Xcode_12_5_M1_post_install_workaround(installer) + end end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 13c10f87c..8d09825d5 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -74,7 +74,6 @@ PODS: - fmt (6.2.1) - glog (0.3.5) - libevent (2.1.12) - - OCMock (3.9.1) - OpenSSL-Universal (1.1.1100) - RCT-Folly (2021.06.28.00-v2): - boost @@ -385,7 +384,6 @@ DEPENDENCIES: - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`) - - OCMock - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../../node_modules/react-native/Libraries/RCTRequired`) @@ -432,7 +430,6 @@ SPEC REPOS: - FlipperKit - fmt - libevent - - OCMock - OpenSSL-Universal - SocketRocket - YogaKit @@ -523,7 +520,6 @@ SPEC CHECKSUMS: fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 - OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a RCTRequired: c8c080849a3670601d5c7056023a2176067a69d8 @@ -556,6 +552,6 @@ SPEC CHECKSUMS: Yoga: 75bf4b0131cfb46a659cd0c13309b79a6fcff66d YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: fe30e6f497a776689c220b9a392fbb1b9fbfd5d9 +PODFILE CHECKSUM: db98acdd11faf19f8692c5b592f01e5f711fed2d COCOAPODS: 1.11.2 From 6edad0a4d551d97d427b6bf359e726166aad68d2 Mon Sep 17 00:00:00 2001 From: danielel Date: Mon, 31 Oct 2022 12:36:19 +0200 Subject: [PATCH 08/11] remove old files --- .../NotificationManagerCompatFacade.java | 12 ------------ .../NotificationManagerCompatFacade.java | 12 ------------ 2 files changed, 24 deletions(-) delete mode 100644 android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java delete mode 100644 android/app/src/reactNative60/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java diff --git a/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java b/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java deleted file mode 100644 index f9c858b06..000000000 --- a/android/app/src/reactNative59/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java +++ /dev/null @@ -1,12 +0,0 @@ - -package com.wix.reactnativenotifications; - -import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v4.app.NotificationManagerCompat; - -public abstract class NotificationManagerCompatFacade { - public static NotificationManagerCompat from(@NonNull Context context) { - return NotificationManagerCompat.from(context); - } -} diff --git a/android/app/src/reactNative60/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java b/android/app/src/reactNative60/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java deleted file mode 100644 index 94ea1884c..000000000 --- a/android/app/src/reactNative60/java/com/wix/reactnativenotifications/NotificationManagerCompatFacade.java +++ /dev/null @@ -1,12 +0,0 @@ - -package com.wix.reactnativenotifications; - -import android.content.Context; -import androidx.annotation.NonNull; -import androidx.core.app.NotificationManagerCompat; - -public abstract class NotificationManagerCompatFacade { - public static NotificationManagerCompat from(@NonNull Context context) { - return NotificationManagerCompat.from(context); - } -} From abb4dbe2a352d683befcdf955381baae74f98e8b Mon Sep 17 00:00:00 2001 From: danielel Date: Mon, 31 Oct 2022 12:36:30 +0200 Subject: [PATCH 09/11] fix ios tests --- example/ios/Podfile | 1 + example/ios/Podfile.lock | 4 ++-- lib/ios/RNNotifications.xcodeproj/project.pbxproj | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/example/ios/Podfile b/example/ios/Podfile index 561383640..f13fc3f64 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -25,6 +25,7 @@ target 'NotificationsExampleApp' do target 'NotificationsExampleAppTests' do inherit! :complete # Pods for testing + pod 'OCMock' end post_install do |installer| diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 8d09825d5..609a0ee54 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -552,6 +552,6 @@ SPEC CHECKSUMS: Yoga: 75bf4b0131cfb46a659cd0c13309b79a6fcff66d YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: db98acdd11faf19f8692c5b592f01e5f711fed2d +PODFILE CHECKSUM: 141bcb02b79b13266502bf3a21b1bec5459833fb -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.3 diff --git a/lib/ios/RNNotifications.xcodeproj/project.pbxproj b/lib/ios/RNNotifications.xcodeproj/project.pbxproj index eb5a779d6..d6b03211c 100644 --- a/lib/ios/RNNotifications.xcodeproj/project.pbxproj +++ b/lib/ios/RNNotifications.xcodeproj/project.pbxproj @@ -624,7 +624,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -658,7 +658,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; From 96a171f6fccff2caa0b670638a1f2ac48c88b083 Mon Sep 17 00:00:00 2001 From: danielel Date: Sun, 6 Nov 2022 17:14:30 +0200 Subject: [PATCH 10/11] upgrade android gradle --- .buildkite/pipeline.yaml | 2 +- lib/android/app/build.gradle | 8 ++++---- lib/android/build.gradle | 19 +++++++++++++++---- .../gradle/wrapper/gradle-wrapper.properties | 2 +- react-native.config.js | 1 + 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 4d6b15909..1bec210fc 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -17,7 +17,7 @@ steps: - "npm install" - "npm run test-js" - "npm run clean" - - "npm run test-unit-android -- --release" + - "JAVA_HOME=/usr/local/opt/openjdk@11 npm run test-unit-android -- --release" key: android - label: "iOS" diff --git a/lib/android/app/build.gradle b/lib/android/app/build.gradle index d049e84dc..b3f120577 100644 --- a/lib/android/app/build.gradle +++ b/lib/android/app/build.gradle @@ -10,7 +10,7 @@ def DEFAULT_COMPILE_SDK_VERSION = 30 def DEFAULT_MIN_SDK_VERSION = 21 def DEFAULT_KOTLIN_VERSION = "1.3.61" def DEFAULT_KOTLIN_STDLIB_VERSION = "kotlin-stdlib-jdk8" -def DEFAULT_FIREBASE_MESSAGING_VERSION = "21.1.0" +def DEFAULT_FIREBASE_MESSAGING_VERSION = "23.1.0" def androidSdkVersion = safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) def androidMinSdkVersion = safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION) @@ -58,8 +58,8 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } dexOptions { @@ -125,7 +125,7 @@ dependencies { implementation 'com.facebook.react:react-native:+' // tests - testImplementation 'junit:junit:4.12' + testImplementation 'junit:junit:4.13.2' testImplementation "org.robolectric:robolectric:4.3" testImplementation "org.assertj:assertj-core:3.8.0" testImplementation "com.squareup.assertj:assertj-android:1.1.1" diff --git a/lib/android/build.gradle b/lib/android/build.gradle index 29d6dca27..d9ecfd8d3 100644 --- a/lib/android/build.gradle +++ b/lib/android/build.gradle @@ -3,9 +3,9 @@ import groovy.json.JsonSlurper buildscript { ext{ - androidGradlePluginVersion = '4.0.0' + androidGradlePluginVersion = "7.1.1" kotlinVersion = "1.3.61" - googleServices = "4.3.3" + googleServices = "4.3.14" androidSdkVersion = 31 } @@ -25,12 +25,23 @@ buildscript { allprojects { repositories { mavenLocal() - mavenCentral() google() jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url "$rootDir/../../node_modules/react-native/android" + url("$rootDir/../../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../../node_modules/jsc-android/dist") + } + maven { url 'https://www.jitpack.io' } + mavenCentral { + // We don't want to fetch react-native from Maven Central as there are + // older versions over there. + content { + excludeGroup "com.facebook.react" + } } } } diff --git a/lib/android/gradle/wrapper/gradle-wrapper.properties b/lib/android/gradle/wrapper/gradle-wrapper.properties index a476594fc..5e1d0e635 100644 --- a/lib/android/gradle/wrapper/gradle-wrapper.properties +++ b/lib/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip diff --git a/react-native.config.js b/react-native.config.js index 958f5533d..a95a16200 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -4,6 +4,7 @@ module.exports = { ios: {}, android: { sourceDir: './lib/android/app', + packageImportPath: 'import com.wix.reactnativenotifications.RNNotificationsPackage;', packageInstance: 'new RNNotificationsPackage(reactNativeHost.getApplication())', } }, From e5195958dbb0d486db82ed1c17cdca850e3532cc Mon Sep 17 00:00:00 2001 From: danielel Date: Mon, 7 Nov 2022 17:14:26 +0200 Subject: [PATCH 11/11] upgrade ios to 12.4 --- .../project.pbxproj | 30 ++++++------------- example/ios/Podfile | 6 +--- example/ios/Podfile.lock | 6 +++- .../RNNotifications.xcodeproj/project.pbxproj | 8 ++--- scripts/test-unit.js | 2 +- 5 files changed, 20 insertions(+), 32 deletions(-) diff --git a/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj b/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj index ec290e545..4c2d5edc9 100644 --- a/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj +++ b/example/ios/NotificationsExampleApp.xcodeproj/project.pbxproj @@ -11,14 +11,12 @@ 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 5004AC02233BE75A00490132 /* CallKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5004ABE1233BE75A00490132 /* CallKit.framework */; }; 50ABBFF224B329CA00077ED8 /* RNNotificationsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBFD824B3294200077ED8 /* RNNotificationsTests.m */; }; 50ABC01424B32ABE00077ED8 /* RNNotificationsStoreTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBFD924B3294200077ED8 /* RNNotificationsStoreTests.m */; }; 50ABC01524B32ABE00077ED8 /* RNNotificationEventHandlerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ABBFDA24B3294200077ED8 /* RNNotificationEventHandlerTests.m */; }; 50ABC02D24B32C6A00077ED8 /* RNCommandsHandlerIntegrationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 50ABC02C24B32C6A00077ED8 /* RNCommandsHandlerIntegrationTest.m */; }; - 56995B62CBAED5D6C6AFDBF3 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CE7864C69CE88DD540D76B06 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */; }; + 7D47BA80D1F49E07B08B0D94 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F8A89B1D69947B44715B713F /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */; }; A602BC62970AAC3CABB3FC9E /* libPods-NotificationsExampleApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B08A38CF5037E07CAB47E42F /* libPods-NotificationsExampleApp.a */; }; - D84861182267695100E9103D /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D84861172267695100E9103D /* JavaScriptCore.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -287,9 +285,9 @@ 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; B08A38CF5037E07CAB47E42F /* libPods-NotificationsExampleApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationsExampleApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; C63BE97E85C8E8A543E447B0 /* Pods-NotificationsExampleAppTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NotificationsExampleAppTests.debug.xcconfig"; path = "Target Support Files/Pods-NotificationsExampleAppTests/Pods-NotificationsExampleAppTests.debug.xcconfig"; sourceTree = ""; }; - CE7864C69CE88DD540D76B06 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationsExampleApp-NotificationsExampleAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; D84861172267695100E9103D /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; D85498C21D97B31100DEEE06 /* RNNotifications.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNNotifications.xcodeproj; path = ../../lib/ios/RNNotifications.xcodeproj; sourceTree = ""; }; + F8A89B1D69947B44715B713F /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NotificationsExampleApp-NotificationsExampleAppTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -297,8 +295,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 5004AC02233BE75A00490132 /* CallKit.framework in Frameworks */, - D84861182267695100E9103D /* JavaScriptCore.framework in Frameworks */, A602BC62970AAC3CABB3FC9E /* libPods-NotificationsExampleApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -307,7 +303,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 56995B62CBAED5D6C6AFDBF3 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a in Frameworks */, + 7D47BA80D1F49E07B08B0D94 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -492,7 +488,7 @@ 5004ABE1233BE75A00490132 /* CallKit.framework */, D84861172267695100E9103D /* JavaScriptCore.framework */, B08A38CF5037E07CAB47E42F /* libPods-NotificationsExampleApp.a */, - CE7864C69CE88DD540D76B06 /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */, + F8A89B1D69947B44715B713F /* libPods-NotificationsExampleApp-NotificationsExampleAppTests.a */, ); name = Frameworks; sourceTree = ""; @@ -888,7 +884,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/scripts/react-native-xcode.sh\n"; + shellScript = "export NODE_BINARY=node\n../../node_modules/react-native/scripts/react-native-xcode.sh ./index.js\n"; }; 010DD5801D008122B4BFEF7E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; @@ -1056,7 +1052,6 @@ CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = ""; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -1089,7 +1084,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, @@ -1138,7 +1132,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NotificationsExampleAppTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1177,7 +1171,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = NotificationsExampleAppTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1237,10 +1231,7 @@ "$(SRCROOT)/../node_modules/react-native/React/**", ); IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); + LD_RUNPATH_SEARCH_PATHS = ""; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; @@ -1287,10 +1278,7 @@ "$(SRCROOT)/../node_modules/react-native/React/**", ); IPHONEOS_DEPLOYMENT_TARGET = 12.4; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); + LD_RUNPATH_SEARCH_PATHS = ""; MTL_ENABLE_DEBUG_INFO = NO; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; diff --git a/example/ios/Podfile b/example/ios/Podfile index f13fc3f64..3d1718daa 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -2,9 +2,6 @@ require_relative '../../node_modules/react-native/scripts/react_native_pods' require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules' platform :ios, '12.4' -install! 'cocoapods', :deterministic_uuids => false - -production = ENV["PRODUCTION"] == "1" target 'NotificationsExampleApp' do config = use_native_modules! @@ -13,11 +10,10 @@ target 'NotificationsExampleApp' do use_react_native!( :path => config[:reactNativePath], - :production => false, :hermes_enabled => flags[:hermes_enabled], :fabric_enabled => flags[:fabric_enabled], :flipper_configuration => FlipperConfiguration.enabled, - :app_path => "#{Pod::Config.instance.installation_root}/../.." + :app_path => "#{Pod::Config.instance.installation_root}/.." ) pod 'react-native-notifications', :path => '../../' diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 609a0ee54..15af04746 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -74,6 +74,7 @@ PODS: - fmt (6.2.1) - glog (0.3.5) - libevent (2.1.12) + - OCMock (3.9.1) - OpenSSL-Universal (1.1.1100) - RCT-Folly (2021.06.28.00-v2): - boost @@ -384,6 +385,7 @@ DEPENDENCIES: - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0) - FlipperKit/SKIOSNetworkPlugin (= 0.125.0) - glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`) + - OCMock - OpenSSL-Universal (= 1.1.1100) - RCT-Folly (from `../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../../node_modules/react-native/Libraries/RCTRequired`) @@ -430,6 +432,7 @@ SPEC REPOS: - FlipperKit - fmt - libevent + - OCMock - OpenSSL-Universal - SocketRocket - YogaKit @@ -520,6 +523,7 @@ SPEC CHECKSUMS: fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 + OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a RCTRequired: c8c080849a3670601d5c7056023a2176067a69d8 @@ -552,6 +556,6 @@ SPEC CHECKSUMS: Yoga: 75bf4b0131cfb46a659cd0c13309b79a6fcff66d YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 141bcb02b79b13266502bf3a21b1bec5459833fb +PODFILE CHECKSUM: 5d3caeaf1762e6fcf7ddd06c56079f01ab44bef1 COCOAPODS: 1.11.3 diff --git a/lib/ios/RNNotifications.xcodeproj/project.pbxproj b/lib/ios/RNNotifications.xcodeproj/project.pbxproj index d6b03211c..591643bf8 100644 --- a/lib/ios/RNNotifications.xcodeproj/project.pbxproj +++ b/lib/ios/RNNotifications.xcodeproj/project.pbxproj @@ -521,7 +521,7 @@ "$(PROJECT_DIR)/RNNotificationsTests/OCMock", ); INFOPLIST_FILE = RNNotificationsTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -574,7 +574,7 @@ "$(PROJECT_DIR)/RNNotificationsTests/OCMock", ); INFOPLIST_FILE = RNNotificationsTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.1; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", @@ -624,7 +624,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -658,7 +658,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.4; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; diff --git a/scripts/test-unit.js b/scripts/test-unit.js index 83be3ee86..861d57776 100644 --- a/scripts/test-unit.js +++ b/scripts/test-unit.js @@ -34,7 +34,7 @@ function runIosUnitTests() { -configuration ${conf} -derivedDataPath ./example/ios/DerivedData/NotificationsExampleApp -quiet - -UseModernBuildSystem=NO + -UseModernBuildSystem=YES ONLY_ACTIVE_ARCH=YES`); exec.execSync(`cd ./example/ios &&