WatchKit: Handoff from static interface of Long Look? - ios

Our app has implemented the handoff functionality between push notification on the Apple Watch (in our WKUserNotificationInterfaceController subclass) and the main iPhone app. It works with dynamic interface of the notification long look.
However, when I open a notification from the notification center on the Apple Watch (thus resulting in a static long look), handoff is not working with iPhone. The handoff icon is not shown at all on the iPhone lock screen.
I also noticed that handoff does work from static long looks of:
Apps without custom long look implementations (the ones with roundrect icons in notification center)
Messages app on the Watch, and maybe more from Apple
Anyone noticed this problem too? Are there any workarounds that make handoff work from a static long look?

Since there's no way to call the call the appropriate Handoff methods for a static notification - owing to the inability to use a custom class - there's no way to accomplish what you're looking for at this time.

Related

How to transfer user from Apple Watch Notification to Apple Watch App?

When a Push Notification is displayed on the Apple Watch, the only possibility to open the Apple Watch App is to tap the App icon in the upper left corner.
Now, as I´m reviewing our tracking data, no user seems to know this.
How can I install another tap area in the Notification View which transfers the user in the Watch App?
The first thing to understand is that notifications aren't specific to either the iPhone or the Apple Watch. They're the same old notifications we've been dealing with for years, and nothing has changed. That means that there's no such thing as an "Apple Watch-specific notification" or an "iPhone-only notification." iOS decides where to route a notification based on its own heuristics. There is no way to programmatically control which device receives an alert.
That said, stk is correct that you will have to add actions to a category that you set for your notification. The Notification Essentials section of the Apple Watch Programming Guide has some sample code.
Because there is no such thing as an iPhone- or Watch-specific notification, you're correct that you will see these actions on both devices. So, you'll have to do something meaningful on both platforms. This makes sense, because iOS decides where to send the notification, so it should be handled appropriately wherever it's sent.

How do you send a "tap" to an apple watch programmatically

I have a project in mind where I would have to be able to send a tap/haptic feedback/vibration to an Apple Watch. Is this possible with Watchkit? If so, how can I accomplish it. (preferably objective-c).
Unfortunately, there is no method in WatchKit to play a sound or trigger Taptic feedback. The closest you can get is to send a UILocalNotification, but even then, you can't control where that notification is displayed, as iOS decides whether to send it to the iPhone or the Watch. Hopefully this will be added in a future update.

Apple Watch: dynamic Long Look not shown, when push opened from Notification Center

I implemented a custom dynamic Long Look for push notifications on the Apple Watch. This dynamic long look is shown correctly, when I immediately raise my arm after receiving a push notification. However, if I respond later, and tap on the push notification from within Notification Center on the Watch, only the static long look is shown.
Is this normal behavior or am I doing something wrong? How are your dynamic long looks behaving?
For clarity here are the steps to reproduce.
This will bring up the dynamic long look:
I receive a push notification on the Watch
I immediately raise my arm to see the push
But this will only bring up the static long look:
I receive a push notification on the Watch
Ignore it at first. After one minute activate the Watch
Drag down from top of the Watch face to bring up Notification Center
Tap on the ignored push
I suspect all notifications that are accessed through the notifications center of the watch are by default static.
I can't find any documentation to confirm this though. Would be a major bummer if that's the case.
I also experience the same problem and it is pretty frustrating because like Sohail my action buttons refer to the dynamic long look notification content. I dont know if I get the apple documentation right here but the following lines sound like the proof to me that apple won´t show your dynamic long look notifications from the notification center:
Use the static notification interface to define a simple version of your custom notification interface. The purpose of a static interface is to provide a fallback interface in the event that your WatchKit extension is unable to configure the dynamic interface in a timely manner. The interface is also displayed in Notification Center.
In the first place I thought this means the notification center just shows the static notification interface in it´s "main table view" but this is not the case. The notification center itself only shows the notification alert message and not the whole interface. So I think what they mean in the documentation is: "The interface is also displayed when opening notifications from the notification center"

Getting refrence of current touch event similar to VoiceOver

I am developing an iphone app for my internal purpose(dont want to put it on App Store).
I want Some functionality similar to built in VoiceOver Application in iPhone.
In my app, i want my app to be kept in background, and when user touches to any button,textfield or any UIElement, then my backgrounded app should be able to know the accessibility label of that element which was touched by User and then perform some action(similar to speech in voiceover). Is there any private apis available to get this detail. If it is possible for jailbroken, then still it is OK for me.
You should try to use IOHid framework to do this.
Look at this question, because it has the code how to do this:
iOS touch event notifications (private API)
Although, I am not sure this method is still applicable in iOS 7 (I believe it was discussed in iOS 6 timeframe).

Changing the behavior of the iOS Lockscreen

Is there a way to change the behavior of the iOS Lockscreen? For instance, can an app, if active, provide a user with dynamic content, such as pictures, as the phone's background, and, in addition, allow a user to swipe left (in addition to swiping right, if they want to unlock the phone) to engage said content?
Is there a way to change the behavior of the iOS Lockscreen?
No.
For instance, can an app, if active...
No.
iOS doesn't provide any API that would allow the sort of thing that you describe. It might be possible to modify or replace the lock screen if you jailbreak your phone -- all bets are off at that point. But an app that uses the Apple-provided API has no way to modify the lock screen.
Also, note that if the device is locked, your app won't be active. You may have intended a looser definition of "active," but looking at the linked chart of app states will help you understand that what you're looking to do isn't achievable with the current API. Apps have to be active to receive events, but a locked phone implies that your app will be in an inactive, background, or suspended state if it's running at all.
No. (Not if you're talking about an 'app' in the sense of the App Store)
The only way an app can interact with the lock screen is through notifications, and cannot alter the standard lock screen interface.
You can alter the lock screen with a MobileSubstrate tweak on a jailbroken phone, but this requires reverse-engineering SpringBoard (the iOS launcher app), can be quite complicated and obviously cannot be distributed through the App Store

Resources