yubo725 / flutter-osc

基于Google Flutter的开源中国客户端,支持Android和iOS。
MIT License
2.89k stars 574 forks source link

run on ios error,help me #8

Open hasonguo opened 6 years ago

hasonguo commented 6 years ago

Xcode's output: ↳ In file included from /Users/guohaisheng/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.2/ios/Classes/SharedPreferencesPlugin.m:5: /Users/guohaisheng/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.2/ios/Classes/SharedPreferencesPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found

import <Flutter/Flutter.h>

Xbigfat commented 6 years ago

it may be Cocoapods version hasn't supported. use cocoapods 1.4 version to solve this problem. @hasonguo

hasonguo commented 6 years ago

@Xbigfat Do you have implement disk cache for flutter:DiskLruCache. If you had implemented DiskLruCache . I wish you can share it.Thanks

Xbigfat commented 6 years ago

@hasonguo Sorry I don't use that...

lyxia commented 6 years ago

I have the same question, my Cocoapods version is 1.5.3,

Xbigfat commented 6 years ago

@lyxia just uninstall the current Cocoapods 1.5 and re-install the 1.4 version.here is the command

1.Uninstall the current version using this command

sudo gem uninstall cocoapods (macOS below 10.10) sudo gem uninstall -n/usr/local/bin cocoapods (macOS after 10.11)

2.Reinstall the 1.4 version

sudo gem install cocoapods -v 1.4

  1. Go to your project's path

cd [project's directory] / ios

  1. Update cocoaspod

pod update

then ,you can build again.

lyxia commented 6 years ago

https://github.com/flutter/flutter/pull/16273 resolve my problem, thanks.