From 99053f47f7a407f3e0a6fbdede5627366349f680 Mon Sep 17 00:00:00 2001 From: Antonio Zugaldia Date: Wed, 16 Sep 2015 09:29:53 -0400 Subject: [PATCH] merge with master --- CHANGELOG.md | 4 ++++ ios/Mapbox-iOS-SDK.podspec | 2 +- test/ios/MapViewTests.m | 27 +++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9165386ea..f2a33b100 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## iOS 2.1.2 + +- Built with Xcode 6.4 to not yet trigger Bitcode compatibility until Xcode 7 stabilizes. ([#2332](https://github.com/mapbox/mapbox-gl-native/issues/2332)) + ## iOS 2.1.1 - Fixes for Xcode 7 and Bitcode. ([#2238](https://github.com/mapbox/mapbox-gl-native/pull/2238)) diff --git a/ios/Mapbox-iOS-SDK.podspec b/ios/Mapbox-iOS-SDK.podspec index eb94769dd..139ad655f 100644 --- a/ios/Mapbox-iOS-SDK.podspec +++ b/ios/Mapbox-iOS-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'Mapbox-iOS-SDK' - m.version = '2.1.1-symbols' + m.version = '2.1.2-symbols' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa bindings.' diff --git a/test/ios/MapViewTests.m b/test/ios/MapViewTests.m index 98636d1a9..d0913670c 100644 --- a/test/ios/MapViewTests.m +++ b/test/ios/MapViewTests.m @@ -220,6 +220,33 @@ @"panning map right should decrease center longitude"); } +- (void)testSetCenterCancelsTransitions { + XCTestExpectation *cameraIsInDCExpectation = [self expectationWithDescription:@"camera reset to DC"]; + + CLLocationCoordinate2D dc = CLLocationCoordinate2DMake(38.894368, -77.036487); + CLLocationCoordinate2D dc_west = CLLocationCoordinate2DMake(38.894368, -77.076487); + [tester.mapView setCenterCoordinate:dc animated:NO]; + [tester.mapView setCenterCoordinate:dc_west animated:YES]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.15 * NSEC_PER_SEC), + dispatch_get_main_queue(), + ^{ + [tester.mapView setCenterCoordinate:dc animated:NO]; + XCTAssertEqualWithAccuracy(dc.latitude, + tester.mapView.centerCoordinate.latitude, + 0.0005, + @"setting center coordinate should cancel transitions"); + XCTAssertEqualWithAccuracy(dc.longitude, + tester.mapView.centerCoordinate.longitude, + 0.0005, + @"setting center coordinate should cancel transitions"); + [cameraIsInDCExpectation fulfill]; + }); + + [self waitForExpectationsWithTimeout:1.0 handler:^(NSError *error) { + ; + }]; +} + - (void)testPanDisabled { tester.mapView.scrollEnabled = NO; CLLocationCoordinate2D centerCoordinate = tester.mapView.centerCoordinate;