How big can the payload be when sending data via WatchConnectivity?
According to the private symbols WCPayloadSizeLimitApplicationContext
, WCPayloadSizeLimitMessage
, WCPayloadSizeLimitUserInfo
, the limits (as of iOS 9.0.2) are:
- 65,536 bytes (65.5 KB) for a message
- 65,536 bytes (65.5 KB) for a user info
- 262,144 bytes (262.1 KB) for an application context
I don't know why Apple wouldn't document this, other than the fact that it can be difficult when sending dictionaries through WatchConnectivity to determine exactly how large they are. Certainly the acceptable sizes may change over time.
I couldn't find (and haven't personally observed) any maximum size limit when sending files, though I've noticed that it seems to get unreliable when you send large files (hundreds of MBs).
What is maximum size of dictionary can I send through watchconnectivity
The payload size is dependent on how you send the content from the phone to the watch. You may want to consider breaking your dictionary into smaller chunks, (smaller than 65KB), or write the dictionary to a file you can then send using WCSession's transferFile:metadata
method.
For more info, see this question and answer, and take a look at the docs for WCSession. The file size limits aren't documented, and may change in the future.
How to transfer large size video data from iPhone app to watch app
Solved my issue with out splitting NSData into multiple parts.Just did another solution.by downloading video in iOS side and saved into documents. then transferred file to watch app using
[_session transferFile:filePathUrl metadata:metadata];"
In watch app side. using this delegate got file and placed data in shared documents. then get file path and played video.
- (void)session:(WCSession *)session didReceiveFile:(WCSessionFile *)file
Related Topics
How to Detect an iOS App Installed or Upgraded
Uicontroleventeditingchanged Doesn't Get Fired When Using Settext of Uitextfield
Override Uiappearance Property for Mfmailcomposeviewcontroller
View Controller Responds to App Delegate Notifications in iOS 12 But Not in iOS 13
How to Set Accessibility Identifier in Interface Builder? Xcode4.2
Get Uiwebview Content's Height
How to Set Selected Segment Index in Uisegmentedcontrol
Difference Between Keychain and Nsuserdefault
Detect Uiimageview Touch in Swift
What Is Correct Format of Bundle Identifier in iOS
Pass Different Parameters to an Ibaction
iOS - Wkwebview Cross Origin Requests Are Only Supported for Http
How to Use iOS Speech Recognition in Offline Mode
How Should a Swift + Objective-C Project Be Setup for Unit Testing
How to Pass Data to Another Controller on Dismiss Viewcontroller