-
Notifications
You must be signed in to change notification settings - Fork 120
nfc_in_flutter in ios #80
Comments
Hi @alrashidi7, I think this is a unknown issue in regards to nic_in_flutter which was identified in the ReadMe Doc. The phone locks up when the NFC is active in iOS. If you print the activity on the function you should see that the data is being read. Maybe related, I found that the Multiscan option doesn't active a "tick" in iOS when an NFC is scanned, but works fine with a single scan. I am planning on bug testing this further as I need the MultiScan to work, as the Single Scan is too slow for my application. |
I have an issue in reading NFC in ios too the function runs one time only if I want to show dialog between each time must wait 5 seconds. |
@adham-ashraf77 , See my Issue request (86) on MultiScaning on IOS. I found I needed to remove readerSession(_:didDetect:) to get the multiscan to work, then I can scan quickly. But it still times out every 60 seconds and needs 4 seconds to restart.. but I think that is just IOS. |
@ZippyRainbow can you provide a pull request for this fix please with null safety. |
@ZippyRainbow i really need that fix for ios please |
@adham-ashraf77 I am a bit of a novice with GitHub, I tried to create a pull request but couldn't work out how to add one, it seemed like the option was greyed out for my access. Maybe I need a paid Github account? |
@ZippyRainbow can you provide me what code you change or send me the file changes at [email protected] and you can use your own fork form this repo and upload your commit and changes. |
@adham-ashraf77 I assume you have read my Issue #86 I just removed the readerSession(_:didDetect:) subroutine from the nfc_in_flutter/ios/Classes/NfcInFlutterPlugin.m file, lines 470 to 507. Starting from. (void)readerSession:(NFCNDEFReaderSession *)session didDetectTags:(NSArray<__kindof id<NFCNDEFTag>> *)tags API_AVAILABLE(ios(13.0)) {This will force the NDEF Tag detect to activate for MultiScan: (void)readerSession:(nonnull NFCNDEFReaderSession *)session didDetectNDEFs:(nonnull NSArray *)messages API_AVAILABLE(ios(11.0)) { |
This will force the NDEF Tag detect to activate for MultiScan: (void)readerSession:(nonnull NFCNDEFReaderSession *)session didDetectNDEFs:(nonnull NSArray *)messages API_AVAILABLE(ios(11.0)) { where do I add this code? |
Hey @adham-ashraf77 Once there is no "didDetectTags" function it will use the "didDetectNDEFs" function on IOS Multiscan instead. This is the problem. with "didDetectTags" in the code, this is being used instead of "didDetectNDEFs".. which we need it to use.. Details of this is on the apple development page, under the Discussion Notes. |
But it still times out every 60 seconds and needs 4 seconds to restart.. but I think that is just IOS. |
@adham-ashraf77
|
Yeap, that is as good as I can get it to work with IOS. The IOS still times out after 60 seconds. Without deleting the "didDetectTags" it wouldn't work at all with multiscan and ticking to show it was reading. |
once true i use |
If you want to scan quickly, you need to use multiscan, else you can only scan once every 4 seconds.. I am pretty sure it is an Apple (iOS) thing.. as it needs to close and reopen the NFC Core. |
and how to use multiscan? |
Once: false |
https://drive.google.com/file/d/1GWuKj57LggIZkdEGhRcXBh0krU1vH_PD/view?usp=sharing |
@adham-ashraf77 if you are not getting the ios "Ready to Scan" at all you might need look at the sample code again to see what you are missing. |
get it the first time but if I click again without wait 4 seconds it will not appear again until we restart the app. |
@ZippyRainbow i just wanna to be like popl |
@ZippyRainbow I figure out something that will not appear in app I turn NFC scan from IOS system is open from the app the scan NFC restarts the NFC app. |
Yeap, would be good. I don't know that much about the ios nfc to bug test much as I don't own a mac |
hello every one,
I don't have much experience with nfc at all
I encountered a problem while using this plugin in ios , which is the process of executing the function inside read tag or write tag not execute it until I clicked the cancel button in NFC-core dialog in ios 14
can any one help me
The text was updated successfully, but these errors were encountered: