diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-02-09 18:01:40 -0800 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-02-09 18:01:40 -0800 |
commit | d4d4cd44151423d374e373798f09d12157babc27 (patch) | |
tree | ede100edc58475b969b62fba8f3bcb219b29beda /test | |
parent | 0ee6044ccf49bb32a25c57ce25af15bcd58ca77b (diff) | |
download | qtlocation-mapboxgl-d4d4cd44151423d374e373798f09d12157babc27.tar.gz |
move iOS code from gl-cocoa to this project
Diffstat (limited to 'test')
-rw-r--r-- | test/ios/.gitignore | 3 | ||||
-rw-r--r-- | test/ios/App-Info.plist | 45 | ||||
-rw-r--r-- | test/ios/Bundle-Info.plist | 22 | ||||
m--------- | test/ios/KIF | 0 | ||||
-rw-r--r-- | test/ios/KIFTestActor+MapboxGL.h | 12 | ||||
-rw-r--r-- | test/ios/KIFTestActor+MapboxGL.m | 24 | ||||
-rw-r--r-- | test/ios/MGLTAppDelegate.h | 7 | ||||
-rw-r--r-- | test/ios/MGLTAppDelegate.m | 18 | ||||
-rw-r--r-- | test/ios/MGLTViewController.h | 5 | ||||
-rw-r--r-- | test/ios/MGLTViewController.m | 18 | ||||
-rw-r--r-- | test/ios/MapViewTests.h | 5 | ||||
-rw-r--r-- | test/ios/MapViewTests.m | 353 | ||||
-rw-r--r-- | test/ios/README.md | 9 | ||||
-rw-r--r-- | test/ios/ios-tests.xcodeproj/project.pbxproj | 659 | ||||
-rw-r--r-- | test/ios/ios-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata | 7 | ||||
-rw-r--r-- | test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/Mapbox GL Tests.xccheckout | 41 | ||||
-rw-r--r-- | test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/ios-tests.xccheckout | 65 | ||||
-rw-r--r-- | test/ios/ios-tests.xcodeproj/xcshareddata/xcschemes/Mapbox GL Tests.xcscheme | 110 | ||||
-rw-r--r-- | test/ios/main.m | 9 |
19 files changed, 1412 insertions, 0 deletions
diff --git a/test/ios/.gitignore b/test/ios/.gitignore new file mode 100644 index 0000000000..516812b72d --- /dev/null +++ b/test/ios/.gitignore @@ -0,0 +1,3 @@ +!*.xcodeproj +!xcshareddata +xcuserdata diff --git a/test/ios/App-Info.plist b/test/ios/App-Info.plist new file mode 100644 index 0000000000..d7e9d5c462 --- /dev/null +++ b/test/ios/App-Info.plist @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleDisplayName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.mapbox.${PRODUCT_NAME:rfc1034identifier}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>UIRequiredDeviceCapabilities</key> + <array> + <string>armv7</string> + </array> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> +</dict> +</plist> diff --git a/test/ios/Bundle-Info.plist b/test/ios/Bundle-Info.plist new file mode 100644 index 0000000000..4ea0aed89c --- /dev/null +++ b/test/ios/Bundle-Info.plist @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>en</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>com.mapbox.${PRODUCT_NAME:rfc1034identifier}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>BNDL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1</string> +</dict> +</plist> diff --git a/test/ios/KIF b/test/ios/KIF new file mode 160000 +Subproject ab5a46ff7e970de5578df48a1e1f013bd5e1bd4 diff --git a/test/ios/KIFTestActor+MapboxGL.h b/test/ios/KIFTestActor+MapboxGL.h new file mode 100644 index 0000000000..199091b29f --- /dev/null +++ b/test/ios/KIFTestActor+MapboxGL.h @@ -0,0 +1,12 @@ +#import <KIF/KIF.h> + +@class MGLMapView; + +@interface KIFTestActor (MapboxGL) + +@property (nonatomic, readonly) UIWindow *window; +@property (nonatomic, readonly) UIViewController *viewController; +@property (nonatomic, readonly) MGLMapView *mapView; +@property (nonatomic, readonly) UIView *compass; + +@end diff --git a/test/ios/KIFTestActor+MapboxGL.m b/test/ios/KIFTestActor+MapboxGL.m new file mode 100644 index 0000000000..b267e0c0be --- /dev/null +++ b/test/ios/KIFTestActor+MapboxGL.m @@ -0,0 +1,24 @@ +#import "KIFTestActor+MapboxGL.h" +#import <KIF/UIApplication-KIFAdditions.h> +#import <KIF/UIAccessibilityElement-KIFAdditions.h> +#import "MGLMapView.h" + +@implementation KIFTestActor (MapboxGL) + +- (UIWindow *)window { + return [[UIApplication sharedApplication] statusBarWindow]; +} + +- (UIViewController *)viewController { + return (UIViewController *)[[tester.mapView nextResponder] nextResponder]; +} + +- (MGLMapView *)mapView { + return (MGLMapView *)[tester waitForViewWithAccessibilityLabel:@"Map"]; +} + +- (UIView *)compass { + return [tester waitForViewWithAccessibilityLabel:@"Compass"]; +} + +@end diff --git a/test/ios/MGLTAppDelegate.h b/test/ios/MGLTAppDelegate.h new file mode 100644 index 0000000000..e5c459beb0 --- /dev/null +++ b/test/ios/MGLTAppDelegate.h @@ -0,0 +1,7 @@ +#import <UIKit/UIKit.h> + +@interface MGLTAppDelegate : UIResponder <UIApplicationDelegate> + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/test/ios/MGLTAppDelegate.m b/test/ios/MGLTAppDelegate.m new file mode 100644 index 0000000000..4bd6b64882 --- /dev/null +++ b/test/ios/MGLTAppDelegate.m @@ -0,0 +1,18 @@ +#import "MGLTAppDelegate.h" +#import "MGLTViewController.h" + +@implementation MGLTAppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + UINavigationController *wrapper = [[UINavigationController alloc] initWithRootViewController:[MGLTViewController new]]; + self.window.rootViewController = wrapper; + wrapper.navigationBarHidden = YES; + wrapper.toolbarHidden = YES; + [self.window makeKeyAndVisible]; + + return YES; +} + +@end diff --git a/test/ios/MGLTViewController.h b/test/ios/MGLTViewController.h new file mode 100644 index 0000000000..39df59bb5e --- /dev/null +++ b/test/ios/MGLTViewController.h @@ -0,0 +1,5 @@ +#import <UIKit/UIKit.h> + +@interface MGLTViewController : UIViewController + +@end diff --git a/test/ios/MGLTViewController.m b/test/ios/MGLTViewController.m new file mode 100644 index 0000000000..9caa64c79a --- /dev/null +++ b/test/ios/MGLTViewController.m @@ -0,0 +1,18 @@ +#import "MGLTViewController.h" +#import "MGLMapView.h" + +@implementation MGLTViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + MGLMapView *mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds + accessToken:@"pk.eyJ1IjoianVzdGluIiwiYSI6Ik9RX3RRQzAifQ.dmOg_BAp1ywuDZMM7YsXRg"]; + mapView.viewControllerForLayoutGuides = self; + mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + + [self.view addSubview:mapView]; +} + +@end diff --git a/test/ios/MapViewTests.h b/test/ios/MapViewTests.h new file mode 100644 index 0000000000..5057ffd641 --- /dev/null +++ b/test/ios/MapViewTests.h @@ -0,0 +1,5 @@ +#import <KIF/KIF.h> + +@interface MapViewTests : KIFTestCase + +@end diff --git a/test/ios/MapViewTests.m b/test/ios/MapViewTests.m new file mode 100644 index 0000000000..adf3aeba06 --- /dev/null +++ b/test/ios/MapViewTests.m @@ -0,0 +1,353 @@ +#import "MapViewTests.h" +#import <KIF/KIFTestStepValidation.h> +#import "KIFTestActor+MapboxGL.h" +#import "MGLMapView.h" + +@interface MapViewTests () <MGLMapViewDelegate> + +@end + +@implementation MapViewTests + +- (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"); + + [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"); +} + +- (void)testCompassTap { + tester.mapView.direction = 180; + __KIFAssertEqual(tester.mapView.direction, + 180, + @"setting direction should take effect"); + + [tester waitForTimeInterval:1]; + + [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"); +} + +- (void)testDirectionReset { + tester.mapView.direction = 100; + __KIFAssertEqual(tester.mapView.direction, + 100, + @"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"); +} + +- (void)testZoom { + double zoom = tester.mapView.zoomLevel; + + [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"); + + zoom = tester.mapView.zoomLevel; + [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"); +} + +- (void)testZoomDisabled { + tester.mapView.zoomEnabled = NO; + double zoom = tester.mapView.zoomLevel; + + [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"); + + [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"); +} + +- (void)testPan { + CLLocationCoordinate2D centerCoordinate = tester.mapView.centerCoordinate; + + [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"); +} + +- (void)testPanDisabled { + tester.mapView.scrollEnabled = NO; + CLLocationCoordinate2D centerCoordinate = tester.mapView.centerCoordinate; + + [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"); +} + +- (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]; + + XCTAssertTrue(tester.mapView.centerCoordinate.latitude == newCenterCoordinate.latitude, + @"setting center should change latitude"); + XCTAssertTrue(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"); +} + +- (void)testTopLayoutGuide { + CGRect statusBarFrame, navigationBarFrame, compassFrame; + UINavigationBar *navigationBar = tester.viewController.navigationController.navigationBar; + + compassFrame = [tester.compass.superview convertRect:tester.compass.frame toView:nil]; + statusBarFrame = [tester.window convertRect:[[UIApplication sharedApplication] statusBarFrame] toView:nil]; + XCTAssertFalse(CGRectIntersectsRect(compassFrame, statusBarFrame), + @"compass should not be under status bar"); + + tester.viewController.navigationController.navigationBarHidden = NO; + compassFrame = [tester.compass.superview convertRect:tester.compass.frame toView:nil]; + navigationBarFrame = [tester.window convertRect:navigationBar.frame toView:nil]; + XCTAssertFalse(CGRectIntersectsRect(compassFrame, navigationBarFrame), + @"compass should not be under navigation bar"); + + [system simulateDeviceRotationToOrientation:UIDeviceOrientationLandscapeLeft]; + + compassFrame = [tester.compass.superview convertRect:tester.compass.frame toView:nil]; + navigationBarFrame = [tester.window convertRect:navigationBar.frame toView:nil]; + XCTAssertFalse(CGRectIntersectsRect(compassFrame, navigationBarFrame), + @"rotated device should not have compass under navigation bar"); + + tester.viewController.navigationController.navigationBarHidden = YES; + compassFrame = [tester.compass.superview convertRect:tester.compass.frame toView:nil]; + statusBarFrame = [tester.window convertRect:[[UIApplication sharedApplication] statusBarFrame] toView:nil]; + XCTAssertFalse(CGRectIntersectsRect(compassFrame, statusBarFrame), + @"rotated device should not have compass under status bar"); +} + +- (void)testBottomLayoutGuide { + CGRect logoBugFrame, toolbarFrame, attributionButtonFrame; + UIView *logoBug = (UIView *)[tester waitForViewWithAccessibilityLabel:@"Mapbox logo"]; + UIToolbar *toolbar = tester.viewController.navigationController.toolbar; + UIView *attributionButton = (UIView *)[tester waitForViewWithAccessibilityLabel:@"Attribution info"]; + + tester.viewController.navigationController.toolbarHidden = NO; + + logoBugFrame = [logoBug.superview convertRect:logoBug.frame toView:nil]; + toolbarFrame = [tester.window convertRect:toolbar.frame toView:nil]; + XCTAssertFalse(CGRectIntersectsRect(logoBugFrame, toolbarFrame), + @"logo bug should not be under toolbar"); + + attributionButtonFrame = [attributionButton.superview convertRect:attributionButton.frame toView:nil]; + XCTAssertFalse(CGRectIntersectsRect(attributionButtonFrame, toolbarFrame), + @"attribution button should not be under toolbar"); + + [system simulateDeviceRotationToOrientation:UIDeviceOrientationLandscapeRight]; + + 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"); + + attributionButtonFrame = [attributionButton.superview convertRect:attributionButton.frame toView:nil]; + XCTAssertFalse(CGRectIntersectsRect(attributionButtonFrame, toolbarFrame), + @"rotated device should not have attribution button under toolbar"); +} + +- (void)testDelegateRegionWillChange { + __block NSUInteger unanimatedCount = 0; + __block NSUInteger animatedCount = 0; + [[NSNotificationCenter defaultCenter] addObserverForName:@"regionWillChangeAnimated" + object:tester.mapView + queue:[NSOperationQueue mainQueue] + usingBlock:^(NSNotification *note) { + if ([note.userInfo[@"animated"] boolValue]) { + animatedCount++; + } else { + unanimatedCount++; + } + }]; + + 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"); + + 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"); + + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"regionWillChangeAnimated" + object:tester.mapView]; +} + +- (void)mapView:(MGLMapView *)mapView regionWillChangeAnimated:(BOOL)animated { + [[NSNotificationCenter defaultCenter] postNotificationName:@"regionWillChangeAnimated" + object:mapView + userInfo:@{ @"animated" : @(animated) }]; +} + +- (void)testDelegateRegionDidChange { + __block NSUInteger unanimatedCount = 0; + __block NSUInteger animatedCount = 0; + [[NSNotificationCenter defaultCenter] addObserverForName:@"regionDidChangeAnimated" + object:tester.mapView + queue:[NSOperationQueue mainQueue] + usingBlock:^(NSNotification *note) { + if ([note.userInfo[@"animated"] boolValue]) { + animatedCount++; + } else { + unanimatedCount++; + } + }]; + + 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"); + + 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"); + + [[NSNotificationCenter defaultCenter] removeObserver:self + name:@"regionDidChangeAnimated" + object:tester.mapView]; +} + +- (void)mapView:(MGLMapView *)mapView regionDidChangeAnimated:(BOOL)animated { + [[NSNotificationCenter defaultCenter] postNotificationName:@"regionDidChangeAnimated" + object:mapView + userInfo:@{ @"animated" : @(animated) }]; +} + +@end diff --git a/test/ios/README.md b/test/ios/README.md new file mode 100644 index 0000000000..21975e177e --- /dev/null +++ b/test/ios/README.md @@ -0,0 +1,9 @@ +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 new file mode 100644 index 0000000000..86f1251324 --- /dev/null +++ b/test/ios/ios-tests.xcodeproj/project.pbxproj @@ -0,0 +1,659 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + 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 */; }; + 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 */ + DDBD0143196DC3AE0033959E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DDBD013A196DC3AE0033959E /* KIF.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EABD46AA1857A0C700A5F081; + remoteInfo = KIF; + }; + DDBD0145196DC3AE0033959E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DDBD013A196DC3AE0033959E /* KIF.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EB72047C1680DDAD00278DA2; + remoteInfo = "KIF-OCUnit"; + }; + DDBD0147196DC3AE0033959E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DDBD013A196DC3AE0033959E /* KIF.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EB60ECC1177F8C83005A041A; + remoteInfo = "Test Host"; + }; + DDBD0149196DC3AE0033959E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DDBD013A196DC3AE0033959E /* KIF.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EABD46CD1857A0F300A5F081; + remoteInfo = "KIF Tests"; + }; + DDBD014B196DC3AE0033959E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DDBD013A196DC3AE0033959E /* KIF.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = EB60ECEB177F8DB3005A041A; + remoteInfo = "KIF Tests-OCUnit"; + }; + DDBD0160196DC3D70033959E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = DD04331B196DB9BC00E6F39D /* Project object */; + proxyType = 1; + remoteGlobalIDString = DD043322196DB9BC00E6F39D; + remoteInfo = "Mapbox GL Tests"; + }; +/* End PBXContainerItemProxy section */ + +/* 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; }; + 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 */ + +/* Begin PBXFrameworksBuildPhase section */ + DD043320196DB9BC00E6F39D /* Frameworks */ = { + 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 */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DDBD014F196DC3D70033959E /* Frameworks */ = { + 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 */, + DDBD016E196DC4A10033959E /* libKIF.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + DD04331A196DB9BC00E6F39D = { + isa = PBXGroup; + children = ( + DD04332C196DB9BC00E6F39D /* App */, + DDBD0139196DC38D0033959E /* Tests */, + DD043325196DB9BC00E6F39D /* Frameworks */, + DD043324196DB9BC00E6F39D /* Products */, + ); + sourceTree = "<group>"; + }; + DD043324196DB9BC00E6F39D /* Products */ = { + isa = PBXGroup; + children = ( + DD043323196DB9BC00E6F39D /* Mapbox GL Tests.app */, + DDBD0152196DC3D70033959E /* Test Bundle.xctest */, + ); + name = Products; + sourceTree = "<group>"; + }; + 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 */, + ); + name = Frameworks; + sourceTree = "<group>"; + }; + DD04332C196DB9BC00E6F39D /* App */ = { + isa = PBXGroup; + children = ( + DD043362196DBBD500E6F39D /* MGLTAppDelegate.h */, + DD04335F196DBBD500E6F39D /* MGLTAppDelegate.m */, + DD043361196DBBD500E6F39D /* MGLTViewController.h */, + DD043360196DBBD500E6F39D /* MGLTViewController.m */, + DD8A77AD196DBFDA00FAD883 /* GL Library */, + DD04332D196DB9BC00E6F39D /* Supporting Files */, + ); + name = App; + path = "Mapbox GL Tests"; + sourceTree = "<group>"; + }; + DD04332D196DB9BC00E6F39D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DD043367196DBCC200E6F39D /* App-Info.plist */, + DD043365196DBBE000E6F39D /* main.m */, + ); + name = "Supporting Files"; + sourceTree = "<group>"; + }; + DD6123FF19CCF06E006845B1 /* Headers */ = { + 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 */, + ); + name = "GL Library"; + sourceTree = "<group>"; + }; + DDBD0139196DC38D0033959E /* Tests */ = { + isa = PBXGroup; + children = ( + DDBD016B196DC4740033959E /* KIFTestActor+MapboxGL.h */, + DDBD016A196DC4740033959E /* KIFTestActor+MapboxGL.m */, + DDBD0169196DC4740033959E /* MapViewTests.h */, + DDBD0168196DC4740033959E /* MapViewTests.m */, + DDBD0167196DC46B0033959E /* Supporting Files */, + DDBD014D196DC3B00033959E /* KIF */, + ); + name = Tests; + path = "Mapbox GL Tests"; + sourceTree = "<group>"; + }; + DDBD013B196DC3AE0033959E /* Products */ = { + isa = PBXGroup; + children = ( + DDBD0144196DC3AE0033959E /* libKIF.a */, + DDBD0146196DC3AE0033959E /* libKIF-OCUnit.a */, + DDBD0148196DC3AE0033959E /* Test Host.app */, + DDBD014A196DC3AE0033959E /* KIF Tests - XCTest.xctest */, + DDBD014C196DC3AE0033959E /* KIF Tests-OCUnit.octest */, + ); + name = Products; + sourceTree = "<group>"; + }; + DDBD014D196DC3B00033959E /* KIF */ = { + isa = PBXGroup; + children = ( + DDBD013A196DC3AE0033959E /* KIF.xcodeproj */, + ); + name = KIF; + sourceTree = "<group>"; + }; + DDBD0167196DC46B0033959E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + DDBD0165196DC4560033959E /* Bundle-Info.plist */, + ); + name = "Supporting Files"; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + DD043322196DB9BC00E6F39D /* Mapbox GL Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = DD043358196DB9BC00E6F39D /* Build configuration list for PBXNativeTarget "Mapbox GL Tests" */; + buildPhases = ( + DD04331F196DB9BC00E6F39D /* Sources */, + DD043320196DB9BC00E6F39D /* Frameworks */, + DD043321196DB9BC00E6F39D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Mapbox GL Tests"; + productName = "Mapbox GL Tests"; + productReference = DD043323196DB9BC00E6F39D /* Mapbox GL Tests.app */; + productType = "com.apple.product-type.application"; + }; + DDBD0151196DC3D70033959E /* Test Bundle */ = { + isa = PBXNativeTarget; + buildConfigurationList = DDBD0162196DC3D70033959E /* Build configuration list for PBXNativeTarget "Test Bundle" */; + buildPhases = ( + DDBD014E196DC3D70033959E /* Sources */, + DDBD014F196DC3D70033959E /* Frameworks */, + DDBD0150196DC3D70033959E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + DDBD0161196DC3D70033959E /* PBXTargetDependency */, + ); + name = "Test Bundle"; + productName = "Test Bundle"; + productReference = DDBD0152196DC3D70033959E /* Test Bundle.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + DD04331B196DB9BC00E6F39D /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = MGLT; + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = Mapbox; + TargetAttributes = { + DDBD0151196DC3D70033959E = { + TestTargetID = DD043322196DB9BC00E6F39D; + }; + }; + }; + buildConfigurationList = DD04331E196DB9BC00E6F39D /* Build configuration list for PBXProject "ios-tests" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = DD04331A196DB9BC00E6F39D; + productRefGroup = DD043324196DB9BC00E6F39D /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = DDBD013B196DC3AE0033959E /* Products */; + ProjectRef = DDBD013A196DC3AE0033959E /* KIF.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + DD043322196DB9BC00E6F39D /* Mapbox GL Tests */, + DDBD0151196DC3D70033959E /* Test Bundle */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + DDBD0144196DC3AE0033959E /* libKIF.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libKIF.a; + remoteRef = DDBD0143196DC3AE0033959E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + DDBD0146196DC3AE0033959E /* libKIF-OCUnit.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libKIF-OCUnit.a"; + remoteRef = DDBD0145196DC3AE0033959E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + DDBD0148196DC3AE0033959E /* Test Host.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = "Test Host.app"; + remoteRef = DDBD0147196DC3AE0033959E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + DDBD014A196DC3AE0033959E /* KIF Tests - XCTest.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = "KIF Tests - XCTest.xctest"; + remoteRef = DDBD0149196DC3AE0033959E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + DDBD014C196DC3AE0033959E /* KIF Tests-OCUnit.octest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = "KIF Tests-OCUnit.octest"; + remoteRef = DDBD014B196DC3AE0033959E /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + DD043321196DB9BC00E6F39D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DD61240919CCF06E006845B1 /* MapboxGL.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DDBD0150196DC3D70033959E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + DD04331F196DB9BC00E6F39D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DD043364196DBBD500E6F39D /* MGLTViewController.m in Sources */, + DD043366196DBBE000E6F39D /* main.m in Sources */, + DD043363196DBBD500E6F39D /* MGLTAppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DDBD014E196DC3D70033959E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + DDBD016D196DC4740033959E /* KIFTestActor+MapboxGL.m in Sources */, + DDBD016C196DC4740033959E /* MapViewTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + DDBD0161196DC3D70033959E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = DD043322196DB9BC00E6F39D /* Mapbox GL Tests */; + targetProxy = DDBD0160196DC3D70033959E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + DD043356196DB9BC00E6F39D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + DD043357196DB9BC00E6F39D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 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, + ); + INFOPLIST_FILE = "$(SRCROOT)/App-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../dist/static, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 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, + ); + INFOPLIST_FILE = "$(SRCROOT)/App-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../dist/static, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + DDBD0163196DC3D70033959E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Mapbox GL Tests.app/Mapbox GL Tests"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + "KIF_XCTEST=1", + ); + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + ../dist/static/Headers, + ); + INFOPLIST_FILE = "Bundle-Info.plist"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + XCTest, + "-ObjC", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Debug; + }; + DDBD0164196DC3D70033959E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Mapbox GL Tests.app/Mapbox GL Tests"; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)", + ); + GCC_PREPROCESSOR_DEFINITIONS = "KIF_XCTEST=1"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + ../dist/static/Headers, + ); + INFOPLIST_FILE = "Bundle-Info.plist"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + XCTest, + "-ObjC", + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUNDLE_LOADER)"; + WRAPPER_EXTENSION = xctest; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + DD04331E196DB9BC00E6F39D /* Build configuration list for PBXProject "ios-tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD043356196DB9BC00E6F39D /* Debug */, + DD043357196DB9BC00E6F39D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DD043358196DB9BC00E6F39D /* Build configuration list for PBXNativeTarget "Mapbox GL Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DD043359196DB9BC00E6F39D /* Debug */, + DD04335A196DB9BC00E6F39D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + DDBD0162196DC3D70033959E /* Build configuration list for PBXNativeTarget "Test Bundle" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + DDBD0163196DC3D70033959E /* Debug */, + DDBD0164196DC3D70033959E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = DD04331B196DB9BC00E6F39D /* Project object */; +} diff --git a/test/ios/ios-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/test/ios/ios-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..4cad7961db --- /dev/null +++ b/test/ios/ios-tests.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Workspace + version = "1.0"> + <FileRef + location = "self:Mapbox GL Tests.xcodeproj"> + </FileRef> +</Workspace> diff --git a/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/Mapbox GL Tests.xccheckout b/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/Mapbox GL Tests.xccheckout new file mode 100644 index 0000000000..68c68a2234 --- /dev/null +++ b/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/Mapbox GL Tests.xccheckout @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDESourceControlProjectFavoriteDictionaryKey</key> + <false/> + <key>IDESourceControlProjectIdentifier</key> + <string>A9E9DC14-62C7-4C7A-B782-6B24B7657046</string> + <key>IDESourceControlProjectName</key> + <string>Mapbox GL Tests</string> + <key>IDESourceControlProjectOriginsDictionary</key> + <dict> + <key>1F4F0A5F-01E4-4945-AE04-F4B1B763C2BF</key> + <string>ssh://github.com/mapbox/mapbox-gl-cocoa.git</string> + </dict> + <key>IDESourceControlProjectPath</key> + <string>test/Mapbox GL Tests/Mapbox GL Tests.xcodeproj/project.xcworkspace</string> + <key>IDESourceControlProjectRelativeInstallPathDictionary</key> + <dict> + <key>1F4F0A5F-01E4-4945-AE04-F4B1B763C2BF</key> + <string>../../../..</string> + </dict> + <key>IDESourceControlProjectURL</key> + <string>ssh://github.com/mapbox/mapbox-gl-cocoa.git</string> + <key>IDESourceControlProjectVersion</key> + <integer>110</integer> + <key>IDESourceControlProjectWCCIdentifier</key> + <string>1F4F0A5F-01E4-4945-AE04-F4B1B763C2BF</string> + <key>IDESourceControlProjectWCConfigurations</key> + <array> + <dict> + <key>IDESourceControlRepositoryExtensionIdentifierKey</key> + <string>public.vcs.git</string> + <key>IDESourceControlWCCIdentifierKey</key> + <string>1F4F0A5F-01E4-4945-AE04-F4B1B763C2BF</string> + <key>IDESourceControlWCCName</key> + <string>mapbox-gl-cocoa</string> + </dict> + </array> +</dict> +</plist> 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 new file mode 100644 index 0000000000..8f3ca408b6 --- /dev/null +++ b/test/ios/ios-tests.xcodeproj/project.xcworkspace/xcshareddata/ios-tests.xccheckout @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>IDESourceControlProjectFavoriteDictionaryKey</key> + <false/> + <key>IDESourceControlProjectIdentifier</key> + <string>31F71B93-A6C7-4EE6-B62A-5324738E25FE</string> + <key>IDESourceControlProjectName</key> + <string>ios-tests</string> + <key>IDESourceControlProjectOriginsDictionary</key> + <dict> + <key>10265E242415D473A6A613214DB7AC3EE3D43F93</key> + <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> + <key>IDESourceControlProjectRelativeInstallPathDictionary</key> + <dict> + <key>10265E242415D473A6A613214DB7AC3EE3D43F93</key> + <string>../../..test/KIF/</string> + <key>7E68CB584078A487C0535CC191D3B7551EEE2095</key> + <string>../../../../..</string> + <key>FC967DACF69B3B67E6F2E9FBE56B64B73B118AFF</key> + <string>../../..</string> + </dict> + <key>IDESourceControlProjectURL</key> + <string>github.com:mapbox/mapbox-gl-cocoa.git</string> + <key>IDESourceControlProjectVersion</key> + <integer>111</integer> + <key>IDESourceControlProjectWCCIdentifier</key> + <string>FC967DACF69B3B67E6F2E9FBE56B64B73B118AFF</string> + <key>IDESourceControlProjectWCConfigurations</key> + <array> + <dict> + <key>IDESourceControlRepositoryExtensionIdentifierKey</key> + <string>public.vcs.git</string> + <key>IDESourceControlWCCIdentifierKey</key> + <string>7E68CB584078A487C0535CC191D3B7551EEE2095</string> + <key>IDESourceControlWCCName</key> + <string>..</string> + </dict> + <dict> + <key>IDESourceControlRepositoryExtensionIdentifierKey</key> + <string>public.vcs.git</string> + <key>IDESourceControlWCCIdentifierKey</key> + <string>10265E242415D473A6A613214DB7AC3EE3D43F93</string> + <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 new file mode 100644 index 0000000000..f3c2bd7ffe --- /dev/null +++ b/test/ios/ios-tests.xcodeproj/xcshareddata/xcschemes/Mapbox GL Tests.xcscheme @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Scheme + LastUpgradeVersion = "0510" + version = "1.3"> + <BuildAction + parallelizeBuildables = "YES" + buildImplicitDependencies = "YES"> + <BuildActionEntries> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "EABD46791857A0C700A5F081" + BuildableName = "libKIF.a" + BlueprintName = "KIF" + ReferencedContainer = "container:KIF/KIF.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + <BuildActionEntry + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "DD043322196DB9BC00E6F39D" + BuildableName = "Mapbox GL Tests.app" + BlueprintName = "Mapbox GL Tests" + ReferencedContainer = "container:ios-tests.xcodeproj"> + </BuildableReference> + </BuildActionEntry> + </BuildActionEntries> + </BuildAction> + <TestAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + shouldUseLaunchSchemeArgsEnv = "YES" + buildConfiguration = "Release"> + <Testables> + <TestableReference + skipped = "NO"> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "DDBD0151196DC3D70033959E" + BuildableName = "Test Bundle.xctest" + BlueprintName = "Test Bundle" + ReferencedContainer = "container:ios-tests.xcodeproj"> + </BuildableReference> + </TestableReference> + </Testables> + <MacroExpansion> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "DD043322196DB9BC00E6F39D" + BuildableName = "Mapbox GL Tests.app" + BlueprintName = "Mapbox GL Tests" + ReferencedContainer = "container:ios-tests.xcodeproj"> + </BuildableReference> + </MacroExpansion> + </TestAction> + <LaunchAction + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + launchStyle = "0" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Debug" + ignoresPersistentStateOnLaunch = "NO" + debugDocumentVersioning = "YES" + allowLocationSimulation = "YES"> + <BuildableProductRunnable> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "DD043322196DB9BC00E6F39D" + BuildableName = "Mapbox GL Tests.app" + BlueprintName = "Mapbox GL Tests" + ReferencedContainer = "container:ios-tests.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + <AdditionalOptions> + </AdditionalOptions> + </LaunchAction> + <ProfileAction + shouldUseLaunchSchemeArgsEnv = "YES" + savedToolIdentifier = "" + useCustomWorkingDirectory = "NO" + buildConfiguration = "Release" + debugDocumentVersioning = "YES"> + <BuildableProductRunnable> + <BuildableReference + BuildableIdentifier = "primary" + BlueprintIdentifier = "DD043322196DB9BC00E6F39D" + BuildableName = "Mapbox GL Tests.app" + BlueprintName = "Mapbox GL Tests" + ReferencedContainer = "container:ios-tests.xcodeproj"> + </BuildableReference> + </BuildableProductRunnable> + </ProfileAction> + <AnalyzeAction + buildConfiguration = "Debug"> + </AnalyzeAction> + <ArchiveAction + buildConfiguration = "Release" + revealArchiveInOrganizer = "YES"> + </ArchiveAction> +</Scheme> diff --git a/test/ios/main.m b/test/ios/main.m new file mode 100644 index 0000000000..d79750dcdd --- /dev/null +++ b/test/ios/main.m @@ -0,0 +1,9 @@ +#import <UIKit/UIKit.h> +#import "MGLTAppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([MGLTAppDelegate class])); + } +} |