Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 7, 2009, 01:41 AM   #1
ppilone
macrumors 6502
 
Join Date: Jan 2008
Stopping Bonjour Services

Hey guys,

I'm having a tough time properly stopping bonjour services when an app is running on the device. Noticed this problem with my app so I downloaded the WiTap example and it's having the same problem.

The apps publish a bonjour service (sometimes it works) but when the service is stopped the service remains listed in a Bonjour Browser app I'm running on my laptop. The only way to stop the services is to restart bonjour. When either WiTap or my app are run in the simulator they behave correctly (the services start and stop correctly).

Any thoughts on how to correctly unregister the service from the phone? Or why they work correctly in the simulator but terribly on the device?
__________________
iHomework
NoteReel
MacBook Pro
iPhone
ppilone is offline   0 Reply With Quote
Old Aug 7, 2009, 01:52 AM   #2
PhoneyDeveloper
macrumors 68030
 
PhoneyDeveloper's Avatar
 
Join Date: Sep 2008
Code:
[netService stop];
[netService release];
works reliably for me. I use the Safari browser to tell that the service is available or not. I'm publishing a web server.
PhoneyDeveloper is offline   0 Reply With Quote
Old Aug 7, 2009, 02:02 AM   #3
ppilone
Thread Starter
macrumors 6502
 
Join Date: Jan 2008
Quote:
Originally Posted by PhoneyDeveloper View Post
Code:
[netService stop];
[netService release];
works reliably for me. I use the Safari browser to tell that the service is available or not. I'm publishing a web server.
That's what I'd expect to use (and do use) but i still run into the problem. Here is a screenshot of the Bonjour Browser I'm using to search for services - you can see that the witap service is available even though the app is no longer running on the device. When I run the app in the simulator it behaves correctly.
Attached Thumbnails
Click image for larger version

Name:	Picture 3.png
Views:	16
Size:	47.9 KB
ID:	187054  
__________________
iHomework
NoteReel
MacBook Pro
iPhone
ppilone is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Stopping an Expedia ad brenda TN Mac Basics and Help 2 Oct 17, 2013 02:32 AM
Clock Stopping Fimbria MacBook 0 May 31, 2013 09:14 PM
Apple TV: ATV2 keeps stopping.... Kerbolton Jailbreaks and iOS Hacks 0 Jan 11, 2013 03:49 PM
What's stopping me from doing this? (Verizon) Diversion iPhone 5 Sep 14, 2012 01:19 PM

Forum Jump

All times are GMT -5. The time now is 07:27 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC