I am trying to build my XCode project and this is what I get. The project runs fine on a device but fails to run on simulator.
Can someone please explain me why this is happening. I have tried removing this library from the project and add it again. It still fails to run on simulator.
Thanks in advance.
i386 is a reference to the Intel processor architecture used by your development machine (the actual iOS devices use ARM processors).
The error indicates that the library has not been built to include support for the Intel architecture. As the simulator runs on the desktop, it requires Intel support to run.
You should obtain a copy of the library that includes i386, or build it yourself.
Here's one way that can be done (for another library that required i386 support adding)
http://www.federicocappelli.net/2012/10/05/zbar-library-for-iphone-5-armv7s/
You need to find where CkoCrypt2 is defined in code and make sure it's being built for the simulator.
If "CkoCrypt" is part of a library or framework, then you need to also compile that library to work under a simulator as well.
Related
I have inherited an old project with some old cocoapods dependencies that do no support arm64 devices. So when I go to import the module (whether it be pods or using Swift Package Manager) ... i.e.
import Module
i get the error: (Compile swift source files (arm64), No such module 'Module' found)
I know that there are past questions and answers for building/testing on a simulator and changing the build settings/valid archs/excluded archs) but I am actually trying to get to this to work on a device that has 64-bit architecture. The machine that I am working on is still Intel.(Not M1)
If the cocoapod library or swift package doesn't include support for 64-bit what workarounds are there (if any)?
It also looks like on Xcode 14.2(Mac OS Monterey 12.6.3), that the option of opening Xcode using Rosetta is no where to be found. Excluding certain archs in build settings and all other past solutions appear to not work.
Anyone have any suggestions?
Recently I got to work on a Swift project on a mac with a M1 chip.
This project uses the normal swift package manager but also has Moscapsule (https://github.com/flightonary/Moscapsule) manually installed. Therefore it gets compiled before all other dependencies and the app the package is used for.
If you compile and run the app on an iPad-Simulator you need to tell the Moscapsule target to compile for x86_64 architecture because it uses a x86_64 iPad simulator. This works absolutely fine.
Then I tried to compile and run the UI Tests for the app. Now the compiler failed to build the app because the compiler needs the Moscapsule framework compiled for arm64 architecture.
I thought: Ok no problem, then compile it for arm64 architecture. But then I get these errors:
The interesting thing to mention is that if I compile the app or the UI Tests for a real arm64 device (iPad Pro with M1 Chip) there is no problem at all.
Did one of you have a similar problem already and has a solution for me?
Thank you!
I'm having trouble to build an external pre built dependency. It throws the following error:
In /Users/me/Projects/app/ThirdParty/GoodFiles/GD.framework/GD(nondga_helper.o), building for iOS, but linking in object file built for free standing, file '/Users/me/Projects/app/ThirdParty/GoodFiles/GD.framework/GD' for architecture arm64
One of the questions that really bothers me is that I don't have a real idea what "free standing" really means. I thought it had to do with being a fat binary, but after running lipo -thin arm64 GD -o GD (and verifying with -info that it really worked) in one of my build scripts I'm still seeing the same problem.
I also tried to exclude arm64 from the simulator and x86_64 from iOS builds in Excluded Architectures as mentioned elsewhere, but that didn't work either.
Removed the Xcode 12 reason. This already doesn't compile anymore in Xcode 11.
Hi there are new BB certification files you have to add along with the usual GD.Framework files. These are documented on Blackberry website
New Xcode build system
GD.framework
BlackBerryCerticom.xcframework
BlackBerryCerticomSBGSE.xcframework
Legacy Xcode build system
GD.framework
BlackBerryCerticom.framework
BlackBerryCerticomSBGSE.framework
https://docs.blackberry.com/en/development-tools/blackberry-dynamics-sdk-ios/8_1/blackberry-dynamics-sdk-ios-devguide/Steps-to-get-started-And-iOS/rqx1490022241984/Prepare-an-app-to-use-the-static-framework
Check:
Xcode > Preferences > Locations > Command Line Tools
In my case it was set to Xcode 12 after installing Xcode 12. There is NO Xcode 12 proof solution until mid December.
I'm trying to build a Cocoa Touch Framework for iOS8 which will eventually be embedded in apps and submitted to the App store so it's important that the release build contains ONLY armv7 but the debug build must run in the simulator too. As such, I've been following this tutorial and I'm hitting upon a runtime error when trying to run an application in the simulator with the framework embedded:
dyld: Library not loaded: #rpath/TestFramework.framework/TestFramework
Referenced from: /Users/jay/Library/Developer/CoreSimulator/Devices/97715157-EABB-4F38-8CA0-62768358DDD6/data/Containers/Bundle/Application/4856FC75-6C5B-4F7E-91A9-70CA1863D130/Test.app/TestFramework
Reason: no suitable image found. Did find: /Users/jay/Library/Developer/CoreSimulator/Devices/97715157-EABB-4F38-8CA0-62768358DDD6/data/Containers/Bundle/Application/4856FC75-6C5B-4F7E-91A9-70CA1863D130/Test.app/Frameworks/TestFramework.framework/TestFramework: mach-o, but wrong architecture
However, when I browse to the framework binary it's complaining about
(/Users/jay/Library/Developer/CoreSimulator/Devices/97715157-EABB-4F38-8CA0-62768358DDD6/data/Containers/Bundle/Application/4856FC75-6C5B-4F7E-91A9-70CA1863D130/Test.app/)
and run xcrun lipo -info TestFramework I get the output Non-fat file: TestFramework is architecture: i386 so I'm kinda lost at where to go now. It runs fine on an actual iOS device.
Based on the question and your comments, the most likely cause of this is that you are building your framework for 32bit and linking it into a 64bit application. If that's not the case, please provide the entire text of your crash log.
You should build your framework 4way-fat:
i386/iphonesimulator
x86_64/iphonesimulator
armv7/iphoneos
arm64/iphoneos
In order to make it 4-way fat, you'll need to manually lipo-together your i386/x86_64 sim build with your armv7/arm64 device build. Building 4-way fat with two different (from Xcode's perspective) platforms is not supported by Xcode.
New in Xcode 11: You can use an xcframework to support these kinds of scenarios! No more lipo hacks required. You can find the details in WWDC 2019 Session 416
In my case, I was using a custom framework containing views that I use in the Interface Builder and I got this error on the Interface Builder build phase.
Running pod install fixed it.
I try to build a static library with cmake for iPad simulation as well as iPad device. When the library is built, it will be put in a location that is determined by the built target (simulation or device). With cmake, I was wondering whether there is a variable that can tell the built target. Thanks.