更新了Xcode, 报错:'system' is unavailable: not available on iOS
来源:互联网 发布:ubuntu 14.04卸载内核 编辑:程序博客网 时间:2024/05/22 03:49
针对iOS11废除了system之后,报错:'system' is unavailable: not available on iOS的一些修改如下:
1.修改了CCFileUtils.cpp文件
参考:https://github.com/cocos2d/cocos2d-x/pull/17921/files
2.修改了AssetsManager.cpp文件
参考:http://www.cocoachina.com/bbs/read.php?tid=1725915&page=1&toread=1#tpc
3.cocos2d_lua/external/lua/Ioslib.c文件还有报错,原因是system方法在iOS11中已经被移除了,
修改:
1.添加了:
#include <ftw.h>
和
int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf)
{
int rv = remove(fpath);
if (rv)
perror(fpath);
return rv;
}
2.替换
lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));
为
lua_pushinteger(L, nftw(luaL_optstring(L, 1, NULL), unlink_cb, 64, FTW_DEPTH | FTW_PHYS));
1.修改了CCFileUtils.cpp文件
参考:https://github.com/cocos2d/cocos2d-x/pull/17921/files
2.修改了AssetsManager.cpp文件
参考:http://www.cocoachina.com/bbs/read.php?tid=1725915&page=1&toread=1#tpc
3.cocos2d_lua/external/lua/Ioslib.c文件还有报错,原因是system方法在iOS11中已经被移除了,
修改:
1.添加了:
#include <ftw.h>
和
int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW *ftwbuf)
{
int rv = remove(fpath);
if (rv)
perror(fpath);
return rv;
}
2.替换
lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));
为
lua_pushinteger(L, nftw(luaL_optstring(L, 1, NULL), unlink_cb, 64, FTW_DEPTH | FTW_PHYS));
阅读全文
1 0
- 更新了Xcode, 报错:'system' is unavailable: not available on iOS
- 'system' is unavailable: not available on iOS
- unavailable function 'system': not available on iOS xcode 升级后 cocos项目报错
- unavailable function 'system': not available on iOS
- unavailable function 'system': not available on iOS
- 解决Call to unavailable function 'system': not available on iOS
- Call to unavailable function 'system': not available on iOS
- call to unavailable function system not available on ios
- Xcode9.0 编译时报错:Call to unavailable function 'system': not available on iOS
- cocos2d-x 3.3连接Xcode9编译时报错:call to unavailable function system not available on ios
- Call to unavailable function 'system': not available on iOS问题的解决方案
- xcode9 cocos call to unavailable function system not available on ios
- Call to unavailable function 'system': not available on iOS问题的解决方案
- cocoapods 安装第三方库,然后运行项目,报错(sharedApplication' is unavailable: not available iOS (App Extension))
- Attribute Unavailable: Automatic Preferred Max Layout Width is not available on iOS versions prior t
- Attribute Unavailable: Automatic Preferred Max Layout Width is not available on iOS versions prior t
- Attribute Unavailable: Automatic Preferred Max Layout Width is not available on iOS versions prior t
- 警告:Attribute Unavailable Automatic Preferred Max Layout Width is not available on iOS versions pri
- 递归简单总结
- shell脚本比较两个文件夹
- MJExtension使用指导
- POJ 1375 求圆外一点引圆的切线
- Android 5.0(Lollipop)事件输入系统(Input System)
- 更新了Xcode, 报错:'system' is unavailable: not available on iOS
- Words from new tab in mac
- apk的包名到底是谁来决定(package和applicationId)
- base家族:base16、base32和base64,转码原理
- 把本地文件拖入chrome浏览器时不预览文件的解决方式
- GPUimageMovie 播放视频时间纠正
- Git 远程操作详解
- 7-116 修理牧场(25 分)
- Java序列化与反序列化