nfc_manager isAvailable returns false iOS - ios

I followed this tutorial https://medium.com/flutter-community/nfc-with-flutter-f8c3515cb0e0 and still got false when calling NfcManager.instance.isAvailable, what am I doing wrong?
updated capability in xcode
updated profile in https://developer.apple.com/account
set NFCReaderUsageDescription in info.plst
I also synced my provisining profile as described here Xcode 8.3 / Xcode 9.0 Refresh provisioning profile devices. Does anybody have an idea what I did wrong. I'm trying it on a iPhone 13 mini.

I managed to solve the issue…
add this to your .entitlements file
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>TAG</string>
</array>
and assign the right .entitlements file to your code signing entitlements file (runner -> Build Settings)

Related

XCode 12.5 Missing entitlement com.apple.developer.associated-appclip-app-identifiers

After I updated Xcode version to 12.5 I have problem with App Clip.
During App Store Connect uploading I receive warning:
TMS-90876: Missing entitlement - This app contains an app clip. The entitlement 'com.apple.developer.associated-appclip-app-identifiers' should be present and include the value of the app clip's application identifier.
there is no information how to add this entitlement
I tried to add 'com.apple.developer.associated-appclip-app-identifiers' key to entitlements file
<key>com.apple.developer.associated-appclip-app-identifiers</key>
<array>
<string>{my_clip_bundle_id}</string>
</array>
but the error appears
Provisioning profile "iOS Team Provisioning Profile: {my_bundle_id}" doesn't match the entitlements file's value for the com.apple.developer.associated-appclip-app-identifiers entitlement.
This seems to be a bug on Apple's side.
All you need to do is regenerate the provisioning profiles.
If you are using Automatically Manage Signing, there is a way to trick XCode to create a new profile for you. Go to Project Target > Signing & Capabilities page and add a new Capability (for example Sign in with Apple). This will force the regeneration of the provisioning profile. After that, you can remove the newly added Capability and upload a new build without any warnings.
I was facing same issue. I was missing $(AppIdentifierPrefix).
adding below to .entitlement file of main app fixed for me.
<key>com.apple.developer.associated-appclip-app-identifiers</key>
<array>
<string>$(AppIdentifierPrefix)com.app.appclipbundleid</string>
</array>

How to fix invalid entitlement for Core NFC Framework after Xcode update

I have created an app which has NFC tag reading functionality. I have done some changes to it and uploading the new version to App Store. Everything was working fine until last week when I updated Xcode to 11.1. Now when I Archive it I have the following error saying.
"Invalid entitlement for Core NFC framework. The sdk version "13.1" and min OS version "11.0" are not compatible for the entitlement 'com.apple.developer.nfc.readersession.formats' because TAG is missing in the entitlement.
I have done the following changes to my info.Plist file but the error still persists.
Any help will be appreciated.
Plist Changes
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>NDEF</string>
<string>TAG</string>
</array>
So, removing NFC tag reading from capabilities and adding it again, which added an entitlements file. This fixed the issue.

Missing NFC tag protocol in profiles issue in iOS 13 and Xcode 11

Provisioning profiles showing error after adding NFC tag-specific data protocol to entitlements which is requirement of iOS 13 and Xcode 11 for using NFC in app.
I have re-checked the profiles NFC is enabled for the bundle-id and provisioning profiles are also valid and includes NFC.
I need to upload a production build but because of this error I am not able to. Is this iOS 13 or Xcode 11 bug? What should I do for fixing this?
After a number of hit and trials, I was able to solve this issue.
Here are steps I followed:
1) In developer site, Open your app identifier, click edit, disable NFC and then re enable it.
2) Re-download the provisioning profiles and install them.
Reason behind it could be when we re-download the profiles it contained information about new NFC tag item which solves the problem.
Preeti. I have the same issue here. I started with an app that uses NFC and is built with Xcode 10.2
It is my aim to update this app to build using Xcode 11.1 However when I do so I get an error saying that have missing entitlements, I can solve this error by adding TAG to my entitlements file like this:
<plist version="1.0">
<dict>
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>NDEF</string>
<string>TAG</string>
</array>
</dict>
</plist>
However once you do this this is where I encounter the issue you describe, my build now complains that my provisioning profile "doesn't match the entitlements file value for the com.apple.developer.nfc.readersession.formats entitlement." Is this the same issue you are having?
This despite my profiles having previously contained the NFC tagging entitlement, and having worked fine on Xcode 10.2 Have these entitlements changed for Xcode 11 and how do we solve this and maintain backward compatibility?
Using >iOS13.0: This link gave the solution (i.e eliminate the NDEF-entry in your entitlement)

The executable was signed with invalid entitlements [AIR]

First before anyone suggests this has been answered elsewhere on SO, I submit that ALL of those answers assume you are compiling with XCode, which is not the case for me. I am using Adobe Animate to compile an Adobe AIR application and deploy to an iPad.
Updated Adobe air SDK to latest 32.0 and have tried re-creating my certificates and provisioning profile from scratch.
If I try to deploy directly from Adobe AIR I get an error message
"Application verification failed"
If instead I publish an .ipa and try and deploy via XCode I get the following
If I furthermore check entitlements on my app.bundle I see
<plist version="1.0">
<dict>
<key>application-identifier</key>
<string>foo.domain.app</string>
<key>get-task-allow</key>
<true/>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
but checking entitlements in my Provisioning profile I see
<key>get-task-allow</key><false/>
Could this be the source of my error? If so, how do I get both these values to be the same?
Any replies welcome as I need to launch this!
Here are a few ideas/things to check.
Check beta reports key is removed from the app descriptor.
When changing iOS certificates, delete the old ones via Keychain Access, then restart the computer before creating the Certificate Signing Request for the new cert.
Check that the new assets.cer has been created for the icons and it has been included in the package.
Check that all icons are present and all casing is correct in the naming on icon files as well as in xml.(e.g. icon and Icon)
Ensure path to SDK is correct. e.g. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk
If you still cannot install the app from Animate, try including the beta reports key, publish the app and upload it to TestFlight.

Xcode 8.1 "No matching provisioning profiles found" after updating MacOS and Xcode

I'm testing my app with TestFlight but I can't upload my archives after updating to MacOS 10.12 and Xcode 8.1.
When I archive my app, click on "Upload to App Store...", select my Development, I get this error.
No matching provisioning profiles found for "Applications/app.app"
None of the valid provisioning profiles allowed the specified entitlements: application-identifier, beta-reports-active, keychain-access-groups.
What I've tried so far:
Reopening Xcode (Many times)
⌘+, > select team > remove every provisioning profile > re-download every provisioning profile (Reopening Xcode after each step)
Re-downloaded and installed my certificates and provisioning profiles
Removing every provisioning profile and building the app
I had this same error when my Xcode wildcard profile expired. Xcode didn't automatically renew it even though everything was set to automatic.
I logged in to the the portal, edited the XC: * profile, hit generate and then downloaded the resulting certificate. All good after that.
On Xcode's Capabilities screen, turning a capability On and then Off will fix the issue.
None of the other answers worked for me.
I had to delete all certificates from KeyChain, and also revoke them in Apple Developer portal. Then manually request a Distribution certificate in KeyChain. Upload it to the Developer portal.
XCode (8.3) must be stopped because it keeps creating certificates as they are being deleted from KeyChain.
Also, KeyChain burped and suddenly had a whole bunch of certificates and keys that it wasn't showing before. I don't know why that happened. Some were expired, which may have been causing the original problem. I deleted them all too.
Finally, XCode was happy to Archive, and Upload to iTunes. Only two hours wasted this time.
Use the automatic option provided in Xcode just add the relevant account team in the Xcode and let Xcode manage the signing process. Then go for Archive and select proper options while making archiving.
I was running into the same issue. As our project was automatically generated by Ionic and had to be build in a CI environment, opening the project and toggle automatic signing wasn't an option. I did a diff of the entitlements file before and after the toggle and found out that the dict value was sorted differently:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
+ <key>aps-environment</key>
+ <string>production</string>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.microsoft.adalcache</string>
</array>
- <key>aps-environment</key>
- <string>production</string>
</dict>
</plist>
Even though from my understanding it shouldn't make a difference, the build was successfull after this change.
For everyone running into this in an Ionic project, the solution was to add this key-value pair to the config edit in the config.xml:
<config-file parent="keychain-access-groups" target="*-Release.plist">
<key>aps-environment</key>
<string>production</string>
<array>
<string>$(AppIdentifierPrefix)com.microsoft.adalcache</string>
</array>
</config-file>

Resources