Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132412

Qt6::QIosOptionalPlugin_NSPhotoLibraryPlugin prohibits -ObjC from using

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.7.3
    • Build System: CMake
    • None
    • iOS/tvOS/watchOS

    Description

      this (perhaps) is related to QTBUG-120676 FileDialog does not open when pre-set to open Pictures Library in iOS - Qt Bug Tracker.

       

      So when I have this solution to use iOS native picker with CMake:

      target_link_libraries(${TARGET_NAME} PRIVATE "${QT_HOST_PATH}/../ios/plugins/platforms/darwin/libqiosnsphotolibrarysupport.a")
      qt_import_plugins(${TARGET_NAME} INCLUDE Qt6::QIosOptionalPlugin_NSPhotoLibraryPlugin)

       

      I cant use additionaly:

      target_link_options(${TARGET_NAME} PUBLIC -ObjC)

       

      otherwise when build I get error:

      • which symbols are those I cant tell (dont know how, or if xcode actually can even tell me)

       

      unfortunatelly, linking c++ and ios sdk for Firebase (which is needed for any major app) REQUIRES to add "-ObjC" to to "OTHER LINKER FLAGS" in order for Firebase to properly initialize().

       

      So at this point, I can ether use NativePicker or Firebase notifications, not both .

       

      The only think I google up as "possible" workaround is: MLVisionTextModel duplicate symbols with React Native · Issue #487 · firebase/quickstart-ios

      but unfortunatelly this does not work...

       

      minimal code example is not needed, just create any fresh iOS project, into CMakeLists.txt put:

       

      target_link_libraries(${TARGET_NAME} PRIVATE "${QT_HOST_PATH}/../ios/plugins/platforms/darwin/libqiosnsphotolibrarysupport.a")
      qt_import_plugins(${TARGET_NAME} INCLUDE Qt6::QIosOptionalPlugin_NSPhotoLibraryPlugin)
       
      target_link_options(${TARGET_NAME} PUBLIC -ObjC)
      

       

      and you will reproduce the error...

      comment out qt_import_plugins() and all works fine

       

      I have spent month pushing firebase with several bug reports and issue reports that they have a real issue in their SDKs but after this month its realy the qt_import_plugins() or the plugin Qt6::QIosOptionalPlugin_NSPhotoLibraryPlugin itself issue

       

      Please give it proper priority or lets check if we cant use any workaround...

      We cant say to our clients that for their apps (social based) they can either upload photos or receive push notifications, never both

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtmultimediateam Qt Multimedia Team
            shokarta Jiri Zaloudek
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes