unity工程打包xcode工程后,在真机运行时进入不了游戏,xcode报这个错误:
A错误:[__NSCFNumber surface]: unrecognized selector sent to instance 0xb000000e6bd79a83
产生这个错误时,一脸懵逼,以为是自己的代码出错了,
后来发现这个错误是在解决
B错误:ARC forbids explicit message send of 'release'这个错误所用的方法产生的问题
解决B错误有两个方法:
点击项目名,在中间一栏选择targets,然后选择build phases选项。
展开Compile Sources,找到你报错的文件名,然后双击添加-fno-objc-arc
2:把整个项目改成非arc机制的:
在build Settings中:把Objective-C Automatic Reference Co....设为NO:
当用方法2的时候就会产生A的报错,使用方法1A和B的错误都解决