Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Addressables not loading on iOS device

Discussion in 'Addressables' started by jeff_unity547, Jan 8, 2020.

  1. jeff_unity547

    jeff_unity547

    Joined:
    Aug 2, 2019
    Posts:
    9
    I am having a hard time getting the Addressable functionality working on an iOS device. I am able to load everything fine on an Android device but the same cannot be said for iOS. I currently have a few *.json files that I am attempting read in at runtime and then load game objects based on the information from the json file. The folder structure for the files is Assets/Files/.json. The assets are assigned as addressable and I have them labeled as Files in the Addressable window.

    When I create a build on Android, everything works as intended. When I load onto an iOS device it acts as though the *.json files are not found and that creates an empty list and then no game object is rendered.
    Is there something I am not understanding about addressables and how they work on iOS?

    It is my understanding that anything in the addressables will be placed in the location where the streaming asssets would reside. This suppose to make it cross platform, however, I am seeing that I don't see the files physically exist in that folder. I do see that they exist in the configuration files and appear to be referenced correctly. I have been fighting this for a couple days and I can't seem to figure it out.

    I am also building with Unity Cloud and I have the addressables turned on and I have it building the player content on every build.

    Thanks for any help!
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Well, it definitely should work. We've done plenty of local ios loading. I don't think we've loaded json files out of bundles, though we load them directly (the catalog is a json file).

    Sounds like you may be hitting some sort of project specific edge case. If you want to debug it yourself, I'd do some logging in the providers. Are we finding & loading the asset bundle? If not perhaps something is going weird in cloud build, and you could try a local build? If so, perhaps the next provider is not loading properly out of the bundle?
    Alternatively you could file a bug against Unity with a repro and we could look into it.
     
    jeff_unity547 likes this.
  3. jeff_unity547

    jeff_unity547

    Joined:
    Aug 2, 2019
    Posts:
    9
    I don't know if this makes a difference but do Canvas UI prefabs not load on iOS when using Addressables? I realized that most of my addressable prefabs were Canvas UI elements. They were showing up on Android so I am not sure if those particular prefabs have an issue with iOS. I will be looking at the logs this upcoming week and will post any further information about what I find.
     
  4. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    I'm not aware of any issues. Keep in mind the package is open source, so you are welcome to copy it into your project, set breakpoints, and add debug logs.
     
    jeff_unity547 likes this.
  5. jeff_unity547

    jeff_unity547

    Joined:
    Aug 2, 2019
    Posts:
    9
    Thanks! I can do that
     
  6. tencnivel

    tencnivel

    Joined:
    Sep 26, 2017
    Posts:
    39
    I am also having a hard time with making addressables work on iOS. It works fine on Android, it works fine as well in the editor with "Play Mode Script" set to "Use Exsiting Build" but on iOS devices it is not working or half working.

    I am using the two functions 'Addressables.LoadAssetAsync' and 'Addressables.LoadSceneAsync'.

    On an iPad pro 2015 with iOS13 'Addressables.LoadAssetAsync' but 'Addressables.LoadSceneAsync' doesn't.
    On an iPhone 6 with iOS12 nothing works or it does work but only for some builds and not for all assets...

    this gives a terrible impression of unrobusteness of the Addressable system for iOS compared to Android
     
  7. NiteDev_

    NiteDev_

    Joined:
    Oct 11, 2014
    Posts:
    19
    @unity_bill I'm also with an issue atm with addressables, atm my project platform is iOS at editor and when I build at cloud build for Android, Addressables show me this errors:

    MissingMethodException: Default constructor not found for type UnityEngine.ResourceManagement.AsyncOperations.ProviderOperation`1[[UnityEngine.AddressableAssets.Initialization.ResourceManagerRuntimeData, Unity.Addressables, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]

    AND

    Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.GameObject], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=300c38379ceb20342881b93070bb8f30, Type=UnityEngine.GameObject

    I've made the builts, and I just trying to instantiate prefabs with instantiateAsync... our project is moving some parts of the game to use Addressables but we cannot test on Android cuz of this issues, I also added link.xml to the Asset folder cuz codeStripping was giving me some errors.

    I'm losing my mind with this, any help?
     
  8. Reivilox

    Reivilox

    Joined:
    Mar 5, 2018
    Posts:
    1
    I have this exact error while running on my brand new iPhone SE.
    In the editor and on Android devices everything works perfectly.

    I've been losing my mind over this for the last 2 days.

    Any luck on fixing it since you posted?

    EDIT: Wow I just fixed it build rebuilding my addressable for like the hundredth time.
    Only thing different I think I did was clear the whole cache first.
     
    Last edited: Oct 7, 2020
  9. tencnivel

    tencnivel

    Joined:
    Sep 26, 2017
    Posts:
    39
    Following my previous post, here is what I've found. There was an 500 HTTP error on the server side (a Cloudflare worker). The server side was complaining that there are some additional the GET request has a body. ,

    I have switched to another CDN. This is obviously a workaround and I believe something should be done about it.
     
  10. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    We have been having issues with IOS and addressables for a long time now. Android works perfectly, Editor using live addressables (IOS) also works perfectly, but on actual Apple hardware it fails, debugging it iOS can cause random CRC check failures when downloading new addressables, so turning OFF Asset Bundle CRC was looking promising as my addressables actually loaded first time and all updated. However i come back to work today loaded the app and the PREVIOUS build of addressables is now loading not the latest.

    We have literally had this issue for weeks, but ive been putting it off as i have plently other work to get on with, however this is the only thing left and its driving me mad, i dont understand how its been 2 years since people are reporting this issue but it still exists....
     
  11. SavedByZero

    SavedByZero

    Joined:
    May 23, 2013
    Posts:
    124
    Same — I keep getting content build failure with my addressables on iOS (after SBP error and some other red flag messages from visual C# computer 3:5 just giving an all rights reserved notice), even after cleaning the build, but it works fine with android and WebGL. This isn’t giving me a whole lot of faith in this particular feature.
     
  12. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    Oh god... I'm just about finished converting our three projects to use Addressables and seeing all these issues pop up and seeing it's widespread and ongoing... This is discouraging. 85% of our users are on iOS. A solution that doesn't load or uses previous versions of assets is an absolute no-go for us.

    Anyone have consistent success using Addressables on iOS/Android? We're just looking to put a bunch of Sprites on there for now, but we're looking at models, prefabs, materials... all that stuff.
     
  13. SavedByZero

    SavedByZero

    Joined:
    May 23, 2013
    Posts:
    124
    For what it’s worth, my issue *seems* to be fixed by closing Unity, deleting the library and temp folders, reopening it and trying again.
     
    Schneider21 likes this.
  14. Hazardio

    Hazardio

    Joined:
    Nov 19, 2018
    Posts:
    25
    Maybe this can help you (Addressables 1.21.2) : https://forum.unity.com/threads/una...-android-devices-1-21-2.1393636/#post-8772751
     
    Schneider21 likes this.
  15. knall_frosch

    knall_frosch

    Joined:
    Feb 24, 2018
    Posts:
    6
    Hi,

    same problem:

    Adressables is not working on iOS (iPad OS 16). I am on Editor with Unity LTS 21.3.19 and Addressables 1.19.19

    The issue I found was, that "EditWeBRequestURL" is not getting called and therefore It loads the wrong paths from the catalog json. On Android, everything is working great. Anyone else with this issue?

    Best