cocos 2d project cant convert to objective ARC - objective-c

I am developing a cocos2d game, I tried to converted the code to Objective c ARC,
But it shows some issues in the cocos 2d library.
How can I convert a cocos2d application to Objective C ARc.
Is there any new release of cocos2d which is ARC compatible,
Thanks in advance

Cocos2d-iphone v1.1 (beta) and 2.0 (beta) are compatible with ARC - but only if you build cocos2d-iphone into a static library. There's no official instructions or template project yet.
Tiny Tim Games has a tutorial on that, and Ray Wenderlich has an alternative solution.
And Kobold2D gives you ARC for cocos2d-iphone out of the box, plus all the nitty-gritty information about ARC that'll help you with the follow-up questions you'll have sooner than later.

You can disable ARC on a file-by-file basis. For each element of the Cocos2D Library, apply the technique of How can I disable ARC for a single file in a project?

Related

ObjC, Swift to WinObjC

I have an iOS app which includes both objective c and swift. Does the winobjc tool support converting the iOS apps which includes both objective c and swift code?
I work on the Windows Bridge for iOS at Microsoft. We're getting more and more questions about Swift support and it's clearly a top priority for the community. Now that Apple has open sourced large parts of Swift, we're considering our options and the technical implications of implementing it.
We regularly update our roadmap on our project wiki with our plans for the next month or two, so there is the best place to check for near-term plans. If you try out the bridge and have any questions, please don't hesitate to get in touch by filing an issue on Github. Thanks for checking out the bridge!
No, WinObjC only supports Objective-C but no Swift at this point.
It also doesn’t seem to be on their roadmap at this point.

file browser for webdav ios7

I have been looking for a packet/library with a file browsing capability for WebDAV, which I could use for my project in objective c, using xcode 5.1. so far the best I have found is GDFileManagerKit. but it still has stuff unsupported by my ARC such as AFNetworking version used. I do not want to alt the code of this library since it requires many changes. I would like to know if there is a better library or without me having to use AFNetworking version 1.
Thank you and please bear with me if this question is very novice. I am new to objective c xcode and iOS
You could use one of several free libraries, for example WTClient. Yet, every library I have seen is not using ARC, instead managing memory without the garbage collector.

Converting Apple's MVC Networking sample to ARC

Has anyone converted the Apple MVC Networking sample to ARC?
http://developer.apple.com/library/ios/#samplecode/MVCNetworking/Introduction/Intro.html
As a new iOS developer I am very interested in ARC and attempted the conversion w/o success, sent a few emails to Apple, no response.
During the conversion there were some CF functions that I couldn't bridge correctly and there were all kinds of memory issues and exceptions.
Currently I don't have an example, just wanted to see if anyone else has been though the conversion, Google didn't help me out this time :)
Thanks
Just curious but why are you trying to do this conversion? If you are integrating this example into a project that already runs with ARC, you can exclude the source files that aren't ARC explicitly in the Compile Source section of your build phases in the Target.
If you want to try this, select the sources that don't have ARC and hit enter. A dialog should appear where you can enter:
-fno-objc-arc
Hope this helps.
XCode 4.3.2 has a new feature to convert projects to ARC.
Edit->Refactor->Convert to Objective-C ARC
Should get you going in no time!

Does cocos2d support ARC?

I am using Xcode 4.2 and building a game for iphone (from iOS 3.0 - 5.0). Does cocos2d support ARC? What modifications needs to be made to convert code written in previous versions?
If I use the strong and weak keywords for variables and set compiler to LLVM GCC 4.2, what will be the results? Is it a necessity to change compiler to 3.0 to support ARC?
Cocos2d v1.1 and v2.0 are compatible with ARC. However, the cocos2d code itself does not use ARC and there are no templates provided by cocos2d that you can use to start programming with ARC. You are required to add a seperate static library target for the cocos2d files yourself.
As Ankit pointed out, Tiny Tim Games made the necessary changes to a forked version of cocos2d-iphone to make it ARC compatible. These changes have been integrated into the development version and should be available in the cocos2d v2.x branch. I've since written a tutorial to enable ARC in a cocos2d (2.0) project.
It was said that cocos2d itself will be converted to use ARC internally in v2.1 or v2.2.
It's important to note that there are no plans to officially support ARC in the cocos2d v1.x branch because the v1.x line is supposed to remain backwards compatible with 1st generation devices and iOS 3.x. But general ARC compatibility has been added to v1.1.
Kobold2D fully supports ARC and has it enabled in all 15 template projects for almost two months now. Kobold2D uses the latest stable versions of cocos2d-iphone 1.x and 2.x. Just start a new Kobold2D project and you're set to work with cocos2d and ARC.
Even though Cocos2d does not support arc but there is way in which you can use both of them together, and that is by cross project referencing. You can learn how to do it by refering this.. cocos2d and ARC
Even easier, just get my cocos2d-ARC template here: https://github.com/Elland/Cocos2d-iphone-ARC-template hassle free, just rename the project to your desired name and you're set :)

Android and Objective-C

I'm completing a project for the iPhone entirely written in Objective-C. I'd like to port this for Android too.
While the user interface of the iPhone and the Android OS are very different and will need different code, can I some how import the core of my code (ie. the black box that does the thinking) as is to Android as part of some Java code?
I have no familiarity with bridging between Objective-C and Java even though I have written in both.
You got luck! Phil Hassey has recently ported his own game from iPhone to Android within a week and wrote up what he did steps by steps. Here is his journey: http://www.philhassey.com/blog/2010/08/03/porting-galcon-using-the-android-ndk/
You could have a look at Apportable which allows to generate an Android app from an existing Objective-C code base. See this article too.
there is a fork of the gcc that supports objective-c on the android by patching the NDK on
http://code.google.com/p/android-gcc-objc2-0/. But it's considered beta at the moment and i'm not sure if jni/java bridges are already implemented
I have been doing a lot of work on this front — for example by creating my own C++ base framework that does not depend on STL (called Platform Core) and writing the core of the next version of my iOS app with that, so that I can easily port it to Android and whatever else has a C++ compiler and strikes my fancy.
I suggest having a (ick, I can't believe I'm about to say this, but eh), ahem, having a C++ core (there, I said it!) so it can be easily ported.