Building for iOS Simulator, but the linked and embedded framework ‘XX.framework‘ was built for

167,386 results found

Post

Replies

Boosts

Views

Activity

Reply to Can't build to simulator on Apple Silicon
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 ! :/
Feb ’21
How do I exclude linking a library for simulator builds
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
2
0
846
Jun ’24
Reply to xcode 11.4 beta no longer allow non-universal frameworks
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.
Apr ’20
Reply to Xcode12 build error. The linked framework 'Pods_projectA.framework'is missing one or more architectures required by this target: arm64
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.
Sep ’20
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
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
0
0
623
Feb ’21
Vision Pro: Building for 'ios-simulator' instead of "build for ios"
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?
2
0
563
Jan ’24
Building for iOS but linked library was built for MacOS
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
2
0
913
Oct ’21
Reply to Xcode12 script creating .a package problem
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)
Oct ’20
building for iOS, but linking in object file built for tvOS
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
0
0
682
Mar ’21
Reply to How to enable bitcode in Universal Swift framework for tvOS?
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
Jan ’17
Reply to Build Failed issue in Xcode 14.3 version
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
Apr ’23
Reply to Static library inside iOS Framework error
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
Mar ’17