Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88757

Assertion failed: (sm_pSharedApplication), function getInstance, file /xxx/cocos2d/cocos/platform/ios/CCApplication-ios.mm, line 71

$
0
0

@923654855 写道:

Hi,

I created a new iOS project, so app delegate is in objective C. Then I have a class that tries to create a bridge between objective C code and c++, but it crashes at the very first step :

cocos2d::Application *app = cocos2d::Application::getInstance();
The error I get is in CCApplication-iOS.mm in the getInstance() method, when it asserts the presence of sm_pSharedApplication :

CC_ASSERT(sm_pSharedApplication);
I got that error :

Assertion failed: (sm_pSharedApplication), function getInstance, file /xxx/cocos2d/cocos/platform/ios/CCApplication-ios.mm, line 71.
Does anyone have an idea about why I got this behaviour ?

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88757

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>