React Native Build Commands Failed: PhaseScriptExecution … (domain=NSPOSIXErrorDomain, code=2)

前端 未结 14 2725
旧巷少年郎
旧巷少年郎 2021-02-12 09:45

Environment

Mac OS X Version 10.11.3 (15D21)
Xcode Version 7.2 (7C68)
Simulator Version 9.2 (SimulatorApp-643)
react-native-cli 0.1.10
node v5.5         


        
14条回答
  •  攒了一身酷
    2021-02-12 10:07

    Open Your Xcode project

    Run it

    You should have 2 errors from RCTSRWebSocket.m

    add (void) to the beginning of both line :

    SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
    

    become

    (void)SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
    

    Save and Re-run your project with Xcode or terminal. It should work for sure. I have tested all the solution before, this one is the only who worked for me.

提交回复
热议问题