1
デバイスでテストできるIPアドレスを変更しようとしました。リアクションネイティブ。シミュレータが開発サーバーに接続できません
AppDelegate.mの行を変更した後、アプリケーションを再構築してサーバーを再起動しました(npm start)。
ご覧のとおり、サーバーはブラウザから表示され、すべて正常に機能しますが、アプリケーション内ではサーバーに接続できないというメッセージが表示されます。
jsCodeLocation = [NSURL URLWithString:@"http://192.168.1.1:8081/index.ios.bundle?platform=ios&dev=true"];
は、再起動プロジェクトの後、私は次を参照してください。
2016-07-01 13:12:07.949 PropertyFinder[10626:5440580] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
2016-07-01 13:12:09.964 [fatal][tid:main] Could not connect to development server.
Ensure the following:
- Node server is running and available on the same network - run 'npm start' from react-native root
- Node server URL is correctly set in AppDelegate
URL: http://192.168.1.1:8081/index.ios.bundle?platform=ios&dev=true
スクリーンショット:http://joxi.ru/RmzQBJKHWkJVOr
ソリューション: 私は持っていた私もSafariのシミュレータでこのIPをオープンしようとしたhttp://dl2.joxi.net/drive/2016/07/01/0001/2707/121491/91/faf405e34d.png
反応ネイティブスタートないNPMます。また、このように、次のNSExceptionDomainsキーに、Info.plistの中NSAllowsArbitraryLoadsキーを追加する必要が
私が最初に見ることができるようにあなたが_Appを修正する必要があるがトランスポートセキュリティがこの問題をクリアテキストHTTP_でブロックしました。これに続く_ [トランスポートセキュリティはクリアテキストHTTPをブロックしました](http://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http)_。 –