-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当和flutter_inappbrowser 一起用的时候,报错 #10
Comments
flutter_inappbrowser 的 ios 配置 可以去https://github.com/pichillilorenzo/flutter_inappbrowser 查看 IMPORTANT Note for iOS, 我就是跟着这个配置的。 |
我也是这个问题。。。。。咋解决的老铁 |
这个库确实是目前最好用的额 不能抛弃啊 |
@lijy91 能修复下不 |
@niugengyun @LZQL 还在调查,暂时未找到解决方法 |
The Solution: react-native-maps/react-native-maps#1923 (comment)
|
from: facebook/flipper#254
# Uncomment this line to define a global platform for your project
+platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
+ use_frameworks!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
+ # If you use `use_frameworks!` in your Podfile,
+ # uncomment the below $static_framework array and also
+ # the pre_install section. This will cause Flipper and
+ # it's dependencies to be static and all other pods to
+ # be dynamic.
+ $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
+ 'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
+ 'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
+ 'CocoaLibEvent', 'openssl-ios-bitcode', 'boost-for-react-native']
+
+ pre_install do |installer|
+ Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
+ installer.pod_targets.each do |pod|
+ if $static_framework.include?(pod.name)
+ pod.instance_variable_set(:@host_requires_frameworks, false)
+ puts pod
+ end
+ end
+ end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
+ config.build_settings['SWIFT_VERSION'] = '4.0'
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
See example: https://github.com/blankapp/flutter_flipperkit_examples/tree/master/flutter_inappbrowser_example |
牛逼 真的详细,用心了 |
谢谢 测试过了 没问题了 |
@LZQL @niugengyun 后续如果有 cocoapods 1.7.x 的解决方案我会更新到这里,你们有其他问题可以加我微信或者加进入 https://t.me/flipper4flutter 进行讨论 |
我加你微信 我微信昵称debug |
Is there a workaround for this?
|
@howardwkim Please upgrade |
I was using:
Should I specify Here's s snippet from my
On another note, some of the pods installed with Thanks! |
|
I incorrectly assumed that setting to I followed these instructions from to get it working for CocoaPods 1.7.5. I included the following within the target 'Runner' do
...
$static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
'CocoaLibEvent', 'OpenSSL-Static', 'boost-for-react-native']
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if $static_framework.include?(pod.name)
def pod.build_as_static_framework?;
true
end
end
end
end
end
|
Please replace $static_framework = ['FlipperKit', 'Flipper', 'Flipper-Folly',
'CocoaAsyncSocket', 'ComponentKit', 'DoubleConversion',
'glog', 'Flipper-PeerTalk', 'Flipper-RSocket', 'Yoga', 'YogaKit',
'CocoaLibEvent', 'openssl-ios-bitcode', 'boost-for-react-native'] This solution seems to have problems facebook/flipper#254 (comment) , You still need cocoapods to downgrade to 1.6.1. |
This comment facebook/flipper#478 (comment) from my issue seems to work for 1.7.5. |
The text was updated successfully, but these errors were encountered: