How to update Kobold2D 2.1 project to MacOS10.10 / XCode 6.1?

可紊 提交于 2019-12-11 11:07:49

问题


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:

  1. 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.

  1. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!