Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Downloading image on iOS returns error "400: Bad Request"

Discussion in 'Scripting' started by FaxDev, Oct 22, 2015.

  1. FaxDev

    FaxDev

    Joined:
    Aug 31, 2015
    Posts:
    3
    Hello everyone,

    I want to load player avatar icons that are stored on a remote server. I am able to load them from my computer without issue and I can go to the URL using a browser without issue however when I attempt to load them in the game on the iOS device I get a 400 error. I have the NSAppTransportSecurity property "NSAllowsArbitraryLoads" key set to true in info.plist so it is not a security issue. Also I am using Unity 5.1.0f3

    Thank you
     
  2. GoofBall101

    GoofBall101

    Joined:
    Jul 25, 2015
    Posts:
    57
    When you load items in IOS it goes by their rules whenever I do it so you..... Cant download any code, so are you downloading the icons to the game? Are you using Apples Html, or javascript stuff they want you to use? Those are some of the things that cause a Security problem even though you might thing it won't. https://developer.apple.com/app-store/review/guidelines/
     
    FaxDev likes this.
  3. FaxDev

    FaxDev

    Joined:
    Aug 31, 2015
    Posts:
    3
    I am using the WWW class to load images like in this example (http://docs.unity3d.com/ScriptReference/WWW-texture.html). Is this not supported on iOS?