Since locations is a Swift pod, it can only be run with the 'use_framework!' line in the Podfile.
"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: location"
Many other popular plugins such as Google Sign in do not work unless this line is commented out. See 9694.
[!] The 'Pods' target has transitive dependencies that include static binaries
There is a work around to the above error message but it results in misplaced headers and a failure to build. (See 10968)
This plugin would be perfect for my current project if I could get it to work with other plugins. Does anyone know of any way of getting around this? or if I'm missing something obvious?
Hi !
What is the content of your Podfile right now ? Which other plugins are creating problems with location ?
Podfile:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# This line must be commented out for
# google sign in and firebase plugins to work
# but must be uncommented for locations to work
# use_frameworks!
if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
end
target 'Runner' do
# Pods for Runner
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
if File.exists? '../.flutter-plugins'
flutter_root = File.expand_path('..')
File.foreach('../.flutter-plugins') { |line|
plugin = line.split(pattern='=')
if plugin.length == 2
name = plugin[0].strip()
path = plugin[1].strip()
resolved_path = File.expand_path("#{path}/ios", flutter_root)
pod name, :path => resolved_path
else
puts "Invalid plugin specification: #{line}"
end
}
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
And my plugins
dependencies:
flutter:
sdk: flutter
image_picker: 0.1.0
google_sign_in: 0.3.1 # does not work with use_frameworks!
firebase_analytics: 0.1.0 # does not work with use_frameworks!
firebase_auth: 0.1.1 # does not work with use_frameworks!
firebase_database: 0.0.12 # does not work with use_frameworks!
firebase_storage: 0.0.5 # does not work with use_frameworks!
shared_preferences: 0.2.4
image: 1.1.27
Whenever I run with the use_frameworks! the main error from 'flutter run -v' is:
The 'Pods-Runner' target has transitive dependencies that include static binaries: (/Users/ryansproule/Documents/FlutterApps/app/ios/Pods/FirebaseUI/FirebaseUIFrameworks/FirebaseAuthUI/Frameworks/FirebaseAuthUI.framework, /Users/ryansproule/Documents/FlutterApps/app/ios/Pods/FirebaseUI/FirebaseUIFrameworks/FirebaseGoogleAuthUI/Frameworks/FirebaseGoogleAuthUI.framework, /Users/ryansproule/Documents/FlutterApps/app/ios/Pods/Google/Frameworks/GGLCore.framework, /Users/ryansproule/Documents/FlutterApps/app/ios/Pods/Google/Frameworks/GGLSignIn.framework, and /Users/ryansproule/Documents/FlutterApps/app/ios/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework)
+1 I have the same issue, is there anything I can do to help?
+1 been struggling with this issue for 3 days, any updates on this matter please ...
+1 same issue here. It works on Android, but not on iOS.
Podfile:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
use_frameworks!
if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
end
target 'Runner' do
# Pods for Runner
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
if File.exists? '../.flutter-plugins'
flutter_root = File.expand_path('..')
File.foreach('../.flutter-plugins') { |line|
plugin = line.split(pattern='=')
if plugin.length == 2
name = plugin[0].strip()
path = plugin[1].strip()
resolved_path = File.expand_path("#{path}/ios", flutter_root)
pod name, :path => resolved_path
else
puts "Invalid plugin specification: #{line}"
end
}
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
pubspec.yaml:
name: untitled
description: A new Flutter project.
dependencies:
flutter:
sdk: flutter
dev_dependencies:
flutter_test:
sdk: flutter
location: "^1.1.3"
google_sign_in: 0.3.1
flutter:
uses-material-design: true
Console:
[!] The 'Pods-Runner' target has transitive dependencies that include static binaries: (/Users/knutvalen/repositories/untitled/ios/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework)
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:81:in `block (2 levels) in verify_no_static_framework_transitive_dependencies'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:73:in `block in verify_no_static_framework_transitive_dependencies'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:70:in `each'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:70:in `verify_no_static_framework_transitive_dependencies'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:36:in `validate!'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:405:in `validate_targets'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:118:in `install!'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/command/install.rb:41:in `run'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.3.1/libexec/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:23:in `load'
/usr/local/Cellar/cocoapods/1.3.1/libexec/bin/pod:23:in `<main>'
Is there any updates on this issue?
This is basically a duplicate of https://github.com/flutter/flutter/issues/10968 which is still open.
Looking at the size of the swift code it might not be too crazy to rewrite it in ObjC, or add an ObjC implementation.
I'm might rewrite it in objective c if it can help the time being, but I hope Flutter will resolve this problem !..
HI, I have the same problem, here the console output
[!] The Pods-Runner target has transitive dependencies that include static binaries: (/Users/giovannicavallaro/mensapp-flutter/ios/Pods/FirebaseUI/FirebaseUIFrameworks/FirebaseAuthUI/Frameworks/FirebaseAuthUI.framework, /Users/giovannicavallaro/mensapp-flutter/ios/Pods/FirebaseUI/FirebaseUIFrameworks/FirebaseGoogleAuthUI/Frameworks/FirebaseGoogleAuthUI.framework, /Users/giovannicavallaro/mensapp-flutter/ios/Pods/Google/Frameworks/GGLCore.framework, /Users/giovannicavallaro/mensapp-flutter/ios/Pods/Google/Frameworks/GGLSignIn.framework, and /Users/giovannicavallaro/mensapp-flutter/ios/Pods/GoogleSignIn/Frameworks/GoogleSignIn.framework)
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:81:in `block (2 levels) in verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:73:in `block in verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:70:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:70:in `verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer/xcode/target_validator.rb:36:in `validate!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:405:in `validate_targets'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/installer.rb:118:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/command/install.rb:41:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
[ +1 ms] Error output from CocoaPods:
↳
[ ]
the same here
I'm might rewrite it in objective c if it can help the time being, but I hope Flutter will resolve this problem !..
Just wondering if you have any updates on this @Lyokone ? Totally understand if you haven't had time to look at it yet of course 👍
I've given this a shot in https://github.com/Lyokone/flutterlocation/pull/13
I'm up and running with this and the previously conflicting google_signin package so it looks good to me at least :-)
Most helpful comment
I've given this a shot in https://github.com/Lyokone/flutterlocation/pull/13