Re: Limiting app installation

2016-09-05 Thread Greg Weston
> Does Apple allow a developer to limit the number of devices on which an app 
> can run? I have an app that requires you to pay more to install it on more 
> than one iPhone and two iPads. It should go without saying these are all on 
> the same Apple ID.
> 
> I thought Apple didn't allow this. But maybe they just don't provide a 
> mechanism for imposing this limitation, but don't prevent developers from 
> implementing their own?

The EULA tells personal users that they can install an app on any device they 
own, and business users that it can either be installed on all devices 
controlled by one user or on a single device shared among multiple users. I 
would expect attempts to override that promise to be frowned upon.
___

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: Limiting app installation

2016-09-05 Thread David Brittain
A consumable in-app purchase could be used for this. They are not restored
to other devices. However if the user deleted the app and reinstalled it
then the purchase would be lost unless you tracked it via some form of
online account.

On Monday, September 5, 2016, Rick Mann  wrote:

> Does Apple allow a developer to limit the number of devices on which an
> app can run? I have an app that requires you to pay more to install it on
> more than one iPhone and two iPads. It should go without saying these are
> all on the same Apple ID.
>
> I thought Apple didn't allow this. But maybe they just don't provide a
> mechanism for imposing this limitation, but don't prevent developers from
> implementing their own?
>
> TIA,
>
> --
> Rick Mann
> rm...@latencyzero.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/websites%40paperetto.com
>
> This email sent to websi...@paperetto.com 



-- 
David Brittain
da...@paperetto.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

Re: Window Opened Notification?

2016-09-05 Thread Andy Lee
Dave, can you clarify whether you want is:

1. a notification when the frontmost window changes, or
2. a notification when some application opens a new window?

If #1, observing these NSWorkspace properties looks like the way  to go.  If 
#2, bear in mind that applications can open windows that don't become the 
active window.  For example, it is possible to open links in emails, tweets, 
etc., that cause the browser to open a new window in the background.  The link 
might not open a new window at all, but rather a new tab in an existing browser 
window.

I'm guessing you want #1, which is fortunately the easy (or easier) case. :)  
Just checking.

--Andy

On Sep 5, 2016, at 7:58 PM, dangerwillrobinsondan...@gmail.com wrote:
> 
> The two key properties in NSWorkspace
> ARE
> KVO observable. 
> Reading the docs was easy ;)
> frontmostApplication
> And
> menuBarOwningApplication
> 
> Sent from my iPhone
> 
>> On Sep 6, 2016, at 8:36 AM, Alex Zavatone  wrote:
>> 
>> There are examples online for making NSArray observable if these are array 
>> structures. 
>> 
>> If you try this path, try it with a simple case where you make an NSArray 
>> and then change it.
>> 
>> Sent from my iPhone
>> 
>>> On Sep 5, 2016, at 4:25 PM, dangerwillrobinsondan...@gmail.com wrote:
>>> 
>>> Not sure if it's KVO observable but NSWorkspace might be worth looking into 
>>> as well as NSRunningApplication
>>> 
>>> Sent from my iPhone
>>> 
>>> On Sep 6, 2016, at 3:55 AM, Dave  wrote:
>>> 
> Would it be possible to observe which window becomes the front window and 
> then send a notification?
 
 That’s what I am trying to find out……
 
 Cheers
 Dave
 
 
 
 ___
 
 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/dangerwillrobinsondanger%40gmail.com
 
 This email sent to dangerwillrobinsondan...@gmail.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/zav%40mac.com
>>> 
>>> This email sent to z...@mac.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/aglee%40mac.com
> 
> This email sent to ag...@mac.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

Re: Window Opened Notification?

2016-09-05 Thread dangerwillrobinsondanger
The two key properties in NSWorkspace
ARE
KVO observable. 
Reading the docs was easy ;)
frontmostApplication
And
menuBarOwningApplication

Sent from my iPhone

> On Sep 6, 2016, at 8:36 AM, Alex Zavatone  wrote:
> 
> There are examples online for making NSArray observable if these are array 
> structures. 
> 
> If you try this path, try it with a simple case where you make an NSArray and 
> then change it.
> 
> Sent from my iPhone
> 
>> On Sep 5, 2016, at 4:25 PM, dangerwillrobinsondan...@gmail.com wrote:
>> 
>> Not sure if it's KVO observable but NSWorkspace might be worth looking into 
>> as well as NSRunningApplication
>> 
>> Sent from my iPhone
>> 
>> On Sep 6, 2016, at 3:55 AM, Dave  wrote:
>> 
 Would it be possible to observe which window becomes the front window and 
 then send a notification?
>>> 
>>> That’s what I am trying to find out……
>>> 
>>> Cheers
>>> Dave
>>> 
>>> 
>>> 
>>> ___
>>> 
>>> 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/dangerwillrobinsondanger%40gmail.com
>>> 
>>> This email sent to dangerwillrobinsondan...@gmail.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/zav%40mac.com
>> 
>> This email sent to z...@mac.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

Re: Window Opened Notification?

2016-09-05 Thread Alex Zavatone
There are examples online for making NSArray observable if these are array 
structures. 

If you try this path, try it with a simple case where you make an NSArray and 
then change it.

Sent from my iPhone

> On Sep 5, 2016, at 4:25 PM, dangerwillrobinsondan...@gmail.com wrote:
> 
> Not sure if it's KVO observable but NSWorkspace might be worth looking into 
> as well as NSRunningApplication
> 
> Sent from my iPhone
> 
> On Sep 6, 2016, at 3:55 AM, Dave  wrote:
> 
>>> Would it be possible to observe which window becomes the front window and 
>>> then send a notification?
>> 
>> That’s what I am trying to find out……
>> 
>> Cheers
>> Dave
>> 
>> 
>> 
>> ___
>> 
>> 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/dangerwillrobinsondanger%40gmail.com
>> 
>> This email sent to dangerwillrobinsondan...@gmail.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/zav%40mac.com
> 
> This email sent to z...@mac.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

Re: Limiting app installation

2016-09-05 Thread dangerwillrobinsondanger
The developer forums are also a good place. 

Sent from my iPhone

> On Sep 6, 2016, at 6:28 AM, M Pulis  wrote:
> 
> Have you even read the App Store guidelines yet?
> 
> And Apple has a list of lists... try that.
> 
> Finding you a list is still not a cocoa issue.
> 
> Gary
> 
> 
>> On Sep 5, 2016, at 2:17 PM, Rick Mann wrote:
>> 
>> Fine, can you suggest a better list?
>> 
>>> On Sep 5, 2016, at 14:08 , M Pulis  wrote:
>>> 
>>> If it isn't listed in the app store guidelines, either go for it or ask 
>>> Apple directly (perhaps a different mailing list) as this off-topic (not a 
>>> cocoa issue but a distribution issue).
>>> 
>>> Gary
>>> 
 On Sep 5, 2016, at 1:35 PM, Rick Mann wrote:
 
 Yeah, I know one has to roll their own. I'm asking if it's allowed by 
 Apple.
 
> On Sep 5, 2016, at 13:34 , M Pulis  wrote:
> 
> My bet would be "no" as that would already be part of submitting an app 
> to the store.
> 
> You could prepare a business case to request this from Apple, but I'd 
> suspect you'll need to roll your own code, and that won't be easy if not 
> impossible without Apple's support.
> 
> Perhaps Enterprise or B-2-B distribution supports this somehow; it's been 
> a while since I've done enterprise apps.
> 
> Good luck!
> 
> Gary
> 
> 
>> On Sep 5, 2016, at 11:44 AM, Rick Mann wrote:
>> 
>> Does Apple allow a developer to limit the number of devices on which an 
>> app can run? I have an app that requires you to pay more to install it 
>> on more than one iPhone and two iPads. It should go without saying these 
>> are all on the same Apple ID.
>> 
>> I thought Apple didn't allow this. But maybe they just don't provide a 
>> mechanism for imposing this limitation, but don't prevent developers 
>> from implementing their own?
>> 
>> TIA,
>> 
>> -- 
>> Rick Mann
>> rm...@latencyzero.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/toothpic%40fastq.com
>> 
>> This email sent to tooth...@fastq.com
 
 
 -- 
 Rick Mann
 rm...@latencyzero.com
>> 
>> 
>> -- 
>> Rick Mann
>> rm...@latencyzero.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/dangerwillrobinsondanger%40gmail.com
> 
> This email sent to dangerwillrobinsondan...@gmail.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

Re: Limiting app installation

2016-09-05 Thread M Pulis

Have you even read the App Store guidelines yet?

And Apple has a list of lists... try that.

Finding you a list is still not a cocoa issue.

Gary


On Sep 5, 2016, at 2:17 PM, Rick Mann wrote:


Fine, can you suggest a better list?


On Sep 5, 2016, at 14:08 , M Pulis  wrote:

If it isn't listed in the app store guidelines, either go for it or  
ask Apple directly (perhaps a different mailing list) as this off- 
topic (not a cocoa issue but a distribution issue).


Gary

On Sep 5, 2016, at 1:35 PM, Rick Mann wrote:

Yeah, I know one has to roll their own. I'm asking if it's allowed  
by Apple.



On Sep 5, 2016, at 13:34 , M Pulis  wrote:

My bet would be "no" as that would already be part of submitting  
an app to the store.


You could prepare a business case to request this from Apple, but  
I'd suspect you'll need to roll your own code, and that won't be  
easy if not impossible without Apple's support.


Perhaps Enterprise or B-2-B distribution supports this somehow;  
it's been a while since I've done enterprise apps.


Good luck!

Gary


On Sep 5, 2016, at 11:44 AM, Rick Mann wrote:

Does Apple allow a developer to limit the number of devices on  
which an app can run? I have an app that requires you to pay  
more to install it on more than one iPhone and two iPads. It  
should go without saying these are all on the same Apple ID.


I thought Apple didn't allow this. But maybe they just don't  
provide a mechanism for imposing this limitation, but don't  
prevent developers from implementing their own?


TIA,

--
Rick Mann
rm...@latencyzero.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/toothpic%40fastq.com

This email sent to tooth...@fastq.com





--
Rick Mann
rm...@latencyzero.com








--
Rick Mann
rm...@latencyzero.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

Re: Window Opened Notification?

2016-09-05 Thread dangerwillrobinsondanger
Not sure if it's KVO observable but NSWorkspace might be worth looking into as 
well as NSRunningApplication

Sent from my iPhone

On Sep 6, 2016, at 3:55 AM, Dave  wrote:

>> Would it be possible to observe which window becomes the front window and 
>> then send a notification?
> 
> That’s what I am trying to find out……
> 
> Cheers
> Dave
> 
> 
> 
> ___
> 
> 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/dangerwillrobinsondanger%40gmail.com
> 
> This email sent to dangerwillrobinsondan...@gmail.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

Re: Limiting app installation

2016-09-05 Thread Rick Mann
Fine, can you suggest a better list?

> On Sep 5, 2016, at 14:08 , M Pulis  wrote:
> 
> If it isn't listed in the app store guidelines, either go for it or ask Apple 
> directly (perhaps a different mailing list) as this off-topic (not a cocoa 
> issue but a distribution issue).
> 
> Gary
> 
> On Sep 5, 2016, at 1:35 PM, Rick Mann wrote:
> 
>> Yeah, I know one has to roll their own. I'm asking if it's allowed by Apple.
>> 
>>> On Sep 5, 2016, at 13:34 , M Pulis  wrote:
>>> 
>>> My bet would be "no" as that would already be part of submitting an app to 
>>> the store.
>>> 
>>> You could prepare a business case to request this from Apple, but I'd 
>>> suspect you'll need to roll your own code, and that won't be easy if not 
>>> impossible without Apple's support.
>>> 
>>> Perhaps Enterprise or B-2-B distribution supports this somehow; it's been a 
>>> while since I've done enterprise apps.
>>> 
>>> Good luck!
>>> 
>>> Gary
>>> 
>>> 
>>> On Sep 5, 2016, at 11:44 AM, Rick Mann wrote:
>>> 
 Does Apple allow a developer to limit the number of devices on which an 
 app can run? I have an app that requires you to pay more to install it on 
 more than one iPhone and two iPads. It should go without saying these are 
 all on the same Apple ID.
 
 I thought Apple didn't allow this. But maybe they just don't provide a 
 mechanism for imposing this limitation, but don't prevent developers from 
 implementing their own?
 
 TIA,
 
 -- 
 Rick Mann
 rm...@latencyzero.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/toothpic%40fastq.com
 
 This email sent to tooth...@fastq.com
>>> 
>> 
>> 
>> -- 
>> Rick Mann
>> rm...@latencyzero.com
>> 
>> 
>> 
> 


-- 
Rick Mann
rm...@latencyzero.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

Re: Limiting app installation

2016-09-05 Thread M Pulis
If it isn't listed in the app store guidelines, either go for it or  
ask Apple directly (perhaps a different mailing list) as this off- 
topic (not a cocoa issue but a distribution issue).


Gary

On Sep 5, 2016, at 1:35 PM, Rick Mann wrote:

Yeah, I know one has to roll their own. I'm asking if it's allowed  
by Apple.



On Sep 5, 2016, at 13:34 , M Pulis  wrote:

My bet would be "no" as that would already be part of submitting an  
app to the store.


You could prepare a business case to request this from Apple, but  
I'd suspect you'll need to roll your own code, and that won't be  
easy if not impossible without Apple's support.


Perhaps Enterprise or B-2-B distribution supports this somehow;  
it's been a while since I've done enterprise apps.


Good luck!

Gary


On Sep 5, 2016, at 11:44 AM, Rick Mann wrote:

Does Apple allow a developer to limit the number of devices on  
which an app can run? I have an app that requires you to pay more  
to install it on more than one iPhone and two iPads. It should go  
without saying these are all on the same Apple ID.


I thought Apple didn't allow this. But maybe they just don't  
provide a mechanism for imposing this limitation, but don't  
prevent developers from implementing their own?


TIA,

--
Rick Mann
rm...@latencyzero.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/toothpic%40fastq.com

This email sent to tooth...@fastq.com





--
Rick Mann
rm...@latencyzero.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

Re: Limiting app installation

2016-09-05 Thread Quincey Morris
On Sep 5, 2016, at 13:35 , Rick Mann  wrote:
> 
> I'm asking if it's allowed by Apple.

I think your restriction falls foul of:

> 2.4.5 Apps distributed via the Mac App Store …
> 
>  (vi) They may not present a license screen at launch, require license keys, 
> or implement their own copy protection.

and:

> 3.1.4 Content Codes: Apps may not use their own mechanisms to unlock content 
> or functionality, such as license keys, augmented reality markers, QR codes, 
> etc.


For example, if you run a server to keep track of the device counts, the 
interaction between the device and the server [that sends the (?) Apple ID and 
gets back a permission] sounds exactly like your own “mechanism” for 
implementing “license keys”.

___

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: Limiting app installation

2016-09-05 Thread Rick Mann
Yeah, I know one has to roll their own. I'm asking if it's allowed by Apple.

> On Sep 5, 2016, at 13:34 , M Pulis  wrote:
> 
> My bet would be "no" as that would already be part of submitting an app to 
> the store.
> 
> You could prepare a business case to request this from Apple, but I'd suspect 
> you'll need to roll your own code, and that won't be easy if not impossible 
> without Apple's support.
> 
> Perhaps Enterprise or B-2-B distribution supports this somehow; it's been a 
> while since I've done enterprise apps.
> 
> Good luck!
> 
> Gary
> 
> 
> On Sep 5, 2016, at 11:44 AM, Rick Mann wrote:
> 
>> Does Apple allow a developer to limit the number of devices on which an app 
>> can run? I have an app that requires you to pay more to install it on more 
>> than one iPhone and two iPads. It should go without saying these are all on 
>> the same Apple ID.
>> 
>> I thought Apple didn't allow this. But maybe they just don't provide a 
>> mechanism for imposing this limitation, but don't prevent developers from 
>> implementing their own?
>> 
>> TIA,
>> 
>> -- 
>> Rick Mann
>> rm...@latencyzero.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/toothpic%40fastq.com
>> 
>> This email sent to tooth...@fastq.com
> 


-- 
Rick Mann
rm...@latencyzero.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

Re: Limiting app installation

2016-09-05 Thread M Pulis
My bet would be "no" as that would already be part of submitting an  
app to the store.


You could prepare a business case to request this from Apple, but I'd  
suspect you'll need to roll your own code, and that won't be easy if  
not impossible without Apple's support.


Perhaps Enterprise or B-2-B distribution supports this somehow; it's  
been a while since I've done enterprise apps.


Good luck!

Gary


On Sep 5, 2016, at 11:44 AM, Rick Mann wrote:

Does Apple allow a developer to limit the number of devices on which  
an app can run? I have an app that requires you to pay more to  
install it on more than one iPhone and two iPads. It should go  
without saying these are all on the same Apple ID.


I thought Apple didn't allow this. But maybe they just don't provide  
a mechanism for imposing this limitation, but don't prevent  
developers from implementing their own?


TIA,

--
Rick Mann
rm...@latencyzero.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/toothpic%40fastq.com

This email sent to tooth...@fastq.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

Re: How to silently use Proxy authentication credentials from Keychain, like Safari, Mail, etc.

2016-09-05 Thread Jens Alfke

> On Sep 5, 2016, at 6:51 AM, Motti Shneor  wrote:
> 
> 1. Why don’t Safari, Mail, Photos, and other standard apps trigger such 
> dialog when they clearly use proxy settings (including credentials) to go to 
> the internet? Is this behavior acceptable, and how is it done?

Those apps are signed by Apple, so they’re automatically trusted.

Note that the Keychain permission alert only appears _once_ for any app. You 
may be seeing it every time you run your code, but that’s because every time 
you change the code, it makes the app look different to the system. (You can 
get around this by signing the app; then the signature remains the same between 
launches.)

> 2. All proxy settings seem to be system-wide. Why do the credentials reside 
> in the active user’s Login keychain, instead of the “System” keychain? Is 
> there at all a way (except for manually editing the keychains) to set-up 
> proxies for ALL users, including credentials?

Have you verified that different users inherit the same proxy settings? If so, 
I agree that it’s odd that the credentials would be in the Login keychain.

> 3. Could I, at the time of installation of my product, ask once for this 
> access, and have this “trust” saved for my installed daemon? That will be 
> acceptable, as IT install our tool, and have rights for this. If this is 
> possible - where and how could I do it?

I don’t know. It may be related to the way that app helper processes are 
authenticated, i.e. being signed with related certs. But this isn’t something 
I’ve ever done.

One other possibility is:
* Installer gets the proxy settings, including getting user permission to 
access credentials
* Installer saves the settings & credentials into a file only accessible to root
* Daemon reads the settings from that file

> 4. Could I avoid the whole proxy-authentication protocol, and use some OS-X 
> API that would do it for me (in the likes of NSURLSession) Is there some 
> official lower-level API to do this? Otherwise I need to implement all kinds 
> of authentication schemes (kerberos, NTLM, digest etc.), which seems silly on 
> an OS that already knows how to do it? Clearly OS implementation will be 
> superior to mine...

I think NSURLSession is the only API that includes proxy support. For some 
reason CFStream doesn’t, even though it can do HTTP requests.

—Jens
___

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: Window Opened Notification?

2016-09-05 Thread Dave
> Would it be possible to observe which window becomes the front window and 
> then send a notification?
> 

That’s what I am trying to find out……

Cheers
Dave



___

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

Limiting app installation

2016-09-05 Thread Rick Mann
Does Apple allow a developer to limit the number of devices on which an app can 
run? I have an app that requires you to pay more to install it on more than one 
iPhone and two iPads. It should go without saying these are all on the same 
Apple ID.

I thought Apple didn't allow this. But maybe they just don't provide a 
mechanism for imposing this limitation, but don't prevent developers from 
implementing their own?

TIA,

-- 
Rick Mann
rm...@latencyzero.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

Re: Window Opened Notification?

2016-09-05 Thread Dave

> On 5 Sep 2016, at 18:27, dangerwillrobinsondan...@gmail.com wrote:
> 
> Not really. 
> You could use CGWindowList but you'll be polling. 

I was wondering if it would be possible to make the Window list Key-Value 
observable? 

I’m Trying to avoid running a timer and polling the Window list.

Cheers
Dave
> 
> 
> Sent from my iPhone
> 
>> On Sep 6, 2016, at 1:09 AM, Dave  wrote:
>> 
>> Hi All,
>> 
>> Is there any way other that using Accessibility that you can tell when a 
>> window is opened is any application? Something like a running app 
>> notification?
>> 
>> If it is not possible using Cocoa? Is there any way of doing this via the 
>> Window Server? 
>> 
>> All the Best
>> Dave
>> 
>> 
>> ___
>> 
>> 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/dangerwillrobinsondanger%40gmail.com
>> 
>> This email sent to dangerwillrobinsondan...@gmail.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

Window Opened Notification?

2016-09-05 Thread Dave
Hi All,

Is there any way other that using Accessibility that you can tell when a window 
is opened is any application? Something like a running app notification?

If it is not possible using Cocoa? Is there any way of doing this via the 
Window Server? 

All the Best
Dave


___

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

How to silently use Proxy authentication credentials from Keychain, like Safari, Mail, etc.

2016-09-05 Thread Motti Shneor
Hello everyone. 

We use C++ boost asyncio for cross-platform networking. Hence, on Mac OS-X, we 
can’t use higher-level APIs (such as NSURLSession). We use our own proprietary 
binary protocol, but we need to pass it sometimes through HTTP Proxy on client 
sites. We use the “HTTP Connect” command to make a secure tunnel through the 
proxy, and work as normal.  This works fine (Mac, LinuX, Windows etc.) when we 
provide proxy configuration of our own.

Now I’m trying to integrate with the OS-X normal proxy settings. I found the 
great (if old) code-sample CFProxySupportTool, read lots of documentation, and 
was able to neatly read and support HTTP, HTTPS, Auto-Configured and PAC based 
settings. 

Yet, the credential keys in CFProxySupport (username and password) are normally 
empty, as they are stored in the keychain. I found a way to find and read 
credentials from the key-chain, but my test tool always triggers a dialog, 
asking the user permission to allow it access to the key-chain. Very reasonable 
for an App.

I tried this as root (our product is a  monitoring tool, running as a 
systemwide daemon, managed by launchd, running always running as root) but that 
only complicated things further - not only the dialog popped up - my code no 
longer accessed the correct key-chain (the login key-chain of the active user) 
but rather the system key-chain where the credentials are missing.

My questions:
1. Why don’t Safari, Mail, Photos, and other standard apps trigger such dialog 
when they clearly use proxy settings (including credentials) to go to the 
internet? Is this behavior acceptable, and how is it done?

2. All proxy settings seem to be system-wide. Why do the credentials reside in 
the active user’s Login keychain, instead of the “System” keychain? Is there at 
all a way (except for manually editing the keychains) to set-up proxies for ALL 
users, including credentials?

3. Could I, at the time of installation of my product, ask once for this 
access, and have this “trust” saved for my installed daemon? That will be 
acceptable, as IT install our tool, and have rights for this. If this is 
possible - where and how could I do it?

4. Could I avoid the whole proxy-authentication protocol, and use some OS-X API 
that would do it for me (in the likes of NSURLSession) Is there some official 
lower-level API to do this? Otherwise I need to implement all kinds of 
authentication schemes (kerberos, NTLM, digest etc.), which seems silly on an 
OS that already knows how to do it? Clearly OS implementation will be superior 
to mine...

Any hint will be greatly appreciated.

Thanks!
 
Motti Shneor
___

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: Running apps compiled for newer OS X versions on older versions (rant)

2016-09-05 Thread Alastair Houghton
On 5 Sep 2016, at 13:48, Mark Allan  wrote:
> 
> It's probably also worth noting that you *can* compile for 10.6 using the 
> tools on 10.11 by adjusting the deployment target.

This is *usually* but not always true.  There are sometimes backwards 
compatibility problems that require you to use older build tools or SDKs.  (The 
most annoying case is if you need a KEXT for some reason, in which case you 
definitely can’t build KEXTs compatible with 10.6 using the 10.11 SDK; in fact, 
you can’t even build KEXTs compatible with *10.10* with the 10.11 SDK, which is 
a PITA because Xcode 7 dropped the 10.10 SDK and Xcode 6 won’t even run on 
10.11...)

Another thing to watch out for is that some APIs change behaviour based on the 
system on which your code was built; this happens because of backwards 
compatibility measures built in to OS X itself, but can be a problem if you 
take older code and just rebuild it with a newer Xcode without going through 
checking everything.  Often the changes are subtle and won’t matter too much, 
but you can’t assume that will always be the case - e.g. I remember one 
instance where a load of percentages magically multiplied themselves by 100 
because of changes in the way NSNumberFormatter works.

So, yes, this is your first point of call, but you will need to go and check 
that your code genuinely does work on the system you’re targeting because 
occasionally things are not quite as simple as they seem.

Kind regards,

Alastair.

--
http://alastairs-place.net


___

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: Running apps compiled for newer OS X versions on older versions (rant)

2016-09-05 Thread Mark Allan

> On 22 Aug 2016, at 2:27 pm, Andreas Falkenhahn  wrote:
> 
> On 22.08.2016 at 13:34 Alastair Houghton wrote:
> 
> 
>>> On 22 Aug 2016, at 12:15, Andreas Falkenhahn  wrote:
>>> Out of curiosity, I've just run a little test and compiled my app on the
>>> 10.11 system for the 10.11 target and tried to run it on the 10.6 system,
>>> just to see what happens. All I got is a message "Illegal instruction"
>>> printed to stdout, or, when starting the app through Finder, a message
>>> dialog telling me that the app has crashed and needs to be shut down.
>>> Optionally, it offered me to send a crash report to Apple.
> 
>>> That was quite a surprise to me. I mean, this is the 21st century, I think
>>> one could at least expect a message dialog telling the user that this app
>>> needs at least Mac OS 10.11 or something, but no, it just crashed, leaving
>>> the user quite clueless as to why it did so.
> 
>> The trick here is that you need to set the LSMinimumSystemVersion
>> key in your Info.plist (this appears in Xcode as “Minimum system version”).
> 
> Ah, ok, thanks!

It's probably also worth noting that you *can* compile for 10.6 using the tools 
on 10.11 by adjusting the deployment target.

The only things you need to watch out for are the fact that you're compiling 
against the 10.11 SDK which will happily let you use APIs that didn't exist in 
previous incarnations of OS X, which will obviously cause your app to crash on 
those older versions. Also beware of any new projects you start, as their 
Interface Builder files will be set to use auto-layout and won't automatically 
set their deployment target to that of the project's main target.

If you're careful, there's no reason why you can't create and compile something 
on 10.11 and have it run happily on 10.6 (or even further back if you're 
feeling adventurous!)

Mark


___

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: Init in Swift

2016-09-05 Thread Quincey Morris
On Sep 4, 2016, at 22:50 , Gerriet M. Denkmann  wrote:
> 
> I really want “onlyKnownBySubclass” to be a constant (i.e. let instead of var)

There’s an easy way if you can declare both classes in the same file. Then, you 
can just declare the instance variable like this:

>   private(set) var onlyKnownBySubclass: Int


(That’s Swift 2. For Swift 3, use “fileprivate” instead of “private”.) In this 
case, “onlyKnownBySubclass” looks like a “let” property outside that one source 
file.

If you can’t do that, you can do it with a closure, assuming the places of 
definition aren’t more complicated than in your code. Something like this:

> class SuperClass
> {
>   let knownBySuperclass: Int
>   let onlyKnownBySubclass: Int
>   
>   init(some: Int, calc: (known: Int) -> Int)
>   {
>   knownBySuperclass = some * 2
>   onlyKnownBySubclass = calc (known: knownBySuperclass)
>   }
>   
>   final func someFunction() -> Void
>   {
>   print("Should never be zero: \(onlyKnownBySubclass)")
>   }
> }
> 
> final class SubClass: SuperClass
> {
>   init(some: Int)
>   {
>   super.init(some: some) { $0 + 5 }
>   }
> }
> 
> let a = SubClass(some:11)
> a.someFunction()  //  prints: “Should never be zero: 27”

This closure “{ $0 + 5 }” is shorthand for the longer form:

{ 
valuePassed in 
return valuePassed + 5 
}

The idea is that the superclass contributes values by parameters to the closure 
(just one, knownBySuperclass, in this case), and the subclass contributes the 
rest of the expression (which could make use of other subclass properties, 
since this closure occurs after the property initialization phase of the 
subclass init.

More globally, this sort of thing is not terribly idiomatic for Swift, because 
you’re trying to hide things that could get exposed other ways, for example, by 
“hostile” subclassing. The Swift-ier way would be to use a protocol instead of 
(or in addition to, but preferably instead of) the superclass. The protocol 
would “force” the subclass to define its own “onlyKnownBySubclass” locally.

___

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