I don't believe that I am using any 3.0 specific APIs, but somehow whenever I compile I get a warning "This project uses features only available in iPhone SDK 3.0 and later", and then a bunch of errors. If I change the Base SDK to 3.0, the warning & errors go away, but then of course I cannot target OS 2.2.1
I see that this is coming from the project_Prefix.pch file, which I assume was created when the XCode initially created the project. I don't see how this file gets included, but I believe this is the source of the problem. I tried removing it, but then the build won't compile at all.
Do I need to regenerate this file somehow?
Silly me- I was in fact using a 3.0 API. I had the following:
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
Removing this line fixed the problem.
I don't believe the project_Prefix.pch is the file, but if you want to regenerated it just delete it or better yet do a clean on your project.
What are the errors you are getting? That should tell you which 3.0 specific API you are using.
Related
I make a plug-in to ą third-party app. Part of the plug-in is written in Swift. The plug-in is stuck at Xcode 7.3.1/Swift 2.2 because of this issue.
The plug-in no longer works on Mojave.
We have the following observations:
The issue is limited to Mojave, everything works as expected on older macOS versions.
If the third-party app asks to "load this bundle" of the plug-in, it just gets nil.
The plug-in's init method is not called at all.
If I completely remove Swift 2.2 from the plug-in's code base (making in unusable), its bundle is correctly loaded.
Any ideas what might be causing this issue and how to fix it?
PS: Pursuing users to install a newer version of Python/PyObjC is not feasible nor expecting Apple to bundle a newer version of Python/PyObjC with macOS (so the plug-in code base cannot be upgraded to a newer Swift version). Migrate the code from Swift to Objective-C is planned but it will not happen instantly (it's a matter of a few months).
I have managed to get the plug-in running on Mojave.
The nil was returned by a call to NSBundle's principalClass.
Based on my understanding of the official documentation, there are two ways how the principalClass is determined.
The principal class name is specified manually in the info.plist file. As the plug-in did not have it specified here, this step should not apply.
The principal class is the first one listed on the ld command line when linking. As the exactly same plug-in binary was used on both High Siera and Mojave, "the first one listed on the ld command line" was the same so the returned principal class should be the same on both versions.
Somehow, the principalClass call returned different value on High Sierra and Mojave. Personally, I do not see any reason why it should behave differently, as the documentation has not changed and the logic sounds to be dependent solely on what happened while compiling the plug-in not how the world context while running it.
However, after I have added NSPrincipalClass item into the info.plist file, the plug-in loads successfuly on Mojave.
Fresh cocos2d-x project build using Xcode runs normally on iOS simulator/device, but after making changes to cpp source files, rebuild fails with error-
Xcode cannor run using selected device. Choose a destination with a supported architecture in order to run on this device.
The only way to make it work is delete build binaries (i.e. delete XCode>Derived Data folder), and take fresh build after restarting Xcode.
Can someone please help me resolve this issue?
Additional Details:
This error is related to mismatching device architecture and armv6 armv7 flags. But first build works fine, and stops working after second build onwards, that means this is not a possible issue.
If the project is not using cocos2d-x (i.e. plain Objective-C project), then there is no such error after second build.
Compiler selected: Apple LLVM Compiler 4.2
Thanks in advance!
Following my comment you should make sure you use the latest templates for creating cocos2d projects. Some templates will only work for a specific Xcode version so make sure you use the right templates for your xcode version (There are some for xcode 3.x and others for xcode 4.x)
Change Valid architecture to armv7 and armv7s. Remove armv6. See image for more information.
I've been receiving this warning since I loaded my project in last Xcode 4 preview. There was no warning before that but now I can't get rid of it even in Xcode 3.2. I've been googling but nobody seems to have the same error.
My project and target settings are correct (IMHO): Architectures: Standard (armv6 armv7), Base SDK: Latest iOS (currently set to iOS 4.2), Build Active Architecture Only: FALSE, Valid Architectures: armv6 armv7.
I compared every project setting with other projects and and found no differences. I even have recreated the project starting from scratch and copying classes, resources and frameworks with the same result.
I must say that the warning is not shown when I set Debug configuration.
I hope someone can help me because I don't know what to do. Thanks in advice.
I kept getting this error and it was driving me crazy. Then I realized I was building the project for Simulator instead of Device. Once I made the change, I was able to upload the app without a problem.
Several things spring to mind. Firstly that there is some file lurking around in the build directory. But I presume you have deleted the build directory. Secondly, that there is something lurking in your library directories. I think xcode puts some tempt files down in them now. Thirdly that something has gone funny is the core xcode setup.
So here's what I would try (the emphasis here is "try" - I don't know if any of this will work :-)
Make sure you have deleted the build directory.
Do a full un-installation of code. Clear out any developer directories and then re-install.
SOLVED!. Not a good solution though.
After a thousand tests I uninstalled Xcode 3.2.5 and installed 3.2.4. Everything went ok since then. Now I'm afraid of upgrade to last version again. :/
I'm writing an iPhone app which seems to run fine on the simulator, however when I try and run it on the device I get a libsqlite3.dylib, file is not of the required architecture error. I'm using os 3.0 on a 3GS. Any ideas on what could be causing this?
Thanks!
When you added the SQLite library to your project, it sounds like you chose the one from the iPhoneSimulator sdk. You need to choose the one in the iPhoneOS sdk for whichever version you're building for.
If you still get the error make sure you haven't accidentally copied the simulator version of the lib into your own project directory. You need to delete it if you have. This would have occurred because you accidentally selected 'Copy items into destination groups folder' when you added the lib to your project. Also make sure reference type is 'Relative to Current SDK'.
I had a similar issue which caused by the search paths for the linked library pointing to incompatible files.
I wrote a blog post on how to fix it here:
Fixing the "missing required architecture arm in file" error when developing for iPad
I have been developing an iPhone app. and had the Base SDK set to "iPhone Device 3.0" and Deployment target set to "iPhone OS 3.0". Everything worked fine. I recently realised I actually needed to compile the project to run on devices using version 2.2.1 of the SDK, so I set the deployment target to "iPhone OS 2.2.1". Now when I hit compile I get 2079 errors all eventually pointing back to my header files saying "#endif without #if". My header files are surrounded by #ifndef/#endif clauses and I have checked every single one of them and all of these match up (since it compiles targeting 3.0 I'm assuming this isn't the problem anyway). I am using XCode 3.1.3. I have no idea what is going on and would appreciate any help with this. Thanks.
First thing to check is that you aren't using libraries that are only available in the 3.0 SDK. If you are using the MPMediaPlayer Framework, for example, you will probably get some compile warnings since those libraries don't exist prior to the 3.0 SDK.
My general advice for compile errors is to start with the first error and work your way one at a time. Generally, a single failure at the top will cascade and cause many more compile errors than actually exist in your code.
I found the answer, I had the target SDK set to the wrong version (2.2.1), when it should have been set to 3.0.