Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conflicting types for 'SecRandomCopyBytes'

I get an error on xCode when I'm trying to archive a new version of my app and I can't figurate out where it come from and how can I fix it.

Look at the printscreen from xcode: Screenshot


1 Answers

iOS 11 changed the signature of that method.

You can try this

#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

Source : https://github.com/RNCryptor/RNCryptor/issues/248

like image 60
Amit Battan Avatar answered May 23 '26 13:05

Amit Battan