Error building archive in xcode for flutter.io app - flutter

I follow release instructions but I am getting a link error building the archive about the Reachability library not being found:
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Reachability'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/connectivity'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/path_provider'
ld: warning: directory not found for option '-L/Users/bartwaggoner/Library/Developer/Xcode/DerivedData/Runner-duuffrseacvinacmifrehqvwbbxo/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/url_launcher'
ld: library not found for -lReachability
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've played around for half a day and so far no luck resolving this - could anyone help a mac.flutter newbie out?

Opening the .xcodeproj extension file instead of the .xcworkspace worked for me.

Related

ld: framework not found CouchbaseLiteSwift

I'm getting an error
ld: framework not found CouchbaseLiteSwift
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I imported CouchbaseLiteSwift.framework on a folder frameworks like image show
i also included it on embedded binaries, and on framework search path i added :
$(PROJECT_DIR)/Frameworks
/Users/user/Documents/CouchbaseLiteTest/Frameworks
$(PROJECT_DIR)
/Users/user/Documents/CouchbaseLiteTest/Frameworks/CouchbaseLiteSwift.framework
$(inherited)
But still have this error, please help

Library not Found

Pulling my hair out on this Library not found error after updating to Xcode 5!
ld: library not found for -lAppLovinSdk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried with Library Search Path but no luck.Does any one know how to solve this?

error on AdMob integration

I Have added Addmob sdk in my project and even added all framework needed. But m getting below error for StoreKit framework even i have added it in my project but still getting error..
ld: warning: directory not found for option '- L/Users/company/Downloads/projectname/GoogleAdMobAdsSdkiOS-6.4.2/Add- ons/GoogleAnalyticsiOS_2.0beta4/Library'
ld: warning: directory not found for option '-L/Users/company/Downloads/projectname/GoogleAdMobAdsSdkiOS-6.4.2'
ld: warning: ignoring file /Users/company/Downloads/StoreKit.framework/StoreKit, missing required architecture i386 in file /Users/company/Downloads/StoreKit.framework/StoreKit (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in libGoogleAdMobAds.a(GADOpener.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[GADOpener openInAppStore:fallbackURLString:] in libGoogleAdMobAds.a(GADOpener.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I search a lot but in every post its sid to add Storkit.. but i have already added it but still getting error. even i have cleaned the project a lot of time.
Just ensure that you have added the following libraries,
1.AudioToolbox
2.MessageUI
3.SystemConfiguration
4.CoreGraphics
Also the frameworks,
1.MessageUI.framework
2.StoreKit.framework
3.SystemConfiguration.framework
According to your error message there is a problem with StoreKit.framework...Please verify that...
Refer: build error when add Admob in iOS app
Add AdSupport.framework, also make it as optional
It says that your StoreKit binary is not build for i386. This should not happen with the default one. Did you download if separately from somewhere? You can find the default here:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer‌​/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks/StoreKit.framework
Use that.

ignoring file [path] missing required architecture i386 in file

I'm quite new to Xcode and Iphone development and ran into the following problem:
I opened a new project and added *.h and a *.a files (which I recived from a certain device vendor).
I get the following warning:
ld: warning: ignoring file /Users/udi/Desktop/Xcode/Xcode Projects/Scosche/libmyTrekSDK_armv7.a, missing required architecture i386 in file /Users/udi/Desktop/Xcode/Xcode Projects/Scosche/libmyTrekSDK_armv7.a (2 slices)
If I ignore the warning, and try to instanciate the class that is given to me in the header file, I get these errors:
ld: warning: ignoring file [Path/FileName.a], missing required architecture i386 in file [Path/FileName.a] (2 slices)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_HRMonitor", referenced from:
objc-class-ref in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
I've checked the Framework Search Pathes (as mantioned in many other posts) and it clear.
More info:
I'm Using Xcode 4.6.1
The files are currently located at project's root folder.
I'm using a Single View Application tamplate.
Appreciate any help
This warning means that you're trying to use library made for Device (ARM) with your Simulator (i386).
You can use this terminal command to create a universal library:
lipo -create lib_arm.a lib_i386.a -output lib_universal.a
More info about lipo command here.
Change your target's "Build Settings > Build Active Architectures Only" to "No"
This is doing the same thing as Dmitry Zhukov's answer but doing it thru Xcode instead of going around its back.
If you are working with a 3rd party code, keep in mind that some SDKs may not work on the simulator. The same build error I have encountered vanished, when I ran the project on the device.

Library Not found error for iOS Device in Xcode

I am trying to run my app on device but it is giving error for device working fine for iPhone simulator.
ld: warning: directory not found for option '-L/Users/Documents/TEST/../CorePlotDemo/CorePlotDemo'
ld: warning: directory not found for option '-L/Users/TEST/../CorePlotDemo/CorePlotDemo'
ld: library not found for -lsqlite3.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How To solve this error, I also tried with Library Search Path but not working .
Add library libCorePlot-CocoaTouch.a
And set path in build Setting -> Search Path -> Library Search Path -> $(inherited) "$(SRCROOT)/Libs/CorePlot"
This is the path of libCorePlot-CocoaTouch.a.