Search Unity

Loading asset bundles on iOS device

Discussion in 'Asset Bundles' started by wolfu, Aug 24, 2017.

  1. wolfu

    wolfu

    Joined:
    May 3, 2017
    Posts:
    3
    I am asking this question again, because nobody answered previous one in Help Room, and I still cant find the solution. Hopefully this time, someone could help me.

    I have a problem loading asset bundles from local server or Amazon CDN on Ipad and Iphone, it always return me an error :

    The AssetBundle 'bundleName' could not be loaded because it is not compatible with this newer version of unity runtime. Rebuild the AssetBundle to fix this error.

    I am using Unity 5.6.1p4 , and AssetBundles are loading perfectly in editor, standalone build and Android devices. I am sure asset bundles are built for iOS platform on same Unity version, I am loading bundles using WWW.LoadFromCacheOrDownload() ,and asset bundle version is set higher than previous one.

    This problem is bugging me for over a week, and I just cant find any lead,neither anything similar here.

    Anyone had this problem before?

    Thanks
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,735
    Try doing a simple file download and then load the bundle using AssetBundle API. If that fails to, check the download file to be sure what is downloaded is the correct file.
     
  3. JDMulti

    JDMulti

    Joined:
    Jan 4, 2012
    Posts:
    384
    Did you upload it as Binary file to the server? FPT clients in general don't do this by default. If you use Filezilla you must set this by hand from ASCII to Binary. Actually this was an issue I had when everything seemed to be fine and a search hit on google pointed me on this fact after being clueless for few hours. At some level it's logical as the assetbundle contains binary data, but you won't link it to the fact your FTP client doesn't upload by default as binary but ASCII.

    I hope you have the same issue and this helps. =)
     
  4. wolfu

    wolfu

    Joined:
    May 3, 2017
    Posts:
    3
    @Aurimas-Cernius I've tried loading AssetBundle from StreamingAssets, and tried loading it UnityWebRequest and always returns me the same error. I am sure I downloaded bundles from server.
    @JDMulti I am using AWS S3 , and I think all bundles are uploaded as Binary on server.
     
  5. wolfu

    wolfu

    Joined:
    May 3, 2017
    Posts:
    3
    I've finally succeded in loading bundles on device. The thing was scripting backend was set on Mono2x , and for iOS arm should be set to IL2CPP.
     
    ilmario likes this.
  6. willymoral

    willymoral

    Joined:
    Feb 7, 2018
    Posts:
    1
    Hi Wolfu,
    Could you post the code?