Xcode 8 beta 3 build error with framework(lipo: -remove i386 specified but fat file does not contain that architecture) - xcode

I'm running into an issue I can't figure out with Xcode 8 beta 2. I have a library I'm including as a framework built through Carthage. I'm able to build once, but all following builds fail with the following error:
fatal error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: -remove i386 specified but fat file: ~/Library/Developer/Xcode/DerivedData/App-dftppwvljrlqmlgzlpklqyuamtkp/Build/Products/Debug-iphoneos/KGNCache.framework.dSYM/Contents/Resources/DWARF/KGNCache does not contain that architecture
If I clean I'm able to build, but the next build will fail with the same error.

Related

impossible to build flutter on device or simulator in my mac

after two week... I successed upload xcode and catalina OS , zsh ... all could be good but have always error and can't launch my app on my physical device or simulator. Always error after Xcode build.
Things interesting, I remove App_review package from pubspec.yaml but I have always error with it...
If I launch flutter example it works, but If I use certain package like admob who worked before, or app review I have this errors. I can remove app_review package but remove ad mob no...
Edit: I remove all packages who show error, but have always this error
Here is my physical device error :
Xcode's output:
↳
ld: framework not found FBLPromises
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Here is the error when I use simulator :
Xcode's output:
↳
ld: framework not found FBLPromises
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'in_app_purchase' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'in_app_purchase' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'Runner' from project 'Runner')
warning: Mapping architecture armv7s to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'Runner' from project 'Runner')
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator platform. (in target 'Runner' from project 'Runner')
Open Runner.xcodeproj with xCode in ios folder, choose File menu, then select "Project Settings...". In Build System, choose Legacy Build System and run again.
I have select legacy build system
, now I have this last error
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
ld: framework not found FBLPromises
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please see this thread and ensure that you are not accidentally overriding the VALID_ARCHS build setting: What does warning "Mapping architecture arm64 to x86_64" mean?

ld: framework not found ModelIO for architecture x86_64 when compiling my app

I was moving a small number of Cocoapods dependencies' source files into the project, and when I tried to compile my project I got the error:
ld: framework not found ModelIO for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What does this mean? ModelIO is not mentioned anywhere in my project, and my linked frameworks do not mention it either.
I got this error message after adding SupportKit to my Podfile. Per the SupportKit release notes, they require Xcode 7 as of 2.10.1 and trying to use it while still on 6.x can produce this error: https://github.com/radialpoint/SupportKit/issues/54.

xcode 6.1 - Undefined symbols for architecture x86_64 (zbar)

ld: warning: ignoring file /Users/sayan/Desktop/ProjectAtanu/Omlis/Custom Classes/ZBarSDK/libzbar.a, missing required architecture x86_64 in file /Users/sayan/Desktop/ProjectAtanu/Omlis/Custom Classes/ZBarSDK/libzbar.a (3 slices)
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ZBarReaderViewController", referenced from:
objc-class-ref in HomeViewController.o
"_ZBarReaderControllerResults", referenced from:
-[HomeViewController imagePickerController:didFinishPickingMediaWithInfo:] in HomeViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using latest Xcode and iOS version in my App.
Any help much appreciated!
I was able to build a universal library with support for the simulator by following the instructions here: Build fat static library (device + simulator) using Xcode and SDK 4+
I hope that helps you too.
or
up vote
USING PODS
pod 'ZBarSDK'
OR
Recompile ZBar for iphone 5. You can download recompiled ZBAR from here to skip the following
Steps
Download the source code (you must have Mercurial for mac):
Open Terminal and run following commands
a. hg clone http://zbar.hg.sourceforge.net:8000/hgroot/zbar/zbar
b. cd zbar
c. hg checkout iPhoneSDK-1.3.1
d. open iphone/zbar.xcodeproj
In the xcode project edit the "libzbar" scheme and select Release in Build configuration
Go to Build Settings set following Architectures
a. Architectures - >Standard architectures(armv7,armv72,arm64)
b. Valid Architectures -> arm64,armv7 armv7s
Compile libzbar for device AND for simulator, here the configuration:
Find the compiled libzbar.a and go in the folder using Teminal.app,
In My Case : /Users/kappe/Library/Developer/Xcode/DerivedData/zbar-gyozyrpbqzvslmfoadhqkwskcesd/Build/Products
In this folder you you should have two sub folder Release-iphoneos and Release-iphonesimulator
using xcode command line tools build your universal lib:
lipo -create Release-iphoneos/libzbar.a Release-iphonesimulator/libzbar.a -o libzbar.a
Now you can use the libzbar.a created, both in device and simulator.
Ref : http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/

Xcode 6 - Undefined symbols for architecture i386 for Parse Framework

I am trying to create a simple push notification iphone Application using Parse framework(from Parse.com) in xcode6. When i compile the app i got Undefined symbols for architecture i386 error. I googled the error and tried following things:
Changed target build settings->Build active architectures only to NO
Tried changing the standard architectures to : i386 armv7 armv7s (and tried combinations of these)
Still i am unable to resolve the error.Below i attached the scrren shots of Target Architectures and linker erros. Any help would be appreciated.
Finally I resolved the error. I changed the architectures to $(ARCHS_STANDARD_32_BIT) and deleted parse.framework from my project and added parse.framework from working example provided in git:ParsePlatform PushTutorial
Here is the screenshot of project and Build Architectures:

How to organize XCode project structure with library, unit tests and iOS app?

I'd like to have code with XC tests (the tests are launched on Mac) and iOS app that uses that code. I'm having:
One workspace
Two projects
2.1. Project 1: Mac OS static library (code + tests to run on Mac)
2.2. Project 2: iOS app that uses Project 1 code
The problem is that library is build for x86_64 platform and iOS app fails to link as it's built for i386 platform (to run in iOS simulator):
ld: warning: ld: warning: ld: warning: ignoring file
/Users/asmirnov/Library/Developer/Xcode/DerivedData/iFileSystem-colswwvuefyumkclybhsyoymndun/Build/Products/Debug/libFileSystem.a
...
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can i do it?
PS. Should i use "iOS static library" Project type instead?
I've solved it for me case and probably it can be useful for others.
Create 2 targets instead of default 1 target (and 2 products) for library - both Mac OS (to be used for unit tests on dev machine) and iOS (to be used in iOS app). See Base SDK in target build settings.

Resources