Not only firebase got that issue GoogleMaps' framework too: ld: building for iOS Simulator, but linking in object file built for iOS, file '.../ios/Pods/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/GoogleMaps' for architecture arm64 Note that building my App with Rosetta on Mbp M1 and xCode 12.4 do build, but shows a white screen. Logging Failed to initialize client context with error and lot of others bad stuff ! :/
Building for iOS Simulator, but the linked and embedded framework ‘XX.framework‘ was built for
167,419 results found
Post
Replies
Boosts
Views
Activity
I have a third party library added to my project as ThirdParty.framework, but it only supports real device. I want to make my project still build for simulators but exclude this library and any references of importing it. I tried a few things, for example in the target's build phase Link Binary With Libraries set this framework as Optional, and in the code I have: #if !targetEnvironment(simulator) import ThirdParty class SomeClass: ProtocolFromThirdParty { // ... } #endif Also some view that has reference to this class: import SwiftUI #if targetEnvironment(simulator) struct TestViewSimulator: View { var body: some View { Text(See this view on real device) } } #else struct TestView: View { @StateObject var example = SomeClass() var body: some View { // ... } } #endif But still when I build for simulator, it still gives error for the linking issue: Building for 'iOS-simulator', but linking
In my case, we have a framework which is exported for devices only, so in previous versions of Xcode (11.3), I was importing and using it contitionally (#if !targetEnvironment(simulator)).Now from Xcode 11.4, as I couldn't build the app for simulator, I've found a workaround with carthage's copy-frameworks run script.I removed the framework from both embedded and linked libraries.I've added a run script: https://imgur.com/99PniC8Basically, it copies your framework to the application during build.
I'm having the same problem with a project of mine after updating to Xcode 12, except the embedded framework here is one of my own from a subproject. Framework has Standard architectures set in build settings...trying to run on the iOS simulator, the app won't build. If I switch to an iOS device Build succeeds.
I found the solution. I add to add the Embedded tvOS Framework in both Embedded Binaries and Linked Frameworks and Libraries to get it on the real device (this does not happen on the AppleTV OS Simulator).
When we build our own framework, is it possible to combine Release/Debug, Simulator/Device all in one? Or do we have to build separate framework for each combination? For example; Device+Release Device+Debug Simulator+Debug
Getting issue since 4days but i unable to find solution i am developing apple tvOS app inside iOS app project but iphone target app working but when try to run tvOS target i am getting below error during compile time. please help - xcode producing error- building for tvOS Simulator, but linking in dylib built for iOS Simulator, file '/Users/shinewebsolutions/Documents/Rohit_Working/Dacast_Player/Dacast/DecastPlayer/THEOplayerSDK.framework/THEOplayerSDK' for architecture x86_64 using xCode 12.2V
On my project I have some libraries built for 'iOS' only. They work just fine for the App store and also for the Mac M1 build (Deisgned for Ipad). I can't understand why I have this error with Apple Vision Pro (defined for iPad). Building for 'iOS-simulator', but linking in object file (libxxx.a[arm64][24]) built for 'iOS' Shouldn't Apple Vision Pro simulator use the same Mac M1 build process?
Hey guys, I am trying to compile C++ code on Mac using command line tools(g++) to output a static library(.a). I compiled it with architecture support for arm64, however when I link it in Xcode project I get the following error Building for iOS but linked library was built for MacOS I have used following command g++ -shared -o ./libCrossPiOS_TestMulti.iOS.a ./alpha.cpp -arch arm64 I understand that I can choose XCFrameworks route to get past this but wanted to understand what I'm missing in this approach. Any help will be appreciated. Thanks in advance Screenshot of error
I am using Xcode 14, but the built in iOS 16 simulator does not run properly on my device, so I use iOS 14 simulator. If I use the old version of Xcode then I will have to compromise with many labraries, frameworks and features and I don't want that. So I want to delete the built in iOS 16 simulator of Xcode 14 to free up memory, because I don't need this. please help me ?
note: Using new build system note: Planning build note: Constructing build description error: Building for iOS Simulator, but the linked framework ‘***.framework' was built for iOS. (in target ‘***’ from project ‘***’) BUILD FAILED fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: ../build/Release-iphonesimulator/***/***.a (No such file or directory)
ld: in Pods/AppCenter/AppCenter-SDK-Apple/AppCenter.xcframework/tvos-arm64/AppCenter.framework/AppCenter(MSACCommonSchemaLog.o), building for iOS, but linking in object file built for tvOS, file 'Pods/AppCenter/AppCenter-SDK-Apple/AppCenter.xcframework/tvos-arm64/AppCenter.framework/AppCenter' clang: error: linker command failed with exit code 1 (use -v to see invocation) This frameworks installed using Pods. pod version 1.10.1 Xcode Version 12.4 (12D4e) Swift version 5.3.2
There are a few important details to consider:Distributing Swift frameworks that are built for later inclusion in an app is not supported, and is documented in the Xcode 8.0 release notes. You should setup your app project to build the framework as a dependency of the app target instead. See Technical Note 2435, Embedding Frameworks In An App for how to setup a project like this.Universal frameworks that cover both a device and a simulator are not supported. You should build two frameworks instead, one for the device OS, the other for the simulator, as you say you are doing.If this was an Objective-C framework, you would need to do either an archive or an install build from xcodebuild to generate a build product that includes bitcode. When doing one of these build types, the only build setting that matters is the Enable Bitcode build setting on the framework
I can’t really help you with the CocoaPods side of this but the underlying cause of this problem is that tvOS and tvOS Simulator are different platforms. You can’t link an app built for tvOS Simulator to a framework built for tvOS even if they have the same CPU architecture. The correct solution here is to build your framework as an XCFramework, including both tvOS and tvOS Simulator variants. An Apple Library Primer explains this in more detail and has links to relevant docs. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Well, now it gets difficult, and it's unlikely we'll discover the solution in this thread except by lucky guesswork. Otherwise, you're likely going to need to take apart the build process step by step.When you try to build your app, what device are you building it for? What device did you build your framework for? Note that the device is chosen from the right half of the scheme popup menu that we mentioned before.My guess is that you built the framework for an actual iOS device (either a plugged-in piece of hardware, or the generic device), but you're currently building your app for the simulator — or vice versa. That would explain why building app A triggers an attempt to re-build framework B, although B already exists. For some reason, building B for the simulator fails. (An iOS device build uses the iOS platform. A simulator build