CCFileUtils.cpp Call to unavailable function 'system': not available on iOS

CCFileUtils.cpp Call to unavailable function 'system': not available on iOS
0.0 0


I upgraded my iOS to the 11 version, and my xCode to the 9 version and cocos2d-x library (3.15) does not compile fine.

This is my error:
/Users/admin/Desktop/Game/MyCppGame/cocos2d/cocos/platform/CCFileUtils.cpp:1429:9: Call to unavailable function 'system': not available on iOS

I read that system function is not available on iOS 11 and I will need use nftw instead of system.

This issue has been fixed by coco2d-x team? If the answer is yes, how can I upgrade my coco2d-x version without creating a new project? What is the easy way?

In my SQLite class I use:
std::string filePath = FileUtils::getInstance()->getWritablePath() + "db.sqlite3";

This method is deprecated? What can I use instead of getWritablePath?





Hi @mars3142, thanks for your comments!
If the cocos2d-x team fixed this issue, i prefier upgrade to the last version instead of fix the issue manually. How can I do that?

I saw these changes:


I’d just pull the latest from GitHub


How could I do that if I use builtin Cocos2d-x Engine of Cocos Creator


When will the fix be ready for Cocos Creator?


as @zhangxm mentioned here Remove `system` to fix compiling error with iOS 11, we can expect new Cocos Creator will be rolled out with cocos2d-x v3.16


For Cocos Creator users, i think you can modify Build\jsb-default\frameworks\cocos2d-x or wait new Cocos Creator version.


It would be great to have a quick fix for Cocos Creator – modifying the cocos2d-x version bundled with it leads to new errors:

'jsapi.h' file not found

Thanks for all your efforts!


The PR is included in Cocos Creator.


So the current version of Cocos Creator will eliminate the iOS 11 compilation issues?


We just released Creator v1.6.2. Give that a try now.