Search results for

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

186,346 results found

Post

Replies

Boosts

Views

Activity

Reply to App Won't Compile with Embedded Third Party Framework: Could not install at this time. Failed to load Info.plist from bundle at path
Okay, reached out to Apple via Feedback and got a response. They brought to my attention that the binaries aren't .dylibs and framework binaries need to be dylibs. So even though Google distributes their Admob SDK as frameworks (GoogleMobileAds.framework, GoogleUtilities.framework, ect), the binaries apparently can't be embedded in the app like a 'dynamic framework'. I guess in Google's Xcode project they changed the Mach-O type to Static? I didn't even realize that was supported. Wonder why they don't ship these as static libraries instead of .frameworks? Is there any advantage to using a .framework over a static library in this case?If I just link to the framework (and not embed) the app will run on my device. I was thinking I needed to embed them, because GoogleMobileAds.framework is obviously not included in iOS and didn't realize the 'framework' wasn't meant to be embedded in the app like frameworks
Dec ’19
Both ios-x86_64-simulator and ios-arm64-simulator represent two equivalent library definitions. XCFramework for iOS simulator on M1 & Intel Mac? How?
I now have an M1 Mac and an Intel Mac. I have an XCFramework that targets the iOS simulator and devices. My XCFramework works fine but I'd like to be able to run my app (which uses the XCFramework) on the iOS simulator on both my Macs (m1 & intel). Now my M1 Mac complains about the x86_64 architecture when I try to run it on the simulator. So I rebuilt the XCFramework (recompiling the simulator version on the M1 Mac). I'm compiling the source code from Terminal (building OpenSSL). There is no .xcarchive here. Anyway now the app runs on the simulator on the M1 Mac but on the Intel Mac it won't build (basically the same problem in reverse). So... I made three versions of the library now (for iOS devices, iOS simulator on m1 Mac, and for the iOS simulator on Intel Macs). When I try to make an XCFramework to wrap all three static libraries I get the following error: Both ios-x
3
0
6.8k
Aug ’22
Reply to How to use .a in swift with an empty header
If you’re building an app you should be able to do this as follows: Add a bridging header to your app. Include the Objective-C header in your bridging header. Add the static library (.a) to your project. Add that to your Link Binary With Libraries build phase. Looking at your screen shot it seems that you’ve already tried steps 1 and 2. The errors suggest that your bridging header isn’t being compiled as Objective-C. Make sure that C++ and Objective-C Interoperability build setting is set to its default value of objc. Taking a step back, sharing code in this way is going to get very clunky very fast. For example, a single static library can’t support both the visionOS and visionOS simulator platforms. If you want to share pre-built libraries between teams, it’s best to use an XCFramework. See Creating a multiplatform binary framework bundle. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ +
Topic: Programming Languages SubTopic: Swift Tags:
May ’24
Simulator Does not Launch when Building
When building the app the simulator does not launch as it previously did, using the latest version on an intel MacBook Pro 2020. I have factory reset the Mac several times and reinstalled Xcode numbers times and have reverted back to previous version which has not worked. Not had any assistance from this community previously can anyone assist me with this now?
1
0
558
Jun ’22
Using iOS SDK framework (Philips Hue) in tvOS application - linking issue
I've already developed an iOS App in Swift using the PhilipsHue SDK for iOS.https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSXNow I started developing a Philips Hue application for the new AppleTV (tvOS). I also used the PhilipsHue SDK for iOS and nearly finished the development. In simulator everything works fine.Last week I got an AppleTV Developer Kit and tried to deploy my application on the AppleTV, but I got the following error:ld: in /Users/xxx/Development/xxx/xxx/HueSDK_iOS.framework/HueSDK_iOS(PHPortalConfig.o), building for tvOS, but linking in object file built for iOS, for architecture arm64According to this discussion I found (other SDK, but same issue), my error was only a warning in previous Xcode 7.1 betas, and since 7.1 beta3 it's an error:https://groups.google.com/forum/#!topic/firebase-talk/DJ8qZAvXgScDoes anybody know, how to fix this? I'm using Xcode Version 7.1 beta 3 (7B85) I think it will take months (if ever) unt
1
0
1.5k
Oct ’15
Reply to Static library inside iOS Framework error
Lipo-ing files from different platforms (simulator and device) isn't supported, but I don't know whether this has anything to do with your problem. It's certainly possible that C is being treated as an iOS library, and that's why it won't link into B. You could try building C for the simulator only, without using lipo, and see if that changes anything.>> Is there anything to do with modulemap?Look at the build transcript to see if it got as far as trying to create a module map for B. (My guess is that it did not.) The later error message about the missing module map may just be a secondary error, because the build of B never finished.>> If i remove Library C from Framework B then A is working fine.That's actually good news, because it narrows the problem down.Is there any need to use a static library? At this point, it may be quicker and easier just to compile C's files directly into B.
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’17
Reply to Library/SPM issue with latest Xcode 11.4 beta
I had the same problem, here's what fixed it for me in Xcode 11.4:1. explicitly set `type` to `.dynamic` for all `products` in Package.swift:.library( name: XXX, type: .dynamic, // add this targets: [XXX] ),2. re-add SPM libraries in Project / Target / Frameworks and Libraries:- what used to be XXX - Do Not Embed- now becomes XXX - Embed & SignAfter these changes, build & run on device and simulator works, along with archive & export, although I had some errors when exporting until I restarted Xcode and started over, after which it succeeded.Btw, my setup is a workspace which contains:- Single Swift package (XXKit) with multiple targets (modules), defining multiple products (libraries)- Main project with multiple targets (iOS app, Widget, Extensions) linking libraries from the XXKit package- Pods project (for 3rd party stuff which still doesn't support SPM)UPDATE:- with the above solution, Xcode actually can't export IPA without errors- real solution is
Mar ’20
Reply to Where to put a Swift framework for execution?
You need to read the dyld man page, which explains how these relative references work.When you create a framework (from the Cocoa Framework template) it assumes that the framework will be embedded within your application, so it sets the Runpath Search Paths (LD_RUNPATH_SEARCH_PATHS) build setting to include directories that the framework would appear in a typical app. If you’re not using the framework embedded within your app, things get more complex. Do you plan to use the framework just in your tool? Or in other situations do you plan to use the framework embedded within an app?Share and Enjoy — Quinn The Eskimo! Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’15
Reply to Today Widgets (old widgets) disappear after EVERY app update.
To everyone, who is also struggling with this issue - I'm glad to inform you that building with the new Xcode 14.0 beta version seems to fix the issue, but introduces some new ones: The widgets doesn't disappear anymore! They do disappear during the installation(which is normal), but appears again after the install completes. Sometimes the today widgets displays Unable to Load after update. The widgets built with the WidgetKit (the iOS 14+ widgets) shows only white (or black, depending on the device theme) on the screen after the update. Tapping on them opens the app, but the deep linking doesn't work. It looks like the widgets are gone. You can't add new one. The worst is phone reboot doesn't fix this bug. The only fix I've found so far is downgrading to version built with Xcode 13. Overall I can't run WidgetKit widget on iOS 15 iPhone. On iOS 16 simulator it works fine. Tested on iOS 15.4.1. Build uploaded to TestFligh
Topic: App & System Services SubTopic: General Tags:
Jun ’22
Can't run app on IOS simulator on mac with M1 chip
Hi, I'm trying to run my Ionic 3 app on IOS simulator with iOS 14. I am using Xcode version 12.4 and then I get this error: in /Plugins/cordova-plugin-google-analytics/libGoogleAnalyticsServices.a(TAGDataProvider.o), building for iOS Simulator, but linking in object file built for iOS, file 'platforms/ios/ManyTutors/Plugins/cordova-plugin-google-analytics/libGoogleAnalyticsServices.a' for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation). any suggestion/help will be appreciated. Jitendera K.
1
0
1.4k
Feb ’21