Terminating app due to uncaught exception ‘NSInternalInconsistencyException’, reason: ‘No foreground window scene found at startup’
terminating due to uncaught exception of type NSException:我是在windows用Unity导出的Xcode工程,我换到Mac电脑导出Xcode工程就不报这个错误了。
.mm文件是无法使用swfit的代码的!!!要用.m
在为OC项目创建一个swfit文件,Xcode会提示帮忙创建一个桥文件。我在.mm文件中引用这个桥文件 “#import <Unity-iPhone-Bridging-Header.h>”,并调用SDK里的方法报错"Use of undeclared identifier xxx",我改成"#import <xxx/xxx-swift.h>",虽然可以调用SDK的方法,但是编译报错,SDK类继承的父类报错:“No type or protocol name ‘xxx’”,后来大佬告诉我.mm文件是无法使用swfit的代码,要用.m
Encountered an error communicating with IBAgent-iOS:权限问题,控制台输入 sudo chmod 777 ~/Library/Logs 重启电脑和Xcode 参考: https://zhidao.baidu.com/question/1055736355056691179.html
OC。Json转NSMutableDictionary(可变字典):
NSData* jsonData = [str dataUsingEncoding:NSUTF8StringEncoding];
NSError* error = nil;
NSMutableDictionary* dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error];
关键是 options:NSJSONReadingMutableContainers 这个属性
参考:https://blog.youkuaiyun.com/shanggquan/article/details/51499797