From b26bedab67a64fe399be207e6615f894ab8c4666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bet=C3=BCl=20Ar=C4=B1?= Date: Fri, 14 Feb 2025 00:55:20 +0300 Subject: [PATCH 1/3] Firebase Packages | Version Updated --- .gitignore | 1 + App.tsx | 10 +++ android/app/build.gradle | 51 +---------- android/app/src/debug/AndroidManifest.xml | 6 +- .../reactnativedemo/ReactNativeFlipper.java | 75 ---------------- android/app/src/main/AndroidManifest.xml | 30 +++---- .../com/reactnativedemo/MainActivity.java | 35 -------- .../java/com/reactnativedemo/MainActivity.kt | 22 +++++ .../com/reactnativedemo/MainApplication.java | 62 ------------- .../com/reactnativedemo/MainApplication.kt | 43 ++++++++++ android/build.gradle | 20 +++-- android/gradle.properties | 5 +- .../gradle/wrapper/gradle-wrapper.properties | 4 +- android/settings.gradle | 2 +- babel.config.js | 7 ++ .../InsiderNotificationContent.entitlements | 4 +- .../NotificationViewController.m | 2 +- .../InsiderNotificationService.entitlements | 4 +- .../NotificationService.m | 2 +- ios/Podfile | 33 +++---- ios/ReactNativeDemo.xcodeproj/project.pbxproj | 86 ++++++++++++++++--- ios/ReactNativeDemo/AppDelegate.mm | 16 ++-- ios/ReactNativeDemo/Info.plist | 16 ++-- ios/ReactNativeDemo/PrivacyInfo.xcprivacy | 39 +++++++++ .../ReactNativeDemo.entitlements | 4 +- metro.config.js | 17 +++- package.json | 35 ++++---- src/insider/BlockInApps.tsx | 38 ++++++++ src/insider/ReInitSDK.tsx | 25 ++++++ 29 files changed, 358 insertions(+), 336 deletions(-) delete mode 100644 android/app/src/debug/java/com/reactnativedemo/ReactNativeFlipper.java delete mode 100644 android/app/src/main/java/com/reactnativedemo/MainActivity.java create mode 100644 android/app/src/main/java/com/reactnativedemo/MainActivity.kt delete mode 100644 android/app/src/main/java/com/reactnativedemo/MainApplication.java create mode 100644 android/app/src/main/java/com/reactnativedemo/MainApplication.kt create mode 100644 ios/ReactNativeDemo/PrivacyInfo.xcprivacy create mode 100644 src/insider/BlockInApps.tsx create mode 100644 src/insider/ReInitSDK.tsx diff --git a/.gitignore b/.gitignore index c899185..e2d4443 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ android/app/mykeystore.jks ios/Podfile.lock ios/Pods package-lock.json +ios/GoogleService-Info.plist diff --git a/App.tsx b/App.tsx index 3353931..9a0565c 100644 --- a/App.tsx +++ b/App.tsx @@ -42,6 +42,8 @@ import PageVisit from "./src/insider/PageVisit"; import GDPR from "./src/insider/GDPR"; import MessageCenter from "./src/insider/MessageCenter"; import ContentOptimizer from "./src/insider/ContentOptimizer"; +import ReInitSDK from "./src/insider/ReInitSDK"; +import BlockInApps from "./src/insider/BlockInApps"; import RNInsider from "react-native-insider"; import InsiderCallbackType from "react-native-insider/src/InsiderCallbackType"; @@ -278,6 +280,10 @@ function App(): JSX.Element { + + + + @@ -285,6 +291,10 @@ function App(): JSX.Element { + + + + diff --git a/android/app/build.gradle b/android/app/build.gradle index 4d4fe35..c347c47 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,8 +1,7 @@ apply plugin: "com.android.application" +apply plugin: "org.jetbrains.kotlin.android" apply plugin: "com.facebook.react" -import com.android.build.OutputFile - /** * This is the configuration block to customize your React Native Android app. * By default you don't need to apply any configuration, just uncomment the lines you need. @@ -78,20 +77,9 @@ def enableProguardInReleaseBuilds = false */ def jscFlavor = 'org.webkit:android-jsc:+' -/** - * Private function to get the list of Native Architectures you want to build. - * This reads the value from reactNativeArchitectures in your gradle.properties - * file and works together with the --active-arch-only flag of react-native run-android. - */ -def reactNativeArchitectures() { - def value = project.getProperties().get("reactNativeArchitectures") - return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] -} - android { - ndkVersion rootProject.ext.ndkVersion - - compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion + compileSdk rootProject.ext.compileSdkVersion namespace "com.reactnativedemo" defaultConfig { @@ -105,15 +93,6 @@ android { manifestPlaceholders = ['partner': 'your_partner_name'] } - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include (*reactNativeArchitectures()) - } - } - signingConfigs { release { // FIXME-INSIDER: Please change with your key store information. @@ -139,36 +118,12 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } - - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // https://developer.android.com/studio/build/configure-apk-splits.html - // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc. - def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - defaultConfig.versionCode * 1000 + versionCodes.get(abi) - } - - } - } } dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") - implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0") - - debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") - debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { - exclude group:'com.squareup.okhttp3', module:'okhttp' - } - - debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") if (hermesEnabled.toBoolean()) { implementation("com.facebook.react:hermes-android") } else { diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 4b185bc..eb98c01 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -2,12 +2,8 @@ - - - - + tools:ignore="GoogleAppIndexingWarning"/> diff --git a/android/app/src/debug/java/com/reactnativedemo/ReactNativeFlipper.java b/android/app/src/debug/java/com/reactnativedemo/ReactNativeFlipper.java deleted file mode 100644 index a839b69..0000000 --- a/android/app/src/debug/java/com/reactnativedemo/ReactNativeFlipper.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - *

This source code is licensed under the MIT license found in the LICENSE file in the root - * directory of this source tree. - */ -package com.reactnativedemo; - -import android.content.Context; -import com.facebook.flipper.android.AndroidFlipperClient; -import com.facebook.flipper.android.utils.FlipperUtils; -import com.facebook.flipper.core.FlipperClient; -import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; -import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; -import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; -import com.facebook.flipper.plugins.inspector.DescriptorMapping; -import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; -import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; -import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; -import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; -import com.facebook.react.ReactInstanceEventListener; -import com.facebook.react.ReactInstanceManager; -import com.facebook.react.bridge.ReactContext; -import com.facebook.react.modules.network.NetworkingModule; -import okhttp3.OkHttpClient; - -/** - * Class responsible of loading Flipper inside your React Native application. This is the debug - * flavor of it. Here you can add your own plugins and customize the Flipper setup. - */ -public class ReactNativeFlipper { - public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { - if (FlipperUtils.shouldEnableFlipper(context)) { - final FlipperClient client = AndroidFlipperClient.getInstance(context); - - client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); - client.addPlugin(new DatabasesFlipperPlugin(context)); - client.addPlugin(new SharedPreferencesFlipperPlugin(context)); - client.addPlugin(CrashReporterPlugin.getInstance()); - - NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); - NetworkingModule.setCustomClientBuilder( - new NetworkingModule.CustomClientBuilder() { - @Override - public void apply(OkHttpClient.Builder builder) { - builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); - } - }); - client.addPlugin(networkFlipperPlugin); - client.start(); - - // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized - // Hence we run if after all native modules have been initialized - ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); - if (reactContext == null) { - reactInstanceManager.addReactInstanceEventListener( - new ReactInstanceEventListener() { - @Override - public void onReactContextInitialized(ReactContext reactContext) { - reactInstanceManager.removeReactInstanceEventListener(this); - reactContext.runOnNativeModulesQueueThread( - new Runnable() { - @Override - public void run() { - client.addPlugin(new FrescoFlipperPlugin()); - } - }); - } - }); - } else { - client.addPlugin(new FrescoFlipperPlugin()); - } - } - } -} diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 4e20737..b60b6a9 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,17 +1,18 @@ - - - + + + + - - + - - - + + diff --git a/android/app/src/main/java/com/reactnativedemo/MainActivity.java b/android/app/src/main/java/com/reactnativedemo/MainActivity.java deleted file mode 100644 index 3e03065..0000000 --- a/android/app/src/main/java/com/reactnativedemo/MainActivity.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.reactnativedemo; - -import com.facebook.react.ReactActivity; -import com.facebook.react.ReactActivityDelegate; -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; -import com.facebook.react.defaults.DefaultReactActivityDelegate; - -public class MainActivity extends ReactActivity { - - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - @Override - protected String getMainComponentName() { - return "ReactNativeDemo"; - } - - /** - * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link - * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React - * (aka React 18) with two boolean flags. - */ - @Override - protected ReactActivityDelegate createReactActivityDelegate() { - return new DefaultReactActivityDelegate( - this, - getMainComponentName(), - // If you opted-in for the New Architecture, we enable the Fabric Renderer. - DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled - // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18). - DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled - ); - } -} diff --git a/android/app/src/main/java/com/reactnativedemo/MainActivity.kt b/android/app/src/main/java/com/reactnativedemo/MainActivity.kt new file mode 100644 index 0000000..911b6dc --- /dev/null +++ b/android/app/src/main/java/com/reactnativedemo/MainActivity.kt @@ -0,0 +1,22 @@ +package com.reactnativedemo + +import com.facebook.react.ReactActivity +import com.facebook.react.ReactActivityDelegate +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled +import com.facebook.react.defaults.DefaultReactActivityDelegate + +class MainActivity : ReactActivity() { + + /** + * Returns the name of the main component registered from JavaScript. This is used to schedule + * rendering of the component. + */ + override fun getMainComponentName(): String = "ReactNativeDemo" + + /** + * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] + * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] + */ + override fun createReactActivityDelegate(): ReactActivityDelegate = + DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) +} diff --git a/android/app/src/main/java/com/reactnativedemo/MainApplication.java b/android/app/src/main/java/com/reactnativedemo/MainApplication.java deleted file mode 100644 index 21b3e39..0000000 --- a/android/app/src/main/java/com/reactnativedemo/MainApplication.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.reactnativedemo; - -import android.app.Application; -import com.facebook.react.PackageList; -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint; -import com.facebook.react.defaults.DefaultReactNativeHost; -import com.facebook.soloader.SoLoader; -import java.util.List; - -public class MainApplication extends Application implements ReactApplication { - - private final ReactNativeHost mReactNativeHost = - new DefaultReactNativeHost(this) { - @Override - public boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - @SuppressWarnings("UnnecessaryLocalVariable") - List packages = new PackageList(this).getPackages(); - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return packages; - } - - @Override - protected String getJSMainModuleName() { - return "index"; - } - - @Override - protected boolean isNewArchEnabled() { - return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED; - } - - @Override - protected Boolean isHermesEnabled() { - return BuildConfig.IS_HERMES_ENABLED; - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } - - @Override - public void onCreate() { - super.onCreate(); - SoLoader.init(this, /* native exopackage */ false); - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - DefaultNewArchitectureEntryPoint.load(); - } - ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); - } -} diff --git a/android/app/src/main/java/com/reactnativedemo/MainApplication.kt b/android/app/src/main/java/com/reactnativedemo/MainApplication.kt new file mode 100644 index 0000000..e0bfc12 --- /dev/null +++ b/android/app/src/main/java/com/reactnativedemo/MainApplication.kt @@ -0,0 +1,43 @@ +package com.reactnativedemo + +import android.app.Application +import com.facebook.react.PackageList +import com.facebook.react.ReactApplication +import com.facebook.react.ReactHost +import com.facebook.react.ReactNativeHost +import com.facebook.react.ReactPackage +import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load +import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost +import com.facebook.react.defaults.DefaultReactNativeHost +import com.facebook.soloader.SoLoader + +class MainApplication : Application(), ReactApplication { + + override val reactNativeHost: ReactNativeHost = + object : DefaultReactNativeHost(this) { + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } + + override fun getJSMainModuleName(): String = "index" + + override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG + + override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED + override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED + } + + override val reactHost: ReactHost + get() = getDefaultReactHost(applicationContext, reactNativeHost) + + override fun onCreate() { + super.onCreate() + SoLoader.init(this, false) + if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { + // If you opted-in for the New Architecture, we load the native entry point for this app. + load() + } + } +} diff --git a/android/build.gradle b/android/build.gradle index ef57b8d..ae9c0fa 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,13 +2,12 @@ buildscript { ext { - buildToolsVersion = "33.0.0" - minSdkVersion = 21 - compileSdkVersion = 33 - targetSdkVersion = 33 - - // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. - ndkVersion = "23.1.7779620" + buildToolsVersion = "34.0.0" + minSdkVersion = 23 + compileSdkVersion = 34 + targetSdkVersion = 34 + ndkVersion = "26.1.10909125" + kotlinVersion = "1.9.22" } repositories { google() @@ -16,10 +15,11 @@ buildscript { maven { url "https://developer.huawei.com/repo/" } } dependencies { - classpath("com.android.tools.build:gradle:7.3.1") + classpath("com.android.tools.build:gradle:8.4.2") classpath("com.facebook.react:react-native-gradle-plugin") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") classpath 'com.google.gms:google-services:4.3.13' - classpath 'com.huawei.agconnect:agcp:1.6.6.200' + classpath 'com.huawei.agconnect:agcp:1.9.1.302' } } @@ -31,3 +31,5 @@ allprojects { maven { url "https://developer.huawei.com/repo/" } } } + +apply plugin: "com.facebook.react.rootproject" diff --git a/android/gradle.properties b/android/gradle.properties index e4af465..08a0ce2 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -24,9 +24,6 @@ android.useAndroidX=true # Automatically convert third-party libraries to use AndroidX android.enableJetifier=true -# Version of flipper SDK to use with React Native -FLIPPER_VERSION=0.125.0 - # Use this property to specify which architecture you want to build. # You can also override it from the CLI using # ./gradlew -PreactNativeArchitectures=x86_64 @@ -38,7 +35,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # to write custom TurboModules/Fabric components OR use libraries that # are providing them. newArchEnabled=false - +NO_FLIPPER=1 # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. hermesEnabled=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 8fad3f5..2ea3535 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/settings.gradle b/android/settings.gradle index 04e660c..edd9553 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,4 @@ rootProject.name = 'ReactNativeDemo' apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' -includeBuild('../node_modules/react-native-gradle-plugin') +includeBuild('../node_modules/@react-native/gradle-plugin') diff --git a/babel.config.js b/babel.config.js index f842b77..61c1d97 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,10 @@ module.exports = { presets: ['module:metro-react-native-babel-preset'], + overrides: [{ + "plugins": [ + ["@babel/plugin-transform-private-methods", { + "loose": true + }] + ] + }] }; diff --git a/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements b/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements index 2eb7e33..4f3707d 100644 --- a/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements +++ b/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements @@ -3,6 +3,8 @@ com.apple.security.application-groups - + + group.com.useinsider.mobile-ios + diff --git a/ios/InsiderNotificationContent/NotificationViewController.m b/ios/InsiderNotificationContent/NotificationViewController.m index 73382ca..d0eae65 100644 --- a/ios/InsiderNotificationContent/NotificationViewController.m +++ b/ios/InsiderNotificationContent/NotificationViewController.m @@ -8,7 +8,7 @@ @interface NotificationViewController () com.apple.security.application-groups - + + group.com.useinsider.mobile-ios + diff --git a/ios/InsiderNotificationService/NotificationService.m b/ios/InsiderNotificationService/NotificationService.m index 74dff8d..312c455 100644 --- a/ios/InsiderNotificationService/NotificationService.m +++ b/ios/InsiderNotificationService/NotificationService.m @@ -9,7 +9,7 @@ @interface NotificationService () @end // FIXME-INSIDER: Please change with your app group. -static NSString *APP_GROUP = @"group.com.useinsider.ReactNativeDemo"; +static NSString *APP_GROUP = @"group.com.useinsider.mobile-ios"; @implementation NotificationService diff --git a/ios/Podfile b/ios/Podfile index 0e9d24f..f460650 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,23 +1,16 @@ -require_relative '../node_modules/react-native/scripts/react_native_pods' -require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' - -platform :ios, min_ios_version_supported -prepare_react_native_project! +# Resolve react_native_pods.rb with node to allow for hoisting +require Pod::Executable.execute_command('node', ['-p', + 'require.resolve( + "react-native/scripts/react_native_pods.rb", + {paths: [process.argv[1]]}, + )', __dir__]).strip use_frameworks! :linkage => :static $RNFirebaseAsStaticFramework = true -# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set. -# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded -# -# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js` -# ```js -# module.exports = { -# dependencies: { -# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}), -# ``` -flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled +platform :ios, min_ios_version_supported +prepare_react_native_project! linkage = ENV['USE_FRAMEWORKS'] if linkage != nil @@ -28,9 +21,6 @@ end target 'ReactNativeDemo' do config = use_native_modules! - # Flags change depending on the env values. - flags = get_default_flags() - use_react_native!( :path => config[:reactNativePath], # Hermes is now enabled by default. Disable by setting this flag to false. @@ -47,11 +37,10 @@ target 'ReactNativeDemo' do post_install do |installer| react_native_post_install( installer, - # Set `mac_catalyst_enabled` to `true` in order to apply patches - # necessary for Mac Catalyst builds - :mac_catalyst_enabled => false + config[:reactNativePath], + :mac_catalyst_enabled => false, + # :cache_enabled => true ) - __apply_Xcode_12_5_M1_post_install_workaround(installer) end end diff --git a/ios/ReactNativeDemo.xcodeproj/project.pbxproj b/ios/ReactNativeDemo.xcodeproj/project.pbxproj index a08eabf..bd8ebd9 100644 --- a/ios/ReactNativeDemo.xcodeproj/project.pbxproj +++ b/ios/ReactNativeDemo.xcodeproj/project.pbxproj @@ -11,11 +11,13 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 3D40D537401BD5DF06D0EEDD /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 64A4D5084B2F87C4603614C0 /* PrivacyInfo.xcprivacy */; }; 549CB9464B512E60E6B49574 /* Pods_InsiderNotificationService.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9BE9A88D89CC05E8267C44A /* Pods_InsiderNotificationService.framework */; }; 56C21BDB0C91CDB507E62A76 /* Pods_InsiderNotificationContent.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2662EA3F7CE08B39B95D593A /* Pods_InsiderNotificationContent.framework */; }; 70D1531799BB00AB46227E11 /* Pods_ReactNativeDemo_ReactNativeDemoTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE7BB2C8BD9C050762173D55 /* Pods_ReactNativeDemo_ReactNativeDemoTests.framework */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; A3994CD144350B313F5C17A3 /* Pods_ReactNativeDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20BB91F8F0D79D819C67CCA3 /* Pods_ReactNativeDemo.framework */; }; + C9EE3EC92D5E9B1400FB617B /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C9EE3EC82D5E9B1400FB617B /* GoogleService-Info.plist */; }; D46883DE29A6132F00DB84D5 /* UserNotifications.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D46883DD29A6132F00DB84D5 /* UserNotifications.framework */; }; D46883E029A6132F00DB84D5 /* UserNotificationsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D46883DF29A6132F00DB84D5 /* UserNotificationsUI.framework */; }; D46883E429A6132F00DB84D5 /* NotificationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D46883E329A6132F00DB84D5 /* NotificationViewController.m */; }; @@ -79,11 +81,13 @@ 20BB91F8F0D79D819C67CCA3 /* Pods_ReactNativeDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReactNativeDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 2662EA3F7CE08B39B95D593A /* Pods_InsiderNotificationContent.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_InsiderNotificationContent.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 6172961AB196E77E2C91BBA4 /* Pods-InsiderNotificationService.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InsiderNotificationService.release.xcconfig"; path = "Target Support Files/Pods-InsiderNotificationService/Pods-InsiderNotificationService.release.xcconfig"; sourceTree = ""; }; + 64A4D5084B2F87C4603614C0 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ReactNativeDemo/PrivacyInfo.xcprivacy; sourceTree = ""; }; 7410DDC0D8D42770603F4C4F /* Pods-ReactNativeDemo-ReactNativeDemoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeDemo-ReactNativeDemoTests.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeDemo-ReactNativeDemoTests/Pods-ReactNativeDemo-ReactNativeDemoTests.debug.xcconfig"; sourceTree = ""; }; 81938F67567C1B88B261E9D6 /* Pods-ReactNativeDemo-ReactNativeDemoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeDemo-ReactNativeDemoTests.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeDemo-ReactNativeDemoTests/Pods-ReactNativeDemo-ReactNativeDemoTests.release.xcconfig"; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ReactNativeDemo/LaunchScreen.storyboard; sourceTree = ""; }; B8B034278A5F0820D067469A /* Pods-ReactNativeDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeDemo.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeDemo/Pods-ReactNativeDemo.release.xcconfig"; sourceTree = ""; }; BE7BB2C8BD9C050762173D55 /* Pods_ReactNativeDemo_ReactNativeDemoTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReactNativeDemo_ReactNativeDemoTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C9EE3EC82D5E9B1400FB617B /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; D35ED9B55BB4A0C376EBD2A1 /* Pods-InsiderNotificationService.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InsiderNotificationService.debug.xcconfig"; path = "Target Support Files/Pods-InsiderNotificationService/Pods-InsiderNotificationService.debug.xcconfig"; sourceTree = ""; }; D46883D729A6109F00DB84D5 /* ReactNativeDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = ReactNativeDemo.entitlements; path = ReactNativeDemo/ReactNativeDemo.entitlements; sourceTree = ""; }; D46883DC29A6132F00DB84D5 /* InsiderNotificationContent.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = InsiderNotificationContent.appex; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -169,6 +173,7 @@ 13B07FB61A68108700A75B9A /* Info.plist */, 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 13B07FB71A68108700A75B9A /* main.m */, + 64A4D5084B2F87C4603614C0 /* PrivacyInfo.xcprivacy */, ); name = ReactNativeDemo; sourceTree = ""; @@ -197,6 +202,7 @@ 83CBB9F61A601CBA00E9B192 = { isa = PBXGroup; children = ( + C9EE3EC82D5E9B1400FB617B /* GoogleService-Info.plist */, 13B07FAE1A68108700A75B9A /* ReactNativeDemo */, 832341AE1AAA6A7D00B99B32 /* Libraries */, 00E356EF1AD99517003FC87E /* ReactNativeDemoTests */, @@ -297,6 +303,7 @@ D46883EF29A6132F00DB84D5 /* Embed Foundation Extensions */, 6FA98614C3F181B8A4CD70D5 /* [CP] Embed Pods Frameworks */, CE89BE1208CF8345DE3737BD /* [CP] Copy Pods Resources */, + 7986F5811E0D5DDF2601A235 /* [CP-User] [RNFB] Core Configuration */, ); buildRules = ( ); @@ -404,7 +411,9 @@ buildActionMask = 2147483647; files = ( 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, + C9EE3EC92D5E9B1400FB617B /* GoogleService-Info.plist in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 3D40D537401BD5DF06D0EEDD /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -581,6 +590,19 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-InsiderNotificationService/Pods-InsiderNotificationService-resources.sh\"\n"; showEnvVarsInLog = 0; }; + 7986F5811E0D5DDF2601A235 /* [CP-User] [RNFB] Core Configuration */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", + ); + name = "[CP-User] [RNFB] Core Configuration"; + 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\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_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"; + }; 9B2B6BA65AF63F101DDD00C3 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -724,6 +746,7 @@ baseConfigurationReference = 7410DDC0D8D42770603F4C4F /* Pods-ReactNativeDemo-ReactNativeDemoTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; + DEVELOPMENT_TEAM = 276CUFK954; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", @@ -752,6 +775,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = 276CUFK954; INFOPLIST_FILE = ReactNativeDemoTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.4; LD_RUNPATH_SEARCH_PATHS = ( @@ -778,7 +802,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ReactNativeDemo/ReactNativeDemo.entitlements; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 276CUFK954; ENABLE_BITCODE = NO; INFOPLIST_FILE = ReactNativeDemo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -791,7 +815,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = com.useinsider.ReactNativeDemo; + PRODUCT_BUNDLE_IDENTIFIER = "com.useinsider.mobile-ios"; PRODUCT_NAME = ReactNativeDemo; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -807,7 +831,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = ReactNativeDemo/ReactNativeDemo.entitlements; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 276CUFK954; INFOPLIST_FILE = ReactNativeDemo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -819,7 +843,7 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = com.useinsider.ReactNativeDemo; + PRODUCT_BUNDLE_IDENTIFIER = "com.useinsider.mobile-ios"; PRODUCT_NAME = ReactNativeDemo; SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; @@ -830,8 +854,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -857,6 +882,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CXX = ""; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; @@ -875,7 +901,20 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD = ""; + LDPLUSPLUS = ""; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", @@ -893,8 +932,10 @@ "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; + USE_HERMES = true; }; name = Debug; }; @@ -902,8 +943,9 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++17"; + CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; @@ -929,6 +971,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; + CXX = ""; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; @@ -940,7 +983,20 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios", + "${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx", + "${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers", + "${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios", + ); IPHONEOS_DEPLOYMENT_TARGET = 12.4; + LD = ""; + LDPLUSPLUS = ""; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", @@ -957,8 +1013,10 @@ "-DFOLLY_MOBILE=1", "-DFOLLY_USE_LIBCPP=1", ); + OTHER_LDFLAGS = "$(inherited) "; REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; + USE_HERMES = true; VALIDATE_PRODUCT = YES; }; name = Release; @@ -977,7 +1035,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 276CUFK954; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = InsiderNotificationContent/Info.plist; @@ -992,7 +1050,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.useinsider.ReactNativeDemo.InsiderNotificationContent; + PRODUCT_BUNDLE_IDENTIFIER = "com.useinsider.mobile-ios.InsiderNotificationContent"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -1015,7 +1073,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 276CUFK954; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = InsiderNotificationContent/Info.plist; @@ -1029,7 +1087,7 @@ ); MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.useinsider.ReactNativeDemo.InsiderNotificationContent; + PRODUCT_BUNDLE_IDENTIFIER = "com.useinsider.mobile-ios.InsiderNotificationContent"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -1051,7 +1109,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 276CUFK954; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = InsiderNotificationService/Info.plist; @@ -1066,7 +1124,7 @@ MARKETING_VERSION = 1.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.useinsider.ReactNativeDemo.InsiderNotificationService; + PRODUCT_BUNDLE_IDENTIFIER = "com.useinsider.mobile-ios.InsiderNotificationService"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; @@ -1089,7 +1147,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = 276CUFK954; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = InsiderNotificationService/Info.plist; @@ -1103,7 +1161,7 @@ ); MARKETING_VERSION = 1.0; MTL_FAST_MATH = YES; - PRODUCT_BUNDLE_IDENTIFIER = com.useinsider.ReactNativeDemo.InsiderNotificationService; + PRODUCT_BUNDLE_IDENTIFIER = "com.useinsider.mobile-ios.InsiderNotificationService"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/ios/ReactNativeDemo/AppDelegate.mm b/ios/ReactNativeDemo/AppDelegate.mm index ae05dd7..0847ace 100644 --- a/ios/ReactNativeDemo/AppDelegate.mm +++ b/ios/ReactNativeDemo/AppDelegate.mm @@ -20,6 +20,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( } - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self bundleURL]; +} + +- (NSURL *)bundleURL { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; @@ -28,15 +33,4 @@ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge #endif } -/// 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` feature is enabled. Otherwise, it returns `false`. -- (BOOL)concurrentRootEnabled -{ - return true; -} - - @end diff --git a/ios/ReactNativeDemo/Info.plist b/ios/ReactNativeDemo/Info.plist index 1f16034..690a613 100644 --- a/ios/ReactNativeDemo/Info.plist +++ b/ios/ReactNativeDemo/Info.plist @@ -39,24 +39,18 @@ NSAppTransportSecurity - NSExceptionDomains - - localhost - - NSExceptionAllowsInsecureHTTPLoads - - - + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + - NSLocationAlwaysAndWhenInUseUsageDescription - Your 'Location Always Usage Description' goes here. NSLocationWhenInUseUsageDescription UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities - armv7 + armv64 UISupportedInterfaceOrientations diff --git a/ios/ReactNativeDemo/PrivacyInfo.xcprivacy b/ios/ReactNativeDemo/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..1b46a7d --- /dev/null +++ b/ios/ReactNativeDemo/PrivacyInfo.xcprivacy @@ -0,0 +1,39 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + 1C8F.1 + CA92.1 + C56D.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + + diff --git a/ios/ReactNativeDemo/ReactNativeDemo.entitlements b/ios/ReactNativeDemo/ReactNativeDemo.entitlements index 127fede..1852573 100644 --- a/ios/ReactNativeDemo/ReactNativeDemo.entitlements +++ b/ios/ReactNativeDemo/ReactNativeDemo.entitlements @@ -5,6 +5,8 @@ aps-environment development com.apple.security.application-groups - + + group.com.useinsider.mobile-ios + diff --git a/metro.config.js b/metro.config.js index e91aba9..92db1e3 100644 --- a/metro.config.js +++ b/metro.config.js @@ -5,7 +5,15 @@ * @format */ -module.exports = { +const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); + +const defaultConfig = getDefaultConfig(__dirname); + +const { + resolver: { sourceExts, assetExts }, +} = getDefaultConfig(__dirname); + +const config = { transformer: { getTransformOptions: async () => ({ transform: { @@ -13,5 +21,12 @@ module.exports = { inlineRequires: true, }, }), + babelTransformerPath: require.resolve('react-native-svg-transformer'), + }, + resolver: { + assetExts: assetExts.filter(ext => ext !== 'svg'), + sourceExts: [...sourceExts, 'svg'], }, }; + +module.exports = mergeConfig(defaultConfig, config); \ No newline at end of file diff --git a/package.json b/package.json index a14751c..ba62174 100644 --- a/package.json +++ b/package.json @@ -10,32 +10,35 @@ "test": "jest" }, "dependencies": { - "react": "18.2.0", - "react-native": "0.71.3", - "react-native-dropdown-picker": "^5.4.4", - "react-native-insider": "^5.5.3", "@react-native-firebase/app": "^17.3.0", "@react-native-firebase/auth": "^17.3.0", - "@react-native-firebase/messaging": "^17.3.0" + "@react-native-firebase/messaging": "^17.3.0", + "react": "18.2.0", + "react-native": "0.74.5", + "react-native-dropdown-picker": "^5.4.4", + "react-native-insider": "^6.6.0-nh" }, "devDependencies": { "@babel/core": "^7.20.0", + "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", - "@react-native-community/eslint-config": "^3.2.0", - "@tsconfig/react-native": "^2.0.2", - "@types/jest": "^29.2.1", - "@types/react": "^18.0.24", + "@react-native/babel-preset": "0.74.87", + "@react-native/eslint-config": "0.74.87", + "@react-native/metro-config": "0.74.87", + "@react-native/typescript-config": "0.74.87", + "@types/react": "^18.2.6", "@types/react-test-renderer": "^18.0.0", - "babel-jest": "^29.2.1", + "babel-jest": "^29.6.3", "eslint": "^8.19.0", - "jest": "^29.2.1", - "metro-react-native-babel-preset": "0.73.7", - "prettier": "^2.4.1", + "jest": "^29.6.3", + "metro-react-native-babel-preset": "^0.77.0", + "prettier": "2.8.8", + "react-native-svg-transformer": "^1.5.0", "react-test-renderer": "18.2.0", - "typescript": "4.8.4" + "typescript": "5.0.4" }, - "jest": { - "preset": "react-native" + "engines": { + "node": ">=18" } } diff --git a/src/insider/BlockInApps.tsx b/src/insider/BlockInApps.tsx new file mode 100644 index 0000000..a093c60 --- /dev/null +++ b/src/insider/BlockInApps.tsx @@ -0,0 +1,38 @@ +import React from "react"; +import { View, StyleSheet } from "react-native"; + +import CustomButton from "../components/CustomButton"; +import RNInsider from "react-native-insider"; + +function BlockInApps(): JSX.Element { + const styles = StyleSheet.create({ + row: { + width: "100%", + flexDirection: "row", + flex: 1, + alignItems: "center", + justifyContent: "center", + }, + }); + + const disableInAppMessages = () => { + RNInsider.disableInAppMessages(); + console.log("[INSIDER][disableInAppMessages]: Method is triggered."); + }; + + const enableInAppMessages = () => { + RNInsider.enableInAppMessages(); + console.log("[INSIDER][enableInAppMessages]: Method is triggered."); + }; + + return ( + + + + + + + ); +} + +export default BlockInApps; diff --git a/src/insider/ReInitSDK.tsx b/src/insider/ReInitSDK.tsx new file mode 100644 index 0000000..3a78744 --- /dev/null +++ b/src/insider/ReInitSDK.tsx @@ -0,0 +1,25 @@ +import React from "react"; +import { View, StyleSheet } from "react-native"; +import CustomButton from "../components/CustomButton"; +import RNInsider from "react-native-insider"; + +function ReInitSDK(): JSX.Element { + const reInitSDK = () => { + console.log("[INSIDER][reInitSDK]: Button Pressed"); + + try { + RNInsider.reinitWithPartnerName("test_partner"); + console.log("[INSIDER][reInitSDK]: Reinitialized with test_partner"); + } catch (error) { + console.error("[INSIDER][reInitSDK]: Error reinitializing SDK", error); + } + }; + + return ( + + + + ); +} + +export default ReInitSDK; From 8eaf242e93136fc76fba9915cbce269757bb4fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bet=C3=BCl=20Ar=C4=B1?= Date: Mon, 17 Feb 2025 13:40:12 +0300 Subject: [PATCH 2/3] Firebase Packages | Package Update --- .../InsiderNotificationContent.entitlements | 2 +- ios/InsiderNotificationContent/NotificationViewController.m | 2 +- .../InsiderNotificationService.entitlements | 2 +- ios/InsiderNotificationService/NotificationService.m | 2 +- ios/ReactNativeDemo/ReactNativeDemo.entitlements | 2 +- package.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements b/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements index 4f3707d..fe578d3 100644 --- a/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements +++ b/ios/InsiderNotificationContent/InsiderNotificationContent.entitlements @@ -4,7 +4,7 @@ com.apple.security.application-groups - group.com.useinsider.mobile-ios + group.com.useinsider.ReactNativeDemo diff --git a/ios/InsiderNotificationContent/NotificationViewController.m b/ios/InsiderNotificationContent/NotificationViewController.m index d0eae65..73382ca 100644 --- a/ios/InsiderNotificationContent/NotificationViewController.m +++ b/ios/InsiderNotificationContent/NotificationViewController.m @@ -8,7 +8,7 @@ @interface NotificationViewController () com.apple.security.application-groups - group.com.useinsider.mobile-ios + group.com.useinsider.ReactNativeDemo diff --git a/ios/InsiderNotificationService/NotificationService.m b/ios/InsiderNotificationService/NotificationService.m index 312c455..74dff8d 100644 --- a/ios/InsiderNotificationService/NotificationService.m +++ b/ios/InsiderNotificationService/NotificationService.m @@ -9,7 +9,7 @@ @interface NotificationService () @end // FIXME-INSIDER: Please change with your app group. -static NSString *APP_GROUP = @"group.com.useinsider.mobile-ios"; +static NSString *APP_GROUP = @"group.com.useinsider.ReactNativeDemo"; @implementation NotificationService diff --git a/ios/ReactNativeDemo/ReactNativeDemo.entitlements b/ios/ReactNativeDemo/ReactNativeDemo.entitlements index 1852573..89e72d4 100644 --- a/ios/ReactNativeDemo/ReactNativeDemo.entitlements +++ b/ios/ReactNativeDemo/ReactNativeDemo.entitlements @@ -6,7 +6,7 @@ development com.apple.security.application-groups - group.com.useinsider.mobile-ios + group.com.useinsider.ReactNativeDemo diff --git a/package.json b/package.json index ba62174..65ea86e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "react": "18.2.0", "react-native": "0.74.5", "react-native-dropdown-picker": "^5.4.4", - "react-native-insider": "^6.6.0-nh" + "react-native-insider": "^6.7.0" }, "devDependencies": { "@babel/core": "^7.20.0", From e716f52a936f6104fe4599b65d125af264288aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bet=C3=BCl=20Ar=C4=B1?= Date: Mon, 17 Feb 2025 14:18:57 +0300 Subject: [PATCH 3/3] Firebase Packages | Sign Up Button Added --- src/insider/UserIdentifier.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/insider/UserIdentifier.tsx b/src/insider/UserIdentifier.tsx index c9ae50a..457f7cc 100644 --- a/src/insider/UserIdentifier.tsx +++ b/src/insider/UserIdentifier.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React from "react"; import { View } from "react-native"; import CustomButton from "../components/CustomButton"; @@ -22,12 +22,15 @@ const UserIdentifiers = () => { const logout = () => { let currentUser = RNInsider.getCurrentUser(); - currentUser.logout(); - console.log("[INSIDER][logout]: Method is triggered."); }; + const signUp = () => { + RNInsider.signUpConfirmation(); + console.log("[INSIDER][signUpConfirmation]: Method is triggered."); + }; + return ( @@ -36,6 +39,11 @@ const UserIdentifiers = () => { buttonStyle={{ backgroundColor: "#E57F74" }} onPress={logout} /> + ); };