Conflict between location and url_launcher plugin - ios

I'm developing an app which finds points of interest around the location of the user. To get the location of the user I use the location plugin which works quite nicely.
The next thing I'd like to implement is a button to open the default mapping application to navigate the user to the POI. I went at it using the url_launcher plugin and the geo: url scheme for android and the maps: scheme for iOS.
Independent of each other both plugins work as expected. Once I had both plugins in my project the problems started. Using the default setup of flutter create I get the following error:
Launching lib/main.dart on iPhone 6 in debug mode...
Running pod install...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (`arm64`)
Finding Podfile changes
- Flutter
- location
- url_launcher
Fetching external sources
-> Fetching podspec for `Flutter` from `/Users/rainerwittmann/Flutter/flutter/bin/cache/artifacts/engine/ios`
-> Fetching podspec for `location` from `/Users/rainerwittmann/.pub-cache/hosted/pub.dartlang.org/location-1.0.2/ios`
-> Fetching podspec for `url_launcher` from `/Users/rainerwittmann/.pub-cache/hosted/pub.dartlang.org/url_launcher-0.4.2+1/ios`
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
- Flutter
- location
- url_launcher
Downloading dependencies
-> Using Flutter (1.0.0)
-> Using location (0.0.1)
-> Using url_launcher (0.0.1)
- Running pre install hooks
[!] 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
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:448:in `block (2 levels) in verify_framework_usage'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:443:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:443:in `block in verify_framework_usage'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:440:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:440:in `verify_framework_usage'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:114:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error running pod install
Error launching application on iPhone 6.
So far so good. Adding use_frameworks! to my podfile, as suggested by the error message resulted in another error:
Launching lib/main.dart on iPhone 6 in debug mode...
Running pod install...
Running Xcode build...
Failed to build iOS app
Error output from Xcode build:
↳
** CLEAN FAILED **
The following build commands failed:
Check dependencies
(1 failure)
** BUILD FAILED **
The following build commands failed:
Check dependencies
(1 failure)
Xcode's output:
↳
Build settings from command line:
ARCHS = x86_64
BUILD_DIR = /Users/rainerwittmann/Flutter/zapfsuche/build/ios
ONLY_ACTIVE_ARCH = YES
SDKROOT = iphonesimulator10.3
=== CLEAN TARGET location OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
=== CLEAN TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies
=== BUILD TARGET url_launcher OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies
=== BUILD TARGET location OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies
“Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
Could not build the application for the simulator.
Error launching application on iPhone 6.
Unfortunately I have no idea how to proceed from here. Can somebody help me sort this out?
Note
This problem only exists on iOS. Both plugins work like a charm on android.

Swift plugins require use_frameworks! and that isn't fully supported yet.
I'm currently working on it. Thanks for your patience!

Edit Podfile
Add/uncomment after "target 'Runner' do" line number ~35
use_frameworks!
Then add this line after line number ~67
config.build_settings['SWIFT_VERSION'] = '4.0'
Example:
target 'Runner' do
** use_frameworks! **
........ ......
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'] = '4.0' **
end
end
end
delete your Podfile.lock and try.

Related

Fails to compile for IOS using Codemagic

I'm having trouble trying to compile on code magic, I don't have access to an Apple device. Can you tell me how to fix it?
I saw that to fix this problem I would have to perform these steps: Open [YourProject]/ios/Podfile and remove the # sign from platform :ios, '9.0' and try flutter run. If it doesn't work increase the version number for example to 10.0
as per the link: Error running pod install - Automatically assigning platform `iOS` with version `8.0` on target `Runner`
But how to resolve this in codemagic without macOS.
LOG ERROR IN CODEMAGIC:
== Building for iOS ==
> flutter build ios --debug --no-codesign
Warning: Building for device with codesigning disabled. You will have to manually codesign before deploying to device.
Building com.example.jumilAssistencia for device (ios)...
Running pod install... 4.9s
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '8.3.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
firebase_messaging: Using Firebase SDK version '8.3.0' defined in 'firebase_core'
-> Fetching podspec for `geocoder` from `.symlinks/plugins/geocoder/ios`
-> Fetching podspec for `google_maps_flutter` from `.symlinks/plugins/google_maps_flutter/ios`
-> Fetching podspec for `location` from `.symlinks/plugins/location/ios`
-> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
-> Fetching podspec for `qr_code_scanner` from `.symlinks/plugins/qr_code_scanner/ios`
-> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
-> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`
Resolving dependencies of `Podfile`
Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
CDN: trunk Relative path downloaded: CocoaPods-version.yml, save ETag: "612aa752-3d"
CocoaPods 1.11.0.rc.1 is available.
To update use: `gem install cocoapods --pre`
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.11.0.rc.1
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
[!] CocoaPods could not find compatible versions for pod "firebase_core":
In Podfile:
firebase_core (from `.symlinks/plugins/firebase_core/ios`)
Specs satisfying the `firebase_core (from `.symlinks/plugins/firebase_core/ios`)` dependency were found, but they required a higher minimum deployment target.
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Users/builder/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/Users/builder/.rbenv/versions/2.7.2/bin/pod:23:in `load'
/Users/builder/.rbenv/versions/2.7.2/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Build failed :|
Failed to build for iOS
You can access a codemagic own Macs during build via ssh or vnc, see the docs here. But I would personally just create a new flutter project and use the ios folder with all the configurations up to date. I recently set up CD through codemagic using a Flutter 2.2 generated ios config and had no issues.

The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (.../ios/Flutter/Flutter.framework)

After upgrading to flutter version 1.17.4 when running flutter build ios I get following output:
[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries: (.../ios/Flutter/Flutter.framework)
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:84:in `block (2 levels) in verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:74:in `each_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:74:in `block in verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:73:in `verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/xcode/target_validator.rb:38:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:590:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:158:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error running pod install
What I tried:
Deleting ios/Flutter/Flutter.framework and running pod install as suggested here didn't help
Adding s.static_framework = true to Flutter.podspec - no luck
Deleting-recreating ios folder - no luck
Commenting out use_frameworks! in Podfile - leads to errors in plugins like fatal error: '..._plugin-Swift.h' file not found
I also tried to downgrade the flutter as I didn't have any problem with prev one. But running flutter version v1.17.2 resulted in error:
Error: ProcessException: Process exited abnormally:
error: unsupported sort specification 'creatordate'
I'm stuck with this.
If this issue occured while you trying to implement your own flutter plugin, then simply add this line below dependencies to .podspec
s.static_framework = true
I get same problem with this error output:
[!] The 'Pods-Runner' target has transitive dependencies that include statically linked binaries:
(/.../ios/Flutter/Flutter.framework)
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/target_validator.rb:84:in `block (2 levels) in
verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/target_validator.rb:74:in `each_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/target_validator.rb:74:in `block in verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/target_validator.rb:73:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/target_validator.rb:73:in `verify_no_static_framework_transitive_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/xcode/target_validator.rb:38:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:595:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:162:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
I have solved problem with tried this step:
Open your folder ios in your project and open Podfile and you will see code like this:
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
You can remove code use_frameworks! and use_modular_headers! and this is complete code:
target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
If you have follow instruction you can save change file and hit flutter run
This is complete output:
Running pod install... 3.1s
Running Xcode build...
└─Compiling, linking and signing... 28.0s
Xcode build done. 73.0s
Waiting for iPhone 12 Pro Max to report its views... 19ms
Syncing files to device iPhone 12 Pro Max... 1,218ms
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h Repeat this help message.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
An Observatory debugger and profiler on iPhone 12 Pro Max is available at: http://127.0.0.1:50854/VhaUEREqLb0=/
*Disclaimer:
I'm quite new to programming & coding and Flutter is my first programming language. But having struggled with this for 3 days, I believe I have fixed my code. Hoping this helps. Please excuse if this doesn't make sense.
Other Newbies reading this: Do this only if you have a backup of your script, and all of above solutions failed for you.*
Background
My problem occurred when I upgraded Xcode to 12.0.1. Got the same error:
The 'Pods-Runner' target has transitive dependencies that include statically linked binaries:
I believe in the upgrade process, some link in an unknown location broke between Flutter, Cocoa-pods & Xcode. I wasn't sure whether something broke internally within my project or within the platforms. Hence, I launched a new flutter project and confirmed it was the latter when that brand new project failed to launch on the Simulator.
Solution
My solution was to rejig the whole platform architecture, rather than re-writing the whole app code.
Step 1: Take a backup of your code (I didn't; got lucky or was just tired with the multiple iterations & backups.)
Step 2: Uninstalled Flutter (Restarted the Mac) and then Reinstalled Flutter on VSCODE
Step 3: Completely Uninstalled Cocoa-pods & Reinstalled Cocoapods. Followed the steps mentioned here.
[Now in your Project]
Step 4: In the terminal, type 'flutter clean' to clean all caches pre-built for the project
Step 5: Delete (or Rename) '/ios' folder (to something else like '/111ios')
Step 6: Recreate a new /ios folder. In the terminal, type
flutter create -i swift
You might need to specify your root PWD for the command to build the ios folder in the right directory.
Step 7: Get packages
flutter pub get
Step 8: Flutter Run.
The above got my boat sailing again. Hopefully this helps the community!

React native viro, framework not found ViroKit_static_lib error when building on ios

I'm currently developing a Ar app with react native app ( version 0.55.2) and viro (version 12).
I followed their tutorial to install Viro on ios and Android. (https://docs.viromedia.com/docs/integrating-with-react-native-projects).
It's working great on Android but I have build error on xcode.
I followed these steps to install viro on ios (https://docs.viromedia.com/docs/no_use_frameworks).
My podfile looks as follow
# Uncomment the next line to define a global platform for your project
platform :ios, '9.3'
target 'treasureHunters' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# Pods for project
pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
pod 'ViroKit_static_lib', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/static_lib'
end
I had pod install success message. the pod lock look like this
PODS:
- ViroKit_static_lib (1.0)
- ViroReact (1.0)
DEPENDENCIES:
- ViroKit_static_lib (from `../node_modules/react-viro/ios/dist/ViroRenderer/static_lib`)
- ViroReact (from `../node_modules/react-viro/ios/`)
EXTERNAL SOURCES:
ViroKit_static_lib:
:path: "../node_modules/react-viro/ios/dist/ViroRenderer/static_lib"
ViroReact:
:path: "../node_modules/react-viro/ios/"
SPEC CHECKSUMS:
ViroKit_static_lib: 17cb5bbb409057a98d2922cef37afb6b132dd630
ViroReact: 5520f26ac4654e361786c82da3b29ce0402c3c00
PODFILE CHECKSUM: 4df8dc354119fe43ff9c12440dce232d09df282d
COCOAPODS: 1.5.2
I opened the xcworkspace file, I set the Enable Bitcode at no. When I build the project I have a error from linker-command failed with exit code 1 with this message : " framework not found ViroKit_static_lib".
I'm not sure how to tackle this. Is there a path to change somewhere?
In your project's Build Settings, add this to Framework Search Paths:
"${PODS_ROOT}/../../node_modules/react-viro/ios/dist/ViroRenderer/static_lib"
Add this to Library Search Paths:
"${PODS_ROOT}/../../node_modules/react-viro/ios/dist/lib"

flutter simple permissions android version compare and iOS path_provider error

I am used Flutter Simple Permissions plugin in my app but I have a some issues with it.
1.) When i run app on android 6 and higher version there is no problem but when i run it on android 5 execution stopped on "SimplePermissions.checkPermission" and only
showing console message "Checking permission: android.permission.WRITE_EXTERNAL_STORAGE" so my question is that how to compare android version in flutter?
2.) how to determine if the user checked “Never ask again”? and ask for open app settings
3.) Error with iOS permissions "BUILD TARGET path_provider OF PROJECT Pods WITH CONFIGURATION Debug"
Console Message: === BUILD TARGET path_provider OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/home/Library/Android/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/ios/Classes/SimplePermissionsPlugin.m:2:9: fatal error: 'simple_permissions/simple_permissions-Swift.h' file not found
#import
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
I am new with flutter so please help me if any one know about it. Thanks advanced.
please try this edits in Podfile Code needs to be added or edited are marked with "** ...... **"
target 'Runner' do
** use_frameworks! **
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'] = '4.0' **
end
end
end
delete your Podfile.lock and try

Swift compiler error: Header not found

I started a "Cocoa Touch Static Project" with a Cocoa Pods dependance.
Podfile:
platform :ios, '8.4'
inhibit_all_warnings!
target 'project' do
pod 'libPusher', '~> 1.6'
end
target 'project' do
end
A workspace has been created by the command "pod install".
Then I created un swift project on this workspace and I created a Bridge header between this swift project and my Objective-C library project.
My swift project configuration:
//:configuration = Debug
SWIFT_OBJC_BRIDGING_HEADER = demo/demo-Bridging-Header.h
//:configuration = Release
SWIFT_OBJC_BRIDGING_HEADER = demo/demo-Bridging-Header.h
When I compile my swift project, I obtain this error:
demo-Bridging-Header.h:5:9: In file included from /Users/XYZ/Projets/iOS/project/library/demo/demo/demo-Bridging-Header.h:5:
project.h:10:9: 'Pusher/PTPusherDelegate.h' file not found
Failed to import bridging header '/Users/XYZ/Projets/iOS/project/project/demo/demo/demo-Bridging-Header.h'
Do you know why the swift compiler doesn't found header file and how can I fix it?
• Did you run pod install ?
Installing SocketRocket (0.3.1-beta2)
Installing libPusher (1.6)
• Did you open demo.xcworkspace (close Xcode project, open Xcode workspace)
If so, were is the correct demo-Bridging-Header.h content:
#import "Pusher.h"
#import "Pusher/PTPusherDelegate.h"

Resources