Can't install app to iPad when Required Device Capability has NFC?

Hello

Is it impossible to install an app to both iPhone and iPad when the app use NFC? The app, I'm working on, use NFC on iPhone but not on iPad. The app program code checks iPhone or iPad and use NFC only on iPhone.

However, TestFlight and App Store show "No Compatible Hardware" on iPad and can't download. It works as expected on iPhone. Target Device is set both iPhone and iPad, the configuration is TARGETED_DEVICE_FAMILY = "1,2"

According to Required Device Capabilities, iPad doesn't support NFC https://developer.apple.com/support/required-device-capabilities/#ipad-devices

The app has UIRequiredDeviceCapabilities = nfc configuration only for iPhone. But is it block installing to iPad? If so how to fix this issue?

Thanks in advance.

Answered by Engineer in 798442022

It is possible to have a single binary that installs on both. If you want the app to also run on devices with no NFC, the solution is to use weak linking, so the system does not attempt to load the NFC framework/libraries.

What you need to do is weak link the CoreNFC framework manually in project settings, and then avoid using it if the app is not running on a supported device (check for iPad).

To do this, you need to do the following:

  • in your project Build Phases, the "Link Binary With Libraries” section, add the CoreNFC.framework, and then mark it as Optional. This will prevent the app from crashing at launch.
  • the next thing you need to handle is to avoid problematic behavior at App Review or in case a user installs the app on an iPad. For that, you could do a check of the UIDevice.current.model value and not engage any features of your app that would require the use of CoreNFC features.

Keep in mind, that App Review will require the app to have some adequate functionality, while not using NFC, on an iPad.


Argun Tekant /  DTS Engineer / Core Technologies

It is possible to have a single binary that installs on both. If you want the app to also run on devices with no NFC, the solution is to use weak linking, so the system does not attempt to load the NFC framework/libraries.

What you need to do is weak link the CoreNFC framework manually in project settings, and then avoid using it if the app is not running on a supported device (check for iPad).

To do this, you need to do the following:

  • in your project Build Phases, the "Link Binary With Libraries” section, add the CoreNFC.framework, and then mark it as Optional. This will prevent the app from crashing at launch.
  • the next thing you need to handle is to avoid problematic behavior at App Review or in case a user installs the app on an iPad. For that, you could do a check of the UIDevice.current.model value and not engage any features of your app that would require the use of CoreNFC features.

Keep in mind, that App Review will require the app to have some adequate functionality, while not using NFC, on an iPad.


Argun Tekant /  DTS Engineer / Core Technologies

Thank you for your support. I update my app as below according to your advice. But the issue not fixed. iPad is still Incompatible Hardware.

  • In project Build Phased, "Link Binary With Libraries” section, CoreNFC.framework is Optional.
  • Use NFC feature only "if UIDevice.current.userInterfaceIdiom == .phone" in program. "import CoreNFC" always exist.

I upload the build to TestFlight but still I can't install it to iPad.

TeestFlight app on iPad show "Incompatible Hardware".

Build Metadata in Test flight section on App Store Connect site show at "Device Requirements"

  • Device Family: iPhone, iPad
  • Required Capabilities: arm64, nfc

The initial version of this app already App Review approved and released on App Store. does it affect update and can't change Compatible Hardware?

Best regards, ziotreks

Accepted Answer

Resolved this issue with these configuration.

  • In the project Signing & Capabilities, add Capability "Near Field Communication Tag Reading"

  • In the project Build Phases, the "Link Binary With Libraries” section, add the CoreNFC.framework, and then mark it as Optional.

  • In the project Info, add "Privacy - NFC Scan Usage Description" = "Use NFC"

  • Do not add "Near Field Communication" to "Required Device Capability" item (this cause Incompatible hardware on iPad)

  • Use NFC feature only "if UIDevice.current.userInterfaceIdiom == .phone" in program.

Hope this helps, Thank you.

Can't install app to iPad when Required Device Capability has NFC?
 
 
Q