Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Problems accessing a picture on the iOS 10.2.1 using Qt 5.8
Forum Updated to NodeBB v4.3 + New Features

Problems accessing a picture on the iOS 10.2.1 using Qt 5.8

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 2 Posters 1.7k 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.
  • P Offline
    P Offline
    philippeb8
    wrote on last edited by
    #1

    So I am trying to access a file selected by the QML engine (so I know the file exists):

        QString path = "file:assets-library://asset/asset.PNG?id=FF324EBC-DC50-4F6A-8F72-E93CB26D91F5&ext=PNG";
    
        QFile file1(path);
        if (!file1.exists())
            qCritical() << "file1 not found";
    
        QFile file2(QUrl(path).path());
        if (!file2.exists())
            qCritical() << "file2 not found";
    
        QFile file3(QUrl(path).toLocalFile());
        if (!file3.exists())
            qCritical() << "file3 not found";
    
    

    And I get the 3 error messages. It used to work before but I guess the upgrade of iOS to 10.2.1 messes things up.

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

      Hi,

      Are you sure your id parameter is correct ?

      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
      • P Offline
        P Offline
        philippeb8
        wrote on last edited by
        #3

        Yes because it is a picture I select from the V-Play's camera roll. I hard coded the filename for this example.

        What's more funny is if I try to print recursively the contents of the root folder in C then I get the following listing (there is no such "asset" subfolder):

        [.Trashes]
        [Applications]
        [Developer]
        [Applications]
            [MobileReplayer.app]
            [_CodeSignature]
            [LaunchScreen.storyboardc]
            [PlugIns]
                [EAGLReplayControllerSupport.mrplugin]
                [_CodeSignature]
                [MTLReplayControllerSupport.mrplugin]
                [_CodeSignature]
        [Library]
            [Daemons]
            [PlugIns]
                [DTODRAssetStatus.bundle]
                [_CodeSignature]
                [IDEDebugGaugeDataProviders.bundle]
                [_CodeSignature]
                [en.lproj]
                [UIAutomation.bundle]
                [_CodeSignature]
            [Frameworks]
            [XCTest.framework]
                [_CodeSignature]
                [en.lproj]
                [Modules]
                [TextBasedStubs]
                [XPCServices]
                [xctestSymbolicator.xpc]
                    [_CodeSignature]
                [XCUIRecorderService.xpc]
                    [_CodeSignature]
            [LaunchDaemons]
            [Lockdown]
            [ServiceAgents]
            [PreferenceBundles]
            [Developer Settings.bundle]
                [_CodeSignature]
                [en.lproj]
            [PrivateFrameworks]
            [AccessibilityAudit.framework]
                [_CodeSignature]
                [Resources]
                [AccessibilityAuditCategories.bundle]
                    [_CodeSignature]
                    [Base.lproj]
                [AXAuditAXUIService.axuiservice]
                    [_CodeSignature]
                [en.lproj]
            [ARMDisassembler.framework]
                [_CodeSignature]
            [DTDDISupport.framework]
                [_CodeSignature]
                [en.lproj]
            [DTPerformanceSession.framework]
                [_CodeSignature]
            [DTXConnectionServices.framework]
                [_CodeSignature]
                [Modules]
            [DVTInstrumentsFoundation.framework]
                [_CodeSignature]
                [XPCServices]
                [com.apple.dt.instruments.dtactivity.xpc]
                    [_CodeSignature]
                [com.apple.dt.instruments.dtarbiter.xpc]
                    [_CodeSignature]
                [com.apple.dt.instruments.dtdtrace.xpc]
                    [_CodeSignature]
                [com.apple.dt.instruments.dtsecurity.xpc]
                    [_CodeSignature]
            [DVTInstrumentsUtilities.framework]
                [_CodeSignature]
            [GLTools.framework]
                [_CodeSignature]
            [GLToolsCore.framework]
                [_CodeSignature]
            [GPUTools.framework]
                [_CodeSignature]
            [GPUToolsCore.framework]
                [_CodeSignature]
            [GPUToolsiOS.framework]
                [_CodeSignature]
                [PlugIns]
                [EAGLCaptureAPISupport.gdtdplugin]
                    [_CodeSignature]
                [MTLCaptureAPISupport.gdtdplugin]
                    [_CodeSignature]
            [GPUToolsPlayback.framework]
                [_CodeSignature]
            [MTLToolsDeviceSupport.framework]
                [_CodeSignature]
            [ScriptProcessor.framework]
                [_CodeSignature]
                [en.lproj]
            [UIAutomation.framework]
                [_CodeSignature]
        [System]
            [Library]
            [CoreServices]
        [usr]
            [bin]
            [lib]
            [swift]
                [iphoneos]
            [libexec]
            [GPUToolsiOS.framework]
                [_CodeSignature]
                [PlugIns]
                [EAGLCaptureAPISupport.gdtdplugin]
                    [_CodeSignature]
            [share]
            [kpep]
            [man]
                [man1]
        [Library]
        [System]
        [bin]
        [cores]
        [dev]
        [private]
        [sbin]
        [usr]
        
        

        I mean what is this?

        1 Reply Last reply
        0
        • P Offline
          P Offline
          philippeb8
          wrote on last edited by
          #4

          All I know so far is that the AssetLibrary.framework is deprecated and replaced by the Photos.framework. This is most likely what is going on here.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            philippeb8
            wrote on last edited by
            #5

            Ok today it works. I didn't do anything except rerunning "qmake". Sorry for the noise...!

            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