Re: Service request fails if provider has not yet launched
Re: Service request fails if provider has not yet launched
- Subject: Re: Service request fails if provider has not yet launched
- From: email@hidden
- Date: Sat, 17 Jan 2009 16:33:57 +0800
At last, I found the cause - something very silly of Safari, and I
don't know why that happened yet.
It turned out that if my app is not running, the service request from
Safari will launch my app as expected; however, it is the debug
version(which is not so up-to-date) of my app that is launched, though
it lays in my project/build/Debug directory, far away from the /
Applications directory where I put my release version.
It is only Safari that is behaving this odd way, all other apps I've
tried, such as Mail, iTune, Xcode, are normal; and in fact, it happens
for Safari only if my app has not yet been running when Safari
requests the service, i.e., Safari will say hello happily to the
release version that is running and forget its beloved debug version
completely.
After I deleted the debug version from the project/build/Debug
directory, Safari came to itself.
Because I was really curious about this eternal triangle, I moved the
debug version back to the project/build/Debug directory to see whether
Safari is really so wholehearted to my debug version, but it is not.
I'm sad for my debug version of app, of course, in whatever aspect.
What a weird, ephemeral affair between Safari and my app, oh, the
debug one, sure.
On Jan 14, 2009, at 9:56 PM, email@hidden wrote:
My app provides a System Service, which works well if it is running
when the request arrives;
however, if the request rises and my app has not yet launched, the
Service is failed to be served,
even though my app can be launched normally by the Service request.
Here is the corresponding Console log message:
PM Safari[368] Application XXX never opened its Services port before
the timeout.
But I'm sure that my app has been ready before the timeout which is
the default 30s, since I register
the Service provider in my applicationDidFinishLaunching:
(NSNotification *) after
all the preparation work is done, and the time needed to get to that
point is no more than 15s.
I can't figure out what is missed after perusing the System Service
section of Dev Doc.
Any hint will be appreciated, and any further info will be
supplemented if needed.
Thanks in advance.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden