Closed felpsio closed 5 years ago
Hello @felipecesar42
You might need to add the following to your Podfile
platform :ios, '10.0'
And then:
target 'Runner' do
use_frameworks! #<----- add this
...
And then:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['SWIFT_VERSION'] = '3.2' #<------- Add this
...
Hope it helps.
thanks @lakexyde . I solved the issue the way you recommended :). It would be great to have this on the documentation :)
add to documentation thanks
I followed your way. But still get this error.
[!] Unable to determine Swift version for the following pods:
- `simple_share` 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.
here is my pod file
platform :ios, '10.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')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
# config.build_settings['SWIFT_VERSION'] = '4.1'
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['SWIFT_VERSION'] = '3.2'
end
end
end```
your podfile looks good to me. Have you tried flutter clean
?
Anyway... I'm using https://pub.dartlang.org/packages/share_extend now
Not sure if is the same problem than the other issue. But, I tried to use and I'm facing this problem when building the project:
Launching lib/main.dart on iPhone XR in debug mode... CocoaPods' output: ↳ Preparing Analyzing dependencies Inspecting targets to integrate Using
ARCHS
setting to build architectures of targetPods-Runner
: (``) Finding Podfile changes A simple_shareshared_preferences Fetching external sources -> Fetching podspec for'
Error output from CocoaPods:
↳
Ignoring bindex-0.5.0 because its extensions are not built. Try: gem pristine bindex --version 0.5.0
Ignoring bootsnap-1.3.0 because its extensions are not built. Try: gem pristine bootsnap --version 1.3.0
Ignoring byebug-10.0.2 because its extensions are not built. Try: gem pristine byebug --version 10.0.2
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
Flutter
from.symlinks/flutter/ios
-> Fetching podspec forcamera
from.symlinks/plugins/camera/ios
-> Fetching podspec forcloud_firestore
from.symlinks/plugins/cloud_firestore/ios
-> Fetching podspec forfirebase_auth
from.symlinks/plugins/firebase_auth/ios
-> Fetching podspec forfirebase_core
from.symlinks/plugins/firebase_core/ios
-> Fetching podspec forfirebase_storage
from.symlinks/plugins/firebase_storage/ios
-> Fetching podspec forflutter_facebook_login
from.symlinks/plugins/flutter_facebook_login/ios
-> Fetching podspec forgoogle_sign_in
from.symlinks/plugins/google_sign_in/ios
-> Fetching podspec forimage_picker
from.symlinks/plugins/image_picker/ios
-> Fetching podspec forpath_provider
from.symlinks/plugins/path_provider/ios
-> Fetching podspec forshared_preferences
from.symlinks/plugins/shared_preferences/ios
-> Fetching podspec forsimple_share
from.symlinks/plugins/simple_share/ios
Resolving dependencies ofPodfile
[!] CocoaPods could not find compatible versions for pod "simple_share": In Podfile: simple_share (from.symlinks/plugins/simple_share/ios
) Specs satisfying thesimple_share (from
.symlinks/plugins/simple_share/ios)
dependency were found, but they required a higher minimum deployment target. /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:inraise_error_unless_state' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in
block in unwind_for_conflict' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:intap' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in
unwind_for_conflict' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:inattempt_to_activate' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in
process_topmost_state' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:inresolve' /Library/Ruby/Gems/2.3.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in
resolve' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/resolver.rb:91:inresolve' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/analyzer.rb:909:in
block in resolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:64:insection' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/analyzer.rb:907:in
resolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer/analyzer.rb:114:inanalyze' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:266:in
analyze' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:174:inblock in resolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/user_interface.rb:64:in
section' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:173:inresolve_dependencies' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/installer.rb:136:in
install!' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command/install.rb:48:inrun' /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in
run' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/lib/cocoapods/command.rb:52:inrun' /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.0/bin/pod:55:in
<top (required)>' /usr/local/bin/pod:22:inload' /usr/local/bin/pod:22:in
Ignoring duktape-1.6.1.0 because its extensions are not built. Try: gem pristine duktape --version 1.6.1.0 Ignoring ffi-1.9.23 because its extensions are not built. Try: gem pristine ffi --version 1.9.23 Ignoring json-2.1.0 because its extensions are not built. Try: gem pristine json --version 2.1.0 Ignoring msgpack-1.2.4 because its extensions are not built. Try: gem pristine msgpack --version 1.2.4 Ignoring nio4r-2.3.1 because its extensions are not built. Try: gem pristine nio4r --version 2.3.1 Ignoring nokogiri-1.8.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.2 Ignoring puma-3.11.4 because its extensions are not built. Try: gem pristine puma --version 3.11.4 Ignoring unf_ext-0.0.7.5 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.5 Ignoring websocket-driver-0.7.0 because its extensions are not built. Try: gem pristine websocket-driver --version 0.7.0 [!] Automatically assigning platform
ios
with version8.0
on targetRunner
because no platform was specified. Please specify a platform for this target in your Podfile. Seehttps://guides.cocoapods.org/syntax/podfile.html#platform
. Error running pod install Error launching application on iPhone XR. Exited (sigterm)