public class WCSession extends NSObject
On start up an app should set a delegate on the default session and call activate. This will allow the system to populate the state properties and deliver any outstanding background transfers.
| Modifier and Type | Class and Description |
|---|---|
static interface |
WCSession.Block_sendMessageDataReplyHandlerErrorHandler_1 |
static interface |
WCSession.Block_sendMessageDataReplyHandlerErrorHandler_2 |
static interface |
WCSession.Block_sendMessageReplyHandlerErrorHandler_1 |
static interface |
WCSession.Block_sendMessageReplyHandlerErrorHandler_2 |
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
WCSession(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
void |
activateSession()
The default session must be activated on startup before the session's properties contain correct values and will begin receiving delegate callbacks.
|
long |
activationState()
The state of the current session
|
static WCSession |
alloc() |
static WCSession |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
NSDictionary<java.lang.String,?> |
applicationContext()
Setting the applicationContext is a way to transfer the latest state of an app.
|
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(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.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
static WCSession |
defaultSession()
Use the default session for all transferring of content and state monitoring.
|
WCSessionDelegate |
delegate()
A delegate must exist before the session will allow sends.
|
static java.lang.String |
description_static() |
boolean |
hasContentPending()
Whether or not there is more content for the session to deliver
|
static long |
hash_static() |
WCSession |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isComplicationEnabled()
Check if the user has the Watch app's complication enabled
|
boolean |
isPaired()
Check if iOS device is paired to a watch
|
boolean |
isReachable()
The counterpart app must be reachable for a send message to succeed.
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static boolean |
isSupported()
Check if session is supported on this iOS device.
|
boolean |
isWatchAppInstalled()
Check if the user has the Watch app installed
|
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static WCSession |
new_objc() |
NSArray<? extends WCSessionFileTransfer> |
outstandingFileTransfers()
Returns an array of file transfers that are still transferring (i.e.
|
NSArray<? extends WCSessionUserInfoTransfer> |
outstandingUserInfoTransfers()
Returns an array of user info transfers that are still transferring (i.e.
|
NSDictionary<java.lang.String,?> |
receivedApplicationContext()
Stores the most recently received applicationContext from the counterpart app.
|
long |
remainingComplicationUserInfoTransfers()
The number of calls remaining to transferCurrentComplicationUserInfo: before the system starts transferring the complicationUserInfo as regular userInfos.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
sendMessageDataReplyHandlerErrorHandler(NSData data,
WCSession.Block_sendMessageDataReplyHandlerErrorHandler_1 replyHandler,
WCSession.Block_sendMessageDataReplyHandlerErrorHandler_2 errorHandler)
Clients can use this method to send message data.
|
void |
sendMessageReplyHandlerErrorHandler(NSDictionary<java.lang.String,?> message,
WCSession.Block_sendMessageReplyHandlerErrorHandler_1 replyHandler,
WCSession.Block_sendMessageReplyHandlerErrorHandler_2 errorHandler)
Clients can use this method to send messages to the counterpart app.
|
void |
setDelegate_unsafe(WCSessionDelegate value)
A delegate must exist before the session will allow sends.
|
void |
setDelegate(WCSessionDelegate value)
A delegate must exist before the session will allow sends.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
WCSessionUserInfoTransfer |
transferCurrentComplicationUserInfo(NSDictionary<java.lang.String,?> userInfo)
Enqueues a user info dictionary containing the most current information for an enabled complication.
|
WCSessionFileTransfer |
transferFileMetadata(NSURL file,
NSDictionary<java.lang.String,?> metadata)
The system will enqueue the file and transfer it to the counterpart app at an opportune time.
|
WCSessionUserInfoTransfer |
transferUserInfo(NSDictionary<java.lang.String,?> userInfo)
The system will enqueue the user info dictionary and transfer it to the counterpart app at an opportune time.
|
boolean |
updateApplicationContextError(NSDictionary<java.lang.String,?> applicationContext,
org.moe.natj.general.ptr.Ptr<NSError> error) |
static long |
version_static() |
NSURL |
watchDirectoryURL()
Use this directory to persist any data specific to the selected Watch.
|
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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static WCSession alloc()
public static WCSession allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static WCSession defaultSession()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static boolean isSupported()
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static WCSession new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void activateSession()
public long activationState()
public NSDictionary<java.lang.String,?> applicationContext()
public WCSessionDelegate delegate()
public boolean hasContentPending()
public boolean isComplicationEnabled()
public boolean isPaired()
public boolean isReachable()
public boolean isWatchAppInstalled()
public NSArray<? extends WCSessionFileTransfer> outstandingFileTransfers()
public NSArray<? extends WCSessionUserInfoTransfer> outstandingUserInfoTransfers()
public NSDictionary<java.lang.String,?> receivedApplicationContext()
public long remainingComplicationUserInfoTransfers()
public void sendMessageReplyHandlerErrorHandler(NSDictionary<java.lang.String,?> message, WCSession.Block_sendMessageReplyHandlerErrorHandler_1 replyHandler, WCSession.Block_sendMessageReplyHandlerErrorHandler_2 errorHandler)
public void sendMessageDataReplyHandlerErrorHandler(NSData data, WCSession.Block_sendMessageDataReplyHandlerErrorHandler_1 replyHandler, WCSession.Block_sendMessageDataReplyHandlerErrorHandler_2 errorHandler)
public void setDelegate_unsafe(WCSessionDelegate value)
public void setDelegate(WCSessionDelegate value)
public WCSessionUserInfoTransfer transferCurrentComplicationUserInfo(NSDictionary<java.lang.String,?> userInfo)
public WCSessionFileTransfer transferFileMetadata(NSURL file, NSDictionary<java.lang.String,?> metadata)
public WCSessionUserInfoTransfer transferUserInfo(NSDictionary<java.lang.String,?> userInfo)
public boolean updateApplicationContextError(NSDictionary<java.lang.String,?> applicationContext, org.moe.natj.general.ptr.Ptr<NSError> error)
public NSURL watchDirectoryURL()