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

前端 未结 14 2480
旧巷少年郎
旧巷少年郎 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:05

    For me, I needed to upgrade my version of XCode from Yosemite to Sierra.

    This can be done via App Store > Updates.

    0 讨论(0)
  • 2021-02-12 10:06

    For me port 8081 was in use :

    lsof -n -i4TCP:8081

    0 讨论(0)
  • 2021-02-12 10:06
    1. Open your react-native project in Xcode
    2. Create a new schema with project name.
    3. the problem will be solved
    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-12 10:08

    Surprisingly, this was the solution for me: Open the file Views/RTCScrollView.m in Xcode and change the variable _refreshControl to refreshControl. All occurrences of _refreshControl were already marked as errors. The new code becomes:

    - (void)setRefreshControl:(RCTRefreshControl *)refreshControl
    {
      if (refreshControl) {
        [refreshControl removeFromSuperview];
      }
      refreshControl = refreshControl;
      [self addSubview:refreshControl];
    }
    
    0 讨论(0)
  • 2021-02-12 10:11

    For me I just needed to edit the iOS project build settings

    Product Bundle Identifier was not set

    You need to set it for both the Project and 2 Targets

    0 讨论(0)
提交回复
热议问题