Need to lock Mixpanel version in Podspec
Opened this issue · 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' => 'davidescalzo@gmail.com' }
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
Yep - just experienced this after running a pod update
whilst installing something unrelated.
+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"
Related to mixpanel/mixpanel-iphone#830
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.