watchkit

Wat is the difference between static notification and dynamic notification?

被刻印的时光 ゝ 提交于 2019-12-23 10:49:37
问题 Wat is the difference between static notification and dynamic notification? could anyone help me 回答1: Notifications come in 2 flavours Short and Long (as per iOS 8.2). The Long ones can be Static or Dynamic. All of them have a system "Dismiss" button. Short You can't customise these at all. They show your app logo, the title of the notification payload and your app name. Long - Static You can customise these on the Storyboard. You can't add buttons directly on the Storyboard but you can have

Is it safe to share access tokens with Watch Connectivity's updateApplicationContext?

自作多情 提交于 2019-12-23 10:48:12
问题 Is the applicationContext encrypted? Or is it simply stored as an unencrypted plist file? Because if it's the latter, I shouldn't be transferring access tokens using that. 回答1: The communication between the devices is encrypted, as documented in the iOS Security Guide. I haven't seen any documentation on whether the applicationContext storage location is encrypted, but to be safe you could encrypt the token yourself before queueing it to be sent and decrypt when the other device has received

iOS Error: FBSOpenApplicationErrorDomain error 5. What does this mean?

不羁岁月 提交于 2019-12-23 10:06:34
问题 I've seen reports for errors 4 but not for 5. I get this as a console message when I'm trying to use an "openParentApplication:reply" request. There isn't enough information in the log to know if the problem is in the iOS code, the WK code or the Simulator. I've restarted the sim, and cleaned the project. Any ideas? WK Code: - (IBAction)sendRequest { NSDictionary *request = @{@"request":@"Request1"}; [InterfaceController openParentApplication:request reply:^(NSDictionary *replyInfo, NSError

iOS Error: FBSOpenApplicationErrorDomain error 5. What does this mean?

谁说我不能喝 提交于 2019-12-23 10:05:57
问题 I've seen reports for errors 4 but not for 5. I get this as a console message when I'm trying to use an "openParentApplication:reply" request. There isn't enough information in the log to know if the problem is in the iOS code, the WK code or the Simulator. I've restarted the sim, and cleaned the project. Any ideas? WK Code: - (IBAction)sendRequest { NSDictionary *request = @{@"request":@"Request1"}; [InterfaceController openParentApplication:request reply:^(NSDictionary *replyInfo, NSError

Watchkit new session does not work

ε祈祈猫儿з 提交于 2019-12-23 09:38:30
问题 I have two view controllers in my watch extension.Whenever I call [[WCSession defaultSession] sendMessage:applicationData replyHandler:^(NSDictionary *reply) {} I get response only for the first view controller, and error in my second viewcontroller Error Domain=WCErrorDomain Code=7011 "Message reply failed." UserInfo={NSUnderlyingError=0x79f1f100 {Error Domain=WCErrorDomain Code=7010 "Payload contains unsupported type." UserInfo={NSLocalizedRecoverySuggestion=Only pass valid types.,

Possible to create watch face for Apple Watch?

谁说我不能喝 提交于 2019-12-23 09:26:31
问题 I've googled over the internet, still can't find an official answer. I can see I can make build glance scenes, but those are "hidden" one swipe away from the user beneath actual watch face. Are developers allowed to publish watch faces? 回答1: No, it is not possible. In the Apple WatchKit forums, an Apple evangelist links to this thread for the FAQ on creating a custom watch face. https://devforums.apple.com/thread/254629?tstart=15 Here is the link to the "official" WatchKit FAQ https:/

How to prevent the Apple Watch from going to sleep?

自作多情 提交于 2019-12-23 07:08:13
问题 We are working on an Apple Watch project, but the watch goes to sleep if uninterrupted with. Is there any way to prevent it from going to sleep? 回答1: As of my knowledge and other searches on this topic, at the moment is no api available to enable or even disable sleep mode for Apple Watch programmatically. 回答2: No-Sleep API Currently, there is no API to disable Apple Watch from going to sleep. You may wait until watchOS 3. Changing Sleep Time By User Any user can go to this path: Settings ->

Apple Watch pre-build action to change storyboard customModule references

倾然丶 夕夏残阳落幕 提交于 2019-12-23 06:56:44
问题 I currently have a project with 3 different versions of the same app (different branding and such), which is working just fine. I've since then added 3 new Apple Watch targets (1 for each app "version"), where which 2 of them reference the files in the "master" Apple Watch target. Everything works fine as long as i remember to change the module reference for each storyboard view, so that it maps to the correct interface controller in the corresponding watchkit extension target. However,

Passing Dictionary to Watch

一曲冷凌霜 提交于 2019-12-23 04:31:59
问题 I'm trying to pass data from iPhone -> Watch via Watch Connectivity using background transfer via Application Context method. iPhone TableViewController private func configureWCSession() { session?.delegate = self; session?.activateSession() print("Configured WC Session") } func getParsePassData () { let gmtTime = NSDate() // Query Parse let query = PFQuery(className: "data") query.whereKey("dateGame", greaterThanOrEqualTo: gmtTime) query.findObjectsInBackgroundWithBlock { (objects:[AnyObject

Watchkit Extension Cannot Read from iCloud

人走茶凉 提交于 2019-12-23 03:37:06
问题 I am looking for the watchkit extension to read a file from iCloud document storage. I wrote the file from the iOS app which is also able to read it. I am leveraging a shared class so the code is the same. The problem is that on the watch, the URL for the cloud container returns nil. static func readFromFile(fileName:String) -> String? { let fileManager = FileManager.default var cloudURL = fileManager.url(forUbiquityContainerIdentifier: nil) cloudURL = cloudURL?.appendingPathComponent(