summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules2
-rw-r--r--.travis.yml5
-rw-r--r--Makefile6
-rw-r--r--README.md2
-rwxr-xr-xscripts/ios_travis/upload_screenshots.sh13
-rwxr-xr-xscripts/package_ios.sh4
-rwxr-xr-xscripts/test_ios.sh16
-rwxr-xr-xscripts/travis_script.sh21
m---------test/ios/KIF0
-rw-r--r--test/ios/KIFTestActor+MapboxGL.h1
-rw-r--r--test/ios/KIFTestActor+MapboxGL.m5
-rw-r--r--test/ios/MGLTAppDelegate.h2
-rw-r--r--test/ios/MGLTViewController.m2
-rw-r--r--test/ios/MapViewTests.h5
-rw-r--r--test/ios/MapViewTests.m289
-rw-r--r--test/ios/README.md9
-rw-r--r--test/ios/ios-tests.xcodeproj/project.pbxproj167
-rw-r--r--test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/ios-tests.xccheckout24
-rw-r--r--test/ios/ios-tests.xcodeproj/xcshareddata/xcschemes/Mapbox GL Tests.xcscheme13
19 files changed, 327 insertions, 259 deletions
diff --git a/.gitmodules b/.gitmodules
index 9e5265a6a1..6a4b1d5162 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -12,7 +12,7 @@
[submodule "test/ios/KIF"]
path = test/ios/KIF
- url = https://github.com/mapbox/KIF.git
+ url = https://github.com/kif-framework/KIF.git
[submodule "platform/ios/vendor/SMCalloutView"]
path = platform/ios/vendor/SMCalloutView
diff --git a/.travis.yml b/.travis.yml
index 690b2b1b67..71936b8726 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -57,6 +57,7 @@ env:
- IOS_PROFILE_NAME="ios-in-house"
- secure: "nQqSM8rd7OHtV4MqmNqVnkrVHqxKqQsaWRYk4/nPdhbeVWtTtkk0df711LrF1TUtbEPEewHxYUvTZ/UXmwJNeoKdzTHavI8hnatRkgjyxGERPn1il1Otelht9I+LQQHf+plrpRjVWBrNIW0Zox1B3cqn6d3NglpbXrEQ2EjYGNA="
# end iOS code signing
+ - KIF_SCREENSHOTS="${TRAVIS_BUILD_DIR}/screenshots"
before_install:
- if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then sudo service mysql stop; fi
@@ -68,6 +69,7 @@ before_install:
- ./scripts/travis_before_install.sh
- if [[ ${TRAVIS_OS_NAME} == "linux" && ${MASON_PLATFORM} != "android" ]]; then export LD_LIBRARY_PATH=`mason prefix mesa 10.4.3`/lib; fi
- if [[ ${TRAVIS_OS_NAME} == "linux" && ${MASON_PLATFORM} != "android" ]]; then glxinfo; fi
+- if [[ ${TRAVIS_OS_NAME} == "osx" && ${TEST_OS} == "ios" ]]; then mkdir -p ${KIF_SCREENSHOTS}; fi
install:
- ulimit -c
@@ -88,6 +90,9 @@ script:
after_script:
- ./scripts/ios_travis/remove-key.sh
+after_failure:
+- if [[ ${TRAVIS_OS_NAME} == "osx" && ${TEST_OS} == "ios" ]]; then ./scripts/ios_travis/upload_screenshots.sh; fi
+
notifications:
slack:
secure: HHQYr7sF8M1SzoWSqgKVYtwAgGdLLCyTMsQjFhEEQNYO92ZwURE5s03qWTGH5k8+4Yqn26yrXt3NztLC4JIOpcGervN2mSZyq4dZgFTcWEd61igw0qwSenlwvFfbE1ASK/KYCzfyn9MIfHN+ovwLoRxXZkPwinKDvl3DXjBaFNg=
diff --git a/Makefile b/Makefile
index 14f78ed0f2..d0cf4407cd 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,9 @@ styles/styles:
SMCalloutView:
git submodule update --init platform/ios/vendor/SMCalloutView
+KIF:
+ git submodule update --init test/ios/KIF
+
#### Library builds ############################################################
.PRECIOUS: Makefile/mbgl
@@ -129,6 +132,9 @@ isim: Xcode/ios
ipackage: clean Xcode/ios
./scripts/package_ios.sh
+itest: ipackage KIF
+ ./scripts/test_ios.sh
+
# Legacy name
iproj: ios-proj
diff --git a/README.md b/README.md
index c423c21b56..a44b138613 100644
--- a/README.md
+++ b/README.md
@@ -70,6 +70,8 @@ If you merely want to install the library for iOS and try it out as an Objective
If you want to build from source and/or contribute to development of the project, run `make iproj`, which will create and open an Xcode project which can build the entire library from source as well as an Objective-C test app.
+You can also run `make itest` to run the included tests. Requires `brew install xcpretty`.
+
Target devices: iPhone 4S and above (5, 5c, 5s, 6, 6 Plus) and iPad 2 and above (3, 4, Mini, Air, Mini 2, Air 2).
Target iOS: 7.0 through 8.1
diff --git a/scripts/ios_travis/upload_screenshots.sh b/scripts/ios_travis/upload_screenshots.sh
new file mode 100755
index 0000000000..88a6427f75
--- /dev/null
+++ b/scripts/ios_travis/upload_screenshots.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+ls $KIF_SCREENSHOTS/
+
+REPO_NAME=$(basename $TRAVIS_REPO_SLUG)
+
+aws s3 cp $KIF_SCREENSHOTS/ s3://mapbox/$REPO_NAME/ios/tests/$TRAVIS_JOB_NUMBER/ --acl public-read --recursive > /dev/null
+
+echo http://mapbox.s3.amazonaws.com/$REPO_NAME/ios/tests/$TRAVIS_JOB_NUMBER/index.html
diff --git a/scripts/package_ios.sh b/scripts/package_ios.sh
index da55b297ae..a651d27342 100755
--- a/scripts/package_ios.sh
+++ b/scripts/package_ios.sh
@@ -33,9 +33,10 @@ export BUILDTYPE=${BUILDTYPE:-Release}
export HOST=ios
make Xcode/mbgl
-step "Building iOS targets..."
+step "Building iOS device targets..."
xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
ARCHS="arm64 armv7 armv7s" \
+ ONLY_ACTIVE_ARCH=NO \
-project ./build/ios/mbgl.xcodeproj \
-configuration ${BUILDTYPE} \
-target everything \
@@ -45,6 +46,7 @@ xcodebuild -sdk iphoneos${IOS_SDK_VERSION} \
step "Building iOS Simulator targets..."
xcodebuild -sdk iphonesimulator${IOS_SDK_VERSION} \
ARCHS="x86_64 i386" \
+ ONLY_ACTIVE_ARCH=NO \
-project ./build/ios/mbgl.xcodeproj \
-configuration ${BUILDTYPE} \
-target everything \
diff --git a/scripts/test_ios.sh b/scripts/test_ios.sh
new file mode 100755
index 0000000000..77d4d90ad3
--- /dev/null
+++ b/scripts/test_ios.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+set -e
+set -o pipefail
+set -u
+
+xcodebuild \
+ -project ./test/ios/ios-tests.xcodeproj \
+ -scheme 'Mapbox GL Tests' \
+ -sdk iphonesimulator \
+ -destination 'platform=iOS Simulator,name=iPhone 5s,OS=7.1' \
+ -destination 'platform=iOS Simulator,name=iPhone 5s,OS=latest' \
+ -destination 'platform=iOS Simulator,name=iPad 2,OS=7.1' \
+ -destination 'platform=iOS Simulator,name=iPad 2,OS=latest' \
+ test \
+ | xcpretty
diff --git a/scripts/travis_script.sh b/scripts/travis_script.sh
index 0351f94144..093b31273d 100755
--- a/scripts/travis_script.sh
+++ b/scripts/travis_script.sh
@@ -48,15 +48,24 @@ elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "osx" ]]; then
elif [[ ${TRAVIS_OS_NAME} == "osx" && ${MASON_PLATFORM} == "ios" ]]; then
#
- # build & package iOS
- #
- mapbox_time "package_ios"
- make ipackage
- #
- # conditionally deploy iOS build
+ # conditionally publish or test
#
if [[ -n "$PUBLISH_TAG" ]]; then
+ #
+ # build & package iOS
+ #
+ mapbox_time "package_ios"
+ make ipackage
+ #
+ # publish iOS build
+ #
mapbox_time "deploy_ios"
./scripts/publish_ios.sh "$PUBLISH_VERSION"
+ else
+ #
+ # build & test iOS
+ #
+ mapbox_time "run_ios_tests"
+ make itest
fi
fi
diff --git a/test/ios/KIF b/test/ios/KIF
-Subproject ab5a46ff7e970de5578df48a1e1f013bd5e1bd4
+Subproject 976aafa2e211dd095411bfef09da6c0919d7047
diff --git a/test/ios/KIFTestActor+MapboxGL.h b/test/ios/KIFTestActor+MapboxGL.h
index 199091b29f..df83b2377a 100644
--- a/test/ios/KIFTestActor+MapboxGL.h
+++ b/test/ios/KIFTestActor+MapboxGL.h
@@ -1,3 +1,4 @@
+#import <UIKit/UIKit.h>
#import <KIF/KIF.h>
@class MGLMapView;
diff --git a/test/ios/KIFTestActor+MapboxGL.m b/test/ios/KIFTestActor+MapboxGL.m
index b267e0c0be..ef40c1bed1 100644
--- a/test/ios/KIFTestActor+MapboxGL.m
+++ b/test/ios/KIFTestActor+MapboxGL.m
@@ -1,7 +1,8 @@
#import "KIFTestActor+MapboxGL.h"
+
+#import "MapboxGL.h"
+
#import <KIF/UIApplication-KIFAdditions.h>
-#import <KIF/UIAccessibilityElement-KIFAdditions.h>
-#import "MGLMapView.h"
@implementation KIFTestActor (MapboxGL)
diff --git a/test/ios/MGLTAppDelegate.h b/test/ios/MGLTAppDelegate.h
index e5c459beb0..c0025582ee 100644
--- a/test/ios/MGLTAppDelegate.h
+++ b/test/ios/MGLTAppDelegate.h
@@ -2,6 +2,6 @@
@interface MGLTAppDelegate : UIResponder <UIApplicationDelegate>
-@property (strong, nonatomic) UIWindow *window;
+@property (nonatomic) UIWindow *window;
@end
diff --git a/test/ios/MGLTViewController.m b/test/ios/MGLTViewController.m
index 9caa64c79a..e839c45047 100644
--- a/test/ios/MGLTViewController.m
+++ b/test/ios/MGLTViewController.m
@@ -1,5 +1,5 @@
#import "MGLTViewController.h"
-#import "MGLMapView.h"
+#import "MapboxGL.h"
@implementation MGLTViewController
diff --git a/test/ios/MapViewTests.h b/test/ios/MapViewTests.h
deleted file mode 100644
index 5057ffd641..0000000000
--- a/test/ios/MapViewTests.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#import <KIF/KIF.h>
-
-@interface MapViewTests : KIFTestCase
-
-@end
diff --git a/test/ios/MapViewTests.m b/test/ios/MapViewTests.m
index adf3aeba06..deed521b71 100644
--- a/test/ios/MapViewTests.m
+++ b/test/ios/MapViewTests.m
@@ -1,9 +1,11 @@
-#import "MapViewTests.h"
+#import <KIF/KIF.h>
#import <KIF/KIFTestStepValidation.h>
+
#import "KIFTestActor+MapboxGL.h"
-#import "MGLMapView.h"
-@interface MapViewTests () <MGLMapViewDelegate>
+#import "MapboxGL.h"
+
+@interface MapViewTests : KIFTestCase <MGLMapViewDelegate>
@end
@@ -11,120 +13,132 @@
- (void)beforeEach {
[system simulateDeviceRotationToOrientation:UIDeviceOrientationPortrait];
- tester.mapView.viewControllerForLayoutGuides = tester.viewController;
+
tester.mapView.centerCoordinate = CLLocationCoordinate2DMake(38.913175, -77.032458);
tester.mapView.zoomLevel = 14;
tester.mapView.direction = 0;
+
tester.mapView.zoomEnabled = YES;
tester.mapView.scrollEnabled = YES;
tester.mapView.rotateEnabled = YES;
+
tester.viewController.navigationController.navigationBarHidden = YES;
tester.viewController.navigationController.toolbarHidden = YES;
+
tester.mapView.delegate = self;
}
- (void)testDirectionSet {
tester.mapView.direction = 270;
- __KIFAssertEqual(tester.mapView.direction,
- 270,
- @"setting direction should take effect");
+
+ XCTAssertEqual(tester.mapView.direction,
+ 270,
+ @"setting direction should take effect");
[tester waitForTimeInterval:1];
- __KIFAssertEqual(tester.compass.alpha,
- 1,
- @"compass should be visible when map is rotated");
- __KIFAssertEqualObjects([NSValue valueWithCGAffineTransform:tester.compass.transform],
- [NSValue valueWithCGAffineTransform:CGAffineTransformMakeRotation(M_PI * 1.5)],
- @"compass rotation should indicate map rotation");
+ XCTAssertEqual(tester.compass.alpha,
+ 1,
+ @"compass should be visible when map is rotated");
+
+ XCTAssertEqualObjects([NSValue valueWithCGAffineTransform:tester.compass.transform],
+ [NSValue valueWithCGAffineTransform:CGAffineTransformMakeRotation(M_PI * 1.5)],
+ @"compass rotation should indicate map rotation");
}
- (void)testCompassTap {
tester.mapView.direction = 180;
- __KIFAssertEqual(tester.mapView.direction,
- 180,
- @"setting direction should take effect");
- [tester waitForTimeInterval:1];
+ XCTAssertEqual(tester.mapView.direction,
+ 180,
+ @"setting direction should take effect");
[tester.compass tap];
[tester waitForTimeInterval:1];
- __KIFAssertEqual(tester.mapView.direction,
- 0,
- @"tapping compass should reset map direction");
- __KIFAssertEqual(tester.compass.alpha,
- 0,
- @"compass should not be visible when map is unrotated");
- __KIFAssertEqualObjects([NSValue valueWithCGAffineTransform:tester.compass.transform],
- [NSValue valueWithCGAffineTransform:CGAffineTransformIdentity],
- @"compass rotation should indicate map rotation");
+ XCTAssertEqual(tester.mapView.direction,
+ 0,
+ @"tapping compass should reset map direction");
+
+ XCTAssertEqual(tester.compass.alpha,
+ 0,
+ @"compass should not be visible when map is unrotated");
+
+ XCTAssertEqualObjects([NSValue valueWithCGAffineTransform:tester.compass.transform],
+ [NSValue valueWithCGAffineTransform:CGAffineTransformIdentity],
+ @"compass rotation should indicate map rotation");
}
- (void)testDirectionReset {
- tester.mapView.direction = 100;
- __KIFAssertEqual(tester.mapView.direction,
- 100,
- @"setting direction should take effect");
+ tester.mapView.direction = 90;
+
+ XCTAssertEqual(tester.mapView.direction,
+ 90,
+ @"setting direction should take effect");
[tester.mapView resetNorth];
[tester waitForTimeInterval:1];
- __KIFAssertEqual(tester.mapView.direction,
- 0,
- @"resetting north should reset map direction");
- __KIFAssertEqual(tester.compass.alpha,
- 0,
- @"compass should not be visible when map is unrotated");
- __KIFAssertEqualObjects([NSValue valueWithCGAffineTransform:tester.compass.transform],
- [NSValue valueWithCGAffineTransform:CGAffineTransformIdentity],
- @"compass rotation should indicate map rotation");
+ XCTAssertEqual(tester.mapView.direction,
+ 0,
+ @"resetting north should reset map direction");
+
+ XCTAssertEqual(tester.compass.alpha,
+ 0,
+ @"compass should not be visible when map is unrotated");
+
+ XCTAssertEqualObjects([NSValue valueWithCGAffineTransform:tester.compass.transform],
+ [NSValue valueWithCGAffineTransform:CGAffineTransformIdentity],
+ @"compass rotation should indicate map rotation");
}
- (void)testZoom {
double zoom = tester.mapView.zoomLevel;
- [tester.mapView zoomAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
+ [tester.mapView zoomAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
tester.mapView.bounds.size.height / 2)
distance:50
steps:10];
- XCTAssertTrue(tester.mapView.zoomLevel > zoom,
- @"zoom gesture should increase zoom level");
+ XCTAssertGreaterThan(tester.mapView.zoomLevel,
+ zoom,
+ @"zoom gesture should increase zoom level");
zoom = tester.mapView.zoomLevel;
- [tester.mapView pinchAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
+
+ [tester.mapView pinchAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
tester.mapView.bounds.size.height / 2)
distance:50
steps:10];
- XCTAssertTrue(tester.mapView.zoomLevel < zoom,
- @"pinch gesture should decrease zoom level");
+ XCTAssertLessThan(tester.mapView.zoomLevel,
+ zoom,
+ @"pinch gesture should decrease zoom level");
}
- (void)testZoomDisabled {
tester.mapView.zoomEnabled = NO;
double zoom = tester.mapView.zoomLevel;
- [tester.mapView zoomAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
+ [tester.mapView zoomAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
tester.mapView.bounds.size.height / 2)
distance:50
steps:10];
- __KIFAssertEqual(tester.mapView.zoomLevel,
- zoom,
- @"disabling zoom gesture should disallow zooming");
+ XCTAssertEqual(tester.mapView.zoomLevel,
+ zoom,
+ @"disabling zoom gesture should disallow zooming");
- [tester.mapView pinchAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
- tester.mapView.bounds.size.height / 2)
+ [tester.mapView pinchAtPoint:CGPointMake(tester.mapView.bounds.size.width / 2,
+ tester.mapView.bounds.size.height / 2)
distance:50
steps:10];
- __KIFAssertEqual(tester.mapView.zoomLevel,
- zoom,
- @"disabling zoom gesture should disallow pinching");
+ XCTAssertEqual(tester.mapView.zoomLevel,
+ zoom,
+ @"disabling zoom gesture should disallow pinching");
}
- (void)testPan {
@@ -132,10 +146,13 @@
[tester.mapView dragFromPoint:CGPointMake(10, 10) toPoint:CGPointMake(300, 300) steps:10];
- XCTAssertTrue(tester.mapView.centerCoordinate.latitude > centerCoordinate.latitude,
- @"panning map down should increase center latitude");
- XCTAssertTrue(tester.mapView.centerCoordinate.longitude < centerCoordinate.longitude,
- @"panning map right should decrease center longitude");
+ XCTAssertGreaterThan(tester.mapView.centerCoordinate.latitude,
+ centerCoordinate.latitude,
+ @"panning map down should increase center latitude");
+
+ XCTAssertLessThan(tester.mapView.centerCoordinate.longitude,
+ centerCoordinate.longitude,
+ @"panning map right should decrease center longitude");
}
- (void)testPanDisabled {
@@ -144,42 +161,82 @@
[tester.mapView dragFromPoint:CGPointMake(10, 10) toPoint:CGPointMake(300, 300) steps:10];
- __KIFAssertEqual(centerCoordinate.latitude,
- tester.mapView.centerCoordinate.latitude,
- @"disabling pan gesture should disallow vertical panning");
- __KIFAssertEqual(centerCoordinate.longitude,
- tester.mapView.centerCoordinate.longitude,
- @"disabling pan gesture should disallow horizontal panning");
+ XCTAssertEqualWithAccuracy(centerCoordinate.latitude,
+ tester.mapView.centerCoordinate.latitude,
+ 0.005,
+ @"disabling pan gesture should disallow vertical panning");
+
+ XCTAssertEqualWithAccuracy(centerCoordinate.longitude,
+ tester.mapView.centerCoordinate.longitude,
+ 0.005,
+ @"disabling pan gesture should disallow horizontal panning");
+}
+
+- (void)testRotate {
+ CLLocationDirection startAngle = tester.mapView.direction;
+
+ XCTAssertNotEqual(startAngle,
+ 45,
+ @"start angle must not be destination angle");
+
+ [tester.mapView twoFingerRotateAtPoint:tester.mapView.center angle:45];
+
+ XCTAssertGreaterThanOrEqual(fabs(tester.mapView.direction - startAngle),
+ 20,
+ @"rotating map should change angle");
+}
+
+- (void)testRotateDisabled {
+ tester.mapView.rotateEnabled = NO;
+ CLLocationDirection startAngle = tester.mapView.direction;
+
+ XCTAssertNotEqual(startAngle,
+ 45,
+ @"start angle must not be destination angle");
+
+ [tester.mapView twoFingerRotateAtPoint:tester.mapView.center angle:45];
+
+ XCTAssertEqualWithAccuracy(tester.mapView.direction,
+ startAngle,
+ 0.005,
+ @"disabling rotation show disallow rotation gestures");
}
- (void)testCenterSet {
CLLocationCoordinate2D newCenterCoordinate = CLLocationCoordinate2DMake(45.23237263, -122.23287129);
+
XCTAssertNotEqual(tester.mapView.centerCoordinate.latitude,
newCenterCoordinate.latitude,
@"initial setup should have differing center latitude");
+
XCTAssertNotEqual(tester.mapView.centerCoordinate.longitude,
newCenterCoordinate.longitude,
@"initial setup should have differing center longitude");
- [tester.mapView setCenterCoordinate:newCenterCoordinate];
+ tester.mapView.centerCoordinate = newCenterCoordinate;
+
+ XCTAssertEqual(tester.mapView.centerCoordinate.latitude,
+ newCenterCoordinate.latitude,
+ @"setting center should change latitude");
- XCTAssertTrue(tester.mapView.centerCoordinate.latitude == newCenterCoordinate.latitude,
- @"setting center should change latitude");
- XCTAssertTrue(tester.mapView.centerCoordinate.longitude == newCenterCoordinate.longitude,
- @"setting center should change longitude");
+ XCTAssertEqual(tester.mapView.centerCoordinate.longitude,
+ newCenterCoordinate.longitude,
+ @"setting center should change longitude");
}
- (void)testZoomSet {
double newZoom = 11.65;
+
XCTAssertNotEqual(tester.mapView.zoomLevel,
newZoom,
@"initial setup should have differing zoom");
tester.mapView.zoomLevel = newZoom;
- __KIFAssertEqual(tester.mapView.zoomLevel,
- newZoom,
- @"setting zoom should take effect");
+ XCTAssertEqualWithAccuracy(tester.mapView.zoomLevel,
+ newZoom,
+ 0.01,
+ @"setting zoom should take effect");
}
- (void)testTopLayoutGuide {
@@ -233,7 +290,7 @@
logoBugFrame = [logoBug.superview convertRect:logoBug.frame toView:nil];
toolbarFrame = [tester.window convertRect:toolbar.frame toView:nil];
XCTAssertFalse(CGRectIntersectsRect(logoBugFrame, toolbarFrame),
- @"rotated device should not have logo buy under toolbar");
+ @"rotated device should not have logo bug under toolbar");
attributionButtonFrame = [attributionButton.superview convertRect:attributionButton.frame toView:nil];
XCTAssertFalse(CGRectIntersectsRect(attributionButtonFrame, toolbarFrame),
@@ -241,11 +298,11 @@
}
- (void)testDelegateRegionWillChange {
- __block NSUInteger unanimatedCount = 0;
- __block NSUInteger animatedCount = 0;
+ __block NSUInteger unanimatedCount;
+ __block NSUInteger animatedCount;
[[NSNotificationCenter defaultCenter] addObserverForName:@"regionWillChangeAnimated"
object:tester.mapView
- queue:[NSOperationQueue mainQueue]
+ queue:nil
usingBlock:^(NSNotification *note) {
if ([note.userInfo[@"animated"] boolValue]) {
animatedCount++;
@@ -254,35 +311,40 @@
}
}];
+ [tester waitForTimeInterval:1];
+
+ unanimatedCount = 0;
+ animatedCount = 0;
+
NSNotification *notification = [system waitForNotificationName:@"regionWillChangeAnimated"
object:tester.mapView
whileExecutingBlock:^{
tester.mapView.centerCoordinate = CLLocationCoordinate2DMake(0, 0);
}];
+
[tester waitForTimeInterval:1];
- XCTAssertNotNil(notification,
- @"regionWillChange delegate should produce a notification");
- __KIFAssertEqual([notification.userInfo[@"animated"] boolValue],
- NO,
- @"regionWillChange delegate should not indicate animated change");
- __KIFAssertEqual(unanimatedCount,
- 1,
- @"regionWillChange delegate should indicate one unanimated change");
+
+ XCTAssertEqual([notification.userInfo[@"animated"] boolValue],
+ NO,
+ @"regionWillChange delegate should not indicate animated change");
+ XCTAssertEqual(unanimatedCount,
+ 1,
+ @"regionWillChange delegate should indicate one unanimated change");
notification = [system waitForNotificationName:@"regionWillChangeAnimated"
object:tester.mapView
whileExecutingBlock:^{
[tester.mapView setCenterCoordinate:CLLocationCoordinate2DMake(45, 100) animated:YES];
}];
+
[tester waitForTimeInterval:1];
- XCTAssertNotNil(notification,
- @"regionWillChange delegate should produce a notification");
- __KIFAssertEqual([notification.userInfo[@"animated"] boolValue],
- YES,
- @"regionWillChange delegate should indicate an animated change");
- __KIFAssertEqual(animatedCount,
- 1,
- @"regionWillChange delegate should indicate one animated change");
+
+ XCTAssertEqual([notification.userInfo[@"animated"] boolValue],
+ YES,
+ @"regionWillChange delegate should indicate an animated change");
+ XCTAssertEqual(animatedCount,
+ 1,
+ @"regionWillChange delegate should indicate one animated change");
[[NSNotificationCenter defaultCenter] removeObserver:self
name:@"regionWillChangeAnimated"
@@ -296,11 +358,11 @@
}
- (void)testDelegateRegionDidChange {
- __block NSUInteger unanimatedCount = 0;
- __block NSUInteger animatedCount = 0;
+ __block NSUInteger unanimatedCount;
+ __block NSUInteger animatedCount;
[[NSNotificationCenter defaultCenter] addObserverForName:@"regionDidChangeAnimated"
object:tester.mapView
- queue:[NSOperationQueue mainQueue]
+ queue:nil
usingBlock:^(NSNotification *note) {
if ([note.userInfo[@"animated"] boolValue]) {
animatedCount++;
@@ -309,35 +371,40 @@
}
}];
+ [tester waitForTimeInterval:1];
+
+ unanimatedCount = 0;
+ animatedCount = 0;
+
NSNotification *notification = [system waitForNotificationName:@"regionDidChangeAnimated"
object:tester.mapView
whileExecutingBlock:^{
tester.mapView.centerCoordinate = CLLocationCoordinate2DMake(0, 0);
}];
+
[tester waitForTimeInterval:1];
- XCTAssertNotNil(notification,
- @"regionDidChange delegate should produce a notification");
- __KIFAssertEqual([notification.userInfo[@"animated"] boolValue],
- NO,
- @"regionDidChange delegate should not indicate animated change");
- __KIFAssertEqual(unanimatedCount,
- 1,
- @"regionDidChange delegate should indicate one unanimated change");
+
+ XCTAssertEqual([notification.userInfo[@"animated"] boolValue],
+ NO,
+ @"regionDidChange delegate should not indicate animated change");
+ XCTAssertEqual(unanimatedCount,
+ 1,
+ @"regionDidChange delegate should indicate one unanimated change");
notification = [system waitForNotificationName:@"regionDidChangeAnimated"
object:tester.mapView
whileExecutingBlock:^{
[tester.mapView setCenterCoordinate:CLLocationCoordinate2DMake(45, 100) animated:YES];
}];
+
[tester waitForTimeInterval:1];
- XCTAssertNotNil(notification,
- @"regionDidChange delegate should produce a notification");
- __KIFAssertEqual([notification.userInfo[@"animated"] boolValue],
- YES,
- @"regionDidChange delegate should indicate animated change");
- __KIFAssertEqual(animatedCount,
- 1,
- @"regionDidChange delegate should indicate one animated change");
+
+ XCTAssertEqual([notification.userInfo[@"animated"] boolValue],
+ YES,
+ @"regionDidChange delegate should indicate animated change");
+ XCTAssertEqual(animatedCount,
+ 1,
+ @"regionDidChange delegate should indicate one animated change");
[[NSNotificationCenter defaultCenter] removeObserver:self
name:@"regionDidChangeAnimated"
diff --git a/test/ios/README.md b/test/ios/README.md
deleted file mode 100644
index 21975e177e..0000000000
--- a/test/ios/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-This is a harness app for integration testing of Mapbox GL Cocoa. It uses the static library build of Mapbox GL Cocoa in order to be entirely self-contained and not need the `mapbox-gl-native` upstream C++ project.
-
-To run tests, either open the enclosed `ios-tests.xcodeproj` and run the tests or use `xcodebuild test` at the command line from this directory. For example:
-
-```bash
-xcodebuild -scheme 'Mapbox GL Tests' \
- -destination 'platform=iOS Simulator,name=iPad,OS=7.1' \
- test
-```
diff --git a/test/ios/ios-tests.xcodeproj/project.pbxproj b/test/ios/ios-tests.xcodeproj/project.pbxproj
index 86f1251324..f644d912de 100644
--- a/test/ios/ios-tests.xcodeproj/project.pbxproj
+++ b/test/ios/ios-tests.xcodeproj/project.pbxproj
@@ -7,27 +7,24 @@
objects = {
/* Begin PBXBuildFile section */
- DD043327196DB9BC00E6F39D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD043326196DB9BC00E6F39D /* Foundation.framework */; };
- DD043329196DB9BC00E6F39D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD043328196DB9BC00E6F39D /* CoreGraphics.framework */; };
- DD04332B196DB9BC00E6F39D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD04332A196DB9BC00E6F39D /* UIKit.framework */; };
DD043363196DBBD500E6F39D /* MGLTAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DD04335F196DBBD500E6F39D /* MGLTAppDelegate.m */; };
DD043364196DBBD500E6F39D /* MGLTViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD043360196DBBD500E6F39D /* MGLTViewController.m */; };
DD043366196DBBE000E6F39D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DD043365196DBBE000E6F39D /* main.m */; };
- DD1A9EA8199BEA0D007BC651 /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD1A9EA7199BEA0D007BC651 /* libc++.dylib */; };
- DD61240819CCF06E006845B1 /* libMapboxGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD61240619CCF06E006845B1 /* libMapboxGL.a */; };
- DD61240919CCF06E006845B1 /* MapboxGL.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD61240719CCF06E006845B1 /* MapboxGL.bundle */; };
- DD8A790D196DC0A900FAD883 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD8A790C196DC0A900FAD883 /* libz.dylib */; };
- DD8A790F196DC0AD00FAD883 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD8A790E196DC0AD00FAD883 /* GLKit.framework */; };
- DD8A7911196DC0BB00FAD883 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD8A7910196DC0BB00FAD883 /* CoreLocation.framework */; };
- DD96917919F1C08400729E7D /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD96917819F1C08400729E7D /* libsqlite3.dylib */; };
- DD96918119F1C09200729E7D /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD96918019F1C09200729E7D /* SystemConfiguration.framework */; };
- DDBD0154196DC3D70033959E /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDBD0153196DC3D70033959E /* XCTest.framework */; };
- DDBD0155196DC3D70033959E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD043326196DB9BC00E6F39D /* Foundation.framework */; };
- DDBD0156196DC3D70033959E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD04332A196DB9BC00E6F39D /* UIKit.framework */; };
+ DD0580E81ACB628200B112C9 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0580E71ACB628200B112C9 /* IOKit.framework */; };
+ DD0581041ACB661200B112C9 /* Headers in Resources */ = {isa = PBXBuildFile; fileRef = DD0581031ACB661200B112C9 /* Headers */; };
+ DD0581061ACB661C00B112C9 /* MapboxGL.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD0581051ACB661C00B112C9 /* MapboxGL.bundle */; };
+ DD0581081ACB663200B112C9 /* libMapboxGL.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DD0581071ACB663200B112C9 /* libMapboxGL.a */; };
+ DD41CE091ACB5DBC00FA7979 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE081ACB5DBC00FA7979 /* CoreTelephony.framework */; };
+ DD41CE0B1ACB5DC400FA7979 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE0A1ACB5DC400FA7979 /* SystemConfiguration.framework */; };
+ DD41CE0D1ACB5DCB00FA7979 /* libc++.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE0C1ACB5DCB00FA7979 /* libc++.dylib */; };
+ DD41CE0F1ACB5DD000FA7979 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE0E1ACB5DD000FA7979 /* libsqlite3.dylib */; };
+ DD41CE111ACB5DD500FA7979 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE101ACB5DD500FA7979 /* libz.dylib */; };
+ DD41CE131ACB5DDA00FA7979 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE121ACB5DDA00FA7979 /* MobileCoreServices.framework */; };
+ DD41CE151ACB5DE000FA7979 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE141ACB5DE000FA7979 /* ImageIO.framework */; };
+ DD41CE171ACB5DE700FA7979 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD41CE161ACB5DE700FA7979 /* GLKit.framework */; };
DDBD016C196DC4740033959E /* MapViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DDBD0168196DC4740033959E /* MapViewTests.m */; };
DDBD016D196DC4740033959E /* KIFTestActor+MapboxGL.m in Sources */ = {isa = PBXBuildFile; fileRef = DDBD016A196DC4740033959E /* KIFTestActor+MapboxGL.m */; };
DDBD016E196DC4A10033959E /* libKIF.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDBD0144196DC3AE0033959E /* libKIF.a */; };
- DDBD016F196DC4A90033959E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD043328196DB9BC00E6F39D /* CoreGraphics.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -77,35 +74,30 @@
/* Begin PBXFileReference section */
DD043323196DB9BC00E6F39D /* Mapbox GL Tests.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Mapbox GL Tests.app"; sourceTree = BUILT_PRODUCTS_DIR; };
- DD043326196DB9BC00E6F39D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- DD043328196DB9BC00E6F39D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
- DD04332A196DB9BC00E6F39D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
DD04335F196DBBD500E6F39D /* MGLTAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLTAppDelegate.m; sourceTree = SOURCE_ROOT; };
DD043360196DBBD500E6F39D /* MGLTViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLTViewController.m; sourceTree = SOURCE_ROOT; };
DD043361196DBBD500E6F39D /* MGLTViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLTViewController.h; sourceTree = SOURCE_ROOT; };
DD043362196DBBD500E6F39D /* MGLTAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLTAppDelegate.h; sourceTree = SOURCE_ROOT; };
DD043365196DBBE000E6F39D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; };
DD043367196DBCC200E6F39D /* App-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "App-Info.plist"; sourceTree = SOURCE_ROOT; };
- DD1A9EA7199BEA0D007BC651 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; };
- DD61240019CCF06E006845B1 /* MGLMapView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLMapView.h; path = ../dist/static/Headers/MGLMapView.h; sourceTree = SOURCE_ROOT; };
- DD61240119CCF06E006845B1 /* MGLStyleFunctionValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLStyleFunctionValue.h; path = ../dist/static/Headers/MGLStyleFunctionValue.h; sourceTree = SOURCE_ROOT; };
- DD61240219CCF06E006845B1 /* MGLTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MGLTypes.h; path = ../dist/static/Headers/MGLTypes.h; sourceTree = SOURCE_ROOT; };
- DD61240319CCF06E006845B1 /* NSArray+MGLAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSArray+MGLAdditions.h"; path = "../dist/static/Headers/NSArray+MGLAdditions.h"; sourceTree = SOURCE_ROOT; };
- DD61240419CCF06E006845B1 /* NSDictionary+MGLAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+MGLAdditions.h"; path = "../dist/static/Headers/NSDictionary+MGLAdditions.h"; sourceTree = SOURCE_ROOT; };
- DD61240519CCF06E006845B1 /* UIColor+MGLAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIColor+MGLAdditions.h"; path = "../dist/static/Headers/UIColor+MGLAdditions.h"; sourceTree = SOURCE_ROOT; };
- DD61240619CCF06E006845B1 /* libMapboxGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libMapboxGL.a; path = ../dist/static/libMapboxGL.a; sourceTree = SOURCE_ROOT; };
- DD61240719CCF06E006845B1 /* MapboxGL.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MapboxGL.bundle; path = ../dist/static/MapboxGL.bundle; sourceTree = SOURCE_ROOT; };
- DD8A790C196DC0A900FAD883 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
- DD8A790E196DC0AD00FAD883 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
- DD8A7910196DC0BB00FAD883 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
- DD96917819F1C08400729E7D /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
- DD96918019F1C09200729E7D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+ DD0580E71ACB628200B112C9 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/IOKit.framework; sourceTree = DEVELOPER_DIR; };
+ DD0580EF1ACB62BE00B112C9 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ DD0581031ACB661200B112C9 /* Headers */ = {isa = PBXFileReference; lastKnownFileType = folder; name = Headers; path = ../../build/ios/pkg/static/Headers; sourceTree = SOURCE_ROOT; };
+ DD0581051ACB661C00B112C9 /* MapboxGL.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = MapboxGL.bundle; path = ../../build/ios/pkg/static/MapboxGL.bundle; sourceTree = SOURCE_ROOT; };
+ DD0581071ACB663200B112C9 /* libMapboxGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libMapboxGL.a; path = ../../build/ios/pkg/static/libMapboxGL.a; sourceTree = SOURCE_ROOT; };
+ DD41CE061ACB5DB300FA7979 /* libMapboxGL.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libMapboxGL.a; path = ../../build/ios/pkg/static/libMapboxGL.a; sourceTree = "<group>"; };
+ DD41CE081ACB5DBC00FA7979 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
+ DD41CE0A1ACB5DC400FA7979 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
+ DD41CE0C1ACB5DCB00FA7979 /* libc++.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libc++.dylib"; path = "usr/lib/libc++.dylib"; sourceTree = SDKROOT; };
+ DD41CE0E1ACB5DD000FA7979 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
+ DD41CE101ACB5DD500FA7979 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+ DD41CE121ACB5DDA00FA7979 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+ DD41CE141ACB5DE000FA7979 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
+ DD41CE161ACB5DE700FA7979 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
DDBD013A196DC3AE0033959E /* KIF.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = KIF.xcodeproj; path = KIF/KIF.xcodeproj; sourceTree = SOURCE_ROOT; };
DDBD0152196DC3D70033959E /* Test Bundle.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Test Bundle.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
- DDBD0153196DC3D70033959E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
DDBD0165196DC4560033959E /* Bundle-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Bundle-Info.plist"; sourceTree = SOURCE_ROOT; };
DDBD0168196DC4740033959E /* MapViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapViewTests.m; sourceTree = SOURCE_ROOT; };
- DDBD0169196DC4740033959E /* MapViewTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapViewTests.h; sourceTree = SOURCE_ROOT; };
DDBD016A196DC4740033959E /* KIFTestActor+MapboxGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "KIFTestActor+MapboxGL.m"; sourceTree = SOURCE_ROOT; };
DDBD016B196DC4740033959E /* KIFTestActor+MapboxGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KIFTestActor+MapboxGL.h"; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
@@ -115,16 +107,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- DD043329196DB9BC00E6F39D /* CoreGraphics.framework in Frameworks */,
- DD8A7911196DC0BB00FAD883 /* CoreLocation.framework in Frameworks */,
- DD043327196DB9BC00E6F39D /* Foundation.framework in Frameworks */,
- DD8A790F196DC0AD00FAD883 /* GLKit.framework in Frameworks */,
- DD96918119F1C09200729E7D /* SystemConfiguration.framework in Frameworks */,
- DD04332B196DB9BC00E6F39D /* UIKit.framework in Frameworks */,
- DD61240819CCF06E006845B1 /* libMapboxGL.a in Frameworks */,
- DD1A9EA8199BEA0D007BC651 /* libc++.dylib in Frameworks */,
- DD96917919F1C08400729E7D /* libsqlite3.dylib in Frameworks */,
- DD8A790D196DC0A900FAD883 /* libz.dylib in Frameworks */,
+ DD41CE091ACB5DBC00FA7979 /* CoreTelephony.framework in Frameworks */,
+ DD41CE171ACB5DE700FA7979 /* GLKit.framework in Frameworks */,
+ DD41CE151ACB5DE000FA7979 /* ImageIO.framework in Frameworks */,
+ DD41CE131ACB5DDA00FA7979 /* MobileCoreServices.framework in Frameworks */,
+ DD41CE0B1ACB5DC400FA7979 /* SystemConfiguration.framework in Frameworks */,
+ DD0581081ACB663200B112C9 /* libMapboxGL.a in Frameworks */,
+ DD41CE0D1ACB5DCB00FA7979 /* libc++.dylib in Frameworks */,
+ DD41CE0F1ACB5DD000FA7979 /* libsqlite3.dylib in Frameworks */,
+ DD41CE111ACB5DD500FA7979 /* libz.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -132,10 +123,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- DDBD016F196DC4A90033959E /* CoreGraphics.framework in Frameworks */,
- DDBD0155196DC3D70033959E /* Foundation.framework in Frameworks */,
- DDBD0156196DC3D70033959E /* UIKit.framework in Frameworks */,
- DDBD0154196DC3D70033959E /* XCTest.framework in Frameworks */,
+ DD0580E81ACB628200B112C9 /* IOKit.framework in Frameworks */,
DDBD016E196DC4A10033959E /* libKIF.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -165,16 +153,17 @@
DD043325196DB9BC00E6F39D /* Frameworks */ = {
isa = PBXGroup;
children = (
- DD96918019F1C09200729E7D /* SystemConfiguration.framework */,
- DD96917819F1C08400729E7D /* libsqlite3.dylib */,
- DD043328196DB9BC00E6F39D /* CoreGraphics.framework */,
- DD8A7910196DC0BB00FAD883 /* CoreLocation.framework */,
- DD043326196DB9BC00E6F39D /* Foundation.framework */,
- DD8A790E196DC0AD00FAD883 /* GLKit.framework */,
- DD04332A196DB9BC00E6F39D /* UIKit.framework */,
- DDBD0153196DC3D70033959E /* XCTest.framework */,
- DD1A9EA7199BEA0D007BC651 /* libc++.dylib */,
- DD8A790C196DC0A900FAD883 /* libz.dylib */,
+ DD0580EF1ACB62BE00B112C9 /* CoreGraphics.framework */,
+ DD41CE081ACB5DBC00FA7979 /* CoreTelephony.framework */,
+ DD41CE161ACB5DE700FA7979 /* GLKit.framework */,
+ DD0580E71ACB628200B112C9 /* IOKit.framework */,
+ DD41CE141ACB5DE000FA7979 /* ImageIO.framework */,
+ DD41CE121ACB5DDA00FA7979 /* MobileCoreServices.framework */,
+ DD41CE0A1ACB5DC400FA7979 /* SystemConfiguration.framework */,
+ DD41CE061ACB5DB300FA7979 /* libMapboxGL.a */,
+ DD41CE0C1ACB5DCB00FA7979 /* libc++.dylib */,
+ DD41CE0E1ACB5DD000FA7979 /* libsqlite3.dylib */,
+ DD41CE101ACB5DD500FA7979 /* libz.dylib */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -186,7 +175,7 @@
DD04335F196DBBD500E6F39D /* MGLTAppDelegate.m */,
DD043361196DBBD500E6F39D /* MGLTViewController.h */,
DD043360196DBBD500E6F39D /* MGLTViewController.m */,
- DD8A77AD196DBFDA00FAD883 /* GL Library */,
+ DDAE739B1ACB557500E1A793 /* GL Library */,
DD04332D196DB9BC00E6F39D /* Supporting Files */,
);
name = App;
@@ -202,26 +191,12 @@
name = "Supporting Files";
sourceTree = "<group>";
};
- DD6123FF19CCF06E006845B1 /* Headers */ = {
+ DDAE739B1ACB557500E1A793 /* GL Library */ = {
isa = PBXGroup;
children = (
- DD61240019CCF06E006845B1 /* MGLMapView.h */,
- DD61240119CCF06E006845B1 /* MGLStyleFunctionValue.h */,
- DD61240219CCF06E006845B1 /* MGLTypes.h */,
- DD61240319CCF06E006845B1 /* NSArray+MGLAdditions.h */,
- DD61240419CCF06E006845B1 /* NSDictionary+MGLAdditions.h */,
- DD61240519CCF06E006845B1 /* UIColor+MGLAdditions.h */,
- );
- name = Headers;
- path = ../../dist/static/Headers;
- sourceTree = SOURCE_ROOT;
- };
- DD8A77AD196DBFDA00FAD883 /* GL Library */ = {
- isa = PBXGroup;
- children = (
- DD6123FF19CCF06E006845B1 /* Headers */,
- DD61240619CCF06E006845B1 /* libMapboxGL.a */,
- DD61240719CCF06E006845B1 /* MapboxGL.bundle */,
+ DD0581031ACB661200B112C9 /* Headers */,
+ DD0581071ACB663200B112C9 /* libMapboxGL.a */,
+ DD0581051ACB661C00B112C9 /* MapboxGL.bundle */,
);
name = "GL Library";
sourceTree = "<group>";
@@ -231,7 +206,6 @@
children = (
DDBD016B196DC4740033959E /* KIFTestActor+MapboxGL.h */,
DDBD016A196DC4740033959E /* KIFTestActor+MapboxGL.m */,
- DDBD0169196DC4740033959E /* MapViewTests.h */,
DDBD0168196DC4740033959E /* MapViewTests.m */,
DDBD0167196DC46B0033959E /* Supporting Files */,
DDBD014D196DC3B00033959E /* KIF */,
@@ -313,7 +287,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = MGLT;
- LastUpgradeCheck = 0510;
+ LastUpgradeCheck = 0620;
ORGANIZATIONNAME = Mapbox;
TargetAttributes = {
DDBD0151196DC3D70033959E = {
@@ -389,7 +363,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- DD61240919CCF06E006845B1 /* MapboxGL.bundle in Resources */,
+ DD0581041ACB661200B112C9 /* Headers in Resources */,
+ DD0581061ACB661C00B112C9 /* MapboxGL.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -407,9 +382,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- DD043364196DBBD500E6F39D /* MGLTViewController.m in Sources */,
DD043366196DBBE000E6F39D /* main.m in Sources */,
DD043363196DBBD500E6F39D /* MGLTAppDelegate.m in Sources */,
+ DD043364196DBBD500E6F39D /* MGLTViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -508,26 +483,20 @@
DD043359196DB9BC00E6F39D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- armv7,
- armv7s,
- arm64,
- i386,
- x86_64,
- );
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
- ../dist/static/Headers,
+ "../../build/ios/pkg/static/**",
);
INFOPLIST_FILE = "$(SRCROOT)/App-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
- ../dist/static,
+ ../../build/ios/pkg/static,
);
+ OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
@@ -537,26 +506,20 @@
DD04335A196DB9BC00E6F39D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = (
- armv7,
- armv7s,
- arm64,
- i386,
- x86_64,
- );
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
- ../dist/static/Headers,
+ "../../build/ios/pkg/static/**",
);
INFOPLIST_FILE = "$(SRCROOT)/App-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
- ../dist/static,
+ ../../build/ios/pkg/static,
);
+ OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
@@ -571,6 +534,7 @@
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
+ "$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -580,7 +544,7 @@
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
- ../dist/static/Headers,
+ "../../build/ios/pkg/static/**",
);
INFOPLIST_FILE = "Bundle-Info.plist";
OTHER_LDFLAGS = (
@@ -603,12 +567,13 @@
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
+ "$(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks",
);
GCC_PREPROCESSOR_DEFINITIONS = "KIF_XCTEST=1";
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
- ../dist/static/Headers,
+ "../../build/ios/pkg/static/**",
);
INFOPLIST_FILE = "Bundle-Info.plist";
OTHER_LDFLAGS = (
diff --git a/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/ios-tests.xccheckout b/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/ios-tests.xccheckout
index 8f3ca408b6..e2f98de8f1 100644
--- a/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/ios-tests.xccheckout
+++ b/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/ios-tests.xccheckout
@@ -14,26 +14,22 @@
<string>https://github.com/mapbox/KIF.git</string>
<key>7E68CB584078A487C0535CC191D3B7551EEE2095</key>
<string>github.com:mapbox/mapbox-gl-native.git</string>
- <key>FC967DACF69B3B67E6F2E9FBE56B64B73B118AFF</key>
- <string>github.com:mapbox/mapbox-gl-cocoa.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
- <string>test/ios-tests.xcodeproj</string>
+ <string>test/ios/ios-tests.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>10265E242415D473A6A613214DB7AC3EE3D43F93</key>
- <string>../../..test/KIF/</string>
+ <string>../../../..test/ios/KIF</string>
<key>7E68CB584078A487C0535CC191D3B7551EEE2095</key>
- <string>../../../../..</string>
- <key>FC967DACF69B3B67E6F2E9FBE56B64B73B118AFF</key>
- <string>../../..</string>
+ <string>../../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
- <string>github.com:mapbox/mapbox-gl-cocoa.git</string>
+ <string>github.com:mapbox/mapbox-gl-native.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
- <string>FC967DACF69B3B67E6F2E9FBE56B64B73B118AFF</string>
+ <string>7E68CB584078A487C0535CC191D3B7551EEE2095</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
@@ -42,7 +38,7 @@
<key>IDESourceControlWCCIdentifierKey</key>
<string>7E68CB584078A487C0535CC191D3B7551EEE2095</string>
<key>IDESourceControlWCCName</key>
- <string>..</string>
+ <string>gl-native</string>
</dict>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
@@ -52,14 +48,6 @@
<key>IDESourceControlWCCName</key>
<string>KIF</string>
</dict>
- <dict>
- <key>IDESourceControlRepositoryExtensionIdentifierKey</key>
- <string>public.vcs.git</string>
- <key>IDESourceControlWCCIdentifierKey</key>
- <string>FC967DACF69B3B67E6F2E9FBE56B64B73B118AFF</string>
- <key>IDESourceControlWCCName</key>
- <string>mapbox-gl-cocoa</string>
- </dict>
</array>
</dict>
</plist>
diff --git a/test/ios/ios-tests.xcodeproj/xcshareddata/xcschemes/Mapbox GL Tests.xcscheme b/test/ios/ios-tests.xcodeproj/xcshareddata/xcschemes/Mapbox GL Tests.xcscheme
index f3c2bd7ffe..911f949fa0 100644
--- a/test/ios/ios-tests.xcodeproj/xcshareddata/xcschemes/Mapbox GL Tests.xcscheme
+++ b/test/ios/ios-tests.xcodeproj/xcshareddata/xcschemes/Mapbox GL Tests.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0510"
+ LastUpgradeVersion = "0620"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@@ -51,6 +51,11 @@
BlueprintName = "Test Bundle"
ReferencedContainer = "container:ios-tests.xcodeproj">
</BuildableReference>
+ <SkippedTests>
+ <Test
+ Identifier = "MapViewTests/testDelegateRegionWillChange">
+ </Test>
+ </SkippedTests>
</TestableReference>
</Testables>
<MacroExpansion>
@@ -72,7 +77,8 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
- <BuildableProductRunnable>
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD043322196DB9BC00E6F39D"
@@ -90,7 +96,8 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
- <BuildableProductRunnable>
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DD043322196DB9BC00E6F39D"