Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Add support for tvOS #1030

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6286898
added new schemes for tvOS
shvul Jul 19, 2018
05976ac
updated some XCTest private headers
shvul Jul 23, 2018
e58b973
updated Carthage config
shvul Jul 31, 2018
4c1d8f1
updated some wad categories and commands for tv os (debug purpose)
shvul Aug 1, 2018
4c85133
updated FBElementCommnds to exclude XCUICoordinate for tv os
shvul Aug 1, 2018
98078f8
added tv os schemes
shvul Aug 1, 2018
79c6a70
added libxml2 for tvOS
shvul Aug 1, 2018
aaa3758
Added Apple TV Remote commands
shvul Aug 2, 2018
0e67c32
add command to return focused element
shvul Aug 2, 2018
e40a4e6
add tv os integration app
shvul Aug 2, 2018
ae04980
update tvOS integration app
shvul Aug 4, 2018
5cfb6a8
update wda commands
shvul Aug 4, 2018
784ced8
add new category for XCUIApplication
shvul Aug 6, 2018
edef34c
update springboard app for tvOS
shvul Aug 6, 2018
7848265
minor bugfix
shvul Sep 20, 2018
55780ec
Merge remote-tracking branch 'upstream/master'
shvul Oct 2, 2018
68eada8
remove package-lock
shvul Oct 2, 2018
b110ade
setup integration tests
shvul Oct 2, 2018
4f94146
update FBAlert to support Apple TV commands
shvul Oct 2, 2018
478631b
update element visibility verification to the low level api
shvul Oct 2, 2018
038fc3b
add focuse element attribute to pagesource
shvul Oct 3, 2018
d3f3195
Update inspector to support "isFocused" attribute
shvul Oct 3, 2018
61cfaa6
update fb_tree method to support isFocused property
shvul Oct 3, 2018
e9ac62f
update FBTVInteract
shvul Oct 4, 2018
1668d6d
update tvOS integration app
shvul Oct 7, 2018
2b58b8b
update SpringBoard to support HeadBoard from tvOS
shvul Oct 7, 2018
27c3baa
update FBAlert for full tvOS support
shvul Oct 7, 2018
e76eb59
update tvOS integration tests
shvul Oct 7, 2018
6aaad68
add functionality to automatically focuse element
shvul Oct 8, 2018
6fd1a09
update tv integration app for selection testing
shvul Oct 8, 2018
a4b4302
update FBElementCommands to support element selection fucntionality
shvul Oct 8, 2018
58b46e0
update tv integration app for attributes testing
shvul Oct 8, 2018
cf9fa52
update attributes tests for tvOS
shvul Oct 8, 2018
4096311
update goToAttributesPage method
shvul Oct 8, 2018
f053da0
add tv element screenshot tests
shvul Oct 8, 2018
bfc7c0d
add focus element route
shvul Oct 15, 2018
b402fae
update carthage dependencies
shvul Oct 17, 2018
663edf6
rename tv integration test case
shvul Oct 19, 2018
cb04124
update tv integration app main storyboard
shvul Oct 19, 2018
9a12bca
add element visibility tests for tvOS
shvul Oct 19, 2018
fffc888
fix table view cells visiblity test
shvul Nov 9, 2018
e7cd6e2
bugfix
shvul Nov 12, 2018
be13531
add search failure tests
shvul Nov 12, 2018
89a9bb4
add keyboard test
shvul Nov 12, 2018
2ab2b81
add typing test
shvul Nov 12, 2018
72257bf
add xpath integration tests
shvul Nov 12, 2018
215088b
add snapshot helpers tests
shvul Nov 12, 2018
0c5c5e2
update copyrights
shvul Nov 12, 2018
382d46e
rename tests
shvul Nov 12, 2018
a13df33
rename fix
shvul Nov 12, 2018
8284317
add hitpoint tv test
shvul Nov 13, 2018
7556b54
add app helpers tests for tvOS
shvul Nov 13, 2018
475d076
add tv device tests
shvul Nov 13, 2018
575c79f
add tv element tests
shvul Nov 13, 2018
fb0f01e
update build script
shvul Nov 14, 2018
46ab871
use Xcode 10.1, iOS 12.1 and tvOS 12.1 on Travis
shvul Nov 14, 2018
6f9fd26
fix FBTyping category
shvul Nov 14, 2018
0058f6e
update XCUIElementDouble for tvOS
shvul Nov 15, 2018
4a5ba40
add unit tests for tvOS
shvul Nov 15, 2018
515ae9b
add tv unit tests to build sh
shvul Nov 15, 2018
16b7f82
fix keyboard typing
shvul Nov 15, 2018
4a409ea
fix application selection tests
shvul Nov 15, 2018
d56a184
change travis destination for iphone
shvul Nov 15, 2018
8c135ba
code clean
shvul Nov 15, 2018
7f86530
remove unnecessary schemes
shvul Nov 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 22 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.2
osx_image: xcode10.1
sudo: false

cache:
Expand All @@ -15,23 +15,32 @@ branches:

env:
# Builds
- ACTION=build TARGET=runner SDK=sim
- ACTION=build TARGET=runner SDK=device
- PLATFORM=ios ACTION=build TARGET=runner SDK=sim
- PLATFORM=ios ACTION=build TARGET=runner SDK=device
- PLATFORM=tvos ACTION=build TARGET=runner SDK=sim
- PLATFORM=tvos ACTION=build TARGET=runner SDK=device

# Analyze
- ACTION=analyze TARGET=lib SDK=sim
- ACTION=analyze TARGET=runner SDK=sim
- PLATFORM=ios ACTION=analyze TARGET=lib SDK=sim
- PLATFORM=ios ACTION=analyze TARGET=runner SDK=sim
- PLATFORM=tvos ACTION=analyze TARGET=lib SDK=sim
- PLATFORM=tvos ACTION=analyze TARGET=runner SDK=sim

# Unit tests
- ACTION=unit_test DEST=iphone TARGET=lib SDK=sim
- ACTION=unit_test DEST=ipad TARGET=lib SDK=sim
- PLATFORM=ios ACTION=unit_test DEST=iphone TARGET=lib SDK=sim
- PLATFORM=ios ACTION=unit_test DEST=ipad TARGET=lib SDK=sim
- PLATFORM=tvos ACTION=unit_test DEST=atv TARGET=lib SDK=sim

# Integration tests iPhone
- ACTION=int_test_1 DEST=iphone TARGET=lib SDK=sim
- ACTION=int_test_2 DEST=iphone TARGET=lib SDK=sim
- ACTION=int_test_3 DEST=iphone TARGET=lib SDK=sim
- PLATFORM=ios ACTION=int_test_1 DEST=iphone TARGET=lib SDK=sim
- PLATFORM=ios ACTION=int_test_2 DEST=iphone TARGET=lib SDK=sim
- PLATFORM=ios ACTION=int_test_3 DEST=iphone TARGET=lib SDK=sim

# Integration tests iPad
- ACTION=int_test_1 DEST=ipad TARGET=lib SDK=sim
- ACTION=int_test_2 DEST=ipad TARGET=lib SDK=sim
- ACTION=int_test_3 DEST=ipad TARGET=lib SDK=sim
- PLATFORM=ios ACTION=int_test_1 DEST=ipad TARGET=lib SDK=sim
- PLATFORM=ios ACTION=int_test_2 DEST=ipad TARGET=lib SDK=sim
- PLATFORM=ios ACTION=int_test_3 DEST=ipad TARGET=lib SDK=sim

# Integration tests Apple TV
- PLATFORM=tvos ACTION=int_test_1 DEST=atv TARGET=lib SDK=sim
- PLATFORM=tvos ACTION=int_test_2 DEST=atv TARGET=lib SDK=sim
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Used for HTTP routing
github "marekcirkos/RoutingHTTPServer"
github "shvul/RoutingHTTPServer"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "marekcirkos/RoutingHTTPServer" "v1.0.1"
github "shvul/RoutingHTTPServer" "v1.0.2"
1 change: 1 addition & 0 deletions Inspector/js/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Inspector extends React.Component {
{this.renderField('Rect', attributes.rect)}
{this.renderField('isEnabled', boolToString(attributes.isEnabled))}
{this.renderField('isVisible', boolToString(attributes.isVisible))}
{this.renderField('isFocused', attributes.isFocused === undefined ? null : boolToString(attributes.isFocused))}
{this.renderField('Tap', tapButton, false)}
</div>
);
Expand Down
1 change: 1 addition & 0 deletions Inspector/js/tree_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class TreeNode {
rect: node.frame,
isEnabled: node.isEnabled,
isVisible: node.isVisible,
isFocused: node.isFocused,
};
}
}
Expand Down
15 changes: 15 additions & 0 deletions IntegrationApp_tvOS/Classes/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

16 changes: 16 additions & 0 deletions IntegrationApp_tvOS/Classes/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import "AppDelegate.h"

@interface AppDelegate ()
@end

@implementation AppDelegate
@end
17 changes: 17 additions & 0 deletions IntegrationApp_tvOS/Classes/FBAlertsViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface FBAlertsViewController : UIViewController

@end

NS_ASSUME_NONNULL_END
66 changes: 66 additions & 0 deletions IntegrationApp_tvOS/Classes/FBAlertsViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/**
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import "FBAlertsViewController.h"
#import <Photos/Photos.h>
#import <CoreLocation/CoreLocation.h>

@interface FBAlertsViewController ()
@property (nonatomic, strong) CLLocationManager *locationManager;
@end

@implementation FBAlertsViewController

- (IBAction)createAppAlert:(UIButton *)sender
{
[self presentAlertController];
}

- (IBAction)createAppSheet:(UIButton *)sender
{
UIAlertController *alerController =
[UIAlertController alertControllerWithTitle:@"Magic Sheet"
message:@"Should read"
preferredStyle:UIAlertControllerStyleActionSheet];
[self presentViewController:alerController animated:YES completion:nil];

}

- (IBAction)createCameraRollAccessAlert:(UIButton *)sender
{
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
}];
}

- (IBAction)createGPSAccessAlert:(UIButton *)sender
{
self.locationManager = [CLLocationManager new];
[self.locationManager requestWhenInUseAuthorization];
}

- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
for (UITouch *touch in touches) {
if (fabs(touch.maximumPossibleForce - touch.force) < 0.0001) {
[self presentAlertController];
}
}
}

- (void)presentAlertController {
UIAlertController *alerController =
[UIAlertController alertControllerWithTitle:@"Magic"
message:@"Should read"
preferredStyle:UIAlertControllerStyleAlert];
[alerController addAction:[UIAlertAction actionWithTitle:@"Will do" style:UIAlertActionStyleDefault handler:nil]];
[self presentViewController:alerController animated:YES completion:nil];
}

@end
18 changes: 18 additions & 0 deletions IntegrationApp_tvOS/Classes/FBAttributesViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface FBAttributesViewController : UIViewController

@end

NS_ASSUME_NONNULL_END
23 changes: 23 additions & 0 deletions IntegrationApp_tvOS/Classes/FBAttributesViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright (c) 2018-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/

#import "FBAttributesViewController.h"

@interface FBAttributesViewController ()

@end

@implementation FBAttributesViewController

- (IBAction)didSelectButton:(UIButton *)button
{
button.selected = !button.selected;
}

@end
42 changes: 42 additions & 0 deletions IntegrationApp_tvOS/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?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>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Yo Yo</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Yo Yo</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Yo Yo</string>
<key>NSLocationUsageDescription</key>
<string>Yo Yo</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Yo Yo</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</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>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Automatic</string>
</dict>
</plist>
Loading