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.
Related
I have two .a static lib files named: libxxx-ios.a and libxxx-ios-sim.a.
In my test, libxxx-ios.a cannot be linked with a iOS simulator build and libxxx-ios-sim.a cannot be linked with a iOS real device build.
Which setting should I use to apply libxxx-ios.a for an iOS real device build and libxxx-ios-sim.a for an iOS simulator build automatically? Then it can auto switch the .a file when i change the build target.
I've tried to use lipo to combine those two .a files, but it failed.
I am building an iOS App using a personal C++ library mylib.a , With the current Xcode version (13.1) When I include this library in my Frameworks and try to run on physical iOS device I have the following issue :
building for iOS, but linking in object file built for iOS Simulator, for architecture arm64
When I include my library built with a previous XCode version (I think it was Xcode 11) the app builds and runs on the device.
The issue appears both on Mac intel and M1.
You can try and exlude architectures or add a user defined setting called "VALID_ARCHS" in targets build settings[enter image description here][1]
look at image
[1]: https://i.stack.imgur.com/EAkWm.png
My unity application is developed for iOS devices, but for some reason at this moment I have only Windows PC.
I searched around and found similar information, but not clear for what I want.
My query is
I will do development of the game in Windows PC using C#.
Then will build and deploy to iOS device using MAC.
Is that possible? I like to make sure.
I have made several Unity3D projects for iOS using a Windows.
When installing Unity, don't forget to check "iOS deployment" and your Unity (on Windows) will be able to build an Xcode project.
Then, just transfer this Xcode project on a Mac with Xcode installed and you will be able to compile the project in order to be run on your iOS device.
Note : I just have to run chmod 777 MapFileParser.sh on the Mac folder containing the Xcode project before compiling with Xcode.
You can always use Unity Cloud to build you games. Their server will build it either from your own repo (git, svn, etc) or you can use their Collaborate feature by going into the unity editor -> services -> collaborate on.
Before getting to use Unity Cloud to build for iOS, you will need to generate your certificates just as you do when building using XCode. On the config page you can choose the version of unity you want the build to use, the version of xcode and if you want Unity to build your game on every push ( auto-build).
As far as I know when building for ios the ipa will have a ridiculous size. If you encounter this problem please refer to the following link: how to disable bitecode
Even though Unity allows us to use their system to build for any platform, in order to upload your *.ipa to app store you will need to do it through application loader.
I have an Xcode project which holds different versions of my game: iOS (iPhone and iPad) and OS X.
I have a different target for each device, platform. Every application works fine, on simulator, devices, etc. I even have some builds currently in the iOS AppStore.
My problem is with the OS X build, which runs just fine when launched from Xcode, but with this forbidden icon on top of the regular app icon.
The problem, is when I try to export/archive this build, the exported application still has this forbidden mark. And when I launch it from the Finder, I get the following message.
You can’t open the application “Foo bar” because it is not supported on this type of Mac.
I did try to run the following command:
file Contents/MacOS/Foobar
Which outputs:
Contents/MacOS/Foobar: Mach-O 64-bit executable x86_64
I would think it should run just fine on my Macbook Air, plus it runs well when launched from Xcode debug command.
Anyone has an idea?
Thanks,
I had forgotten to remove this settings from my OS X Info.plist file:
Application requires iPhone environment --> YES
Thanks Michelle for the great help! The flag lead me to the solution.
When launched from Xcode, the compiler uses the Debug build configuration.
When building for archive it uses Release (or Distribution or what you have selected in Scheme definition).
In your OS X target check the Architectures and Valid Architectures flags in Build Settings, they should differ between Debug and Release (or Distribution or what you have).
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.