Flutter iOS Build Error - framework image_picker not found - flutter

I have added v0.8.5 of image_picker library in my project.
I have tried following things to solve the issue:
Deleted podfile.lock & Pods folder from iOS Directory
Deleted pubspec.lock file from Project Directory
pod deintegrate
flutter clean
flutter pub get
pod install
While building the project in iOS,It throws following error
ld: framework not found image_picker
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Can anyone provide a solution to this?

for me change to image_picker: 0.8.0
after that,
flutter clean,
flutter pub get
cd ios
pod deintegrate; pod install

Due to the latest update, which includes migration of image_picker to Android and iOS federation packages, the naming convention of the iOS package has changed from "image_picker" to "image_picker_ios".
Solution:
Just make sure that in xcode, your app's project and target linker flags are set from "image_picker" to "image_picker_ios".
Navigate to xcode project, and then build settings
Find section Linking and then Other linking flags.
Change flag -framework "image_picker" to -framework "image_picker_ios"
Important: changes must be applied to both project and target linker flags.

Open Runner.xcodeproj/project.pbxproj and change image_picker to image_picker_ios in all places.

Related

purchases_flutter minimum deployment target error

I am receiving the following error when I compile my FLutter project after adding package:
purchases_flutter: ^4.0.1 to it ....
[!] CocoaPods could not find compatible versions for pod "purchases_flutter":
In Podfile:
purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
Specs satisfying the purchases_flutter (from .symlinks/plugins/purchases_flutter/ios)
dependency were found, but they required a higher minimum deployment target.
I have checked the Readme in PubDev for this package which says:
minimum targets iOS 9.0+ is required.
However when I look in my PoDFile I have platform :ios, '10.0'. And in Xcode:
Am I missing something here. I haven't seen any other Deployment targets in Xcode or Podfile.
Would really appreciate it, if someone could point me in the correct direction with this.
Many thanks.
I have also tried creating a new Flutter project to test this from the start again and used the terminal commands as suggested below.
I still get the same error... here is a full screen shot of my Android Studio window. Showing the error, my IOS drive and Podfile.
You need to prioritize your dependencies. If the problem is only with this package or plugin, just add it with flutter pub add [dependency name], avoiding directly writing pubspec.yaml It prevents conflict between package versions, automatically finding appropriate version. Then in Podfile top define minimum version. Delete pubspec.lock file, ios/Podfile.lock file and ios/Pods directory. Execute flutter pub get. Enter ios directory via Terminal, execute pod install and try to run application again. If your Mac has apple silicon chip pod install command will be a bit different. Let me know, it worked or not.

ld: Invalid value (Producer: 'LLVM13.0.0-rust-1.57.0-nightly' Reader: 'LLVM APPLE_1_1300.0.29.3_0') for architecture arm64

Trying to install and work with zkgroup.
Build, run for specific iOS device working fine.
But generic archiving is not working.
Error text:
ld: Invalid value (Producer: 'LLVM13.0.0-rust-1.57.0-nightly' Reader: 'LLVM APPLE_1_1300.0.29.3_0') for architecture arm64
Rust toolchain:
installed toolchains
--------------------
stable-x86_64-apple-darwin
nightly-2021-06-08-x86_64-apple-darwin
nightly-2021-09-16-x86_64-apple-darwin (default)
nightly-2021-09-19-x86_64-apple-darwin
installed targets for active toolchain
--------------------------------------
aarch64-apple-ios
aarch64-apple-ios-sim
x86_64-apple-darwin
x86_64-apple-ios
active toolchain
----------------
nightly-2021-09-16-x86_64-apple-darwin (default)
rustc 1.57.0-nightly (2c7bc5e33 2021-09-15)
Any insight?
The solution to this problem turns out to be deceptively simple: set the Xcode build setting "Enable Bitcode" to "No", as in this image:
(I figured this out by first discovering that command-line archive builds did not have this problem, and then comparing their log with the in-Xcode build log. The in-XCode build was doing bitcode-verify operations, which reminded me that the Rust cargo-lipo README talks about turning this setting off to avoid this LLVM incompatibility.)
I was fighting with this error while using the isar package in Flutter. The problem was with isar_flutter_libs 2.5.0.
Solution
Delete pubspec.lock and podfile.lock
Downgrade all isar libs to 2.4.0
In the terminal, run dart pub remove isar_flutter_libs
flutter pub get
pod update

Framework not found Crashlytics in xcode 12.0.1

After i implement firebase Crashlytics on old project it has fabric.
i removed those pods :
pod 'Fabric'
pod 'Crashlytics'
and after
pod install
i see this error
ld: framework not found Fabric
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have tried many clean build folder and project. But It still stays in there. What should I do?
Solution
Goto your project target and Build Settings
search for "Other Linker Flags"
Delete :
-framework
"Crashlytics"
Crashlytics
If you want to upgrade, just follow the upgrade guide here:
https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=ios
If you want to just remove Crashlytics, use pod deintegrate

"Flutter run" giving error in Mac OS once I change in pubpec.yaml file

Please check below error, I am getting below error once I did some changes in "pubspec.yaml" file.
When I initial setup the project It works, as I did some changes then I am getting below error.
Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart
side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
Running Xcode build...
Xcode build done. 2.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Planning build
note: Constructing build description
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
error: /Users/neeteshkeshari/Projects/development/song_app/ios/Flutter/Debug.xcconfig:1: could not find included file
'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig' in search paths (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Looking forward for kind response.
You'll need to install the changes made to the pubspec file, you can do this by following either of the 3 options:
Install it
From the terminal: Run flutter pub get.
OR From Android Studio
Click Packages get in the action ribbon at the top of
pubspec.yaml.
OR From VS Code:
Click Get Packages located in right side
of the action ribbon at the top of pubspec.yaml.
Then run the following in the terminal:
sudo gem install cocoapods
terminal:
flutter pub get
or if you are using VSCode with the Flutter extension, you can simply do:
CMD + S on your pubspec.yaml file (saving the file automatically calls flutter pub get)
if the error persists, you can try
flutter clean
and then try "flutter pub get" again.
Thanks everyone for sharing your views.
Above issue has been fixed by below steps:
Open terminal
Run Below commands
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 1.7.5
pod setup
CocoaPods will be available
Quit VC editor and reopen.
do flutter run
Above steps worked for me.
Thanks.

Linking error when building Parse in Xcode 7

I am trying to add the Parse.com SDK to my Xcode 7 project. I have followed the getting started guide and I have managed to do it before in Xcode 6.
However this time I am being shown this error message when I try to build:
ld: framework not found Bolts
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks
There seems to be an issue with Xcode 7 beta where the search path for manually added frameworks is missing.
To fix the issue add the search path by doing the following:
Select Project
Click on Targets
Click Build Settings
Search for: Framework Search Path
Add the following without the quotes: "$(PROJECT_DIR)" and choose recursive option.
The project should build now.
I suggest you integrate Parse using CocoaPods.
Cocoapods manages the library dependencies in a much better way.
The following is a sample PodFile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
inhibit_all_warnings!
target '**YourProjectName**' do
pod 'Parse', '~> 1.7.1'
pod 'AFNetworking', '2.2.3'
end