Running react-native app on iOS device using offline bundle

前端 未结 6 1148
广开言路
广开言路 2020-12-14 09:37

The official React Native documentation to run app on iOS device using offline bundle says

Open ios/YourApp/AppDelegate.m

Uncomment the line, jsCo

6条回答
  •  旧巷少年郎
    2020-12-14 10:09

    First I would make sure I have ios-deploy installed.

    You can do so by running npm install -g ios-deploy

    Then connect the iphone you want the app to be installed in into your mac.

    Then run

    react-native run-ios --device "ABC’s iPhone" --configuration=release
    

    This would create a offline js bundled app and install it onto the iphone.

    PS: If it errors out saying

    Signing for "" requires a development team. 
    Select a development team in the project editor.
    

    Then open up the project inside ios/ in Xcode and Select the target -> General Tab Under signing choose the signing team and choose automatically manage signing.

    Then save and re-run the command.

提交回复
热议问题