Package apple.corenfc
Class NFCNDEFReaderSession
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.corenfc.NFCReaderSession
-
- apple.corenfc.NFCNDEFReaderSession
-
- All Implemented Interfaces:
NFCReaderSession,NSObject
public class NFCNDEFReaderSession extends NFCReaderSession
NFCNDEFReaderSession NFC reader session for processing NFC Data Exchange Format (NDEF) tags. This session requires the "com.apple.developer.nfc.readersession.formats" entitlement in your process. In addition your application's Info.plist must contain a non-empty usage description string. [@link] NFCReaderErrorSecurityViolation @link/ will be returned from @link [NFCNDEFReaderSessionDelegate readerSession:didInvalidateWithError:] @link/ if the required entitlement is missing when session is started. [@note] Only one NFCNDEFReaderSession can be active at any time in the system. Subsequent opened sessions will get queued up and processed by the system in FIFO order. [@note] If the delegate object implements the optional -readerSession:didDetectTags: method the NFCNDEFReaderSession will become a read-write session; see @link NFCNDEFReaderSessionDelegate @link/ for detail description. [@note] The error symbol will not be drawn on the action sheet if -invalidateSessionWithError: method is called on a session that is not a read-write session; -invalidateSession: method should be used in a read-only session.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceNFCNDEFReaderSession.Block_connectToTagCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNFCNDEFReaderSession(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NFCNDEFReaderSessionalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()voidconnectToTagCompletionHandler(NFCNDEFTag tag, NFCNDEFReaderSession.Block_connectToTagCompletionHandler completionHandler)connectToTag:completionHandler: This method establishes a tag connection and activates the tag.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()static longhash_static()NFCNDEFReaderSessioninit()NFCNDEFReaderSessioninitWithDelegateQueueInvalidateAfterFirstRead(NFCNDEFReaderSessionDelegate delegate, NSObject queue, boolean invalidateAfterFirstRead)initWithDelegate:queue:invalidateAfterFirstRead: A NDEF reader session will scan and detect NFC Forum tags that contain a valid NDEF message.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()static booleanreadingAvailable()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidrestartPolling()restartPolling Restart the polling sequence in this session to discover new NDEF tags.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static longversion_static()-
Methods inherited from class apple.corenfc.NFCReaderSession
alertMessage, beginSession, delegate, invalidateSession, invalidateSessionWithErrorMessage, isReady, sessionQueue, setAlertMessage
-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NFCNDEFReaderSession alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
connectToTagCompletionHandler
public void connectToTagCompletionHandler(NFCNDEFTag tag, NFCNDEFReaderSession.Block_connectToTagCompletionHandler completionHandler)
connectToTag:completionHandler: This method establishes a tag connection and activates the tag. Connecting to the same tag that is currently opened has no effect. Connecting to a different tag will automatically terminate the previous tag connection and put it into the halt state. Tag stays in the connected state until another tag is connected or the polling is restarted.- Parameters:
tag- A NFCTag protocol compliant tag object that will be connect to.completionHandler- Completion handler called when the operation is completed. error is nil if operation succeeds. A @link NFCErrorDomain @link/ error is returned when there is a communication issue with the tag.
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
init
public NFCNDEFReaderSession init()
- Overrides:
initin classNFCReaderSession
-
initWithDelegateQueueInvalidateAfterFirstRead
public NFCNDEFReaderSession initWithDelegateQueueInvalidateAfterFirstRead(NFCNDEFReaderSessionDelegate delegate, NSObject queue, boolean invalidateAfterFirstRead)
initWithDelegate:queue:invalidateAfterFirstRead: A NDEF reader session will scan and detect NFC Forum tags that contain a valid NDEF message. NFC Forum Tag type 1 to 5 that is NDEF formatted are supported. A modal system UI will present once -beginSession is called to inform the start of the session; the UI sheet is automatically dismissed when the session is invalidated either by the user or by calling -invalidateSession. The alertMessage property shall be set prior to -beginSession to display a message on the action sheet UI for the tag scanning operation. The reader session has the following properties: + An opened session has a 60 seconds time limit restriction after -beginSession is called; -readerSession:didInvalidateWithError: will return NFCReaderSessionInvalidationErrorSessionTimeout error when the time limit is reached. + Only 1 active reader session is allowed in the system; -readerSession:didInvalidateWithError: will return NFCReaderSessionInvalidationErrorSystemIsBusy when a new reader session is initiated by -beginSession when there is an active reader session. + -readerSession:didInvalidateWithError: will return NFCReaderSessionInvalidationErrorUserCanceled when user clicks on the done button on the UI. + -readerSession:didInvalidateWithError: will return NFCReaderSessionInvalidationErrorSessionTerminatedUnexpectedly when the client application enters the background state. + -readerSession:didInvalidateWithError: will return NFCReaderErrorUnsupportedFeature when 1) reader mode feature is not available on the hardware, 2) client application does not have the required entitlement. The session's mode of operation is determined by the implementation of the delegate object. The -readerSession:didDetectTags: optional method will enable the read-write capability and suppress the -readerSession:didDetectNDEFs: callback for the session.- Parameters:
delegate- The session will hold a weak ARC reference to this @link NFCNDEFReaderSessionDelegate @link/ object.queue- A dispatch queue where NFCNDEFReaderSessionDelegate delegate callbacks will be dispatched to. A nil value will cause the creation of a serial dispatch queue internally for the session. The session object will retain the provided dispatch queue.invalidateAfterFirstRead- Session will automatically invalidate after the first NDEF tag is read successfully when this is set to YES, and -readerSession:didInvalidateWithError: will return NFCReaderSessionInvalidationErrorFirstNDEFTagRead in this case. Set to NO if the delegate object implements the -readerSession:didDetectTags: optional method.- Returns:
- A new NFCNDEFReaderSession instance.
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object new_objc()
-
readingAvailable
public static boolean readingAvailable()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
restartPolling
public void restartPolling()
restartPolling Restart the polling sequence in this session to discover new NDEF tags. New tags discovered from polling will return in the subsequent @link [NFCNDEFReaderSessionDelegate readerSession:didDetectTags:]
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
-