truenary / native_mixpanel

Other
12 stars 22 forks source link

cant compile for ios #5

Closed farconada closed 5 years ago

farconada commented 5 years ago

[!] Unable to determine Swift version for the following pods:

- `Mixpanel-swift` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
- `native_mixpanel` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
sosuren commented 5 years ago

Are your using this plugin from Obj-C project? If yes, then you should definitely look this comment and its issue: https://github.com/flutter/flutter/issues/16049#issuecomment-382629492

Hope it will be helpful.

sosuren commented 5 years ago

Closing this issue because of no activity

sosuren commented 5 years ago

It seems to work with the following

  1. Bridging Header must be created.
Open the project with XCode. Then choose File -> New -> File -> Swift File.
A dialog will be displayed when creating the swift file(Since this file is deleted, any name can be used.). XCode will ask you if you wish to create Bridging Header, click yes.
  2. Make sure you have use_frameworks! in the Runner block, in ios/Podfile。
  3. Make sure you have SWIFT_VERSION specified selected in you XCode -> Build Settings
  4. Do flutter clean
  5. Go to your ios folder, delete Podfile.lock and Pods folder and then execute pod install --repo-update