GitHubPopular icon indicating copy to clipboard operation
GitHubPopular copied to clipboard

run ios error fixed, 最近通过修改一些配置成功的安装了这个项目

Open zelinDavid opened this issue 6 years ago • 1 comments

iOS运行: 在此把修改的地方和大家分享一下,这些错误在其他问题中也有解答,我就综合一下。

  1. 'React/RCTBridgeModule.h' file not found 修改为 #import "RCTBridgeModule.h"
  2. /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); ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes) 在这个方法前面加上 (void)就行,写成 (void)SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes) 我解决了以上两个问题后在ios模拟器上能运行了,但在手机上不能运行。

还有的小伙伴说升级 react版本到0.43.1,也可以运行,大家试试吧,欢迎补充

zelinDavid avatar Dec 11 '17 01:12 zelinDavid

按照你上面的修改是能正常运行,可是在模拟器上一直卡在初始界面上~~

simplefeel avatar Jan 25 '18 11:01 simplefeel