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. QNearFieldManager can't dectection ?
Forum Updated to NodeBB v4.3 + New Features

QNearFieldManager can't dectection ?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 266 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.
  • S Offline
    S Offline
    sgsm
    wrote on last edited by
    #1

    Use Qt Nfc API to develop applications on IOS. The main purpose is to read and write nfc tags,

    develop tools : QtCreater 9.0.3
    platForm: macos ventrual
    qt ver:qt 6.4.2
    IOS : 16.1

    code :
    nfm = new QNearFieldManager(this);

    nfcAdapterAvailable = nfm->isEnabled(); // return true
    
    if(nfcAdapterAvailable)
    {
        showUserTip("NFC Adapter is ready");
    
        //开始监听
        if(nfm->startTargetDetection(QNearFieldTarget::AnyAccess))
        {
           showUserTip("begin detection...");
    
           connect(nfm, &QNearFieldManager::targetDetected,this, &MainWindow::targetDetected);
    
           connect(nfm, &QNearFieldManager::targetLost,this, &MainWindow::targetLost);
        }
        else
        {
           showUserTip("detection wrong");
        }
    }
    else
    {
        showUserTip("NFC Adapter not find");
    }
    

    }

    question:
    1、nfm->startTargetDetection(QNearFieldTarget::AnyAccess) always return false ,I can't dection,and I cant't go next

    ask :
    Why? what will i can do

    Is the NFC api simply not available on IOS?

    ekkescornerE 1 Reply Last reply
    0
    • S sgsm

      Use Qt Nfc API to develop applications on IOS. The main purpose is to read and write nfc tags,

      develop tools : QtCreater 9.0.3
      platForm: macos ventrual
      qt ver:qt 6.4.2
      IOS : 16.1

      code :
      nfm = new QNearFieldManager(this);

      nfcAdapterAvailable = nfm->isEnabled(); // return true
      
      if(nfcAdapterAvailable)
      {
          showUserTip("NFC Adapter is ready");
      
          //开始监听
          if(nfm->startTargetDetection(QNearFieldTarget::AnyAccess))
          {
             showUserTip("begin detection...");
      
             connect(nfm, &QNearFieldManager::targetDetected,this, &MainWindow::targetDetected);
      
             connect(nfm, &QNearFieldManager::targetLost,this, &MainWindow::targetLost);
          }
          else
          {
             showUserTip("detection wrong");
          }
      }
      else
      {
          showUserTip("NFC Adapter not find");
      }
      

      }

      question:
      1、nfm->startTargetDetection(QNearFieldTarget::AnyAccess) always return false ,I can't dection,and I cant't go next

      ask :
      Why? what will i can do

      Is the NFC api simply not available on IOS?

      ekkescornerE Offline
      ekkescornerE Offline
      ekkescorner
      Qt Champions 2016
      wrote on last edited by
      #2

      @sgsm haven't used NFC on iOS yet
      perhaps this can help:
      https://scythe-studio.com/en/blog/nfc-in-qt-qml-application

      ekke ... Qt Champion 2016 | 2024 ... mobile business apps
      5.15 --> 6.9 https://t1p.de/ekkeChecklist
      QMake --> CMake https://t1p.de/ekkeCMakeMobileApps

      S 1 Reply Last reply
      1
      • ekkescornerE ekkescorner

        @sgsm haven't used NFC on iOS yet
        perhaps this can help:
        https://scythe-studio.com/en/blog/nfc-in-qt-qml-application

        S Offline
        S Offline
        sgsm
        wrote on last edited by
        #3

        @ekkescorner Thank you. Although I am prepared, I am still disappointed. I have no choice but to learn swift on xcode

        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