Giter VIP home page Giter VIP logo

analytics-ios-integration-firebase's People

Contributors

alanjcharles avatar brennan avatar briemcnally avatar bsneed avatar cem2ran avatar f2prateek avatar fabribertani avatar fathyb avatar jeehut avatar kdhingra07 avatar krris avatar ladanazita avatar lenli avatar michaelghseg avatar niallzato avatar pierricklete avatar sorodrigo avatar wcjohnson11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

analytics-ios-integration-firebase's Issues

No shared framework scheme

Dependency "analytics-ios-integration-firebase" has no shared framework schemes for any of the platforms: iOS

Compatibility with react-native-firebase

Issue

I'm trying to integrate this library with react-native-firebase but I'm finding the problem that both libraries instantiate twice the FIRApp, I've sorted out through the compatibility issues regarding versions, but I can't do much more about this, I've to instantiate the FIRApp in my AppDelegate given that I want to do something like this in my JS code:

  componentDidMount() {
    firebase.app().onReady()
      .then(() => {
        console.log('firebase app ready')
      });
  }

I want to do this to do permissions request or check dynamic links or if the app was opened by FCM. Is there any way for me to solve this or any help by the library so FIRApp isn't instantiated twice if there's an existing FIRApp? In case I wait for the FIRApp initialisation by this library my app crashes with this error message, this is probably because the JS is loaded before the initialisation of Firebase by this library:

The [__FIRAPP_DEFAULT] firebase app has not been initialized!

Code where the application crashes

File: SEGFirebaseIntegration.m

- (id)initWithSettings:(NSDictionary *)settings
{
    if (self = [super init]) {
        self.settings = settings;
        self.firebaseClass = [FIRAnalytics class];
        NSString *deepLinkURLScheme = [self.settings objectForKey:@"deepLinkURLScheme"];
        if (deepLinkURLScheme) {
            [FIROptions defaultOptions].deepLinkURLScheme = deepLinkURLScheme;
            SEGLog(@"[FIROptions defaultOptions].deepLinkURLScheme = %@;", deepLinkURLScheme);
        }
        
        [FIRApp configure]; // Crashes here
        SEGLog(@"[FIRApp Configure]");
    }
    return self;
}

Proposal to reduce download size.

Instead of adding the whole Firebase package as dependency, can you include just the Analytics and Core frameworks as binary targets to reduce the download size?

didReceiveRegistrationToken from FIRMessaging not called

Hi guys.
In my project I'm using Segment to send events to Firebase.
And also I'm using FIRMessaging to send push notifications.
I did setup Segment successfully.
But I'm having troubles with Firebase Push notifications after I setup Segment. I'm not receiving Firebase token for Push notifications.

My code in didFinishLaunchingWithOptions:

SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"kxkGcbHhZhq8LONtfD5ZBYeGMQL1siYB"];
[configuration use: [SEGFirebaseIntegrationFactory instance]];
[configuration use: [SEGGoogleAnalyticsIntegrationFactory instance]];
configuration.recordScreenViews = YES;
[SEGAnalytics setupWithConfiguration:configuration];

[FIRMessaging messaging].delegate = self;

The last line expect token to be received

- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
}

But it's not called.

If to remove Segment configuration, then it works as expected.
Can you help me with that ?
Thanks.

Support for Firebase 7.7.0

Is there any possibility that you deploy one version specific for Firebase 7.7.0?

The issue is that the last deploy for firebase libraries on flutter without Null Safety and Flutter 2 is 7.7.0 and so I would need to upgrade my flutter project versions but still if I do it I will not be able to work with this since firebase flutter libs updated to #76.

What do you advise me to do?

Firebase screen events called from a secondary Thread

I'm getting these warnings on the console:

2020-08-18 16:11:36.964061-0400 Chopra[1371:174800] 6.30.0 - [Firebase/Analytics][I-ACS025025] setScreenName:screenClass: must be called from the main thread to ensure that events are associated with the intended screen.

I debugged it and it's definitely been called by a secondary thread inside Segment's library, is there anything we can do about this?

Header imports in 2.7.7 not compiling

Hello Segment Firebase team,

Our project is implementing this integration along with the AppsFlyer segment integration. When using version 2.7.3, our project compiles and sends event as expected (looks like it's using the @import in the ), however this week it looks like the version resolved to version 2.7.7 and it has been erroring out on the updated header import.

Are there any updated requirements or set up our team has to perform?

compile

Use of undeclared identifier 'config'

Where exactly I'm supposed to write this line?

[config use:[SEGFirebaseIntegrationFactory instance]];

The documentation is unclear in this part, I'm a React Native engineer not very experienced in xcode.
I have <Segment-Firebase/SEGFirebaseIntegrationFactory.h> imported in AppDelegate.m and I wrote that line in the same file after doing pod install, but I get this error:

Use of undeclared identifier 'config'

Is there a file or function example where to put that line? Or I'm missing a simple import?

Compilation failure

Hi,

I'm unable to link Firebase Segment pod to my project. Whereas the official pod from Firebase is working like a charm.
I'm getting the error below :

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
  "_OBJC_CLASS_$_FIRAnalytics", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)```

Cannot provide custom settings

I am attempting to use a separate Firebase configuration file for different build environments (development and production).

Based on the Firebase Documentation I would pass setting to the configuration. I have this working outside of using the SEGFirebaseIntegrationFactory, but was hoping to integrate with Segment.

There does not appear to be a way to change the setting in the Segment dashboard or using SEGFirebaseIntegrationFactory. After taking a look at SEGIntegrationsManager, I would love to be able to locally pass options into the factory.

Is it possible to read a different GoogleService-Info.plist file

I'm not good with Objective-C, but is there a way I can pass a reference to a different plist file, the purpose of this is to support different environments, it looks like this code always goes for the default GoogleService-Info.plist file.

NSString *plistFile = [[NSBundle mainBundle] pathForResource:@"GoogleService-QA-Info" ofType:@"plist"];
  NSDictionary *firebaseConf = [NSDictionary dictionaryWithContentsOfFile:plistFile];
  
  SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"SEGMENT_API_KEY"];
  configuration.trackApplicationLifecycleEvents = YES;          // Enable this to record certain application events automatically!
  configuration.recordScreenViews = YES;                        // Enable this to record screen views automatically!
  configuration.flushAt = 1;                                    // Flush events to Segment every 1 event
  [configuration use:[SEGFirebaseIntegrationFactory instance]]; // Use Firebase
  [SEGAnalytics setupWithConfiguration:configuration];
  [SEGAnalytics debug:YES];

Any ideas are welcome

UI API called on a background thread: -[UIApplication delegate]

In my Firebase project, I enable the Firebase/Messaging feature.

When the SEGIntegrationsManager tries to create the Firebase integration after fetching the settings (in a background thread), the updateIntegrationsWithSettings will use the same background thread to create each integration in the factories list.

Hence theSEGFirebaseIntegration initWithSettings method is called from the background thread, which the [FIRApp configure] will try to access the shared UIApplication's delegate, causing the Xcode 10 complains the error:

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication delegate]
PID: 18686, TID: 5429842, Thread name: (none), Queue name: io.segment.analytics, QoS: 0
Backtrace:
4  MyApp                              0x00000001045f35bc -[FIRMessagingRemoteNotificationsProxy swizzleMethodsIfPossible] + 172
5   MyApp                              0x00000001045f3144 +[FIRMessagingRemoteNotificationsProxy swizzleMethods] + 108
6   MyApp                              0x00000001045cbdf0 -[FIRMessaging configureMessaging:] + 272
7   MyApp                              0x00000001045cbca4 +[FIRMessaging configureWithApp:] + 268
8   MyApp                              0x000000010459f37c +[FIRApp sendNotificationsToSDKs:] + 800
9   MyApp                              0x000000010459d554 +[FIRApp configureWithName:options:] + 1464
10  MyApp                              0x000000010459cf7c +[FIRApp configureWithOptions:] + 192
11  MyApp                              0x000000010459ce7c +[FIRApp configure] + 712
12  MyApp                              0x0000000104c107f8 -[SEGFirebaseIntegration initWithSettings:] + 528
13  MyApp                              0x0000000104c122fc -[SEGFirebaseIntegrationFactory createWithSettings:forAnalytics:] + 140
14  Analytics                           0x00000001063de7b4 __57-[SEGIntegrationsManager updateIntegrationsWithSettings:]_block_invoke + 584
15  Analytics                           0x00000001063d527c __seg_dispatch_specific_block_invoke + 80
16  Analytics                           0x00000001063d5190 seg_dispatch_specific + 256
17  Analytics                           0x00000001063d5420 seg_dispatch_specific_sync + 116
18  Analytics                           0x00000001063de524 -[SEGIntegrationsManager updateIntegrationsWithSettings:] + 208
19  Analytics                           0x00000001063de418 -[SEGIntegrationsManager setCachedSettings:] + 380
20  Analytics                           0x00000001063def90 __41-[SEGIntegrationsManager refreshSettings]_block_invoke_3 + 140
21  Analytics                           0x00000001063d527c __seg_dispatch_specific_block_invoke + 80
22  libdispatch.dylib                   0x0000000107e4ec28 _dispatch_call_block_and_release + 32
23  libdispatch.dylib                   0x0000000107e501c0 _dispatch_client_callout + 20
24  libdispatch.dylib                   0x0000000107e582f4 _dispatch_lane_serial_drain + 708
25  libdispatch.dylib                   0x0000000107e58ff8 _dispatch_lane_invoke + 420
26  libdispatch.dylib                   0x0000000107e62bfc _dispatch_workloop_worker_thread + 1168
27  libsystem_pthread.dylib             0x000000022f064b20 _pthread_wqthread + 316
28  libsystem_pthread.dylib             0x000000022f06add4 start_wqthread + 4

I would avoid this error by modifying the SEGFirebaseIntegrationFactory's createWithSettings method like this:


- (id<SEGIntegration>)createWithSettings:(NSDictionary *)settings forAnalytics:(SEGAnalytics *)analytics
{
  __block SEGFirebaseIntegration* integration;
  dispatch_sync(dispatch_get_main_queue(), ^{
    integration = [[SEGFirebaseIntegration alloc] initWithSettings:settings];
  });
  return integration;
}

What else I can do to prevent this error without modifying this lib's source?

Crash on FIRApp configure

App crashes on this line when you try to configure it the second time.

SEGFirebaseIntegration.m - Line 21

Throws:

Fatal Exception: com.firebase.core
Default app has already been configured.
+[FIRApp configureDefaultAppWithOptions:sendingNotifications:]

Enable installation via Carthage

We are using carthage for our stack (we are paying users of segment) and we are wondering what is the ETA for having installation available via Carthage

Integrating amplitude to segment without using cocoapod

Following the indication on this thread
segment-integrations/analytics-ios-integration-amplitude#46 (comment)

I integrated the files from Segment-Firebase project directly to my project and installed Firebase pod. It compiles well but if I try to integrate it using

let integration = SEGFirebaseIntegrationFactory.instance()
let configuration = SEGAnalyticsConfiguration(writeKey: self.segmentKey)
configuration.trackApplicationLifecycleEvents = true
configuration.use(integration)

as the documentation suggests but the result is in the attached image.
Any ideas?
Thanks in advance

screen shot 2017-10-25 at 6 43 55 pm

Increase version firebase core to 10.12.0 or higher

I am trying to use flutter 3.10.0, and firebase_core ^2.15.0. but Cocoapds could not find compatible versions.

`Analyzing dependencies
firebase_analytics: Using Firebase SDK version '10.12.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '10.12.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.12.0' defined in 'firebase_core'
Warning: firebase_app_id_file.json file does not exist. This may cause issues in upload-symbols. If this error is unexpected, try running flutterfire configure again.
firebase_crashlytics: Using Firebase SDK version '10.12.0' defined in 'firebase_core'
firebase_dynamic_links: Using Firebase SDK version '10.12.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '10.12.0' defined in 'firebase_core'
firebase_performance: Using Firebase SDK version '10.12.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Core":
In Podfile:
Segment-Firebase (= 2.7.13) was resolved to 2.7.13, which depends on
Firebase/Core (~> 10.6.0)

firebase_analytics (from `.symlinks/plugins/firebase_analytics/ios`) was resolved to 10.4.4, which depends on
  Firebase/Analytics (= 10.12.0) was resolved to 10.12.0, which depends on
    Firebase/Core (= 10.12.0)

`

so could you increase version firebase core to 10.12.0 or higher

Add support for Carthage

Now that Firebase supports an experimental version of Carthage, is it possible to have this integration support Carthage as well?

We're a Segment customer with a large iOS app that has a modern architecture. We use Carthage instead of CocoaPods, we're 100% Swift, and our large codebase is modularized into dynamic frameworks. The part of our app that deals with analytics is in one of these frameworks. Because of this, we have no obvious way to integrate Segment Firebase into our build.

Approaches we've considered:

  1. Changing our package manager to Cocoapods instead of Carthage. Unfortunately this would be a monumental task and is out of scope given the level of effort.
  2. Adding Cocoapods on top of Carthage. This is not possible because this library is needed inside our framework and Cocoapods does not support framework targets.
  3. Integrating Firebase via Carthage and then dropping the source for this library in our framework. This is also not possible because bridging headers are not supported in framework targets.

At the moment it appears our only (potentially) viable approach is integrate Firebase into our project using Carthage, and then to manually port this library to Swift to avoid the need for a bridging header.

Debugin integratiuon

Hello !

My integration with Segment -> Firebase is not working ( I saw the events on Segment but nothing on Firebase console) and I did not get error.

I am using:
cocopods with

  pod 'Analytics', '~> 4.1'
  pod 'Segment-Firebase', '2.7.12'

code with Swift :

 let configuration = AnalyticsConfiguration(writeKey: "MyKEY")
    configuration.trackApplicationLifecycleEvents = true 
    configuration.flushAt = 1
    configuration.recordScreenViews = true 
    configuration.use(SEGFirebaseIntegrationFactory.instance())
    Analytics.setup(with: configuration)
    Analytics.debug(true)

And al also added the GoogleService-Info.plist file and on Segment I had enable the firebase destination

Questions please:
Is there a way that can I check/debug if my configuration for firebase is ok?
In the debug information the integrations json is empty , is this expected ?
Could you provide me and example of use SEGAnalyticsIntegrationDidStart ? this example https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/ios-faqs/#how-do-i-know-when-a-destination-is-initialized does not compile in my side .

Thanks in advance

SEGFirebaseIntegration does not set Crashlytics UserId

The current implementation is:
Analytics.setUserID("SomeUserId")

However for Crashlytics to correctly associate crashes with a firebase user you also need to call:
Crashlytics.crashlytics().setUserID("SomeUserId")

You can repro this by:

  1. Calling .identify(userID, traits: ["email": email])
  2. Triggering a crash
  3. Checking the Data tab on Crashlytics for the crash event and noting a lack of User.Id

If you set the Crashlytics User Id correctly you'll see the user section shown here (for Android)
Screenshot 2022-10-05 at 10 33 25

File not found!

Hi,

I've been trying to integrate Firebase through Segment using the iOS SDK: Segment-Firebase.

After installing the pod Segment-Firebase and trying to compile the project I get the following error:

FirebaseAnalytics/FIrebaseAnalytics.h file not found

It looks like the error has been generated at SEGFirebaseIntegration.m. I am also not able to import import Segment_Firebase to my classes.

Note: The project has been developed in swift.

Best,

Bruno Agatte

Compatibility with Firebase Core 7.1.0

Last SegmentFirebase version available on Cocoapods supports only Firebase 6 (https://cocoapods.org/pods/Segment-Firebase). Is there any plan to support the last version which is the 7.1.0 ? https://firebase.google.com/support/release-notes/ios.

My app relies on Invertase 10.1 which supports this last version (https://github.com/invertase/react-native-firebase). And I'd want to use the Segment Firebase integration (https://github.com/segmentio/analytics-react-native).

For now I get this message with the current version :

 [!] CocoaPods could not find compatible versions for pod "Analytics":
  In Podfile:
    RNAnalytics (from `../node_modules/@segment/analytics-react-native`) was resolved to 1.3.2, which depends on
      Analytics (~> 4.1)

    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Analytics

    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Segment-Firebase was resolved to 2.4.1, which depends on
        Analytics (~> 3.2)

CocoaPods could not find compatible versions for pod "FirebaseInstallations":
  In Podfile:
    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Segment-Firebase was resolved to 2.7.0, which depends on
        FirebaseAnalytics (~> 6.1) was resolved to 6.4.1, which depends on
          FirebaseInstallations (~> 1.1)

    RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`) was resolved to 10.1.0, which depends on
      Firebase/Crashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
        FirebaseCrashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
          FirebaseInstallations (~> 7.0)

CocoaPods could not find compatible versions for pod "nanopb":
  In Podfile:
    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Segment-Firebase was resolved to 2.7.0, which depends on
        FirebaseAnalytics (~> 6.1) was resolved to 6.1.2, which depends on
          nanopb (~> 0.3)

    RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`) was resolved to 10.1.0, which depends on
      Firebase/Crashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
        FirebaseCrashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
          nanopb (~> 2.30906.0)

Any clue ?

Crash when identifying user

We are unable to run the firebase integration with a custom configuration, by creating our own integration factory that initialises SEGFirebaseIntegration by passing an instance of the firebase analytics class (Analytics.self())

When trying to identify an user, we get the following ObjectiveC error:

2017-11-18 10:55:35.739179+0000 iOS-Client[65916:23393924] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FIRAnalytics setUserID:]: unrecognized selector sent to instance 0x60c0000123c0'

Upgrade dependency to allow latest Firebase/Core

Hi,

I have the Segment Firebase integration and it is blocking my upgrade to the latest Firebase Core. As per pod dependencies I can see:

- Segment-Firebase (2.4.0):
  - Analytics (~> 3.2)
  - Firebase/Core (~> 5.0)
  - Segment-Firebase/Core (= 2.4.0)

It is forcing 5.x.x version of Firebase Core. I need the latest Firebase due to a critical bug fix relating to push notifications. Firebase is now on 6.0.3 at time of writing.

The only solution for me now is to remove the Segment Firebase integration so I can update to the latest Firebase, please update the integration.

Incompatible with Firebase Crashlytics

I'm trying to implement the Firebase/Crashlytics CocoaPod due to the sunsetting of Fabric Crashlytics and the fact that the old Fabric SDK will stop reporting crashes to Firebase on November 15th, 2020.

Like many others (#45, #29) I am having problems with the fact that Segment-Firebase requires a version of Firebase/CoreOnly that is more than a year old. In this instance I cannot just use an older version of the Pod I need,Firebase/Crashlytics, because it did not exist in August 2019 and requires a newer version of Firebase/CoreOnly.

Are there plans to update to a recent version of the Firebase SDK soon?

CocoaPods could not find compatible versions for pod "Analytics"

Hello,

After updating my react-native-firebase packages to the latest version to fix a crash on iOS 14.2 detected by the Apple review team, it seems like I now have a conflict in dependencies.

Running pod install leads to a conflict and I've tried cleaning up node_modules, Podfile.lock and the Pods directory as well as every other solution I found on previous issues that were similar without success.

Any ideas how to override the Analytics and nanopb versions in the Analytics pods and its dependencies to reflect newer versions?

[!] CocoaPods could not find compatible versions for pod "Analytics":
  In snapshot (Podfile.lock):
    Analytics (= 4.1.2, ~> 4.1)

  In Podfile:
    RNAnalytics (from `../node_modules/@segment/analytics-react-native`) was resolved to 1.3.2, which depends on
      Analytics (~> 4.1)

    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Analytics

    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Segment-Firebase was resolved to 2.4.1, which depends on
        Analytics (~> 3.2)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `Analytics` inside your development pod `RNAnalyticsIntegration-Firebase`.
   You should run `pod update Analytics` to apply changes you've made.
CocoaPods could not find compatible versions for pod "nanopb":
  In snapshot (Podfile.lock):
    nanopb (= 2.30906.0, ~> 2.30906.0)

  In Podfile:
    RNAnalyticsIntegration-Firebase (from `../node_modules/@segment/analytics-react-native-firebase`) was resolved to 1.3.2, which depends on
      Segment-Firebase was resolved to 2.7.0, which depends on
        FirebaseAnalytics (~> 6.1) was resolved to 6.1.2, which depends on
          nanopb (~> 0.3)

    RNFBCrashlytics (from `../node_modules/@react-native-firebase/crashlytics`) was resolved to 10.1.0, which depends on
      Firebase/Crashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
        FirebaseCrashlytics (~> 7.1.0) was resolved to 7.1.0, which depends on
          nanopb (~> 2.30906.0)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `nanopb` inside your development pod `RNAnalyticsIntegration-Firebase`.
   You should run `pod update nanopb` to apply changes you've made.

package.json

 21         "@react-native-firebase/app": "^10.1.0",                                                                                                           
 22         "@react-native-firebase/auth": "^10.1.0",                                                                                                          
 23         "@react-native-firebase/crashlytics": "^10.1.0",                                                                                                   
 24         "@react-native-firebase/dynamic-links": "^10.1.0",                                                                                                 
 25         "@react-native-firebase/in-app-messaging": "^10.1.0",                                                                                              
 26         "@react-native-firebase/messaging": "^10.1.0",                                                                                                     
 27         "@react-native-firebase/remote-config": "^10.1.0",                                                                                                 
 31         "@segment/analytics-react-native": "^1.3.2",                                                                                                       
 32         "@segment/analytics-react-native-firebase": "^1.3.2",

Podfile

  1 platform :ios, '11.0'                                                                                                                                      
  2 require_relative '../node_modules/react-native/scripts/react_native_pods'                                                                                  
  3 require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'                                                                 
  4                                                                                                                                                            
  5 target 'app' do                                                                                                                                            
  6     config = use_native_modules!                                                                                                                           
  7     use_react_native!(:path => config["reactNativePath"])                                                                                                  
  8                                                                                                                                                            
  9     pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"                                                                     
 10     pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"                                                           
 11     pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"                                                                       
 12     pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"                                                                      
 13                                                                                                                                                            
 14     pod 'Intercom'                                                                                                                                         
 15     pod 'GoogleSignIn'                                                                                                                                     
 16     pod 'Stripe', '~> 19.0.1'                                                                                                                                                                                                                                                                 
 25                                                                                                                                                            
 26     target 'appTests' do                                                                                                                                   
 27         inherit! :search_paths                                                                                                                             
 28     end                                                                                                                                                    
 29                                                                                                                                                            
 30     # Enables Flipper.                                                                                                                                     
 31     #                                                                                                                                                      
 32     # Note that if you have use_frameworks! enabled, Flipper will not work and                                                                             
 33     # you should disable these next few lines.                                                                                                             
 34     use_flipper!                                                                                                                                           
 35     post_install do |installer|                                                                                                                            
 36         flipper_post_install(installer)                                                                                                                    
 37     end                                                                                                                                                    
 38                                                                                                                                                                                                                                                                                                               
 39 end 

Crash on [FIRApp configure] while using firebase config with custom name.

Analytics (3.6.10)
Segment-Firebase (2.4.0)

In my project, I'm using a firebase configuration file with a custom name.

FirebaseApp.configure(options: FirebaseOptions(contentsOfFile: Bundle.main.path(forResource: GOOGLE_SERVICE_FILE, ofType: "plist")!)!)

It seems to cause a FIRApp crash because there's no GoogleService-Info.plist in the project.

let configuration: SEGAnalyticsConfiguration = SEGAnalyticsConfiguration(writeKey: self.writeKey)
configuration.use(SEGFirebaseIntegrationFactory())

*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure]; (FirebaseApp.configure() in Swift) could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'

Truncate values

This integration doesn't seem to truncate values to the maximum lengths laid forward by the firebase documentation, thus resulting in errors being reported by Firebase. Would truncating be the expected/desired behavior?

-[FBLPromise HTTPBody]: unrecognized selector sent to instance

Hello,

We've added Segment-Firebase to our Podfile recently. Since then we're experiencing crashes, like this one:

2022-02-23 17:14:15.653277+0100 MyApp [66578:1007593] -[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x600001ec5c20
2022-02-23 17:14:15.654383+0100 MyApp [66578:1007593] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBLPromise HTTPBody]: unrecognized selector sent to instance 0x600001ec5c20'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff20421af6 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007fff20177e78 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff204306f7 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
    3   CoreFoundation                      0x00007fff20426036 ___forwarding___ + 1489
    4   CoreFoundation                      0x00007fff20428068 _CF_forwarding_prep_0 + 120
    5   GoogleDataTransport                 0x00000001124f1928 -[GDTCCTUploadOperation updateNextUploadTimeWithResponse:forTarget:] + 88
    6   GoogleDataTransport                 0x00000001124f0b89 __64-[GDTCCTUploadOperation sendURLRequestWithBatch:target:storage:]_block_invoke + 105
    7   FBLPromises                         0x00000001123a641e __56-[FBLPromise chainOnQueue:chainedFulfill:chainedReject:]_block_invoke.67 + 94
    8   FBLPromises                         0x00000001123a58cd __44-[FBLPromise observeOnQueue:fulfill:reject:]_block_invoke_2 + 109
    9   libdispatch.dylib                   0x000000011528c7ec _dispatch_call_block_and_release + 12
    10  libdispatch.dylib                   0x000000011528d9c8 _dispatch_client_callout + 8
    11  libdispatch.dylib                   0x0000000115294440 _dispatch_lane_serial_drain + 1222
    12  libdispatch.dylib                   0x0000000115294f67 _dispatch_lane_invoke + 439
    13  libdispatch.dylib                   0x00000001152a0de2 _dispatch_workloop_worker_thread + 882
    14  libsystem_pthread.dylib             0x00007fff6116845d _pthread_wqthread + 314
    15  libsystem_pthread.dylib             0x00007fff6116742f start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Interestingly I also noticed these warnings popping up:

objc[66578]: Class GDTCCTCompressionHelper is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e030) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e2b0). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCCTUploadOperation is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e0a8) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e2d8). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCCTUploader is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e058) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e328). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORClock is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e0f8) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e378). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORDirectorySizeTracker is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e148) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e3c8). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCOREndpoints is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e1c0) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/ QA.app/MyApp (0x11002e440). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCOREvent is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e1e8) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e468). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORFlatFileStorage is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e238) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e4b8). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORLifecycle is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e288) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e508). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORApplication is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e2d8) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e558). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORReachability is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e328) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e5a8). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORRegistrar is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e378) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e5f8). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORStorageEventSelector is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e3c8) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e648). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORTransformer is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e418) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e698). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORTransport is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e468) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e6e8). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORUploadBatch is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e4b8) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e738). One of the two will be used. Which one is undefined.
objc[66578]: Class GDTCORUploadCoordinator is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport (0x11251e508) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e788). One of the two will be used. Which one is undefined.
objc[66578]: Class GULHeartbeatDateStorage is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities (0x112577a70) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e7d8). One of the two will be used. Which one is undefined.
objc[66578]: Class GULHeartbeatDateStorageUserDefaults is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities (0x112577ac0) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e828). One of the two will be used. Which one is undefined.
objc[66578]: Class GULSecureCoding is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities (0x112577e08) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e8a0). One of the two will be used. Which one is undefined.
objc[66578]: Class GULKeychainStorage is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities (0x112577b10) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e8c8). One of the two will be used. Which one is undefined.
objc[66578]: Class GULKeychainUtils is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities (0x112577b88) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e940). One of the two will be used. Which one is undefined.
objc[66578]: Class GULURLSessionDataResponse is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities (0x112577e80) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e968). One of the two will be used. Which one is undefined.
objc[66578]: Class GULAppEnvironmentUtil is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities (0x112577a20) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002e9b8). One of the two will be used. Which one is undefined.
objc[66578]: Class FBLPromise is implemented in both /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/Frameworks/FBLPromises.framework/FBLPromises (0x1123ba880) and /Users/jvesza/Library/Developer/CoreSimulator/Devices/60054541-5ADD-43C6-BE9C-5107B3439E5E/data/Containers/Bundle/Application/EAAAFE22-0AA4-40BC-9F38-9ECE3929CE9C/MyApp.app/MyApp (0x11002ea08). One of the two will be used. Which one is undefined.

So my theory is that somehow the Firebase library is duplicated. I am using a number of analytics pods, including multiple Segment dependencies:

def analytics
    pod 'Analytics', '4.1.2'
    pod 'Segment-Adjust'
    pod 'Segment-Firebase'
    pod 'Appboy-iOS-SDK/InAppMessage'
    pod 'Segment-Appboy/Core'
    pod 'Apptimize'
end

I think I followed the installation steps correctly. I just

  • added the pod
  • set up the Firebase integration in code
// ...
let config = AnalyticsConfiguration(writeKey: segmentId)

// ...

// Connect Segment to Firebase
config.use(SEGFirebaseIntegrationFactory.instance())

// ...

So I'm not sure what I could do to fix this, I would appreciate any input, Thanks in advance!

Segment-Firebase is not sending events to the firebase console

I'm using the latest Segment-Firebase library to send events to the firebase console along with the segment library Segment-GoogleAnalytics. The events are being sent successfully by using the Segment-GoogleAnalytics library but I'm getting the following error while sending the same events to the firebase console with the same parameters.

Error

[Firebase/Analytics][I-ACS035001] Cannot create Value type with unsupported value. The Value has to be NSNumber, NSString or NSArray (if supported). Value: {
2020-10-16 11:20:12.539924+0500 edX[71657:5054469] 6.21.0 - [Firebase/Analytics][I-ACS016000] Event parameter value must be of type NSString, NSNumber or NSArray. Type: __NSDictionaryM

Parameters

{
  context =   {
    "app_name" = "app.name";
  };
  data =   {
    context =     {
      "app_name" = "app.name";
    };
  };
  "device_orientation" = portrait;
  "item_category" = screen;
  "item_name" = "event.name";
  label = "A Event";
  "user_id" = 12345678;
}

Can you please let me know why the same parameters are not working for the firebase console and how I can fix it?

Increase version firebase core to 10.0.0 or higher

Firebase has released a new major version of its Core package 10. Users of this pod cannot upgrade their version of firebase core until this has been supported by this analytics-firebase integration

Architecture x86_64 issue with SEGFirebaseIntegration

I'm using CocoaPods v1.5.3. I'm trying to integrate the Segment Firebase integration and I get the following error:

image

I've followed the directions in the documentation and nothing seems out of the ordinary. I'm using !use_frameworks so there's no need for a bridging header (I'm directly importing Segment-Firebase)

PODS:

  • segment-appsflyer-ios
  • Segment-Firebase
  • Crashlytics (3.12.0):
  • Fabric (1.9.0)
  • Firebase/Core (5.16.0):
    • Firebase/CoreOnly
    • FirebaseAnalytics (= 5.5.0)
  • Firebase/CoreOnly (5.16.0):
    • FirebaseCore (= 5.2.0)
  • FirebaseAnalytics (5.5.0):
    • FirebaseCore (~> 5.2)
    • FirebaseInstanceID (~> 3.4)
    • GoogleAppMeasurement (= 5.5.0)
    • GoogleUtilities/AppDelegateSwizzler (~> 5.2)
    • GoogleUtilities/MethodSwizzler (~> 5.2)
    • GoogleUtilities/Network (~> 5.2)
    • "GoogleUtilities/NSData+zlib (~> 5.2)"
  • FirebaseCore (5.2.0):
    • GoogleUtilities/Logger (~> 5.2)
  • FirebaseInstanceID (3.4.0):
    • FirebaseCore (~> 5.2)
    • GoogleUtilities/Environment (~> 5.3)
    • GoogleUtilities/UserDefaults (~> 5.3)
  • Google-Mobile-Ads-SDK (7.27.0)
  • GoogleAppMeasurement (5.5.0):
    • GoogleUtilities/AppDelegateSwizzler (~> 5.2)
    • GoogleUtilities/MethodSwizzler (~> 5.2)
    • GoogleUtilities/Network (~> 5.2)
    • "GoogleUtilities/NSData+zlib (~> 5.2)"
    • nanopb (~> 0.3)
  • GoogleUtilities/AppDelegateSwizzler (5.3.7):
    • GoogleUtilities/Environment
    • GoogleUtilities/Logger
    • GoogleUtilities/Network
  • GoogleUtilities/Environment (5.3.7)
  • GoogleUtilities/Logger (5.3.7):
    • GoogleUtilities/Environment
  • GoogleUtilities/MethodSwizzler (5.3.7):
    • GoogleUtilities/Logger
  • GoogleUtilities/Network (5.3.7):
    • GoogleUtilities/Logger
    • "GoogleUtilities/NSData+zlib"
    • GoogleUtilities/Reachability
  • "GoogleUtilities/NSData+zlib (5.3.7)"
  • GoogleUtilities/Reachability (5.3.7):
    • GoogleUtilities/Logger
  • GoogleUtilities/UserDefaults (5.3.7):
    • GoogleUtilities/Logger
  • Segment-Firebase (2.4.0):
    • Analytics (~> 3.2)
    • Firebase/Core (~> 5.0)
    • Segment-Firebase/Core (= 2.4.0)
  • Segment-Firebase/Core (2.4.0):
    • Analytics (~> 3.2)
    • Firebase/Core (~> 5.0)

Crash when using Firebase DynamicLink

I have an issue with using Firebase DynamicLink, Segment_Firebase doesn't ensure that Firebase is configured on main thread, which DynamicLink requires, so the app crashes instead.

it throws FIRDLJavaScriptExecutor must be used in main thread error

I managed to fix it by wrapping configuring of the firebase in dispatch block that would execute it on main thread in the initWithSettings method.

dispatch_async(dispatch_get_main_queue(), ^(void){
    [FIRApp configure];
    SEGLog(@"[FIRApp Configure]");
});

though I'm not sure if it is correct solution, I'm not an objc guy.

Segement-Firebase fails to compile

The import of 'FirebaseAnalytics/FirebaseAnalytics.h' fails in file included from ../Pods/Segment-Firebase/Segment-Firebase/Classes/SEGFirebaseIntegration.m:3: with 'FirebaseAnalytics/FirebaseAnalytics.h' file not found ". Xcode 9.3 and Swift 4.1

Dash symbol is not mapped in segment integration

From Segment documentation

Firebase has strict requirements for User Property names; they must:

Begin with a letter (not a number or symbol, including an underscore)
Contain only alphanumeric characters and underscores
Be no longer than 40 characters
User Property values must be fewer than 100 characters.

The issue is we are not mapping the dash symbol to something else. This prevent Firebase to log any element with a dash symbol in it.

Support for Firebase 8.8.0

This SDK has not been updated in five months at the time of writing. Many versions of Firebase has been released in the meantime. Any plans to keep this SDK up to date?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.