No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 

1 línea
5.3 KiB

  1. {"sections":[],"identifier":{"url":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NFCReader\/readerSession(_:didDetectNDEFs:)","interfaceLanguage":"swift"},"abstract":[{"text":"Called when the NFC reader session detects NDEF messages.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NFCReader"]]},"kind":"symbol","primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["iOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"readerSession","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"kind":"text","text":" "},{"text":"session","kind":"internalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"c:objc(cs)NFCNDEFReaderSession","text":"NFCNDEFReaderSession"},{"text":", ","kind":"text"},{"text":"didDetectNDEFs","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"messages","kind":"internalParam"},{"text":": [","kind":"text"},{"text":"NFCNDEFMessage","preciseIdentifier":"c:objc(cs)NFCNDEFMessage","kind":"typeIdentifier"},{"text":"])","kind":"text"}]}]},{"parameters":[{"name":"session","content":[{"inlineContent":[{"text":"The NFC reader session.","type":"text"}],"type":"paragraph"}]},{"content":[{"inlineContent":[{"type":"text","text":"The array of detected NFC NDEF messages."}],"type":"paragraph"}],"name":"messages"}],"kind":"parameters"},{"content":[{"text":"Discussion","level":2,"type":"heading","anchor":"discussion"},{"syntax":"swift","code":["func readerSession(_ session: NFCNDEFReaderSession, didDetectNDEFs messages: [NFCNDEFMessage]) {"," guard let message = messages.first else {"," self.result = .failure(NFCReaderError.emptyMessage)"," return"," }"," "," guard let record = message.records.first else {"," self.result = .failure(NFCReaderError.emptyRecord)"," return"," }"," "," guard let payload = String(data: record.payload, encoding: .utf8) else {"," self.result = .failure(NFCReaderError.invalidPayload)"," return"," }"," "," self.result = .success(payload)"," onTagRead?(payload)"," session.invalidate()","}"],"type":"codeListing"}],"kind":"content"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"paths":["\/documentation\/fueling\/nfcreader\/readersession(_:diddetectndefs:)"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"symbol","modules":[{"name":"Fueling"}],"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"readerSession"},{"kind":"text","text":"("},{"preciseIdentifier":"c:objc(cs)NFCNDEFReaderSession","kind":"typeIdentifier","text":"NFCNDEFReaderSession"},{"kind":"text","text":", "},{"text":"didDetectNDEFs","kind":"externalParam"},{"kind":"text","text":": ["},{"preciseIdentifier":"c:objc(cs)NFCNDEFMessage","text":"NFCNDEFMessage","kind":"typeIdentifier"},{"kind":"text","text":"])"}],"title":"readerSession(_:didDetectNDEFs:)","externalID":"c:@M@Fueling@objc(cs)NFCReader(im)readerSession:didDetectNDEFs:","symbolKind":"method","roleHeading":"Instance Method"},"references":{"doc://rpm.com.production.Scanner/documentation/Fueling":{"kind":"symbol","url":"\/documentation\/fueling","title":"Fueling","identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling","abstract":[{"type":"text","text":"The Scanner app is designed to facilitate secure and efficient fuel management operations, primarily focusing on user authentication, fuel data collection, and network communication. The app includes several key features to ensure seamless and reliable interactions between users and the backend systems, leveraging technologies like WebSockets, Core Data, and biometric authentication."}],"type":"topic","role":"collection"},"doc://rpm.com.production.Scanner/documentation/Fueling/NFCReader/readerSession(_:didDetectNDEFs:)":{"identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NFCReader\/readerSession(_:didDetectNDEFs:)","kind":"symbol","role":"symbol","abstract":[{"text":"Called when the NFC reader session detects NDEF messages.","type":"text"}],"title":"readerSession(_:didDetectNDEFs:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"readerSession"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","text":"NFCNDEFReaderSession","preciseIdentifier":"c:objc(cs)NFCNDEFReaderSession"},{"kind":"text","text":", "},{"kind":"externalParam","text":"didDetectNDEFs"},{"text":": [","kind":"text"},{"preciseIdentifier":"c:objc(cs)NFCNDEFMessage","kind":"typeIdentifier","text":"NFCNDEFMessage"},{"text":"])","kind":"text"}],"url":"\/documentation\/fueling\/nfcreader\/readersession(_:diddetectndefs:)"},"doc://rpm.com.production.Scanner/documentation/Fueling/NFCReader":{"navigatorTitle":[{"kind":"identifier","text":"NFCReader"}],"abstract":[{"text":"A class that handles NFC reading operations and notifies observers about the results.","type":"text"}],"kind":"symbol","title":"NFCReader","fragments":[{"text":"class","kind":"keyword"},{"text":" ","kind":"text"},{"text":"NFCReader","kind":"identifier"}],"identifier":"doc:\/\/rpm.com.production.Scanner\/documentation\/Fueling\/NFCReader","role":"symbol","type":"topic","url":"\/documentation\/fueling\/nfcreader"}}}