skip to Main Content

I recently upgraded to 0.71.2 and when my app opens in the simulator, it shows the Splash screen and then fades out to a black screen.

enter image description here

I see the following in the logs in Xcode:

2023-03-05 14:26:02.425529-0700 swoop[46482:1781261] <Warning>: The value for FacebookAdvertiserIDCollectionEnabled is currently set to FALSE so you're sending app events without collecting Advertiser ID. This can affect the quality of your advertising and analytics results.
2023-03-05 14:26:02.568162-0700 swoop[46482:1781382] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2023-03-05 14:26:02.572400-0700 swoop[46482:1781382] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2023-03-05 14:26:02.583568-0700 swoop[46482:1781375] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2023-03-05 14:26:02.766479-0700 swoop[46482:1781403] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2023-03-05 14:26:02.776339-0700 swoop[46482:1781383] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2023-03-05 14:26:03.345793-0700 swoop[46482:1781386] 7.0.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your application initialization. Read more:
2023-03-05 14:26:03.400447-0700 swoop[46482:1781386] 7.0.0 - [Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you'd prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO. Follow the instructions at:
https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging
to ensure proper integration.
2023-03-05 14:26:32.653488-0700 swoop[46482:1782007] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics

Here is my AppDelegate.mm

/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#import "RNSplashScreen.h"
#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKCoreKit/FBSDKCoreKit-swift.h>
#import "RNGoogleSignin.h"
#import <GoogleMaps/GoogleMaps.h>
#import "RNNotifications.h"
#import <Firebase.h>
#import <UserNotifications/UserNotifications.h>
#import <React/RCTLinkingManager.h>
#import <CodePush/CodePush.h>

#import <React/RCTAppSetupUtils.h>



@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  
  self.moduleName = @"swoop";
  self.initialProps = @{};

  if ([FIRApp defaultApp] == nil) {
     [FIRApp configure];
   }
  
  [[FBSDKApplicationDelegate sharedInstance] application:application
                         didFinishLaunchingWithOptions:launchOptions];
  
  return YES;
}

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

  if ([RCTLinkingManager application:app openURL:url options:options]) {
    return YES;
  }

  return NO;
}


- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
#else
 return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
  [RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
  [RNNotifications didFailToRegisterForRemoteNotificationsWithError:error];
}


- (BOOL)concurrentRootEnabled
{
  return true;
}


@end

and here is my Podfile

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!

flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end

target 'swoop' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],

    :flipper_configuration => flipper_config,
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  # React Native Maps dependencies
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'

  permissions_path = '../node_modules/react-native-permissions/ios'

  pod 'react-native-fbsdk-next', :path => '../node_modules/react-native-fbsdk-next'
  pod 'react-native-maps', :path => '../node_modules/react-native-maps'
  pod 'RNReanimated', :path => '../node_modules/react-native-reanimated'
  pod 'Permission-LocationAccuracy', :path => "../node_modules/react-native-permissions/ios/LocationAccuracy"
  pod 'Permission-LocationWhenInUse', :path => "../node_modules/react-native-permissions/ios/LocationWhenInUse"
  pod 'Permission-Notifications', :path => "../node_modules/react-native-permissions/ios/Notifications"
  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
#  use_flipper!()
  
  post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = "arm64"
      end
    end
  end
end

2

Answers


  1. Have you configured your Firebase app?
    you might wanna check this https://firebase.google.com/docs/cloud-messaging/ios/client#method_swizzling_in_firebase_messaging

    Also:

    1. The warning "The value for FacebookAdvertiserIDCollectionEnabled is currently set to FALSE so you’re sending app events without collecting Advertiser ID" is not an error, but just a warning message. It suggests that you are not collecting the Advertiser ID, which can affect the quality of your advertising and analytics results.

    2. The error message "[boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics" is a potential issue with the BoringSSL library used by Firebase. This error message may indicate that there is a problem with the metrics logging function in the library.

    3. The warning message "The default Firebase app has not yet been configured. Add ‘[FIRApp configure];’ (FirebaseApp.configure() in Swift) to your application initialization" suggests that the default Firebase app in your React Native project has not been configured properly. To fix this issue, you need to add the FirebaseApp.configure() function to your app initialization code.

    4. The message "[Firebase/Messaging][I-FCM001000] FIRMessaging Remote Notifications proxy enabled, will swizzle remote notification receiver handlers. If you’d prefer to manually integrate Firebase Messaging, add "FirebaseAppDelegateProxyEnabled" to your Info.plist, and set it to NO" is a suggestion from Firebase that if you prefer to manually integrate Firebase Messaging, you should add "FirebaseAppDelegateProxyEnabled" to your Info.plist file and set it to NO.

    The error message "[boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics" is again related to the BoringSSL library, which is used by Firebase. It suggests that there may be a problem with the metrics logging function in the library.

    Login or Signup to reply.
  2. Ran into this as well. Previously in our app we were using:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
       ...
       return YES;
    }
    

    the new method is to use:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
       ...
       return [super application:application didFinishLaunchingWithOptions:launchOptions];
    }
    

    changing this solved the problem for us.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search