缺少StoreKit.framework,编译报错:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_SKPayment", referenced from:
objc-class-ref in IAPHelper.o
"_OBJC_CLASS_$_SKProductsRequest", referenced from:
objc-class-ref in IAPHelper.o
"_OBJC_CLASS_$_SKPaymentQueue", referenced from:
objc-class-ref in IAPHelper.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Cocos2dx-2.2.5编译报错:_curl_rule_01_ declared as an array with a negative size
解决方案:在Valid Architectures下面删除arm64
真机测试提示:This application does not support this device’s CPU type.
未找到解决方案(cocos2d-x-2.2.5项目使用Xcode7、Xcode9在iOS11.2.1手机上测试,都会报这个错误)
解决方案:在Valid Architectures下面添加arm64,但是又会报错: _curl_rule_01_ declared as an array with a negative size(某些版本报错,cocos2dx-2.2.6正常运行)
有人说替换引擎的curl文件夹下的所有.h 文件,再把libcurl.a添加到工程中,即可解决这问题
网上一种解释如下:
It seems likely that you’re building your app as 32 bit. iOS 11 no longer supports 32-bit apps; you’ll have to build a 64-bit version.
In your project check the value of the Valid Architectures (VALID_ARCHS) and Architectures (ARCHS) build settings. The default values should do the right thing, so if you have any customisations you should remove them and try again.
It’s possible that building a 64-bit app will require some code changes on your part. The 64-Bit Transition Guide for Cocoa Touch has info about that.
真机测试提示 :Could not write to the device .
解决方案:clean一下项目或者重启Xcode