react-native-mixpanel icon indicating copy to clipboard operation
react-native-mixpanel copied to clipboard

Need to lock Mixpanel version in Podspec

Open wkoutre opened this issue 5 years ago • 5 comments

As of today, Mixpanel 3.4.0 is the latest version available via Cocoapods.

Running react-native link react-native-mixpanel, therefore, adds pod 'react-native-mixpanel', :path => '../node_modules/react-native-mixpanel' to the Podfile. Running pod update thereby adds...

- Mixpanel (3.4.0)
...
- react-native-mixpanel (0.0.6):
    - Mixpanel
    - React

...to the Podfile.lock.

However, there's an issue in 3.4.0 causing, upon compiling, the error: 'Mixpanel/Mixpanel-Swift.h' file not found based on the header #import "Mixpanel/Mixpanel-Swift.h" in an MP*.m file (I forget, exactly which one -- maybe MPN, but you'll run into it).

The issue is resolved by reverting to Mixpanel 3.3.9 via altering the react-native-mixpanel.podspec to be:

Pod::Spec.new do |s|
  s.name             = "react-native-mixpanel"
  s.version          = "0.0.6"
  s.summary          = "React Native wrapper for Mixpanel tracking"
  s.requires_arc = true
  s.author       = { 'Davide Scalzo' => '[email protected]' }
  s.license      = 'MIT'
  s.homepage     = 'n/a'
  s.source       = { :git => "https://github.com/davodesign84/react-native-mixpanel.git" }
  s.source_files = 'RNMixpanel/*'
  s.platform     = :ios, "7.0"
  s.dependency 'Mixpanel', '~> 3.3.9'
  s.dependency 'React'
end

wkoutre avatar Mar 15 '19 16:03 wkoutre

Yep - just experienced this after running a pod update whilst installing something unrelated.

mtford90 avatar Mar 17 '19 11:03 mtford90

Same issue. Thanks for the work around @wkoutre

rgoldiez avatar Mar 17 '19 17:03 rgoldiez

+1. Faced this issue and this was an easy fix - thanks!

In case it helps anyone, this issue manifested itself to me in as this error

"[!] Pods written in Swift can only be integrated as frameworks; add use_frameworks! to your Podfile or target to opt into using it. The Swift Pod being used is: Mixpanel"

jste7102 avatar Mar 18 '19 21:03 jste7102

Related to https://github.com/mixpanel/mixpanel-iphone/issues/830

younes200 avatar Mar 19 '19 23:03 younes200

Mixpanel 3.4.1 has released and it has no swift content any more. https://github.com/mixpanel/mixpanel-iphone/releases/tag/v3.4.1. Sorry guys for the inconvenience.

zihejia avatar Mar 21 '19 06:03 zihejia