segment-integrations / analytics-ios-integration-firebase

Segment's bundled integration for Firebase on iOS
MIT License
13 stars 92 forks source link

Crash when traits contain non NSString's #4

Closed smokyfire closed 7 years ago

smokyfire commented 7 years ago

https://github.com/segment-integrations/analytics-ios-integration-firebase/blob/master/Segment-Firebase/Classes/SEGFirebaseIntegration.m#L36

This line assumes that obj will be an NSString, but in reality it can be any object leading to an unrecognized selector sent to instance crash.

ladanazita commented 7 years ago

@smokyfire Thanks for opening this issue, and I apologize for the radio silence here. I'm making major improvements to this integration and will look into guarding for other value types here.

From a quick search, it does look like Firebase is expecting a String value: https://firebase.google.com/docs/reference/ios/firebaseanalytics/api/reference/Classes/FIRAnalytics#setuserpropertystringforname

I will specifically look into adding logic to coerce other value types to a String.

ladanazita commented 7 years ago

Fixed on version 2.0.0