2016-11-11 15 views
0

私はブラウザでローカルに開発するときに動作するionic v2.1アプリケーションがありますが、iosプロジェクトをビルドしてxcodeのipadでシミュレートすると、 django restフレームワークを使用して私のdjangoアプリケーションにhttps呼び出しを行うことに問題があります。

私は、任意のエンドポイントにhttpコールを発信できることを確認するためにテストを行い、エンドポイントをカールと他の方法でテストしたので、サービスがアップしていることがわかりました。私はまた、このポストに物事を試みました:CFNetwork SSLHandshake failed iOS 9 .plistファイルを更新しようとしています。

$scope.buttonPress = function(){ 

    // this one works - some random endpoint 
    $http.get('https://jsonplaceholder.typicode.com/posts/1').then(function(data){ 
    console.log(data.data); 
    }).catch(function(err){ 
    console.log('some err getting json placeholder'); 
    }); 

    // mine does not work in xcode, it just prints the .catch console.log in 
    // xcode console. this endpoint works any other time i try it accept 
    // through xcode. 
    $http.get('https://mycoolapp.menu/getBartenderInfo/').then(function(data){ 
    console.log(data.data); 
    }).catch(function(err){ 
    console.log('some err getting the info'); 
    }); 

} 

arbritaryを可能にするための.plistを更新するか、このような何かをやって:

<key>NSAppTransportSecurity</key> 
<dict> 
    <key>NSExceptionDomains</key> 
    <dict> 
     <key>mycoolapp.menu</key> 
     <dict> 
      <key>NSIncludesSubdomains</key> 
      <true/> 
      <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> 
      <true/> 
      <key>NSTemporaryExceptionMinimumTLSVersion</key> 
      <string>TLSv1.0</string> 
      <key>NSTemporaryExceptionRequiresForwardSecrecy</key> 
      <false/> 
     </dict> 
    </dict> 
が働いていません。

ご協力いただければ幸いです。私が問題の声明の中で批判的なものを残したなら、私に知らせてください。

答えて

関連する問題