How to use Cocos 2D 1.1.0, When I run a sample Cocos2D Appication it gives error - iphone

How to use Cocos2D 1.1.0, When I am choose a template as Cocos2D Application and name it "NewCocos", When simply run this project without doing anything It gives me
124 errors
of same type = error: missing binary operator before token "("
this errors shows near "#if defined(__has_feature) && __has_feature(objc_arc)"
18 Warnings
of same type = warning: ignoring #pragma clang diagnostic
this warning shows near "#pragma clang diagnostic push" , "#pragma clang diagnostic pop" etc...
I am using XCode 3.2.4 and iOS / iPhone OS 4.1
In short statement gives (124 times) error of
error: missing binary operator before token "("
on the statement without quotes "#if defined(__has_feature) && __has_feature(objc_arc)"
This is working fine in Cocos v1.0.1 older version but not working on cocos v1.1.0

Cocos2D v1.1 requires to set the compiler to "Apple LLVM compiler" in Build Settings. Only Xcode 4.0 and newer are shipped with the Apple LLVM compiler. Furthermore, to enable ARC you must be using at least Xcode 4.2 with the "Apple LLVM compiler 3.0".
You should seriously consider upgrading. Xcode 3.2 is over 2 years old now (released: August 2009). As mentioned here, only apps built with the latest, or if not "too old" the second to latest iOS SDK version are going to be approved by Apple (at the time of this writing iOS 5.0 is the latest SDK but iOS 4.3 apps are also still accepted). Regardless of that, Xcode 4 makes it a lot easier to submit apps through its built-in Organizer.

this is XCode 3.2.4 problem Update Your X-Code Minimum X-Code 4.2.0

Related

Cant build ios project, no such module or this SDK is not supported by compiler

So I got an demo ios project from different company but I can't launch it
Basically i get two errors:
Sometimes I also go an unsupported swift architecure error
I work on M2 processor and use XCode 14.2
Project does not have pods, all packages are managed via spm (that's what I was told)
For now i tried:
opening xcode via rosetta (nothing changed)
changing version of xcode to 14.0 (nothing changed)
using other swift version via toolchain (Swift 5.7), screen below ( get different erorrs but i dont think its a good way)
UPDATE
I downloaded version 14.0 of xcode and toolchain 5.7.2
When i use that version of xcode i get an error about missing classes from that sdk in scope and also some weird error from SentrySamplingProvider ( screens below)

Swift 3.1.1 compile error: unknown key 'SwiftImportAsNonGeneric'

Some time after upgrading to Xcode 9, I discovered that I was no longer able to build a Kitura-based project with the Swift 3.1.1 snapshot (which I have installed via swiftenv).
When I ran swift build, some time into the build I would get:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes:8:28: error: unknown key 'SwiftImportAsNonGeneric'
SwiftImportAsNonGeneric: true
^
<unknown>:0: error: could not build Objective-C module 'Foundation'
It seems that there is a dependency between Swift and Xcode, and Xcode 9 is no longer fully compatible with Swift 3.1.1 (or earlier) snapshots. I believe it may be because my project uses Foundation, and Foundation on Mac is provided as part of Xcode, whereas on Linux it is part of the Swift snapshot (via swift-corelibs-foundation).
I did find a solution to this problem: If I keep a copy of Xcode 8.3.3 around (eg. in /Applications/Xcode8.3.3.app) then I can use sudo xcode-select -s /Applications/Xcode<version>.app/Contents/Developer to select the appropriate one prior to building with SPM, and I can then build both Swift 3.1.1 and 4.0 projects on the same system.
However, this feels a bit clunky. Each time I build a project with the 'other' Swift version, I have to make sure I run xcode-select, or the build will fail. Is having multiple versions of Xcode the right solution in this case, or am I missing a trick with Xcode 9?
note that if, like me, you upgraded Xcode via the App Store, previous versions of Xcode are still available from https://developer.apple.com/download/more/

Trouble getting Vapor to work with Xcode 8 beta 3

I was following the instructions here, but was not able to get vapor working on my mac. Here're my xcode and swift versions
Xcode 8.0
Build version 8S174q
Apple Swift version 3.0-dev (LLVM 8fcf602916, Clang cf0a734990, Swift 000d413a62)
Target: x86_64-apple-macosx10.9
When I try to install the toolbox using this command
curl -sL toolbox.qutheory.io | bash
The installation is unsuccessful and yields this message
⚠️ It looks like your Command Line Tools version is incorrect.
Make sure Xcode > Preferences > Locations > Command Line Tools is set correctly.
Correct: Xcode 8.0 (8S162m)
Current: Xcode 8.0
Build version 8S174q
⚠️ It looks like your Swift install location has been modified.
Correct: /usr/bin/swift
Current: /Users/<name>/.swiftenv/shims/swift
❌ Incompatible
Reason: Invalid Swift version
Output must contain 'swiftlang-800.0.33.1'
Current 'swift -version' output:
Apple Swift version 3.0-dev (LLVM 8fcf602916, Clang cf0a734990, Swift 000d413a62) Target: x86_64-apple-macosx10.9
📖 Visit our docs for step-by-step instructions on installing Swift correctly.
http://docs.qutheory.io
👋 or Join our Slack and we'll help you get setup.
http://slack.qutheory.io
From this, I can gather that my swift location is wrong (I don't remember changing it) and that my xcode build number is wrong (because xcode beta 2 is no longer available for download, so I got xcode beta 3.)
Can anybody help me to get this working without changing too much, or is this framework still too finicky to work with a slightly different setup?
Unfortunately it's impossible to create packages that work between different Swift 3 development previews because of how much changes in each preview. Things that compiled today might not compile tomorrow and there is no way to selectively target a given preview in code.
Because of this, the Swift version declared in https://github.com/qutheory/vapor#-current-environment for a given Vapor version must be the one used.
Vapor 0.14 relied on the Swift 3.0 preview 2 version that comes with Xcode 8 beta 2. There is currently no way to download Xcode 8 beta 2 now that Apple has stopped hosting it upon the release of Xcode 8 beta 3. That was an oversight.
Vapor 0.15 will not rely on Xcode 8 beta previews and should be released in a few days.
Open Xcode and make sure the correct SDK is selected:
👀 Xcode > Preferences > Locations > Command Line Tools
Select XCode 8
Then continue with the tutorial you are following.

Printing in 4.2 SDK - would like to support 4.0 without app crashing

I'm trying to have printing in my application.
While this works, and I can indeed print from my application, I would like to be able to run my application on devices that aren't running iOS 4.2.
Even if I check the version before I run the code.
The method that prints the document has all of the classes that are being used to print.
Whenever I switch the simulator back to 4.1, I get a Symbol not found exception that displays the error:
dyld: Symbol not found: _OBJC_CLASS_$_UIMarkupTextPrintFormatter
Referenced from: /Users/Jack/Library/Application Support/iPhone Simulator/4.1/Applications/794534DB-DB53-42E7-A294-7E78FDD3899B/Documentation.app/Documentation
Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit
in /Users/Jack/Library/Application Support/iPhone Simulator/4.1/Applications/794534DB-DB53-42E7-A294-7E78FDD3899B/Documentation.app/Documentation
I don't want to discard the users who haven't upgraded to 4.2.
Any help appreciated.
Which compiler are you using? If you haven't, you should switch to LLVM GCC or LLVM to support automatic weak linking as described by Marco Arment in Supporting older versions of iOS while using new APIs.

UIKit SDK 3.0 error

I am using iphone_sdk_3.0_beta_5__9m2735 SDK.
When I try to compile my code using simulator 3.0 option I get following error. The code compiles for rest all simulator option ie 2.0, 2.1, 2.2, 2.2.1
While compiling my code I get following error
from /Users/videomac/manish/EXPLab/2009-05-27-11-20 myApp_LL_2/myApp_Prefix.pch:7:
In file included from /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:30,
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:11: error: syntax error before 'AT_NAME' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:19: error: syntax error before '}' token
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UILocalizedIndexedCollation.h:21: fatal error: method definition not in #implementation context
The errors are located in file UILocalizedIndexedCollation.h which is SDK file.I am using UIKit Framework of SDK 3.0. Can anyone tell me what should I do to remove this error?
I've traced this problem to be the compiler version being used. From what I can tell, [REDACTED] requires GCC 4.2 while iPhone SDK 2.x only works with GCC 4.0.
Here's a way to fix this.
In your Target Info, select Build separator and look for the section Compiler Version. Then:
Select the C/C++ Compiler Version row
Set the default to GCC 4.0
At the bottom-left control, hit Add Build Setting Condition
On the left, choose Device - iPhone OS 3.0
On the right, chose GCC 4.2
Repeat steps 3 to 5, now with Simulator - iPhone OS 3.0 on step 4.
Apple’s engineer had confirmed that they had a bug in UIKit framework:
We do have a simple workaround for this UIKit bug. In UILocalizedIndexedCollation.h change this:
UIKIT_EXTERN #interface UILocalizedIndexedCollation : NSObject
to
UIKIT_EXTERN_CLASS #interface UILocalizedIndexedCollation : NSObject
Denis2342
Firstly you should discuss beta products here.
However, this is not connected with the beta. You have an error in one of your own header filesprobably a missing '#end' statment.
BTW, google could have solved this for you rather than asking here.