GithubHelp home page GithubHelp logo

ios-nfc-example's People

Contributors

baic989 avatar hansemannn avatar sherbondy avatar tinue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-nfc-example's Issues

nfc

I found my way to your configuration for my project, I can't find in the official version of iOS11 and Xcode 9 on the card to read any information, I would like to ask you about, in a formal environment, your project has a special configuration of others?

Can not read tags

I got the app running but my iPhone 7 Plus does not recognise tags. Tried all my tags on a Pixel Phone and they are all working. Even rebooting like @tinue suggested does not work for me. Your code looks fine to me. Hopefully it gets better in Beta 2.

FAQ: Will it read passport NFC chip?

On Android that was possible for a while, but if it is finally possible on iOS 11.
Note that some passports, like US, needs to be open for NFC chip to be read. Also, to read the data on passport's chip you need to provide input information found in MRZ zone.

iOS 12: NSUserActivity.ndefMessagePayload ?

CoreNFC seems to have not changed much in iOS 12, (I guess the rumors were wrong).

There is one change in the header files, a NSUserActivity.ndefMessagePayload:
The NFC NDEF message with an Universial Link object that triggers the application launch.
See here.
Seems to indicate that you could register for your application to launch when a tag is scanned (from where???) with a specific NDEF message payload.

Anyone have any more information on this?

How about create a compatible tag list?

Hi!
I tried every tag I could grab nearby. They are elevator key, starbucks member card, subway ticket.
All failed... ๐Ÿ˜ซ
All these tags are readable by Android and according to the app NFC-Tool, many of them are NDEF formated.

The official NXP NFC tag -- NTAG213 I just ordered are still on the way. How about create a list collecting all tags workable with iOS? Thank you.

Is it possible to write RFID?

(sorry for not-directly-related issue!)
I couldn't find any resources online whether it is possible to use iPhone's RFID write capability (e.g. the capability that is used in apple pay)

anyone know if it is possible?

lb-m5215-1 is not detected

When i try to detect this(lb-m5215-1) RFID Tag it not detecting and throws an error as
"Required entitlement is missing"

Does NFC capability requires a paid Apple developer membership ?

Hi,

I only have a free developer account and can't get this project to compile. I always get errors about missing capabilities and entitlements.

The matrix here does not includes NFC (yet) :

https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/SupportedCapabilities/SupportedCapabilities.html#//apple_ref/doc/uid/TP40012582-CH38-SW1

As far as I know provisioning profiles can't be be managed from the developer portal with a free account, is that correct ? From what I understand it's managed automatically by Xcode.

Thanks

Ludovic

NDEF parser

Feel free to check out https://github.com/jvk75/NFCNDEFParse
Small library that parses the NDEF messages ("well known types" as defined in NDEF specification) to usable objects. E.g. text type both locale and the payload string are in separate variable.

Early stage but usable. SP type coming soon...

iOS ti.nfc Appcelerator module

These instructions mention a beta version of ti.nfc for ios, however the link provided does not seem to include the ios module. I apologize if this is the wrong place, but the projects appear to be related. Is the ti.nfc fork here the same beta version mentioned, or is there a better place to find this module?: https://github.com/hansemannn/ti.nfc/tree/2d14f18cf8898963a20eb809b968019cd16edee2/ios

Following similar instructions as iOS11-NFC-Example (using Entitlements.plist with the options mentioned), I've successfully built the module and the example Titanium app, but have run into some trouble and am looking for someplace to find some help. Thanks!

Get UID And Serial Number of the NFC Tag iOS

I'm developing an application in which I want to get the NFC serial number and Identifier of a NFC tag. When I press a button, I want the application to find the UID and serial number of the NFC card. The only problem is that I have no idea how to get the UID and and serial number if that's possible on iOS. I m trying to get NFC identifier but i don't know how to get serial number of NFC Tag.

class ScanNFCTag: NFCTagReaderSessionDelegate {

import CoreNFC

var session: NFCTagReaderSession?

func scanNFCTag(sender: UIButton!) {
     self.session = NFCTagReaderSession(pollingOption: .iso14443, delegate: self)
     self.session?.alertMessage = "Hold Your Phone Near the NFC Tag"
     self.session?.begin()
}

func tagReaderSessionDidBecomeActive(_ session: NFCTagReaderSession) {
    print("Session Begin!")
}

func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: Error) {
    print(error.localizedDescription)
}

func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) {
    if tags.count > 1{
        session.alertMessage = "More Than One Tag Detected, Please try again"
        session.invalidate()
    }
    
    let tag = tags.first!
    session.connect(to: tag) { (error) in
        if nil != error{
            session.invalidate(errorMessage: error?.localizedDescription ?? "")
        }
        if case let .miFare(sTag) = tag{
            let UID = sTag.identifier.map{ String(format:"%.2hhx", $0)}.joined()
            session.alertMessage = "Successfully linked tag to location"
            session.invalidate()
            DispatchQueue.main.async {
                print("NFC Identifer = ", "\(UID)")
               }
           }
       }
   }
}

So, Here is the my code please let me know if i m doing wrong please correct me. Can someone please explain to me how to get serial number and UID of NFC tag,

Any help would be greatly appreciated.

Thanks in advance.

Can't read any tags

Hi, just wondering: Could you ever read any tag with your phone? I tried both your example and the one from Apple.
One tag on many that I have shows a "Produkt Erkannt" message, but then it doesn't actually read anything. All other tags time out when reading.
It's apparently very, very beta at this time, but I am wondering if you had more success.

Update: Even when the message "Produkt Erkannt" is shown, the "didDetectNDEFs" method is not being called. A few seconds after the message is shown, I am getting the "readerSessionInvalidationErrorUserCanceled".

Crash appli

Hi hansemannn,
Thx for your code sample for NFC.
I have tried to use it, but I 've got an error with UITableView.
Please, your help is welcome.
Normally, NFC is working fine with my setup (tried with another basic application, and it works fine).

Here below, log error message...

New NFC Tag detected:
Type name format: NFCTypeNameFormat
Payload: 4036 bytes
Type: 12 bytes
Identifier: 0 bytes

Main Thread Checker: UI API called on a background thread: -[UITableView reloadData]
PID: 439, TID: 69069, Thread name: (none), Queue name: com.apple.corenfc.readersession, QoS: 0
Backtrace:
4 NFC-Example 0x000000010277d43c _T011NFC_Example22NFCTableViewControllerC13readerSessionySo013NFCNDEFReaderG0C_SaySo14NFCNDEFMessageCG14didDetectNDEFstF + 2600
5 NFC-Example 0x000000010277d91c _T011NFC_Example22NFCTableViewControllerC13readerSessionySo013NFCNDEFReaderG0C_SaySo14NFCNDEFMessageCG14didDetectNDEFstFTo + 124
6 libdispatch.dylib 0x00000001032b1654 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x00000001032b1614 _dispatch_client_callout + 16
8 libdispatch.dylib 0x00000001032c1008 _dispatch_queue_serial_drain + 716
9 libdispatch.dylib 0x00000001032b4e58 _dispatch_queue_invoke + 340
10 libdispatch.dylib 0x00000001032c21c4 _dispatch_root_queue_drain_deferred_wlh + 412
11 libdispatch.dylib 0x00000001032c97fc _dispatch_workloop_worker_thread + 868
12 libsystem_pthread.dylib 0x00000001a87e71e8 _pthread_wqthread + 924
13 libsystem_pthread.dylib 0x00000001a87e6e40 start_wqthread + 4
2017-06-12 11:12:32.207609+0200 NFC-Example[439:69069] [reports] Main Thread Checker: UI API called on a background thread: -[UITableView reloadData]
PID: 439, TID: 69069, Thread name: (none), Queue name: com.apple.corenfc.readersession, QoS: 0
Backtrace:
4 NFC-Example 0x000000010277d43c _T011NFC_Example22NFCTableViewControllerC13readerSessionySo013NFCNDEFReaderG0C_SaySo14NFCNDEFMessageCG14didDetectNDEFstF + 2600
5 NFC-Example 0x000000010277d91c _T011NFC_Example22NFCTableViewControllerC13readerSessionySo013NFCNDEFReaderG0C_SaySo14NFCNDEFMessageCG14didDetectNDEFstFTo + 124
6 libdispatch.dylib 0x00000001032b1654 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x00000001032b1614 _dispatch_client_callout + 16
8 libdispatch.dylib 0x00000001032c1008 _dispatch_queue_serial_drain + 716
9 libdispatch.dylib 0x00000001032b4e58 _dispatch_queue_invoke + 340
10 libdispatch.dylib 0x00000001032c21c4 _dispatch_root_queue_drain_deferred_wlh + 412
11 libdispatch.dylib 0x00000001032c97fc _dispatch_workloop_worker_thread + 868
12 libsystem_pthread.dylib 0x00000001a87e71e8 _pthread_wqthread + 924
13 libsystem_pthread.dylib 0x00000001a87e6e40 start_wqthread + 4
2017-06-12 11:12:44.163074+0200 NFC-Example[439:69069] *** Assertion failure in -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3678.13/UITableView.m:7518
2017-06-12 11:12:44.170954+0200 NFC-Example[439:69069] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier NFCTableCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
*** First throw call stack:
(0x184ee04e8 0x1a7850528 0x184ee03bc 0x186b5dc24 0x18c01c7cc 0x18be654e8 0x10277c238 0x10277c660 0x18c02c844 0x18c02cd5c 0x18c00e9c4 0x18bdd26a0 0x18bcfe4f0 0x18b21aa84 0x18b20ed70 0x18b20ec2c 0x18b18588c 0x18b1acae4 0x18b1ace7c 0x1a87e7898 0x1a87e75e8 0x1a87e7380 0x1a87e6e40)
libc++abi.dylib: terminating with uncaught exception of type NSException

Not working with PN532 NFC chip

Hi I have a PN532 NFCNDEFTag chip connected to an Arduino Uno, the chip should send a ndef message to the phone, everything works good in Android while this app seems not to see the chip.
The app works with a card but not with the chip?
Do you know why?

Not work

Always prompt "The NFC-session is not ready so far, try again!"

xcode9 beta3
iPhone7plus
iOS11 beta3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.