davide-scalzo / react-native-mixpanel

A React Native wrapper for Mixpanel tracking
MIT License
455 stars 195 forks source link

Use of undeclared identifier 'Mixpanel' -- build errors on iOS #151

Closed SunburtReynolds closed 6 years ago

SunburtReynolds commented 6 years ago

Unfortunately, the most recent release (1.1.0) appears to be broken on iOS.

I tried to integrate the library following both the automatic and manual steps defined here. After that failed, I reintegrated React Native and all dependencies purely through CocoaPods as described here. My built fine in both cases before adding react-native-mixpanel. However, after adding your library, I received errors from Xcode. See screen shot below.

screen shot 2018-08-16 at 10 48 57 am

Here are the offending lines: https://github.com/davodesign84/react-native-mixpanel/blob/master/RNMixpanel/RNMixpanel.m#L54 https://github.com/davodesign84/react-native-mixpanel/blob/master/RNMixpanel/RNMixpanel.m#L60

While building, Xcode does not recognize mixpanel. It looks like @andrejunges authored the PR, so maybe he has a few suggestions.

Thanks for your hard work!

andrejunges commented 6 years ago

@SunburtReynolds @davodesign84 It seems this PR was merged right before mine. https://github.com/davodesign84/react-native-mixpanel/commit/23455eb5661f620d86cca7f1b27c21dcd9d94441 and it ends up removing the mixpanel instance variable, we should probably revert my commit now and release a new version to fix it.

LOC: https://github.com/davodesign84/react-native-mixpanel/commit/23455eb5661f620d86cca7f1b27c21dcd9d94441#diff-842d30de746292c571066931560168c1L31

Gadigg commented 6 years ago

@andrejunges Do you have merge permissions on this repo? There's a PR to fix this waiting to get merged...

https://github.com/davodesign84/react-native-mixpanel/pull/149

andrejunges commented 6 years ago

@Gadigg Unfortunately I don't have permissions.