Day 13
I think today is Day 13.
So finally I’ve had a chance to sit down and nut this out. First things first, getting hello world to run on the iPhone. Finally I worked out how to self sign a certificate, and get Xcode to build it, then using a custom script I found on the net, sign the code so the iPhone will run it. Yay! Hello World runs on the iPhone!
Next step. Get a GPS app running on the iPhone. After following a pretty good tutorial from http://www.vellios.com/2010/08/16/core-location-gps-tutorial/ I finally got a GPS test app running. (After making some changes so it would run on iOS 3.1). However, this is the end of the good news. So far, as I suspected, the iPhone 3GS isn’t performing well on the GPS. Accuracy of 1km isn’t good enough, that can be achieved with just network location! We need down to about 10m. I’m thinking maybe I will need to upgrade to a newer iOS to see if it’s an issue with the hardware or the software. However I want this app to run on iOS 3.1, so am hesitant to do any upgrades.
The last of the good news is that the Objective-C is starting to make some sense to me, and I’ll now work on learning the major differences, and some more subtle ones, between Objective-C, C++ and C.
Hi Tim, one thing I *really* like about Objective-C is that you can send messages to nil. Makes many situations simpler and ads a touch of ‘functional’ style. The downside of Objective-C 2.0 is the verbosity of properties.
Regarding your location-services issue, if your accuracy is only 1km, then I’m guessing the GPS is broken or you are in an undercover area where the 3GS can’t get a direct GPS signal. Try it outdoors?
Thanks James.
After following many instructions on the net yesterday, including trying to flash it to 3.1.3, and a variety of other reset, with the last thing I tried being the good old hit it hard one. Something I did must have worked because when I went for a drive later, it finally worked! Previously outside it was still not being accurate, but it seems to be working now!
I guess part of the problem was not testing it outside after everything I tried, as I’m used to my nice Android that works next to the window, so thought surely the iPhone can do that! Obviously not. However, it did have a problem initially, which I think was probably the GPS having last been used in WA, so it was very confused and just wouldn’t correct itself so reverted to network location. Unlike my android where i can update the AGPS data, and turn off network location, it was frustrating to try and work out why it wouldn’t just work!