iOS 10 Beta 2: MKRouteStep instructions are missing
Originator: | haugli | ||
Number: | rdar://27230415 | Date Originated: | 7/7/2016 |
Status: | Duplicate of 27251771 (Closed) | Resolved: | |
Product: | iOS SDK | Product Version: | 10.0 (14A5297c) |
Classification: | Serious Bug | Reproducible: | Always |
Summary: When calling -[MKDirections calculateDirectionsWithCompletionHandler:], the MKRouteStep objects returned in the route response are missing instructions. Steps to Reproduce: Run the following code: MKPlacemark *sourcePlacemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(37.8, -122.4) addressDictionary:nil]; MKPlacemark *destinationPlacemark = [[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(37.7, -122.4) addressDictionary:nil]; MKDirectionsRequest *directionsRequest = [[MKDirectionsRequest alloc] init]; directionsRequest.source = [[MKMapItem alloc] initWithPlacemark:sourcePlacemark]; directionsRequest.destination = [[MKMapItem alloc] initWithPlacemark:destinationPlacemark]; MKDirections *directions = [[MKDirections alloc] initWithRequest:directionsRequest]; [directions calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse *response, NSError * error) { MKRoute *firstRoute = [response.routes firstObject]; for (MKRouteStep *step in firstRoute.steps) { NSLog(@"Instructions: %@", step.instructions); } }]; Expected Results: Console log: 2016-07-07 14:16:34.717 MKDirectionsTest[761:201356] Instructions: Proceed to Front St 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: Turn right onto Green St 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: Turn right onto The Embarcadero 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: Continue onto King St 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: Merge onto I-280 S 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: Take exit 54 on the left toward US-101 S, San Jose 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: Take exit 429A toward Tunnel Ave, Candlestick Park 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: Continue onto Beatty Rd 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: At the end of the road, turn left onto Tunnel Ave 2016-07-07 14:16:34.718 MKDirectionsTest[761:201356] Instructions: The destination is on your left Actual Results: Console log: 2016-07-07 14:17:44.585134 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.585421 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.585487 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.585653 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.585766 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.585925 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.585999 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.586051 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.586258 MKDirectionsTest[362:40466] Instructions: (null) 2016-07-07 14:17:44.586309 MKDirectionsTest[362:40466] Instructions: (null) Version: 10.0 (14A5297c) Notes: Running the same code on iOS 9.3 and below results in instructions appearing as expected. Configuration: iPhone 5S 32GB Verizon, using WiFI
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Fixed in iOS 10 beta 4.