On Aug 20, 2013, at 1:05 PM, Jens Alfke <j...@mooseyard.com> wrote:

> 
> On Aug 20, 2013, at 11:38 AM, Bradley O'Hearne <br...@bighillsoftware.com> 
> wrote:
> 
>> 1. Is there any guaranteed invocation order of these methods, or is it 
>> completely random? I cannot think of any scenario where you'd want to 
>> process the URL launching event *after* the callback which signifies app 
>> launch completion. That just seems wrong. 
> 
> Under the hood, the mechanism is that the Launch Services options for 
> launching an app can include an AppleEvent to send the app upon launch. Most 
> commonly this is an ‘odoc’ (open document) event, if the app was launched by 
> double-clicking a document. In the case of opening via a URL, as in your 
> case, that event would be a ‘GURL’ (goto URL). In the case where there’s no 
> AppleEvent given, the app receives an ‘oapp’ (open app) event just to tell it 
> that it isn’t going to get a different special event.
> 
> The reason for ‘oapp’ is for the exact thing you’re describing: the app wants 
> to know when it’s done launching, i.e. when the special launch-time events 
> are over.
> 
>> 2. Assuming that the answer to 1 is that there IS an expected invocation 
>> order, then what could possibly cause this problem? This smells an awful lot 
>> like something to do with unexpected results of thread scheduling in the OS 
>> (not in the app, I'm creating no threads at all). 
> 
> It might be an AppKit bug, or it might be in the Finder (e.g. maybe it’s 
> launching the app normally and then sending the GURL event, instead of 
> attaching the event to the launch options.)
> 
> —Jens

Jens, 

In my case, the URL is custom, configured with launch services and in my app's 
info.plist file. The app is launched by opening a URL with the specified 
protocol from a web browser. It is not being launched any other way (such as 
from the Finder). 

Brad
_______________________________________________

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

Reply via email to