Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS运行编译的时候报错 #8

Closed
Feng999 opened this issue Nov 2, 2016 · 2 comments
Closed

iOS运行编译的时候报错 #8

Feng999 opened this issue Nov 2, 2016 · 2 comments

Comments

@Feng999
Copy link

Feng999 commented Nov 2, 2016

您好,在执行react-native run-ios后,提示BUILD FAILED,具体信息如下:
./ReactNative/GitHubPopular/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:494:3: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result] SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes); ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./ReactNative/GitHubPopular/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:1334:5: error: ignoring return value of function declared with warn_unused_result attribute [-Werror,-Wunused-result] SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key); ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated._
求指教~

@crazycodeboy
Copy link
Owner

fix in #1

@Feng999
Copy link
Author

Feng999 commented Nov 2, 2016

在中文官网找到了答案:

SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
改为
(void)SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);即可。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants