Xcode and Qt4iOS error while doing build - ios

I got this error when I want to build project that is using Qt4iOS and Xcode 4.2.
Problem is that when I was building project in Qt my GCC compiler was set to an x86.
And system where I am having Xcode is x64 but yesterday was working everything fine. Now suddenly I got this error. And I have tried to build my Qt project with x64 compiler and still I am having the same error.
Any idea what went wrong?

Maybe just following the instructions would help? You waste everyone's time when you don't follow them. In particular, this question is answered by:
"The Qt4iOS SDK has been built as a ‘Universal binary’, containing linkable object code for both ARM (device) and x86 (simulator) targets. When building the application project, it will need to be built for either the device or the simulator. When building for the simulator, the mkspec will need to be specified when running qmake eg.
Xcode 4.2.x (and earlier):
/Developer/Qt4iOS/qt‐everywhere‐ios‐gles2‐4.8.1/bin/qmake animatedtiles.pro –spec qpa/macx‐iossimulator‐clang‐legacy
Xcode 4.3.x (and later):
/Developer/Qt4iOS/qt‐everywhere‐ios‐gles2‐4.8.1/bin/qmake animatedtiles.pro –spec qpa/macx‐iossimulator-­clang"

According to your comments it looks like you haven't used the x86 compiler for building the app for the simulator (your library is armv7 atm).
Try to add the simulator compiler as new toolchain in Qt Creator (located at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++) like you did for the device compiler and use the new one for your next simulator build.
You can check the resulting library with lipo again.

Related

xCode6 > testFlight "Missing 64-bit support "

Been all around with this one, still needing help
1) In xCode when I am archiving to submit to TestFlight I get the following error
2) I have researched and changed the architecture to Arm64 and the Debug to Yes The Build to No
The build completely Fails
3) & I get the LLVM Warning
So I change the optimization Level from Fastest to Fast
4) Normally I could build to my phone / unplug it and then Archive.
But I can't get as far as a build to my phone anymore. This is a project coming from Unity that has worked well in the past.
I work with AR some bundles that now give errors so I take them off
I also add the Core Text Framework to get rid of the Mach-O errors
I'm running the latest Unity the latest xCode in hopes of bug fixes
I have even tried reverting to older version of Unity
Thanks
~ Be
You should use latest version of unity and Xcode. When you build your project in unity, change architecture type to universal in player setting.

Could not build module 'Foundation' in Xcode 6

I have searched Stack Overflow, Google and fellow peers for a current workaround in Xcode 6 for this error but have failed in doing so.
Note that this error occurs ONLY when attempting to run my app ON A DEVICE USING XCODE 6.
(This is not an issue when using the simulators, and I can build my app on a device using Xcode 5)
It seems to be a framework or library issue, but since it is able to work in almost every other possible way, I am not sure where the solution resides. I was using Xcode 6.0.
Here is the error:
I have checked my architecture settings, my frameworks and project files. Everything that needs to be included seems to be there.
This looks like it might be a silly error to do with Cocos2d and/or Xcode6. I have used SpriteBuilder to create the app. If you have a fix or have this error, any insight would be appreciated, thank you!
Found a fix. Downloaded the new Xcode6 version from the App Store. Xcode 6.0.1 (6A317) and it runs on all devices and simulators.
(There was no notification to update Xcode, you must search for it and download the new version)

IOS simulator using XE5 wrapper init failed error

I have been using the IOS simulator from XE5 for many weeks now, but suddenly it will no longer work. I get the error 'Wrapper init failed (null)'. The only thing that happened before the problem was I got a request to "update" from OSX. I said 'yes' and it appears XCode was updated but it does seem to work fine. PAserver starts OK.
When I went to options SDK manager and used the update local files cache I got the error
Directory does not exist: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/
This appears to be an incompatibilty between the PAServer and Xcode 5.1 and SDK 7.1. The same happens with XE4.
The question now is can you roll back XCode with success.
I did roll back to Xcode 5.0.2 and everything appears to work OK.
Roll back to Xcode 5.0.2 and Late October command line tools. Confirmed that this allows Delphi to invoke the simulator correctly.
Make sure you set SDK to 7.0 too, 7.1 won't work. With SDK 7.0 the compile is aimed at a usable SDK.
xcode 5.1 contains only iOS 7.1 SDK. So this is not incompatibility between paserver, but only lack of sdk in xcode .app package. You can always open the app package (right mouse button etc) and simple copy/paste older sdks into the right subfolder inside xcode.app
The other (easier) way is to install parallel xcode 5.1 and xcode 5.0 (changing names for example as follows: xcode51.app, xcode.app (for 5.0) - simulator works even with command line tools setup to 5.1 in xcode/preferences/locations).
For updating local file cache of sdk in delphi you need to rename old version to xcode50.app and 5.1 to xcode.app (I think that a path is hardcoded in paserver). In this configuration you can add 7.1 sdk, and fix it according to: http://delphi.radsoft.com.au/2013/10/making-delphi-xe4-compile-for-ios-devices-with-xcode-5/
After updating revert xcode file names and you will be able to compile against iOS 7.1 and run in device as well as in simulator :) - checked in Delphi XE4, so I think it will work in XE5 too.

Unable to link ZBar SDK with Xcode 5

Downloaded ZBar
Imported the contents in to the group.
Added library file libzbar.a in build phases.
But when I'm tried to build (both 32 bit & 64 bit), it got the follower linker error. I have attached the screenshot of the setup in the bottom of the post.
How can I make ZBar to be flexible with both (32bit and 64 bit) Architecture.
Change "armv7, armv7s" to "armv7" only in Build Settings,
I think I found an answer to your problem just yesterday:
When I was compiling/running in simulator (64bit) or trying to create an archive with the zbar sdk (I'm using the beta 1.3.1 one), the program crashes with the same errors because of this 64bit-structure. Rest worked fine.
So I selected my project in the navigator and clicked on the project (not the target) and then Build Settings. I switched the options to ALL and COMBINED. Then I selected the drop-down-menu in Architectures / Architectures. You should see the Debug and Release options. Edit both of them and replace the $(ARCHS_STANDARD) with $(ARCHS_STANDARD_32_BIT). Now you should be able to run your project on all simulators.
One important point: I haven't tried this solution on a real 64bit device (iPhone 5s) jet. So I don't know if there might be problems with this fixing. If someone got issues, please tell us here.
ZBar SDK doesn't compile when you select the iOS Simulator . It runs on Device only .

iOS Development: problematic framework search path

I have an iOS app and I want to test it on simulator. When I run the project xcode complains that my framework file is "missing required architecture i386 in file".
I did a bit of search on line and it says that's because xcode used the framework files intended for actual device when building the project for simulator. Solution is to add the simulator framework folder under the framework search path in build settings.
Okay now the problem is, doing that solves the problem of building project on simulator, but later when I want to build the project on an actual device, xcode starts complaining again saying there are redefinitions of some of the openGL typedef in the framework. To fix this I have to remove the search path item that I added.
So is there an easy way to avoid having this kind of problem? I don't want to switch the search path over and over again when I want to build the project on different platform.
If you upgrade a project from 4.2 to 4.3.2 style it often loses the architectures required for the target you are building for. Usually you just have to add them back or change the target SDK.

Resources