Re: Adding a watchOS complication to an existing project?

2017-03-04 Thread Saagar Jha
I remember doing this around a year ago, but IIRC there wasn’t an easy way to 
do this. I think I created a new extension with a complication and copy/pasted 
stuff from the new target.

Saagar Jha

> On Mar 3, 2017, at 07:08, Eric E. Dolecki  wrote:
> 
> Everything I've seen shows adding the complication on project creation. How
> does one go about adding it to a project later on? I have my watch app
> right where I want it, but I didn't think I would need a complication.
> Until today.
> 
> Thanks!
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/saagar%40saagarjha.com
> 
> This email sent to saa...@saagarjha.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Adding a watchOS complication to an existing project?

2017-03-03 Thread Eric E. Dolecki
Everything I've seen shows adding the complication on project creation. How
does one go about adding it to a project later on? I have my watch app
right where I want it, but I didn't think I would need a complication.
Until today.

Thanks!
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


watchOS

2016-12-06 Thread Gerriet M. Denkmann
watchOS 3
The watchApp  has NotificationController ← WKUserNotificationInterfaceController

watchApp gets a Local Notification with one associated UNNotificationAction 
with title = “Accept”

[NotificationController init]
[NotificationController didReceiveNotification:withCompletion:]
[NotificationController willActivate]

now the notification is shown with two buttons:
“Accept”
“Dismiss”

So  far ok.

But I have no idea how to tell whether the user did click on “Accept” or 
“Dismiss” .

On iOS I would use the UNUserNotificationCenterDelegate method
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:
but this is never called on watchOS.

It is called on the paired iOS app, but this does not help much. The watchApp 
needs to know whether the user did accept the Notification or not.

Gerriet.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Message from iOS to watchOS

2016-12-06 Thread J. Scott Tury
That is correct.  Local notifications only go to your local device - or the 
paired device (watch) associated with it.

If you want to be able to reach all iOS devices a user has, you would have to 
use a Remote notification service, and eventually talk to the APNS service. 

Notifications have always been application specific.  They were not built to 
allow applications to send information to another application.

Hopefully that was the information you were looking for.  :)

Scott Tury

> On Dec 6, 2016, at 4:01 AM, Gerriet M. Denkmann  wrote:
> 
> 
>> On 5 Dec 2016, at 21:27, J. Scott Tury  wrote:
>> 
>> Gerriet, 
>> 
>> Try setting a Local Notification to be delivered at a scheduled time in the 
>> future (like a minute later).  Then put your iPhone into lock mode, and turn 
>> off the display.  
>> 
>> This should force the OS to deliver your notification to your paired device. 
>>  
>> 
>> When the timer fires for the local notification, you should see it go to 
>> your watch first.  (It will also be delivered to your iPhone if you go to 
>> the lock screen.)
>> 
>> Keep experimenting.  :)
> 
> I followed your wise advice and found out that Local Notifications are not 
> delivered in these cases:
> • different Apps on same iOS Device   
> • same App on different iOS Devices
> which means the only case remaining is:
> • some App sends a Local Notification to itself.
> 
> If this sending iOS app is paired with a watchOS app and the iOS device is 
> locked and the watch is not locked then the Notification is sent also to the 
> watch (and the iOS does not get woken up).
> 
> Gerriet.
> 
>> 
>> Scott Tury
>> 
>>> On Dec 5, 2016, at 12:17 AM, Gerriet M. Denkmann  
>>> wrote:
>>> 
>>> 
>>>> On 5 Dec 2016, at 02:34, J. Scott Tury  wrote:
>>>> 
>>>> There are two concepts I think you are trying to ask in your email.  
>>>> 
>>>> 1. What are notifications?
>>>> 
>>>> 2. How can you communicate between your iPhone and your watch app?
>>>> 
>>>> These are two fundamentally different questions.
>>> 
>>> Thanks for clearing this up.
>>> 
>>> Trying Notifications first (just for learning):
>>> 
>>> […]
>>> 
>>>> Local Notifications allow you as a developer to not have to call a remote 
>>>> server to deliver a notification to the device your app is currently 
>>>> running on.  If you have a watch paired to the current device, the 
>>>> notification will show up on the watch if you are not currently using your 
>>>> iPhone.
>>>> 
>>>> The following class allows you to generate Local notifications.
>>>> https://developer.apple.com/reference/usernotifications/unnotificationrequest
>>> 
>>> Did this.
>>> 
>>>> 
>>>> You might want to spend a bit of time looking over the Apple documentation 
>>>> as to what Notifications are, and how they work:
>>>> https://developer.apple.com/notifications/
>>> 
>>> Did this too; also watched WWDC 2016 - Session 707 - Introduction to 
>>> Notifications again.
>>> At 3:00 it is said that “ Local Notifications are the ones that are used by 
>>> applications that are on the device".
>>> 
>>> So there are 3 posssiblities for Local Notifications:
>>> A   local = inside local Wifi or Bluetooth network
>>> B   local to the device (as hinted by WWDC talk)
>>> C   local to the sending app
>>> 
>>> I can send notifications from an app to itself. 
>>> But the receiving apps UNNotificationContentExtension gets never called.
>>> I only see UNUserNotificationCenterDelegate methods being invoked.
>>> 
>>> I cannot do: 
>>> • notification from one app to another on the same device
>>> • notification from one app to another on a different device
>>> 
>>> The sending app does see its own notifications via 
>>> getPendingNotificationRequestsWithCompletionHandler.
>>> It sets the categoryIdentifier of the sent UNNotificationContent to “my 
>>> test category”.
>>> 
>>> The receiving app (same iOS device) never sees anything. Although it does 
>>> setNotificationCategories with a UNNotificationCategory with the same 
>>> category: “my test category”.
>>> 
>>> This might indicate possibility “C”: local notifications are local to the 
>>> sending app.
>>> Or it may just be a proof that I am doin

Re: Message from iOS to watchOS

2016-12-06 Thread Gerriet M. Denkmann

> On 5 Dec 2016, at 21:27, J. Scott Tury  wrote:
> 
> Gerriet, 
> 
> Try setting a Local Notification to be delivered at a scheduled time in the 
> future (like a minute later).  Then put your iPhone into lock mode, and turn 
> off the display.  
> 
> This should force the OS to deliver your notification to your paired device.  
> 
> When the timer fires for the local notification, you should see it go to your 
> watch first.  (It will also be delivered to your iPhone if you go to the lock 
> screen.)
> 
> Keep experimenting.  :)

I followed your wise advice and found out that Local Notifications are not 
delivered in these cases:
• different Apps on same iOS Device 
• same App on different iOS Devices
which means the only case remaining is:
• some App sends a Local Notification to itself.

If this sending iOS app is paired with a watchOS app and the iOS device is 
locked and the watch is not locked then the Notification is sent also to the 
watch (and the iOS does not get woken up).

Gerriet.

> 
> Scott Tury
> 
>> On Dec 5, 2016, at 12:17 AM, Gerriet M. Denkmann  wrote:
>> 
>> 
>>> On 5 Dec 2016, at 02:34, J. Scott Tury  wrote:
>>> 
>>> There are two concepts I think you are trying to ask in your email.  
>>> 
>>> 1. What are notifications?
>>> 
>>> 2. How can you communicate between your iPhone and your watch app?
>>> 
>>> These are two fundamentally different questions.
>> 
>> Thanks for clearing this up.
>> 
>> Trying Notifications first (just for learning):
>> 
>> […]
>> 
>>> Local Notifications allow you as a developer to not have to call a remote 
>>> server to deliver a notification to the device your app is currently 
>>> running on.  If you have a watch paired to the current device, the 
>>> notification will show up on the watch if you are not currently using your 
>>> iPhone.
>>> 
>>> The following class allows you to generate Local notifications.
>>> https://developer.apple.com/reference/usernotifications/unnotificationrequest
>> 
>> Did this.
>> 
>>> 
>>> You might want to spend a bit of time looking over the Apple documentation 
>>> as to what Notifications are, and how they work:
>>> https://developer.apple.com/notifications/
>> 
>> Did this too; also watched WWDC 2016 - Session 707 - Introduction to 
>> Notifications again.
>> At 3:00 it is said that “ Local Notifications are the ones that are used by 
>> applications that are on the device".
>> 
>> So there are 3 posssiblities for Local Notifications:
>> Alocal = inside local Wifi or Bluetooth network
>> Blocal to the device (as hinted by WWDC talk)
>> Clocal to the sending app
>> 
>> I can send notifications from an app to itself. 
>> But the receiving apps UNNotificationContentExtension gets never called.
>> I only see UNUserNotificationCenterDelegate methods being invoked.
>> 
>> I cannot do: 
>> • notification from one app to another on the same device
>> • notification from one app to another on a different device
>> 
>> The sending app does see its own notifications via 
>> getPendingNotificationRequestsWithCompletionHandler.
>> It sets the categoryIdentifier of the sent UNNotificationContent to “my test 
>> category”.
>> 
>> The receiving app (same iOS device) never sees anything. Although it does 
>> setNotificationCategories with a UNNotificationCategory with the same 
>> category: “my test category”.
>> 
>> This might indicate possibility “C”: local notifications are local to the 
>> sending app.
>> Or it may just be a proof that I am doing it wrong.
>> 
>>> 
>>> Communicate between watchOS, and iPhone:
>> 
>> To be investigated later.
>> 
>>> 
>>> Scott
>>> 
>>>> On Dec 4, 2016, at 5:47 AM, Gerriet M. Denkmann  
>>>> wrote:
>>>> 
>>>> 
>>>>> On 4 Dec 2016, at 00:48, J. Scott Tury  wrote:
>>>>> 
>>>>> Notifications for iOS will show on whatever device you are using 
>>>>> currently.  If you’re not using one, it will show up on your watch.  If 
>>>>> you’re using a iPad, it’ll show up on your iPad.  If you’r using your 
>>>>> phone - it’ll show up there.  
>>>>> 
>>>>> There is no API that sends a Notification to a particular device per se.
>>>>> 
>>>>> I would just send a notification:  Local or remote.  The behavior should 
>>&g

Re: Message from iOS to watchOS

2016-12-05 Thread J. Scott Tury
Gerriet, 

Try setting a Local Notification to be delivered at a scheduled time in the 
future (like a minute later).  Then put your iPhone into lock mode, and turn 
off the display.  

This should force the OS to deliver your notification to your paired device.  

When the timer fires for the local notification, you should see it go to your 
watch first.  (It will also be delivered to your iPhone if you go to the lock 
screen.)

Keep experimenting.  :)

Scott Tury

> On Dec 5, 2016, at 12:17 AM, Gerriet M. Denkmann  wrote:
> 
> 
>> On 5 Dec 2016, at 02:34, J. Scott Tury  wrote:
>> 
>> There are two concepts I think you are trying to ask in your email.  
>> 
>> 1. What are notifications?
>> 
>> 2. How can you communicate between your iPhone and your watch app?
>> 
>> These are two fundamentally different questions.
> 
> Thanks for clearing this up.
> 
> Trying Notifications first (just for learning):
> 
> […]
> 
>> Local Notifications allow you as a developer to not have to call a remote 
>> server to deliver a notification to the device your app is currently running 
>> on.  If you have a watch paired to the current device, the notification will 
>> show up on the watch if you are not currently using your iPhone.
>> 
>> The following class allows you to generate Local notifications.
>> https://developer.apple.com/reference/usernotifications/unnotificationrequest
> 
> Did this.
> 
>> 
>> You might want to spend a bit of time looking over the Apple documentation 
>> as to what Notifications are, and how they work:
>> https://developer.apple.com/notifications/
> 
> Did this too; also watched WWDC 2016 - Session 707 - Introduction to 
> Notifications again.
> At 3:00 it is said that “ Local Notifications are the ones that are used by 
> applications that are on the device".
> 
> So there are 3 posssiblities for Local Notifications:
> A local = inside local Wifi or Bluetooth network
> B local to the device (as hinted by WWDC talk)
> C local to the sending app
> 
> I can send notifications from an app to itself. 
> But the receiving apps UNNotificationContentExtension gets never called.
> I only see UNUserNotificationCenterDelegate methods being invoked.
> 
> I cannot do: 
> • notification from one app to another on the same device
> • notification from one app to another on a different device
> 
> The sending app does see its own notifications via 
> getPendingNotificationRequestsWithCompletionHandler.
> It sets the categoryIdentifier of the sent UNNotificationContent to “my test 
> category”.
> 
> The receiving app (same iOS device) never sees anything. Although it does 
> setNotificationCategories with a UNNotificationCategory with the same 
> category: “my test category”.
> 
> This might indicate possibility “C”: local notifications are local to the 
> sending app.
> Or it may just be a proof that I am doing it wrong.
> 
>> 
>> Communicate between watchOS, and iPhone:
> 
> To be investigated later.
> 
>> 
>> Scott
>> 
>>> On Dec 4, 2016, at 5:47 AM, Gerriet M. Denkmann  wrote:
>>> 
>>> 
>>>> On 4 Dec 2016, at 00:48, J. Scott Tury  wrote:
>>>> 
>>>> Notifications for iOS will show on whatever device you are using 
>>>> currently.  If you’re not using one, it will show up on your watch.  If 
>>>> you’re using a iPad, it’ll show up on your iPad.  If you’r using your 
>>>> phone - it’ll show up there.  
>>>> 
>>>> There is no API that sends a Notification to a particular device per se.
>>>> 
>>>> I would just send a notification:  Local or remote.  The behavior should 
>>>> be essentially the same.  Send the title and message in the notification.  
>>>> You can add in any actions you would like your user to be able to have.
>>>> 
>>>> Scott
>>> 
>>> One fundamental question: what does “local” in Local Notification mean?
>>> 
>>> A:  “local” as in local Wlan 
>>> i.e. a local Notification gets sent to all iOS and watchOS devices in 
>>> the local Wlan
>>> 
>>> B:  “local” as inside the same app
>>> i.e. i.e. a local Notification gets sent just to the sending app.
>>> 
>>> I want to communicate between iOS app and watchOS app without using Apples 
>>> servers.
>>> If (as some tests seem to indicate) B is true, then this would be useless 
>>> for my purpose.
>>> How could one then communicate between iOS app and watchOS app?
>>> 
>>> Gerriet.
&

Re: Message from iOS to watchOS

2016-12-04 Thread Gerriet M. Denkmann

> On 5 Dec 2016, at 02:34, J. Scott Tury  wrote:
> 
> There are two concepts I think you are trying to ask in your email.  
> 
> 1. What are notifications?
> 
> 2. How can you communicate between your iPhone and your watch app?
> 
> These are two fundamentally different questions.

Thanks for clearing this up.

Trying Notifications first (just for learning):

[…]

> Local Notifications allow you as a developer to not have to call a remote 
> server to deliver a notification to the device your app is currently running 
> on.  If you have a watch paired to the current device, the notification will 
> show up on the watch if you are not currently using your iPhone.
> 
> The following class allows you to generate Local notifications.
> https://developer.apple.com/reference/usernotifications/unnotificationrequest

Did this.

> 
> You might want to spend a bit of time looking over the Apple documentation as 
> to what Notifications are, and how they work:
> https://developer.apple.com/notifications/

Did this too; also watched WWDC 2016 - Session 707 - Introduction to 
Notifications again.
At 3:00 it is said that “ Local Notifications are the ones that are used by 
applications that are on the device".

So there are 3 posssiblities for Local Notifications:
A   local = inside local Wifi or Bluetooth network
B   local to the device (as hinted by WWDC talk)
C   local to the sending app

I can send notifications from an app to itself. 
But the receiving apps UNNotificationContentExtension gets never called.
I only see UNUserNotificationCenterDelegate methods being invoked.

I cannot do: 
• notification from one app to another on the same device
• notification from one app to another on a different device

The sending app does see its own notifications via 
getPendingNotificationRequestsWithCompletionHandler.
It sets the categoryIdentifier of the sent UNNotificationContent to “my test 
category”.

The receiving app (same iOS device) never sees anything. Although it does 
setNotificationCategories with a UNNotificationCategory with the same category: 
“my test category”.

This might indicate possibility “C”: local notifications are local to the 
sending app.
Or it may just be a proof that I am doing it wrong.

> 
> Communicate between watchOS, and iPhone:

To be investigated later.

> 
> Scott
> 
>> On Dec 4, 2016, at 5:47 AM, Gerriet M. Denkmann  wrote:
>> 
>> 
>>> On 4 Dec 2016, at 00:48, J. Scott Tury  wrote:
>>> 
>>> Notifications for iOS will show on whatever device you are using currently. 
>>>  If you’re not using one, it will show up on your watch.  If you’re using a 
>>> iPad, it’ll show up on your iPad.  If you’r using your phone - it’ll show 
>>> up there.  
>>> 
>>> There is no API that sends a Notification to a particular device per se.
>>> 
>>> I would just send a notification:  Local or remote.  The behavior should be 
>>> essentially the same.  Send the title and message in the notification.  You 
>>> can add in any actions you would like your user to be able to have.
>>> 
>>> Scott
>> 
>> One fundamental question: what does “local” in Local Notification mean?
>> 
>> A:   “local” as in local Wlan 
>>  i.e. a local Notification gets sent to all iOS and watchOS devices in 
>> the local Wlan
>> 
>> B:   “local” as inside the same app
>>  i.e. i.e. a local Notification gets sent just to the sending app.
>> 
>> I want to communicate between iOS app and watchOS app without using Apples 
>> servers.
>> If (as some tests seem to indicate) B is true, then this would be useless 
>> for my purpose.
>> How could one then communicate between iOS app and watchOS app?
>> 
>> Gerriet.
>> 
>>> 
>>>> Date: Sat, 03 Dec 2016 13:48:31 +0700
>>>> From: "Gerriet M. Denkmann" 
>>>> To: cocoa-dev 
>>>> Subject: Message from iOS to watchOS
>>>> Message-ID: <2001a5e8-10f8-4b30-86c4-9dfee6198...@icloud.com>
>>>> Content-Type: text/plain; charset=us-ascii
>>>> 
>>>> I have a pair of apps: iOS + watchOS.
>>>> 
>>>> The iOS app would like (e.g. when the user taps a button) to send some 
>>>> (short) info to the watchOS app.
>>>> The watchOS app probably should show something like a Notification 
>>>> Controller Scene:
>>>>Message from iOS (title)
>>>>Something was done  (body)
>>>>Accept / Refuse (buttons)
>>>> 
>>>> I looked at UNUserNotificationCenter, but did not see any way to specify 
>>>> the recipient of the notification.
>>>> 
>>>> And I am not interested in Push Notifications.  
>>>> 
>>>> Gerriet.
>>>> 
>>>> P.S. This is my first watch app, so I am more than usual clueless.
>>>> 
>> 
> 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Message from iOS to watchOS

2016-12-04 Thread J. Scott Tury
There are two concepts I think you are trying to ask in your email.  

1. What are notifications?

2. How can you communicate between your iPhone and your watch app?

These are two fundamentally different questions.

Notifications:

Notifications are a way for you to deliver messages of something important to 
your user, and have them displayed in the OS - on the lock screen, or on a 
watch.  You can se these with notifications that someone has sent you a 
Message.  The OS will determine which of your devices actually displays the 
message.

Local Notifications allow you as a developer to not have to call a remote 
server to deliver a notification to the device your app is currently running 
on.  If you have a watch paired to the current device, the notification will 
show up on the watch if you are not currently using your iPhone.

The following class allows you to generate Local notifications.
https://developer.apple.com/reference/usernotifications/unnotificationrequest

You might want to spend a bit of time looking over the Apple documentation as 
to what Notifications are, and how they work:
https://developer.apple.com/notifications/

Communicate between watchOS, and iPhone:

Use the Watch Connectivity framework to communicate between your WatchKit 
extension and iOS app.  This allows you to send data to your companion 
application, and receive data from your companion application.  You can see the 
basic information about how this works at 
https://developer.apple.com/library/prerelease/content/documentation/General/Conceptual/WatchKitProgrammingGuide/SharingData.html
 . 

For class documentation you can reference:

https://developer.apple.com/reference/watchconnectivity

Hope this helps!

Scott

> On Dec 4, 2016, at 5:47 AM, Gerriet M. Denkmann  wrote:
> 
> 
>> On 4 Dec 2016, at 00:48, J. Scott Tury  wrote:
>> 
>> Notifications for iOS will show on whatever device you are using currently.  
>> If you’re not using one, it will show up on your watch.  If you’re using a 
>> iPad, it’ll show up on your iPad.  If you’r using your phone - it’ll show up 
>> there.  
>> 
>> There is no API that sends a Notification to a particular device per se.
>> 
>> I would just send a notification:  Local or remote.  The behavior should be 
>> essentially the same.  Send the title and message in the notification.  You 
>> can add in any actions you would like your user to be able to have.
>> 
>> Scott
> 
> One fundamental question: what does “local” in Local Notification mean?
> 
> A:“local” as in local Wlan 
>   i.e. a local Notification gets sent to all iOS and watchOS devices in 
> the local Wlan
> 
> B:“local” as inside the same app
>   i.e. i.e. a local Notification gets sent just to the sending app.
> 
> I want to communicate between iOS app and watchOS app without using Apples 
> servers.
> If (as some tests seem to indicate) B is true, then this would be useless for 
> my purpose.
> How could one then communicate between iOS app and watchOS app?
> 
> Gerriet.
> 
>> 
>>> Date: Sat, 03 Dec 2016 13:48:31 +0700
>>> From: "Gerriet M. Denkmann" 
>>> To: cocoa-dev 
>>> Subject: Message from iOS to watchOS
>>> Message-ID: <2001a5e8-10f8-4b30-86c4-9dfee6198...@icloud.com>
>>> Content-Type: text/plain; charset=us-ascii
>>> 
>>> I have a pair of apps: iOS + watchOS.
>>> 
>>> The iOS app would like (e.g. when the user taps a button) to send some 
>>> (short) info to the watchOS app.
>>> The watchOS app probably should show something like a Notification 
>>> Controller Scene:
>>> Message from iOS (title)
>>> Something was done  (body)
>>> Accept / Refuse (buttons)
>>> 
>>> I looked at UNUserNotificationCenter, but did not see any way to specify 
>>> the recipient of the notification.
>>> 
>>> And I am not interested in Push Notifications.  
>>> 
>>> Gerriet.
>>> 
>>> P.S. This is my first watch app, so I am more than usual clueless.
>>> 
> 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Message from iOS to watchOS

2016-12-04 Thread Gerriet M. Denkmann

> On 4 Dec 2016, at 00:48, J. Scott Tury  wrote:
> 
> Notifications for iOS will show on whatever device you are using currently.  
> If you’re not using one, it will show up on your watch.  If you’re using a 
> iPad, it’ll show up on your iPad.  If you’r using your phone - it’ll show up 
> there.  
> 
> There is no API that sends a Notification to a particular device per se.
> 
> I would just send a notification:  Local or remote.  The behavior should be 
> essentially the same.  Send the title and message in the notification.  You 
> can add in any actions you would like your user to be able to have.
> 
> Scott

One fundamental question: what does “local” in Local Notification mean?

A:  “local” as in local Wlan 
i.e. a local Notification gets sent to all iOS and watchOS devices in 
the local Wlan

B:  “local” as inside the same app
i.e. i.e. a local Notification gets sent just to the sending app.

I want to communicate between iOS app and watchOS app without using Apples 
servers.
If (as some tests seem to indicate) B is true, then this would be useless for 
my purpose.
How could one then communicate between iOS app and watchOS app?

Gerriet.

> 
>> Date: Sat, 03 Dec 2016 13:48:31 +0700
>> From: "Gerriet M. Denkmann" 
>> To: cocoa-dev 
>> Subject: Message from iOS to watchOS
>> Message-ID: <2001a5e8-10f8-4b30-86c4-9dfee6198...@icloud.com>
>> Content-Type: text/plain; charset=us-ascii
>> 
>> I have a pair of apps: iOS + watchOS.
>> 
>> The iOS app would like (e.g. when the user taps a button) to send some 
>> (short) info to the watchOS app.
>> The watchOS app probably should show something like a Notification 
>> Controller Scene:
>>  Message from iOS (title)
>>  Something was done  (body)
>>  Accept / Refuse (buttons)
>> 
>> I looked at UNUserNotificationCenter, but did not see any way to specify the 
>> recipient of the notification.
>> 
>> And I am not interested in Push Notifications.  
>> 
>> Gerriet.
>> 
>> P.S. This is my first watch app, so I am more than usual clueless.
>> 


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Message from iOS to watchOS

2016-12-03 Thread J. Scott Tury
Notifications for iOS will show on whatever device you are using currently.  If 
you’re not using one, it will show up on your watch.  If you’re using a iPad, 
it’ll show up on your iPad.  If you’r using your phone - it’ll show up there.  

There is no API that sends a Notification to a particular device per se.

I would just send a notification:  Local or remote.  The behavior should be 
essentially the same.  Send the title and message in the notification.  You can 
add in any actions you would like your user to be able to have.

Scott

> Date: Sat, 03 Dec 2016 13:48:31 +0700
> From: "Gerriet M. Denkmann" mailto:gerri...@icloud.com>>
> To: cocoa-dev mailto:cocoa-dev@lists.apple.com>>
> Subject: Message from iOS to watchOS
> Message-ID: <2001a5e8-10f8-4b30-86c4-9dfee6198...@icloud.com 
> <mailto:2001a5e8-10f8-4b30-86c4-9dfee6198...@icloud.com>>
> Content-Type: text/plain; charset=us-ascii
> 
> I have a pair of apps: iOS + watchOS.
> 
> The iOS app would like (e.g. when the user taps a button) to send some 
> (short) info to the watchOS app.
> The watchOS app probably should show something like a Notification Controller 
> Scene:
>   Message from iOS (title)
>   Something was done  (body)
>   Accept / Refuse (buttons)
> 
> I looked at UNUserNotificationCenter, but did not see any way to specify the 
> recipient of the notification.
> 
> And I am not interested in Push Notifications.  
> 
> Gerriet.
> 
> P.S. This is my first watch app, so I am more than usual clueless.
> 
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Message from iOS to watchOS

2016-12-02 Thread Gerriet M. Denkmann
I have a pair of apps: iOS + watchOS.

The iOS app would like (e.g. when the user taps a button) to send some (short) 
info to the watchOS app.
The watchOS app probably should show something like a Notification Controller 
Scene:
Message from iOS (title)
Something was done  (body)
Accept / Refuse (buttons)

I looked at UNUserNotificationCenter, but did not see any way to specify the 
recipient of the notification.

And I am not interested in Push Notifications.  

Gerriet.

P.S. This is my first watch app, so I am more than usual clueless.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com