This Week in iPhone & iPad News - Februrary 5/2010
With the iPad announcement from last week, there are now many news items on both the iPad and the iPhone. Take a look at the latest batch.
Game developer / Flash, iPhone, .NET and Web 2.0 engineer
With the iPad announcement from last week, there are now many news items on both the iPad and the iPhone. Take a look at the latest batch.
Due to this week's announcement of the iPad, the normal "This Week in iPhone News" has been pre-empted by the iPad news that came out.
Read more: ipad
Some of the more interesting iPhone news items of the week.
Read more: iphone
Catch up on the latest in iPhone news this week!
Read more: iphone
Take a look at some of the more noteworthy iPhone news items of the week.
Read more: iphone
Lately I've been working on an iPhone application that includes the use of a Google map by way of the MapKit libraries.
When showing the user's current location, there are a few ways to go about it. If you simply want the MapView instance to take care of it, you can set "showsUserLocation" to true and the MapView instance will use the GPS hardware to locate your position and place the familiar blue dot with the accuracy circle around it on the map. However, if you want to zoom in on that position, it's up to you to manage.
If you want more control or if you're placing a custom "placemark" (pushpin, etc.) onto the map, there are two main ways of doing it. The easiest and most often quoted method in tutorials involves the use of the MKReverseGeocoder library. What this does is allow you create an instance of the MKReverseGeocoder class and initialize it with a CLLocationCoordinate2D object. You then assign a delegate and then tell the MKReverseGeocoder instance to start via its start method.
The two delegate methods you're interested in when dealing with the MKReverseGeocoder library are:
-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)errorand
-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemarkWhat MKReverseGeocoder does is take a given location object (containing geocoordinate information in the form of latitude and longitude) and make a call to Google's API using an HTTP POST in order to determine what the closest address is. If the lookup is successful, didFindPlacemark: is called, but if it's note, didFailWithError: is called.
PBRequesterErrorDomain error 6001While this isn't very descriptive, I did a bit of searching online (using Google ironically) and found that a few other developers have started to see this behavior recently as well.
POST /glm/mmap HTTP/1.1As you can see, what MKReverseGeocoder is actually doing is making an HTTP POST call to http://google.com/glm/mmap.
Host: www.google.com
User-Agent: Apple iPhone v7D11 Maps v3.1.2
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 89
Connection: keep-alive
../+.N.8.Z..en_US.&com.apple.iphone simulator-com.foobar..
3.1.2.7D11>...
.. ............HTTP/1.1 200 OK
Content-Type: application/binary
Content-Length: 13
Date: Mon, 28 Dec 2009 02:51:50 GMT
Expires: Mon, 28 Dec 2009 02:51:50 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
Server: GFE/2.0
..>....
.359.POST /glm/mmap HTTP/1.1
Host: www.google.com
User-Agent: MyApp/1.0 CFNetwork/459 Darwin/9.8.0
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 181
Connection: keep-alive
../+.N.8.Z..en_US.&com.apple.iphone simulator-com.foobar..
3.1.2.7D11)...k.i
=
.7D11..iPhone OS.#2:FeAFHCc8yFilvsrw:7TjBQIp9ijRdhsXJ*.en_US.
.com.foobar."...
......P..".
...... .HTTP/1.1 503 Service Unavailable
Content-Type: text/html; charset=UTF-8
Date: Mon, 28 Dec 2009 02:51:54 GMT
Expires: Mon, 28 Dec 2009 02:51:54 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
X-Frame-Options: SAMEORIGIN
Server: GFE/2.0
Transfer-Encoding: chunked
a1
Service Unavailable
Error 503
http://www.iphonedevsdk.com/forum/iphone-sdk-development/31883-pbrequestererrordomain-errors-reverse-geocoding.html#post155793I have also verified that other iPhone applications already in the App Store are also exhibiting this behavior. If you download and install the "Gowalla" application, you will see that they are relying on the MKReverseGeocoder library to resolve your current location's address in their gold GPS bar at the bottom of the screen. During the times of 5PM - 9AM PST, I am noticing that it is "stuck" saying "Finding address...". At other times it is successfully resolving the address of your current location as found by the GPS.
- (void)addAnnotation:(idIn order to create an annotation object to be added to the map, you'll want to create a MapAnnotation class that inherits from MKAnnotation. The members of this class should include:)annotation
CLLocationCoordinate2D coordinate;where annotationType is an enumeration where you can customize different placemark graphics for different types.
NSString *title;
NSString *subtitle;
MapAnnotationType annotationType;
-initWithCoordinate:(CLLocationCoordinate2D)inCoord;All you then need to do is instantiate your MapAnnotation class, passing the geocoordinate where you want the placemark to appear on the map. Then add this instance to your MapView instance via the MapView's addAnnotation method. The MKMapViewDelegate methods that you should be listening to in the class that you're using for all of this will then message the following method:
-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(idAt this point, you can check the annotation type to show custom placemark graphics, or you could just place a generic color pin, etc. Either way, you will need to return an instance of the MKAnnotationView class for your placemark to appear on the map.)annotation;
Here's my theory. We know that Google throttles reverse-geocoding requests by IP. My suspicion is that this throttling is reset at midnight each night and that MKReverseGeocoder passes its requests through a centralized caching proxy; since that proxy would appear as a single IP to Google, it stops working at a certain point during the day.
Read more: iphone
Need to catch up on the latest in iPhone news? Take a look!
Read more: iphone
Only a few more weeks left for 2009. Amazing how time flies isn't it? Take a look at this week's iPhone news.
Read more: iphone
Has it been a week already? Time for the latest in iPhone news that happened this week.
Read more: iphone
The latest installment of iPhone news is now up, if a few days late :)
Read more: iphone
Use IRC? I created a new channel #aribraginsky on irc.freenode.net (port 6667) where people can hang out and discuss things with me in real-time. For now, not much will be going on but I did setup Github to push out commit digest info into the channel.
I don't promise to be there 100% of the time, but I'm almost always at a terminal that is connected to IRC.
Stop by and say hi!
Unfamiliar with IRC? IRC stands for Internet Relay Chat and was created in the late 1980s as a way for people to communicate in real-time over the Internet. There are various ways to connect but the easiest would be via the web using http://mibbit.com.
Read more: IRC
I recently created a new repository on Github to hold my Flash prototypes.
For now, you can download and play with a simple StarField 3D animation I created recently. A demo is also available.
A bunch of interesting stuff happened this week in the iPhone world. Take a look and check back here every week for the latest in iPhone and iPod Touch news.
Read more: iphone
I'm finally getting around to setting the color schemes for the various IDEs that I use to a more darker color to help save my eyes.
There are many different resources that cover the IDE color scheme topic:
Read more: colors, ide, productivity, programming
It's that time again to take a look at this week's iPhone news!
Read more: iphone