问题
we've got a major project written in Kobold2D by Steffen Itterheim, (which is itself a wrapper for Cocos 2.1), and since upgrading to XCode 6.1/OS X 10.10, the new iOS 8 framework seems to render many parts of the Kobold-library and the Cocos implementation unusable, or it seems to need a rewrite.
- Has anyone updated a Kobold2D project successfully to iOS8 yet?
- Are there simple ways to upgrade it, or is it necessary to rewrite the entire library?
- If there are no simple ways to upgrade, has anyone migrated a project from Kobold to cocos 3 yet?
Any hints would be much appreciated!
Averett
PS. I have seen this question: How to convert Kobold2D into a new Cocos2D 3.x project? - but the answer is not very helpful, as this solution would omit iOS 8.
回答1:
We actually have created a script to make the necessary changes to Kobold2D. You can find it in this post: https://www.makegameswith.us/gamernews/406/xcode-6-fixes-for-kobold2d
Basically all you need to do is run
curl https://s3.amazonaws.com/mgwu-misc/xcode6_kobold_patch.sh | sh
in the terminal, when you are in the root folder of your project.
回答2:
I have just compiled my Kobold2D 2.1 project using XCode 6.0.1. It breaks initially at several lines, but it's easy to fix. I only found a couple of errors:
Multiple methods named 'setPosition:' found
Example:
[_target setPosition: newPos];Fix: cast the object to CCNode
[(CCNode*)_target setPosition: newPos];Do this for all errors found
You also need to import "ccNode.h" at the top of the file.
- Use of undeclared identifier 'MPMovieControlModeHidden'
I found that the #ifdef__ #endif enclosing the offending line was commented out. Uncomment them to fix the problem.
来源:https://stackoverflow.com/questions/26591350/how-to-update-kobold2d-2-1-project-to-macos10-10-xcode-6-1