'SecRandomCopyBytes'的冲突类型

时间:2017-10-03 11:51:00

标签: ios objective-c xcode

当我尝试存档我的应​​用程序的新版本时,我在xCode上收到错误,我无法确定它的来源以及如何解决它。

从xcode查看printscreen:Screenshot

1 个答案:

答案 0 :(得分:5)

iOS 11改变了该方法的签名。

你可以试试这个

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000
extern int SecRandomCopyBytes(SecRandomRef rnd, size_t count, void *bytes) __attribute__((weak_import));
#else
extern int SecRandomCopyBytes(SecRandomRef rnd, size_t count, uint8_t *bytes) __attribute__((weak_import));
#endif

来源:https://github.com/RNCryptor/RNCryptor/issues/248

相关问题