Cocos2d-iphone basic compile error - iphone

I downloaded Cocos2d-iphone 0.99.5 and installed it using ./install-script
I then opened xcode and created a new cocos2d application. When I ran Build and Run it, gave the error 'There is no SDK with the name or path iphoneos'. Searching online I found a solution which said to change the Base SDK setting in Project Settings. I changed it to the Simulator of iphone os 3.1.2.
But now when I Build and Run, it gives me 217 errors. Most are: "float.h No such File or directory" or "stdarg.h No such file or directory"
Any suggestions?

You'll probably need to update Xcode to 3.2.5, with iOS 4.2. Check inside the Project Settings for cocos2d -- I believe the base SDK is up above 4.0, probably at 4.1 or 4.2, by now. If all of the items in the Frameworks folder are red, that means that the project is trying to link to a higher SDK, and can't find anything.

Related

Xcode SDK Version Issue

I'm having a bit of an issue with distributing an app via the latest version of Xcode (Version 10.1 (10B61)). Every time I try to upload it to the App Store via organizer, I get this error after uploading:
WARNING ITMS-90725: "SDK Version Issue. This app was built with the iOS 12.0 SDK. Starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later."
Previous answers to this question said that it was just a warning and that I should still be able to upload my app, but it is now March and I am still getting the error even on 10.1. iTunesConnect will not let me select these builds and I get emails about the validation failure.
Further details:
-The app is an iMessage extension, and uses exactly 1 framework from Carthage, which is up to date with the latest framework version and Carthage version.
-My project and Message extension targets Swift Language Version build setting is Swift 4.2.
-My deployment target is iOS 11.0, but the issue persists after selecting iOS 12.1.
-The app compiles and runs fine on my physical device running iOS 12.1.
-The issue persists after a build folder clean.
-The issue persists after reinstalling Xcode.
If anyone has any suggestions as to how I can verify my app is compiling with the latest SDK please let me know.
Whether the app runs on given iOS version, has no relevance to which SDK are you really using. The definitive SDK version used for building is found in the app's Info.plist.
after Archiving, Show the xcarchive in Finder.
right-click, Show Package Contents.
open Products/Applications/YourApp.app
right-click, Show Package Contents.
copy the Info.plist to some place where you can run terminal commands on it
/usr/libexec/PlistBuddy -c "print :DTSDKBuild" Info.plist
You would expect it to show "16B91" for SDK 12.1. If it's something else (SDK 12.0 would be "16A366"), here are some ideas:
inspect the Carthage dependency. Are you really building it locally or downloading a prebuilt binary? If in doubt, force local building with --no-use-binaries. Remove whole Carthage folder (Checkouts as well as Build) and start from scratch.
rm -rf ~/Library/Developer/Xcode/DerivedData instead of just "build folder clean"
Verify MacOS System Report section Software/Developer for the actual SDK versions that MacOS thinks that you have
xcode-select -p to verify that you are really using the Xcode instance that you would like to
If all looks correct on your side, fill Technical Support Incident. Report the exact rejected build which you uploaded already. That should speed up the support reaction.
I filled out a bug report with Apple because I was experiencing the exact same issue and none of the above solutions worked. They made a change on their backend and now everything is back to proper working order.
If you haven't tried in awhile, make another attempt and I'm betting that it'll work this time.
I was having the same problem. My app was compiled in Xcode 10.1 but I was still getting the SDK warning. I was able to resolve it by doing the following. I'm not sure if all these steps are necessary. I didn't try validating between steps.
I upgraded macOS to Mojave (10.14.3). I had been running High Sierra.
Delete Xcode from applications folder
Reinstall Xcode from the app store
Open my project and run Project->Clean Build folder
Archive and upload and no more warnings

Unity 4.3.4f1 and Xcode 5.1

Xcode 5.1 just released. I installed the latest version of Xcode 5.1 as well as Unity 4.3.4f1.
Before updating Xcode to version 5.1, Unity project builds without problem. In the mentioned version, the following errors appeared when I hit "Build and Run" in Unity3D:
In Unity:
UnityException: Launching iOS project via Xcode4 failed. Check editor log for details.
Well, I'm not using Xcode4. Xcode fails to load. Then I open the Xcode project manually. When I try to compile the Xcode project, the following compile errors occurs:
Dsymutil Error: error: invalid abbreviation code [114] for DIE at 0x00005e22 in
and
Dsymutil Error: Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil emitted errors but did not return a nonzero exit code to indicate failure
What do they mean? How can I resolve it?
Note: the App build is successful on device.
The device is iOS 6.1.4, iPhone 5.
If you change the "Debug Information Format" to DWARF, the error will go away.
DEBUG_INFORMATION_FORMAT = dwarf
I got this answer from here
You can get Build and Run working again in Unity w/ the latest Xcode by following the steps in this thread
http://forum.unity3d.com/threads/234557-nityException-Launching-iOS-project-via-Xcode4-failed
This is not a definitive answer but in the meantime I did this on my project and I manage to compile and make it work on an iPad with the latest iOS 7.1.
I was able to compile with no errors but warnings by removing armv7 and arm64 from the architectures.
Some references here: Architecture linking error after Xcode 5.1 upgrade
I currently have the latest Unity 4.3.4f1 and Xcode 5.1/iOS 7.1 sdk installed and using Build and Run in Unity to automatically get a build on an iOS device also fails for me.
Just do:
File > Build Settings... > Build
in Unity, manually open the project in Xcode, and build/run it normally from Xcode - it still compiles and runs fine on a connected device.
You can fix Xcode 5.1 support by manually editing Unity Xcode plugin metadata.
Find following file in Unity installation:
Unity.app/Contents/BuildTargetTools/iPhonePlayer/Unity4XC.xcplugin/Contents/Info.plist
Open it with XCode and locate following lines here:
DVTPlugInCompatibilityUUIDs
Insert following item just before closing
A2E4D43F-41F4-4FB9-BB94-7177011C9AED
Restart Xcode.
Updating Unity to 4.5 (using XCode 5.1.1) solved the problem for me.

XCODE Base SDK missing

The only option I am able to see in my Base SDK is IOS 4.2 but I can see all SDK versions in IOS Deployment Target. I am trying to run a project which was written using IOS 3.2 do able to run the current XCODE settings.
Any clue?
If you don't have anything incompatible between the iOS 3 and iOS 4 APIs, you should be able to compile and run successfully by changing the Base SDK setting on Project - Edit Project settings (Build tab), and Edit Active Target. Those are the two places that make reference to the original SDK you used (3.2), and the two places you should change to reflect your current SDK (4.2).
yes, change base SDK to "latest iOS" or one which is available with your XCode installation; that should work.
deployment target is the OS version on which the app should be able to run, base SDK is the version you compile and test the app with.

iOS4 SDK + Three20 Build issue

I installed the latest iOS4 SDK which replaced my existing SDKs (so I no longer have anything other than 3.2, 4.0).
I also checked out the latest Three20 from github, and now whenever I'm about to Build a new Three20 app, or even run the samples I get the following error:
Build Three20Core of project Three20Core with configuration Debug
Check dependencies
[BEROR]error: There is no SDK with the name or path 'iphonesimulator3.0'
Is Three20 not yet iOS4 SDK compatible?
You need to change the "Base SDK" in the downloaded project info settings from 3.0 to 3.2 or 4.0

Sometimes Xcode appears to ignore target build settings?

I've created a iPhone static library project with two targets like this
Project
--> Library (Device) target
--> Library (simulator) target
The device target has the SDK set to the device so it produces an armv6/7 library and the simulator target is set to the simulator SDK so it produces an i386 library.
The issue I'm having is that the SDK settings on the targets keep getting overridden by the XCode active target setting. i.e. if I build the device target, but the XCode window is showing the active SDK as being the simlulator, XCode will build a simulator library instead of a device library, ignoring the settings of the target. Although it will put it into the *-iphoneos/ directory in the build directories!
I originally had the same issue with another static library project, and after a lot of playing around got everything to work correctly. i.e. The targets ignore the XCode active SDK because they have their own specifications of what to build.
The problem is that I don't know what made it work in that project and I have not been able to reproduce the issue in it either.
Does anyone have any ideas as to what is going on?
ciao
Derek
OK, I think I've figured it out.
Set the project SDK to the general setting, ie. Simulator SDK so that you get the APIs and libraries correct during coding.
Set each target to the SKD it needs to build. ie. device SDK or simulator SDK.
Leave XCodes SDK set to current SDK, effectively telling it to not override the targets.