ActionManager
-
This extension automatically monitors the database for objects that support the YapActionable protocol.
Objects that support the YapActionable protocol relay information about
actions
that need to be taken. This information includes things such as:- when the action needs to be taken
- if it should be retried, and if so what delay to use
- whether or not the action requires an Internet connection
- the block to invoke in order to trigger the action
This extension handles all aspects related to scheduling & executing YapActionItems.
Examples of YapActionItems include things such as:
- deleting items when they expire e.g.: removing cached files
- refreshing items when they’ve become
stale
e.g.: periodically updating user infromation from the server
Declaration
Objective-C
@interface YapDatabaseActionManager : YapDatabaseAutoView
Swift
class YapDatabaseActionManager : YapDatabaseAutoView
-
Undocumented
Declaration
Objective-C
@interface YapDatabaseActionManagerConnection : YapDatabaseAutoViewConnection
Swift
class YapDatabaseActionManagerConnection : YapDatabaseAutoViewConnection
-
Undocumented
Declaration
Objective-C
@interface YapDatabaseActionManagerTransaction : YapDatabaseAutoViewTransaction
Swift
class YapDatabaseActionManagerTransaction : YapDatabaseAutoViewTransaction
-
This class is used by the YapDatabaseActionManager, and any model object(s) that need to interact with it.
A YapActionItem encompasses a majority of the logic required to track when a particular action should occur concerning a particular model object.
See moreDeclaration
Objective-C
@interface YapActionItem : NSObject <NSCopying>
Swift
class YapActionItem : NSObject, NSCopying
-
Undocumented
See moreDeclaration
Objective-C
@protocol YapActionable @required /** * Returns an array of YapActionItem instances for the object. * Or nil if there are none. */ - (nullable NSArray<YapActionItem*> *)yapActionItems; @end
Swift
protocol YapActionable
-
Undocumented
See moreDeclaration
Objective-C
@interface YapReachability : NSObject @property (nonatomic, copy) NetworkReachableBlock reachableBlock; @property (nonatomic, copy) NetworkUnreachableBlock unreachableBlock; @property (nonatomic, assign) BOOL reachableOnWWAN; +(YapReachability*)reachabilityWithHostname:(NSString*)hostname; // This is identical to the function above, but is here to maintain //compatibility with Apples original code. (see .m) +(YapReachability*)reachabilityWithHostName:(NSString*)hostname; +(YapReachability*)reachabilityForInternetConnection; +(YapReachability*)reachabilityWithAddress:(void *)hostAddress; +(YapReachability*)reachabilityForLocalWiFi; -(YapReachability *)initWithReachabilityRef:(SCNetworkReachabilityRef)ref; -(BOOL)startNotifier; -(void)stopNotifier; -(BOOL)isReachable; -(BOOL)isReachableViaWWAN; -(BOOL)isReachableViaWiFi; // WWAN may be available, but not active until a connection has been established. // WiFi may require a connection for VPN on Demand. -(BOOL)isConnectionRequired; // Identical DDG variant. -(BOOL)connectionRequired; // Apple's routine. // Dynamic, on demand connection? -(BOOL)isConnectionOnDemand; // Is user intervention required? -(BOOL)isInterventionRequired; -(YapReachabilityStatus)currentReachabilityStatus; -(SCNetworkReachabilityFlags)reachabilityFlags; -(NSString*)currentReachabilityString; -(NSString*)currentReachabilityFlags; @end
Swift
class YapReachability : NSObject