Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Problems Merging Picture Sharing & Browser
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems Merging Picture Sharing & Browser

Hello everybody,

I've been writing a program using Rendezvous and I'm having issues with the service disappearing from the list. After many hours trying to understand the problem, I gave up and I decided to go back to square one: attempt to merge Picture Sharing and Picture Sharing Browser in one single application. The idea is to offer an app which publishes and subscribes, as opposed to having two different apps.

To my surprise, I'm experiencing exactly the same buggy behavior with Picture Sharing/Picture Browser:

- In Picture Sharing Browser, the method - (void)netServiceDidResolveAddress:(NSNetService *)sender contains the following snippet:

// Cancel the resolve now that we have an IPv4 address.
[sender stop];
[sender release];

This piece of code makes the service disappear instantly. I commented it out, which helped a bit.

- I changed netServiceBrowser:didFindService:moreComing: to the following:

if (![[aNetService name] isEqualToString: [serviceNameField stringValue]]) {
[services addObject:aNetService];

    if(!moreComing) {
        [pictureServiceList reloadData];

This avoids having your own service being listed in the services list.

After these corrections, I'm still having problems. These are:

- Issue #1: launch the app on two Macs, Mac #1 and Mac #2, and start the service on both of them. The first service published (either on Mac #1 or Mac #2) will not be able to browse the other one, even though it's displayed on the table view. The second service is fine and will display the other's picture. In other words, the very first Mac that starts the service is doomed and won't be able to subscribe to other services, even though they're listed on the table view.

- Issue #2: service #2, which displays the picture from service #1 will also break. To do that, go to Mac with service #2 and deselect Mac #1 from the list. You'll see that it takes two clicks to get the picture back. The first click doesn't go through. This leads to issue #3...

- Issue #3: after the picture has been displayed on Mac #2, watch Mac #1: the list doesn't show Mac#2 anymore.

I don't know what else to try, even after reading the docs. I was hoping that I could use the merged app as a foundation from where I could rebuild my app, but it's ill-behaved as well, so I', stuck either way. I have the project (XCode) ready, in case someone wants to start from there. Please contact me off-list and I'll send it to you.

Thanks in advance.

-- Tito
rendezvous mailing list | email@hidden
Do not post admin requests to the list. They will be ignored.

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.