Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt iOS: access to local .js file
Forum Updated to NodeBB v4.3 + New Features

Qt iOS: access to local .js file

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 886 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tycos
    wrote on last edited by
    #1

    I'm developing an app on multiplatform. In particular my application download on local disk some .js files recalled from the qml-side. Under Android and Linux it's works, but under iOS simulator I've a strange message error:

    main.qml
    @
    import "file:script/MyJs.js" as MyJs
    @

    error during running:
    ASSERT: "!url.isRelative() && (QQmlFile::urlToLocalFileOrQrc(url).isEmpty() || !QDir::isRelativePath(QQmlFile::urlToLocalFileOrQrc(url)))"

    This error appears only on iOS simulator (I cannot try on real device for now). Can you help me?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, you are trying to do something forbidden on iOS i.e. modifying your app bundle. IIRC download code to run in your application is also something that's forbidden.

      You should rather use one of the official accessible folder that you can get through QStandardPaths::AppDataLocation but again, I'm not sure you'll be able to get your application through the AppStore with that download code part.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved