Runtime Errors with iPhone OS 4



i try to build the example with iPhone OS 4 SDK beta 4 (current one). Calling

crashes within Simulator with

ERROR,Time,297199344.728,Function,"void CLClientHandleDaemonDataRegistration(__CLClient*, mach_port_t, const CLDaemonCommToClientRegistration*, const __CFDictionary*)",server did not accept client registration 3 ERROR,Time,297199344.729,Function,"void CLClientHandleDaemonDataRegistration(__CLClient*, mach_port_t, const CLDaemonCommToClientRegistration*, const __CFDictionary*)",server did not accept client registration 3

Is this a Simulator bug or can anybody interpret this error message? I have no glue :frowning:


I searched a bit around and found out, that this exception is throw, if location services is not available. This could be checked with

in iPhone OS 4, but how can i activate it in the simulator or do i have to debug on device? I’m currently not very interested in updating my iPhone to OS 4 until stabil. Perhaps somebody knows it.


With the 4.0 simulator, a panel will pop up asking you if it’s okay to use location services. If you hit “Don’t Allow”, you get that message. If you hit allow, then its okay.

As with any beta software, there are always bugs. You should be targeting 3.1.3 for exercises in this book. While they should all remain forward compatible, the bugs in 4.0 will hinder your learning.


thanks for the help. I already thought, that it could be something like this, but i never get such a popup. Even if i reset simulator settings.

But you’re absolutly right, i should go back to a stable sdk :slight_smile:


just as a short feedback. downgrading to iPhone SDK 3.1 works fine.


I’m having similar issues. I have IOS 4.01, the corresponding iPhone SDK, and IOS 4.01 simulator that comes with it. When I built and ran my code on the simulator nothing happened, all I got was a white screen after clicking ok on the push notification to allow it to use my location. I let it run for a while, but nothing happened after several minutes. I suspected IOS 4 might have something to do with it, but couldn’t be sure that I didn’t make a copying error so I used the solution code from, built and ran the project as is and the same thing happened a blank white screen. Is there an easy way to fix this, besides reverting back to 3.1.3? I didn’t save the old iPhone SDK or iPhone OS, and I have some trust issues with the third party .ipsw files to restore the IOS to 3.1.3. I know some things in CoreLocation were deprecated in IOS 4. Perhaps this could be the culprit. How can I make this run correctly? Please help.


I just wanted to say that this chapter did not give me trouble using the SDK 3.2.3 for iOS4. I have the non-beta release of this SDK. I haven’t run into any broken examples yet.

Does setting the target OS really make a difference when the Base SDK is still 4.0? There is no way in XCode 3.2.3 to revert to an old SDK; and I don’t have the impression that changing the target OS makes that much of a difference.

I’m not really up on the finer points of things like weak linking; but I do know that it’s up to the developer to determine if any features used are too new for an older target OS. (Correct me if I’m wrong, please.) Which I think stinks, but I guess Apple really wants to push everyone to iOS4.


The error you are seeing is because you declined to let Core Location work. Quit the Simulator and then relaunch the application. A dialog box should appear and ask if you want to allow it to use location services. If you hit No, you get the error message you see. If you hit Yes, then it works as expected.

In terms of 4.0, most everything will work. The big changes are the movie player and multitasking, where you should implement applicationWillEnterBackground: instead of applicationWillTerminate: to save stuff.


I suppose at this point I move on without actually seeing that my code works. I’ve built & run my project and the solution project from the solutions folder I downloaded from BNR, pushed “allow” on both, with the same results on the simulator and my iPhone, a blank white screen. It’s disappointing not to see it work, but since even the solution code doesn’t work on my IOS 4 it seems there is something else at play here.


There must be an issue related to your Mac - some setting somewhere is preventing you from connecting to location services. Are you behind a router? Does it block some ports?

We ran this code last week in class and there were no issues with the simulator on iOS 4.0. The application in this chapter doesn’t have a user interface, you will always see a blank white screen. But, if you are running thru Xcode on the device, you should see output in the run log.

Perhaps try taking your device off the Wifi network, make sure you have a cell signal, and try on the device with Xcode running the app.


Thanks :smiley: turns out it was an ID-10-T (idiot) error. I totally missed the fact that I was supposed to be looking in the debugger console for that. Now I can see that both the solution set and my code work fine. I’m brand new to the mac, X-Code, and objective C, but hopefully there will be fewer ID-10-T errors.


I too experienced this problem while attempting to use Core Location from within the simulator. Interestingly, changing the target executable to older versions did seem to help. In the end I just ended up joining the iOS Developer Program in order to have access to the actual device. This helped immensely.


Alright, this is what I did to get this working, took me a good while of digging through stuff to figure it out. The only thing that probably matters is 2a, but the others can’t hurt to get you up and running.
On your Dev Machine (Running 10.6.3+):
[li]make sure WiFi is enabled (and attached to a router? not sure if that’s important, it does need to be enabled though).
[] If you have a wired connection, unplug it and go WiFi only (probably unnecessary)[/li][/ol][/:m]
[li] Open up Security under System Preferences
[] Under General make sure “Disable Location Services” is unchecked, and click reset warnings.[/li]
[li] For now (you can turn it back on later) turn off the firewall. (probably unnecessary)[/li][/ol][/
[li] Go to Date & Time under system preferences
[] Select Time Zone[/li]
[li] Check Set time zone automatically using current location[/li]
[li] Wait for this to finish, if it still cannot connect, make sure all the previous settings listed are set.[/li][/ol][/
[li] Open up Xcode
[] Clean[/li]
[li] Build[/li]
[li] Run[/li][/ol][/
[li] The OS Simulator should ask you if you want to allow the application to use Location Services, allow it to do so.[/li]
[li] You should now be working.[/li][/list:o]


I did all those steps and I m running on lion. I am still experiencing the same error code “server did not accept client registration 68”