Class CLMonitor

  • All Implemented Interfaces:
    NSObject

    public class CLMonitor
    extends NSObject
    API-Since: 17.0
    • Constructor Detail

      • CLMonitor

        protected CLMonitor​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addConditionForMonitoringIdentifier

        public void addConditionForMonitoringIdentifier​(@NotNull
                                                        @NotNull CLCondition condition,
                                                        @NotNull
                                                        @NotNull java.lang.String identifier)
        addConditionForMonitoring:identifier: Discussion: Adds `condition` to be monitored under `identifier`. It initializes the monitoring state to `CLMonitoringStateUnknown`.
      • addConditionForMonitoringIdentifierAssumedState

        public void addConditionForMonitoringIdentifierAssumedState​(@NotNull
                                                                    @NotNull CLCondition condition,
                                                                    @NotNull
                                                                    @NotNull java.lang.String identifier,
                                                                    long state)
        addConditionForMonitoring:identifier:assumedState Discussion: Adds `condition` to be monitored under `identifier`. It initializes the monitoring state with the given value.
      • allocWithZone

        public static CLMonitor allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • 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()
      • 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

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • monitoredIdentifiers

        @NotNull
        public @NotNull NSArray<java.lang.String> monitoredIdentifiers()
        monitoredIdentifiers Discussion: Array containing all the identifiers with each identifying a condition that is monitored.
      • monitoringRecordForIdentifier

        @Nullable
        public @Nullable CLMonitoringRecord monitoringRecordForIdentifier​(@NotNull
                                                                          @NotNull java.lang.String identifier)
        monitoringRecordForIdentifier: Discussion: Gets the monitoring record containing the condition and last monitoring event, if applicable
      • name

        @NotNull
        public @NotNull java.lang.String name()
        name Discussion: Name associated with the `CLMonitor` instance.
      • new_objc

        public static CLMonitor new_objc()
      • removeConditionFromMonitoringWithIdentifier

        public void removeConditionFromMonitoringWithIdentifier​(@NotNull
                                                                @NotNull java.lang.String identifier)
        removeConditionFromMonitoringWithIdentifier: Discussion: Removes the monitoring record with given `identifier` from monitoring
      • requestMonitorWithConfigurationCompletion

        public static void requestMonitorWithConfigurationCompletion​(@NotNull
                                                                     @NotNull CLMonitorConfiguration config,
                                                                     @NotNull
                                                                     @NotNull CLMonitor.Block_requestMonitorWithConfigurationCompletion completionHandler)
        requestMonitorWithConfiguration:completion: Discussion: Creates or opens, a `CLMonitor` instance with the given name. The completion handler will be called with the instance of `CLMonitor` on the queue that was set in the configuration instance. Conditions can be added for monitoring or removed from monitoring by this instance of `CLMonitor`. When an event occurs, the passed in block would be called on the specified queue. The callback handler is invoked with this instance of `CLMonitor` and an instance of `CLMonitoringEvent` containing the identifier under which the condition is monitored, an optional instance of `CLCondition` containing specifics, the new state, and the timestamp of the event. All interaction directly with the returned `CLMonitor` must occur on the specified queue. Failing to do so will result in undefined behavior. Conditions added to an instance of `CLMonitor` will persist until removed from monitoring. However, CoreLocation will stop monitoring conditions if an event is pending for them, but no `CLMonitor` has been configured to receive it. The conditions are stored in an opaque file at ~/Library/CoreLocation/BundleId (or Process name)/`name`.monitor. Note that for containerized Apps this will be inside the Data container. Apps need to observe when protected data becomes available using `UIApplicationProtectedDataDidBecomeAvailable` before creating a `CLMonitor` instance. Persistence of Conditions enables an app to query efficiently for conditions currently being monitored and the last event delivered for each. The app can choose to initialize the monitoring state for a condition. By default, it is set to `CLMonitoringStateUnknown`. - Note: Only one instance of `CLMonitor` with a given name may be opened at a time. Attempting to open another instance with the same name will return `false`. API-Since: 17.0
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.
      • version_static

        public static long version_static()