diff --git a/ios/DeveloperApp/AppDelegate.swift b/ios/DeveloperApp/AppDelegate.swift index 8ad1def5..b174608a 100644 --- a/ios/DeveloperApp/AppDelegate.swift +++ b/ios/DeveloperApp/AppDelegate.swift @@ -5,50 +5,29 @@ import UserNotifications import MendixNative @main -class AppDelegate: ReactAppProvider { - - var shouldLaunchLastApp: Bool = false - var previewingSampleApp: Bool = false - - override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { +class AppDelegate: UIResponder, UIApplicationDelegate { + + /// The window lives on `SceneDelegate` under the scene lifecycle, but `UIApplicationDelegate` + /// declares `window` as an optional requirement that third party libraries still read through + /// `UIApplication.shared.delegate` (react-native-firebase, reanimated, blob-util). Without this + /// forwarding property the selector is unimplemented and those reads crash. + @objc var window: UIWindow? { + get { SceneDelegate.delegateInstance()?.window } + set { SceneDelegate.delegateInstance()?.window = newValue } + } + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { SessionCookieStore.restore() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android - setUpProvider() clearKeychainIfNecessary() setUpDevice() setUpGoogleMaps() setUpPushNotifications(application) - updateRootViewController(showOnboarding() ? .launchTutorial : .openApp) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } - - func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { - RCTLinkingManager.application(app, open: url, options: options) - guard let appUrl = AppPreferences.appUrl, !appUrl.isEmpty, !ReactAppProvider.isReactAppActive() else { - return true - } - var launchOptions: [AnyHashable: Any] = options - launchOptions[UIApplication.LaunchOptionsKey.annotation] = options[UIApplication.OpenURLOptionsKey.annotation] ?? [] - launchOptions[UIApplication.LaunchOptionsKey.url] = url - launchMendixAppWithOptions(options: launchOptions) return true } - - func applicationDidEnterBackground(_ application: UIApplication) { - SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android - } func applicationWillTerminate(_ application: UIApplication) { SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android } - - private func launchMendixAppWithOptions(options: [AnyHashable: Any] = [:]) { - ReactNative.shared.setup(MendixAppEntryType.deeplink.mendixApp, launchOptions: options) - ReactNative.shared.start() - } - - static func delegateInstance() -> AppDelegate? { - return UIApplication.shared.delegate as? AppDelegate - } } //Device @@ -66,21 +45,6 @@ extension AppDelegate { } } -//RootView -extension AppDelegate { - private func updateRootViewController(_ storyboard: UIStoryboard) { - window = UIWindow(frame: UIScreen.main.bounds) - window?.rootViewController = storyboard.instantiateInitialViewController() - window?.makeKeyAndVisible() - window?.overrideUserInterfaceStyle = .light // Force Light Mode - IQKeyboardManager.shared().isEnabled = false - } - - func changeRootViewToOpenApp() { - updateRootViewController(.openApp) - } -} - //GMS extension AppDelegate { private func setUpGoogleMaps() { diff --git a/ios/DeveloperApp/DeveloperApp-Bridging-Header.h b/ios/DeveloperApp/DeveloperApp-Bridging-Header.h index bf2f22ce..88334264 100644 --- a/ios/DeveloperApp/DeveloperApp-Bridging-Header.h +++ b/ios/DeveloperApp/DeveloperApp-Bridging-Header.h @@ -1,4 +1,3 @@ #import "React/RCTRootView.h" -#import "React/RCTLinkingManager.h" #import "IQKeyboardManager/IQKeyboardManager.h" #import diff --git a/ios/DeveloperApp/Info.plist b/ios/DeveloperApp/Info.plist index b3a78ff8..80dcbe5d 100644 --- a/ios/DeveloperApp/Info.plist +++ b/ios/DeveloperApp/Info.plist @@ -130,6 +130,23 @@ SimpleLineIcons.ttf Zocial.ttf + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + + + + UIBackgroundModes fetch @@ -137,8 +154,6 @@ UIFileSharingEnabled - UILaunchStoryboardName - UIMainStoryboardFile LaunchTutorial UIRequiredDeviceCapabilities diff --git a/ios/DeveloperApp/MendixApp/MendixAppViewController.swift b/ios/DeveloperApp/MendixApp/MendixAppViewController.swift index ec5cef08..8bbece67 100644 --- a/ios/DeveloperApp/MendixApp/MendixAppViewController.swift +++ b/ios/DeveloperApp/MendixApp/MendixAppViewController.swift @@ -15,7 +15,7 @@ class MendixAppViewController: UIViewController, ReactNativeDelegateInternal { // Set all orientations available while launching the mendix app. AppDelegate.orientationLock = .all - AppDelegate.delegateInstance()?.window?.overrideUserInterfaceStyle = .unspecified + SceneDelegate.delegateInstance()?.window?.overrideUserInterfaceStyle = .unspecified ReactNative.shared.delegate = self ReactNative.shared.start() } @@ -30,12 +30,12 @@ class MendixAppViewController: UIViewController, ReactNativeDelegateInternal { super.viewDidDisappear(animated) // Set orientation to only portrait mode, while exiting the mendix app. AppDelegate.orientationLock = .portrait - AppDelegate.delegateInstance()?.window?.overrideUserInterfaceStyle = .light + SceneDelegate.delegateInstance()?.window?.overrideUserInterfaceStyle = .light } func onAppClosed() { - if let appDelegate = AppDelegate.delegateInstance(), appDelegate.previewingSampleApp == true { - appDelegate.previewingSampleApp = false + if let sceneDelegate = SceneDelegate.delegateInstance(), sceneDelegate.previewingSampleApp == true { + sceneDelegate.previewingSampleApp = false StorageHelper.clearAll() } self.navigationController?.popViewController(animated: true) diff --git a/ios/DeveloperApp/OpenApp/OpenAppViewController.swift b/ios/DeveloperApp/OpenApp/OpenAppViewController.swift index 11eeed92..59ad1e2a 100644 --- a/ios/DeveloperApp/OpenApp/OpenAppViewController.swift +++ b/ios/DeveloperApp/OpenApp/OpenAppViewController.swift @@ -6,9 +6,8 @@ class OpenAppViewController: UIViewController { self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) - let appDelegate = (UIApplication.shared.delegate as! AppDelegate) - if (appDelegate.shouldLaunchLastApp) { - appDelegate.shouldLaunchLastApp = false; + if let sceneDelegate = SceneDelegate.delegateInstance(), sceneDelegate.shouldLaunchLastApp { + sceneDelegate.shouldLaunchLastApp = false; self.performSegue(withIdentifier: "MendixApp", sender: nil) } } diff --git a/ios/DeveloperApp/OpenApp/TabViewController.swift b/ios/DeveloperApp/OpenApp/TabViewController.swift index b63379bd..59684c9a 100644 --- a/ios/DeveloperApp/OpenApp/TabViewController.swift +++ b/ios/DeveloperApp/OpenApp/TabViewController.swift @@ -16,8 +16,8 @@ class TabViewController: UITabBarController { } func setSelectedIndex(index:Int){ - guard let appDelegate = UIApplication.shared.delegate as? AppDelegate, - let tabBarController = appDelegate.window?.rootViewController as? UITabBarController else { + guard let sceneDelegate = SceneDelegate.delegateInstance(), + let tabBarController = sceneDelegate.window?.rootViewController as? UITabBarController else { return } tabBarController.selectedIndex = index diff --git a/ios/DeveloperApp/SampleApps/SampleAppCollectionViewController.swift b/ios/DeveloperApp/SampleApps/SampleAppCollectionViewController.swift index 2fc877fb..e92ab8f7 100644 --- a/ios/DeveloperApp/SampleApps/SampleAppCollectionViewController.swift +++ b/ios/DeveloperApp/SampleApps/SampleAppCollectionViewController.swift @@ -38,8 +38,7 @@ class SampleAppCollectionViewController: UIViewController { } func onTap(app: SampleApp) { - let appDelegate = (UIApplication.shared.delegate as! AppDelegate) - appDelegate.previewingSampleApp = true + SceneDelegate.delegateInstance()?.previewingSampleApp = true for i in 0..) { + handleURLContexts(URLContexts) { [weak self] launchOptions in + self?.launchMendixAppWithOptions(options: launchOptions) + } + } + + @objc func sceneDidEnterBackground(_ scene: UIScene) { + SessionCookieStore.persist() //iOS does not persist session cookies across app restarts, this helps persisting session cookies to match behaviour with Android + } + + private func launchMendixAppWithOptions(options: [AnyHashable: Any]) { + guard let appUrl = AppPreferences.appUrl, !appUrl.isEmpty else { + return + } + ReactNative.shared.setup(MendixAppEntryType.deeplink.mendixApp, launchOptions: options) + ReactNative.shared.start() + } + + static func delegateInstance() -> SceneDelegate? { + if let provider = ReactAppProvider.shared() as? SceneDelegate { + return provider + } + return UIApplication.shared.connectedScenes.compactMap { $0.delegate as? SceneDelegate }.first + } +} + +//RootView +extension SceneDelegate { + private func updateRootViewController(_ storyboard: UIStoryboard) { + guard let rootViewController = storyboard.instantiateInitialViewController() else { + return + } + changeRoot(to: rootViewController) + window?.overrideUserInterfaceStyle = .light + IQKeyboardManager.shared().isEnabled = false + } + + func changeRootViewToOpenApp() { + updateRootViewController(.openApp) + } +} diff --git a/ios/DeveloperApp/Tutorial/LaunchTutorialViewController.swift b/ios/DeveloperApp/Tutorial/LaunchTutorialViewController.swift index ed243de6..ed7b1450 100644 --- a/ios/DeveloperApp/Tutorial/LaunchTutorialViewController.swift +++ b/ios/DeveloperApp/Tutorial/LaunchTutorialViewController.swift @@ -22,7 +22,7 @@ class LaunchTutorialViewController: UIViewController { } private func closeOnboarding() { - AppDelegate.delegateInstance()?.changeRootViewToOpenApp() + SceneDelegate.delegateInstance()?.changeRootViewToOpenApp() } private func setupSwiftUIScreen(){ diff --git a/ios/Podfile b/ios/Podfile index c5a785c6..cd808be5 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -75,6 +75,12 @@ target 'DeveloperApp' do installer.pods_project.targets.each do |target| target.build_configurations.each do |config| + + minimum_ios_version = Gem::Version.new(deployment_target) + current_deployment_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] + if current_deployment_target && Gem::Version.new(current_deployment_target) < minimum_ios_version + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target + end if target.name.start_with?('React') || target.name == 'RCTTypeSafety' config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [] diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 7fac32f8..a99fbb66 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -167,7 +167,7 @@ PODS: - libwebp/sharpyuv (1.5.0) - libwebp/webp (1.5.0): - libwebp/sharpyuv - - MendixNative (0.5.0): + - MendixNative (0.5.2): - hermes-engine - RCTRequired - RCTTypeSafety @@ -3399,10 +3399,10 @@ SPEC CHECKSUMS: GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a GoogleMaps: 8939898920281c649150e0af74aa291c60f2e77d GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 - hermes-engine: 166613ab57f3dde1bf3f24c60212b66a1d585f8b + hermes-engine: 9f6d216d03a4100ed243774d56948a93afc5bae1 IQKeyboardManager: c8665b3396bd0b79402b4c573eac345a31c7d485 libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8 - MendixNative: 7cba944a4e608e6ab40ec281e9b2b0f9f3cdefe0 + MendixNative: b789c95cb7e776e332a0dabd4f39b91e20c1f31d MultiplatformBleAdapter: b1fddd0d499b96b607e00f0faa8e60648343dc1d nanopb: 438bc412db1928dac798aa6fd75726007be04262 NitroGeolocation: 688a2b889656060dafe9d83dc62fc0513b954a97 @@ -3420,7 +3420,7 @@ SPEC CHECKSUMS: React: 1ba7d364ade7d883a1ec055bfc3606f35fdee17b React-callinvoker: bc2a26f8d84fb01f003fc6de6c9337b64715f95b React-Core: 7840d3a80b43a95c5e80ef75146bd70925ebab0f - React-Core-prebuilt: 2439654d53489a5609231fe950d7f4e4c641ad52 + React-Core-prebuilt: a54db89db007bc34115efc5abe10e05c699797da React-CoreModules: 2eb010400b63b89e53a324ffb3c112e4c7c3ce42 React-cxxreact: a558e92199d26f145afa9e62c4233cf8e7950efe React-debug: 755200a6e7f5e6e0a40ff8d215493d43cce285fc @@ -3499,7 +3499,7 @@ SPEC CHECKSUMS: ReactCodegen: 797de5178718324c6eba3327b07f9a423fbd5787 ReactCommon: 07572bf9e687c8a52fbe4a3641e9e3a1a477c78e ReactNativeBiometrics: 9ead8d633833fd13e5a79564af8ba7064c2a58c6 - ReactNativeDependencies: 14132e559d3008cd261e3c00859a58fd4f7fa42c + ReactNativeDependencies: e709c771664b1e4e11acf00936c61a975577bf9c RNBootSplash: 13b7612788960d0c5446e68489ac2509e506cfcd RNCalendarEvents: f90f73666b6bcbb3cc8a491ffbb5e48c0db3de37 RNCAsyncStorage: 3a4f5e2777dae1688b781a487923a08569e27fe4 @@ -3530,6 +3530,6 @@ SPEC CHECKSUMS: VisionCamera: 7187b3dac1ff3071234ead959ce311875748e14f Yoga: c0b3f2c7e8d3e327e450223a2414ca3fa296b9a2 -PODFILE CHECKSUM: 3ac57498e7a5b50e63c45224f2a40431ea916f8c +PODFILE CHECKSUM: d353966f749dab43419e63883c1943d86361ce21 COCOAPODS: 1.16.2 diff --git a/ios/developerapp.xcodeproj/project.pbxproj b/ios/developerapp.xcodeproj/project.pbxproj index 4b4aef1c..d139c875 100644 --- a/ios/developerapp.xcodeproj/project.pbxproj +++ b/ios/developerapp.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 04222F8220403EC30092F0A0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04222F8120403EC30092F0A0 /* AppDelegate.swift */; }; + 04222F8420403EC30092F0A0 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04222F8320403EC30092F0A0 /* SceneDelegate.swift */; }; 0433D0C820878BA6001EDC7B /* PaddingTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0433D0C720878BA6001EDC7B /* PaddingTextField.swift */; }; 046CD08F20406110007291F9 /* OpenAppViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 046CD08E20406110007291F9 /* OpenAppViewController.swift */; }; 047B674A22B1080200FF5FC3 /* Bundles in Resources */ = {isa = PBXBuildFile; fileRef = 047B674922B1080200FF5FC3 /* Bundles */; }; @@ -89,6 +90,7 @@ /* Begin PBXFileReference section */ 04222F8120403EC30092F0A0 /* AppDelegate.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; tabWidth = 2; wrapsLines = 1; }; + 04222F8320403EC30092F0A0 /* SceneDelegate.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; tabWidth = 2; wrapsLines = 1; }; 0433D0C720878BA6001EDC7B /* PaddingTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PaddingTextField.swift; sourceTree = ""; }; 046CD08E20406110007291F9 /* OpenAppViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenAppViewController.swift; sourceTree = ""; }; 047B674922B1080200FF5FC3 /* Bundles */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Bundles; sourceTree = ""; }; @@ -171,8 +173,6 @@ /* Begin PBXFileSystemSynchronizedRootGroup section */ 9EA4C6642E8D2CB20050BB15 /* Extension */ = { isa = PBXFileSystemSynchronizedRootGroup; - exceptions = ( - ); path = Extension; sourceTree = ""; }; @@ -285,6 +285,7 @@ 13B07FB61A68108700A75B9A /* Info.plist */, 6EAD388C2A3B439F00DC9D88 /* Launch */, 04222F8120403EC30092F0A0 /* AppDelegate.swift */, + 04222F8320403EC30092F0A0 /* SceneDelegate.swift */, 2CCCE91825A367F80087AD16 /* Colors.xcassets */, 2C887F5B24B78D640003DC53 /* SplashScreenPresenter.swift */, EB07BDA720CEA13400E0CD48 /* Images.xcassets */, @@ -595,6 +596,8 @@ "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", ); name = "[CP-User] [RNFB] Core Configuration"; + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\n##########################################################################\n##########################################################################\n#\n# NOTE THAT IF YOU CHANGE THIS FILE YOU MUST RUN pod install AFTERWARDS\n#\n# This file is installed as an Xcode build script in the project file\n# by cocoapods, and you will not see your changes until you pod install\n#\n##########################################################################\n##########################################################################\n\nset -e\n\n_MAX_LOOKUPS=2;\n_SEARCH_RESULT=''\n_RN_ROOT_EXISTS=''\n_CURRENT_LOOKUPS=1\n_JSON_ROOT=\"'react-native'\"\n_JSON_FILE_NAME='firebase.json'\n_JSON_OUTPUT_BASE64='e30=' # { }\n_CURRENT_SEARCH_DIR=${PROJECT_DIR}\n_PLIST_BUDDY=/usr/libexec/PlistBuddy\n_TARGET_PLIST=\"${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}\"\n_DSYM_PLIST=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n# plist arrays\n_PLIST_ENTRY_KEYS=()\n_PLIST_ENTRY_TYPES=()\n_PLIST_ENTRY_VALUES=()\n\nfunction setPlistValue {\n echo \"info: setting plist entry '$1' of type '$2' in file '$4'\"\n ${_PLIST_BUDDY} -c \"Add :$1 $2 '$3'\" $4 || echo \"info: '$1' already exists\"\n}\n\nfunction getFirebaseJsonKeyValue () {\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$1'); puts output[$_JSON_ROOT]['$2']\"\n else\n echo \"\"\n fi;\n}\n\nfunction jsonBoolToYesNo () {\n if [[ $1 == \"false\" ]]; then\n echo \"NO\"\n elif [[ $1 == \"true\" ]]; then\n echo \"YES\"\n else echo \"NO\"\n fi\n}\n\necho \"info: -> RNFB build script started\"\necho \"info: 1) Locating ${_JSON_FILE_NAME} file:\"\n\nif [[ -z ${_CURRENT_SEARCH_DIR} ]]; then\n _CURRENT_SEARCH_DIR=$(pwd)\nfi;\n\nwhile true; do\n _CURRENT_SEARCH_DIR=$(dirname \"$_CURRENT_SEARCH_DIR\")\n if [[ \"$_CURRENT_SEARCH_DIR\" == \"/\" ]] || [[ ${_CURRENT_LOOKUPS} -gt ${_MAX_LOOKUPS} ]]; then break; fi;\n echo \"info: ($_CURRENT_LOOKUPS of $_MAX_LOOKUPS) Searching in '$_CURRENT_SEARCH_DIR' for a ${_JSON_FILE_NAME} file.\"\n _SEARCH_RESULT=$(find \"$_CURRENT_SEARCH_DIR\" -maxdepth 2 -name ${_JSON_FILE_NAME} -print | /usr/bin/head -n 1)\n if [[ ${_SEARCH_RESULT} ]]; then\n echo \"info: ${_JSON_FILE_NAME} found at $_SEARCH_RESULT\"\n break;\n fi;\n _CURRENT_LOOKUPS=$((_CURRENT_LOOKUPS+1))\ndone\n\nif [[ ${_SEARCH_RESULT} ]]; then\n _JSON_OUTPUT_RAW=$(cat \"${_SEARCH_RESULT}\")\n _RN_ROOT_EXISTS=$(ruby -Ku -e \"require 'rubygems';require 'json'; output=JSON.parse('$_JSON_OUTPUT_RAW'); puts output[$_JSON_ROOT]\" || echo '')\n\n if [[ ${_RN_ROOT_EXISTS} ]]; then\n if ! python3 --version >/dev/null 2>&1; then echo \"python3 not found, firebase.json file processing error.\" && exit 1; fi\n _JSON_OUTPUT_BASE64=$(python3 -c 'import json,sys,base64;print(base64.b64encode(bytes(json.dumps(json.loads(open('\"'${_SEARCH_RESULT}'\"', '\"'rb'\"').read())['${_JSON_ROOT}']), '\"'utf-8'\"')).decode())' || echo \"e30=\")\n fi\n\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n\n # config.app_data_collection_default_enabled\n _APP_DATA_COLLECTION_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_data_collection_default_enabled\")\n if [[ $_APP_DATA_COLLECTION_ENABLED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseDataCollectionDefaultEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_DATA_COLLECTION_ENABLED\")\")\n fi\n\n # config.analytics_auto_collection_enabled\n _ANALYTICS_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_auto_collection_enabled\")\n if [[ $_ANALYTICS_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_COLLECTION\")\")\n fi\n\n # config.analytics_collection_deactivated\n _ANALYTICS_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_collection_deactivated\")\n if [[ $_ANALYTICS_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_DEACTIVATED\")\")\n fi\n\n # config.analytics_idfv_collection_enabled\n _ANALYTICS_IDFV_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_idfv_collection_enabled\")\n if [[ $_ANALYTICS_IDFV_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_IDFV_COLLECTION_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_IDFV_COLLECTION\")\")\n fi\n\n # config.analytics_default_allow_analytics_storage\n _ANALYTICS_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_analytics_storage\")\n if [[ $_ANALYTICS_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_ANALYTICS_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_storage\n _ANALYTICS_AD_STORAGE=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_storage\")\n if [[ $_ANALYTICS_AD_STORAGE ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_STORAGE\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_STORAGE\")\")\n fi\n\n # config.analytics_default_allow_ad_user_data\n _ANALYTICS_AD_USER_DATA=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_user_data\")\n if [[ $_ANALYTICS_AD_USER_DATA ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_USER_DATA\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AD_USER_DATA\")\")\n fi\n\n # config.analytics_default_allow_ad_personalization_signals\n _ANALYTICS_PERSONALIZATION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"analytics_default_allow_ad_personalization_signals\")\n if [[ $_ANALYTICS_PERSONALIZATION ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_DEFAULT_ALLOW_AD_PERSONALIZATION_SIGNALS\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_PERSONALIZATION\")\")\n fi\n\n # config.analytics_registration_with_ad_network_enabled\n _ANALYTICS_REGISTRATION_WITH_AD_NETWORK=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_registration_with_ad_network_enabled\")\n if [[ $_ANALYTICS_REGISTRATION_WITH_AD_NETWORK ]]; then\n _PLIST_ENTRY_KEYS+=(\"GOOGLE_ANALYTICS_REGISTRATION_WITH_AD_NETWORK_ENABLED\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_REGISTRATION_WITH_AD_NETWORK\")\")\n fi\n\n # config.google_analytics_automatic_screen_reporting_enabled\n _ANALYTICS_AUTO_SCREEN_REPORTING=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"google_analytics_automatic_screen_reporting_enabled\")\n if [[ $_ANALYTICS_AUTO_SCREEN_REPORTING ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAutomaticScreenReportingEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_ANALYTICS_AUTO_SCREEN_REPORTING\")\")\n fi\n\n # config.perf_auto_collection_enabled\n _PERF_AUTO_COLLECTION=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_auto_collection_enabled\")\n if [[ $_PERF_AUTO_COLLECTION ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_enabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_AUTO_COLLECTION\")\")\n fi\n\n # config.perf_collection_deactivated\n _PERF_DEACTIVATED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"perf_collection_deactivated\")\n if [[ $_PERF_DEACTIVATED ]]; then\n _PLIST_ENTRY_KEYS+=(\"firebase_performance_collection_deactivated\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_PERF_DEACTIVATED\")\")\n fi\n\n # config.messaging_auto_init_enabled\n _MESSAGING_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"messaging_auto_init_enabled\")\n if [[ $_MESSAGING_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseMessagingAutoInitEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_MESSAGING_AUTO_INIT\")\")\n fi\n\n # config.in_app_messaging_auto_colllection_enabled\n _FIAM_AUTO_INIT=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"in_app_messaging_auto_collection_enabled\")\n if [[ $_FIAM_AUTO_INIT ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseInAppMessagingAutomaticDataCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_FIAM_AUTO_INIT\")\")\n fi\n\n # config.app_check_token_auto_refresh\n _APP_CHECK_TOKEN_AUTO_REFRESH=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"app_check_token_auto_refresh\")\n if [[ $_APP_CHECK_TOKEN_AUTO_REFRESH ]]; then\n _PLIST_ENTRY_KEYS+=(\"FirebaseAppCheckTokenAutoRefreshEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"$(jsonBoolToYesNo \"$_APP_CHECK_TOKEN_AUTO_REFRESH\")\")\n fi\n\n # config.crashlytics_disable_auto_disabler - undocumented for now - mainly for debugging, document if becomes useful\n _CRASHLYTICS_AUTO_DISABLE_ENABLED=$(getFirebaseJsonKeyValue \"$_JSON_OUTPUT_RAW\" \"crashlytics_disable_auto_disabler\")\n if [[ $_CRASHLYTICS_AUTO_DISABLE_ENABLED == \"true\" ]]; then\n echo \"Disabled Crashlytics auto disabler.\" # do nothing\n else\n _PLIST_ENTRY_KEYS+=(\"FirebaseCrashlyticsCollectionEnabled\")\n _PLIST_ENTRY_TYPES+=(\"bool\")\n _PLIST_ENTRY_VALUES+=(\"NO\")\n fi\nelse\n _PLIST_ENTRY_KEYS+=(\"firebase_json_raw\")\n _PLIST_ENTRY_TYPES+=(\"string\")\n _PLIST_ENTRY_VALUES+=(\"$_JSON_OUTPUT_BASE64\")\n echo \"warning: A firebase.json file was not found, whilst this file is optional it is recommended to include it to configure firebase services in React Native Firebase.\"\nfi;\n\necho \"info: 2) Injecting Info.plist entries: \"\n\n# Log out the keys we're adding\nfor i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n echo \" -> $i) ${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\"\ndone\n\nfor plist in \"${_TARGET_PLIST}\" \"${_DSYM_PLIST}\" ; do\n if [[ -f \"${plist}\" ]]; then\n\n # paths with spaces break the call to setPlistValue. temporarily modify\n # the shell internal field separator variable (IFS), which normally\n # includes spaces, to consist only of line breaks\n oldifs=$IFS\n IFS=\"\n\"\n\n for i in \"${!_PLIST_ENTRY_KEYS[@]}\"; do\n setPlistValue \"${_PLIST_ENTRY_KEYS[$i]}\" \"${_PLIST_ENTRY_TYPES[$i]}\" \"${_PLIST_ENTRY_VALUES[$i]}\" \"${plist}\"\n done\n\n # restore the original internal field separator value\n IFS=$oldifs\n else\n echo \"warning: A Info.plist build output file was not found (${plist})\"\n fi\ndone\n\necho \"info: <- RNFB build script finished\"\n"; @@ -607,10 +610,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-DeveloperApp/Pods-DeveloperApp-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-DeveloperApp/Pods-DeveloperApp-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DeveloperApp/Pods-DeveloperApp-frameworks.sh\"\n"; @@ -626,6 +633,8 @@ "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", ); name = "[CP-User] [RNFB] Crashlytics Configuration"; + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "#!/usr/bin/env bash\n#\n# Copyright (c) 2016-present Invertase Limited & Contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this library except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nset -e\n\nif [[ ${PODS_ROOT} ]]; then\n echo \"info: Exec FirebaseCrashlytics Run from Pods\"\n \"${PODS_ROOT}/FirebaseCrashlytics/run\"\nelse\n echo \"info: Exec FirebaseCrashlytics Run from framework\"\n \"${PROJECT_DIR}/FirebaseCrashlytics.framework/run\"\nfi\n"; @@ -638,10 +647,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-DeveloperApp/Pods-DeveloperApp-resources-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-DeveloperApp/Pods-DeveloperApp-resources-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DeveloperApp/Pods-DeveloperApp-resources.sh\"\n"; @@ -678,6 +691,7 @@ 1055849E2A8DF9950015F9E0 /* SampleApps.swift in Sources */, E7EF3D242A33474400A04EA8 /* LaunchScreenStateManager.swift in Sources */, 04222F8220403EC30092F0A0 /* AppDelegate.swift in Sources */, + 04222F8420403EC30092F0A0 /* SceneDelegate.swift in Sources */, 6E1EA91C2A4AD72B00C430A4 /* LaunchScreenViewController.swift in Sources */, 6E6C9B402A406C99002F788D /* HelpListTile.swift in Sources */, 2C887F5C24B78D640003DC53 /* SplashScreenPresenter.swift in Sources */, diff --git a/package-lock.json b/package-lock.json index d3d03e9a..f06321ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -32,7 +32,7 @@ "@sbaiahmed1/react-native-biometrics": "0.10.0", "@shopify/flash-list": "2.3.1", "@swan-io/react-native-browser": "1.0.1", - "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.5.0/mendix-native-v0.5.0.tgz", + "mendix-native": "github:mendix/mendix-native#moo/MOO-2398-scene-delegate-migration", "react-native": "0.84.1", "react-native-ble-plx": "3.5.1", "react-native-blob-util": "0.24.7", @@ -5167,9 +5167,8 @@ "license": "MIT" }, "node_modules/mendix-native": { - "version": "0.5.0", - "resolved": "https://github.com/mendix/mendix-native/releases/download/v0.5.0/mendix-native-v0.5.0.tgz", - "integrity": "sha512-iyECE41zVvHj8SzvzqiP10JjFsoEBP3cKPV/qyZuk2frcjcrel1IJAZiLGC9AlsWp9AjaC0aDfhci/Lzisnx+g==", + "version": "0.5.2", + "resolved": "git+ssh://git@github.com/mendix/mendix-native.git#0141d71066f41ce4120551dab29563a8bf55ca35", "license": "MIT", "workspaces": [ "example" diff --git a/package.json b/package.json index 16b9fde3..264c6129 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@gorhom/bottom-sheet": "5.2.14", - "mendix-native": "https://github.com/mendix/mendix-native/releases/download/v0.5.0/mendix-native-v0.5.0.tgz", + "mendix-native": "github:mendix/mendix-native#moo/MOO-2398-scene-delegate-migration", "@octokit/rest": "^21.1.1", "@op-engineering/op-sqlite": "15.2.5", "@shopify/flash-list": "2.3.1",