2017-06-05 113 views
0

我無法加載這張圖片,請幫助我! 我的info.plist>無法加載圖片HTTP

<key>NSAppTransportSecurity</key> 
<dict> 
    <key>NSExceptionDomains</key> 
    <dict> 
     <key>localhost</key> 
     <dict> 
      <key>NSExceptionAllowsInsecureHTTPLoads</key> 
      <true/> 
     </dict> 
    </dict> 
</dict> 

我的代碼>

 <View style={{flex: 1, flexDirection: 'row'}}> 
     <Image 
     source={{uri: 'http://ro-character-simulator.ratemyserver.net/charsim.php?gender=1&job=40&hair=1&viewid=0&location=256&direction=0&action=1&hdye=1&dye=0&framenum=0&bg=0&cart=&mount=0&shield=0&weapon=0&animate=1&rand=9725591', width: 50, height: 50}}/> 
     </View> 

回答

0

需要允許形式的Xcode設置。 enter image description here

+0

謝謝工作! ]] –

+0

您的歡迎。 :) –

0

我認爲你需要在一個更關鍵的Info.plist

<key>NSAppTransportSecurity</key> 
    <dict> 
     <key>NSAllowsArbitraryLoads</key> 
     <true/> 
     <key>NSExceptionDomains</key> 
     <dict> 
      <key>localhost</key> 
      <dict> 
       <key>NSExceptionAllowsInsecureHTTPLoads</key> 
       <true/> 
      </dict> 
     </dict> 
    </dict>