Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Unsolved Writing IOS app logfiles to public accessible folder QStandardPaths

    QML and Qt Quick
    4
    7
    1789
    Loading More Posts
    • 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.
    • E
      esther last edited by esther

      hi our app runs on windows. android && IOS tablets and phones
      we write logfiles for troubleshooting and customer issues ...

      on windows, using QStandardPaths::writableLocation(QStandardPaths::TempLocation); which works great

      on android I use QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); which allows me to both view && pull logs via myFiles application && adb .... files reside in internalStorage/Document

      but I cant seem to either view or pull logfiles on IOS tablet ...
      I have tried ITunes , and various other file manager and plugging tablet into my desktop .... I tried using various folders like photos which are public

      Do you have any advice on what folder I can write logfiles to on IOS so I can view /or pull them off a tablet ?

      thanks in advance

      J.Hilk 1 Reply Last reply Reply Quote 0
      • J.Hilk
        J.Hilk Moderators @esther last edited by

        Hi @esther
        I am not sure, if you can access Data that way on IOS.
        My guess would be, you need to fall back on native code and either send those files via E-Mail or AirDrop

        But I‘m not so deep into this, mabe someone else knows more.

        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct

        Qt Needs YOUR vote: https://bugreports.qt.io/browse/QTQAINFRA-4121


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply Reply Quote 0
        • E
          esther last edited by

          thank you but I did not want to go the nativeApi route ... for sure that would work
          I want to keep the solution in the QT space

          1 Reply Last reply Reply Quote 0
          • T
            timday last edited by

            On iOS to get at an apps' files you need to enable "file sharing" for an app by setting UIFileSharingEnabled to YES in the plist, and then I think the files will need to be in the app's "Documents" area, and then you can access them via iTunes. It's a bit clunky (especially as so far as I remember iTunes only lets you deal with top level files and won't copy multiple files or directory hierarchies). That's how I was doing things a few years ago anyway; not sure if better ways have appeared since then.

            1 Reply Last reply Reply Quote 2
            • E
              esther last edited by esther

              I tried this using ITunes 12.6 and I did not see the file I created using QStandardPaths::DocumentsLocation

              I did use UIFileSharing YES in the plist ...
              Additionally I added LSSupportsOpeningDocumentsInPlace YES

              Here is where QT is putting my logfile based on using Standard path DocumentsLocation
              fullLogFileName=/var/mobile/Containers/Data/Application/50BAE524-BF87-4820-9092-3AB9C8036419/Documents/MyAppName/MyAppLog.txt
              (I created the MyAppName folder)
              I don't believe this is the correct path for ITunes ...
              Should I be using QStandardPaths::AppDataLocation ???

              Has anyone had success ?

              1 Reply Last reply Reply Quote 0
              • E
                esther last edited by

                I have updated my Itunes and I am seeing the logfiles now through ITunes ...

                please consider this topic closed

                1 Reply Last reply Reply Quote 1
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  Hi,

                  You can mark it as solved using the "Topic Tools" button :)

                  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 Reply Quote 0
                  • First post
                    Last post