├── .gitignore ├── ADFiOSReferenceApp ├── ADFBaseViewController.h ├── ADFBaseViewController.m ├── AppDelegate.h ├── AppDelegate.m ├── CameraViewController.h ├── CameraViewController.m ├── ContactAddButtonViewController.h ├── ContactAddButtonViewController.m ├── CrashViewController.h ├── CrashViewController.m ├── CustomWebSiteNavigationViewController.h ├── CustomWebSiteNavigationViewController.m ├── CustomWebSitePickerViewController.h ├── CustomWebSitePickerViewController.m ├── DataPickerViewController.h ├── DataPickerViewController.m ├── DatePickerViewController.h ├── DatePickerViewController.m ├── ElementsTableViewController.h ├── ElementsTableViewController.m ├── FirstViewController.h ├── FirstViewController.m ├── FourthViewController.h ├── FourthViewController.m ├── GesturesViewController.h ├── GesturesViewController.m ├── HomePageViewController.h ├── HomePageViewController.m ├── ImageGalleryCollectionViewCell.h ├── ImageGalleryCollectionViewCell.m ├── ImageGalleryViewController.h ├── ImageGalleryViewController.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-40.png │ │ ├── Icon-40@2x.png │ │ ├── Icon-40@3x.png │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ ├── appicon-72.png │ │ ├── appicon-72@2x.png │ │ ├── appicon-Small-50.png │ │ ├── appicon-Small-50@2x.png │ │ ├── appicon-Small.png │ │ ├── appicon.png │ │ └── appicon@2x.png │ ├── LaunchImage.launchimage │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 5.png │ │ ├── 7.png │ │ ├── Contents.json │ │ ├── Default-568h@2x-1.png │ │ ├── Default-568h@2x.png │ │ ├── Default-Landscape.png │ │ ├── Default-Landscape@2x.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── Untitled-1.png │ │ └── Untitled.png │ ├── ic_account_box_white.imageset │ │ ├── Contents.json │ │ ├── ic_account_box_white.png │ │ ├── ic_account_box_white_2x.png │ │ └── ic_account_box_white_3x.png │ ├── ic_announcement_white.imageset │ │ ├── Contents.json │ │ ├── ic_announcement_white.png │ │ ├── ic_announcement_white_2x.png │ │ └── ic_announcement_white_3x.png │ ├── ic_bug_report_white.imageset │ │ ├── Contents.json │ │ ├── ic_bug_report_white.png │ │ ├── ic_bug_report_white_2x.png │ │ └── ic_bug_report_white_3x.png │ ├── ic_collections_white.imageset │ │ ├── Contents.json │ │ ├── ic_collections_white.png │ │ ├── ic_collections_white_2x.png │ │ └── ic_collections_white_3x.png │ ├── ic_error_white.imageset │ │ ├── Contents.json │ │ ├── ic_error_white.png │ │ ├── ic_error_white_2x.png │ │ └── ic_error_white_3x.png │ ├── ic_filter_1_white.imageset │ │ ├── Contents.json │ │ ├── ic_filter_1_white.png │ │ ├── ic_filter_1_white_2x.png │ │ └── ic_filter_1_white_3x.png │ ├── ic_format_list_numbered_white.imageset │ │ ├── Contents.json │ │ ├── ic_format_list_numbered_white.png │ │ ├── ic_format_list_numbered_white_2x.png │ │ └── ic_format_list_numbered_white_3x.png │ ├── ic_input_white.imageset │ │ ├── Contents.json │ │ ├── ic_input_white.png │ │ ├── ic_input_white_2x.png │ │ └── ic_input_white_3x.png │ ├── ic_person_outline_white.imageset │ │ ├── Contents.json │ │ ├── ic_person_outline_white.png │ │ ├── ic_person_outline_white_2x.png │ │ └── ic_person_outline_white_3x.png │ ├── ic_photo_camera_white.imageset │ │ ├── Contents.json │ │ ├── ic_photo_camera_white.png │ │ ├── ic_photo_camera_white_2x.png │ │ └── ic_photo_camera_white_3x.png │ ├── ic_public_white.imageset │ │ ├── Contents.json │ │ ├── ic_public_white.png │ │ ├── ic_public_white_2x.png │ │ └── ic_public_white_3x.png │ ├── ic_radio_button_checked_white.imageset │ │ ├── Contents.json │ │ ├── ic_radio_button_checked_white.png │ │ ├── ic_radio_button_checked_white_2x.png │ │ └── ic_radio_button_checked_white_3x.png │ ├── ic_store_white.imageset │ │ ├── Contents.json │ │ ├── ic_store_white.png │ │ ├── ic_store_white_2x.png │ │ └── ic_store_white_3x.png │ ├── ic_warning_white_48pt.imageset │ │ ├── Contents.json │ │ ├── ic_warning_white_48pt.png │ │ ├── ic_warning_white_48pt_2x.png │ │ └── ic_warning_white_48pt_3x.png │ └── ic_wifi_white.imageset │ │ ├── Contents.json │ │ ├── ic_wifi_white.png │ │ ├── ic_wifi_white_2x.png │ │ └── ic_wifi_white_3x.png ├── Info.plist ├── InputBaseControlViewController.h ├── InputBaseControlViewController.m ├── InputControlsPageViewController.h ├── InputControlsPageViewController.m ├── InputTextFieldViewController.h ├── InputTextFieldViewController.m ├── LabelsViewController.h ├── LabelsViewController.m ├── LogInViewController.h ├── LogInViewController.m ├── MainTabBarViewController.h ├── MainTabBarViewController.m ├── MediaPlayerViewController.h ├── MediaPlayerViewController.m ├── ModalViewController.h ├── ModalViewController.m ├── NativeViewCollectionViewCell.h ├── NativeViewCollectionViewCell.m ├── NativeViewController.h ├── NativeViewController.m ├── NativeViewMenuNavigationViewController.h ├── NativeViewMenuNavigationViewController.m ├── NestedNavigationViewController.h ├── NestedNavigationViewController.m ├── NestedViewBase.h ├── NestedViewBase.m ├── NotificationsViewController.h ├── NotificationsViewController.m ├── Pictures │ ├── amber.jpg │ ├── central_park.jpg │ ├── chicken.jpg │ ├── duck.jpg │ ├── fish.jpg │ ├── key_west.jpg │ ├── nelly.jpg │ └── nola.jpg ├── PopOverViewController.h ├── PopOverViewController.m ├── RefreshControlViewController.h ├── RefreshControlViewController.m ├── ScrollOutOfViewViewController.h ├── ScrollOutOfViewViewController.m ├── ScrollingViewController.h ├── ScrollingViewController.m ├── SecondViewController.h ├── SecondViewController.m ├── SubmitButtonViewController.h ├── SubmitButtonViewController.m ├── SwitchViewController.h ├── SwitchViewController.m ├── TextViewController.h ├── TextViewController.m ├── ThirdViewController.h ├── ThirdViewController.m ├── UIColor+ColorExtension.h ├── UIColor+ColorExtension.m ├── UIFont+FontExtension.h ├── UIFont+FontExtension.m ├── WebViewController.h ├── WebViewController.m ├── main.m ├── movie.mp4 └── solid.png ├── ADFiOSReferenceAppTests ├── ADFiOSReferenceAppTests.m └── Info.plist ├── AWSDeviceFarmiOSReferenceApp.xcodeproj ├── project.pbxproj ├── project.pbxproj.bak └── project.xcworkspace │ └── contents.xcworkspacedata ├── LICENSE.txt ├── README.md ├── README_Images ├── build-ios.gif ├── record-xcui.png └── xcode-ipa.gif ├── calabash.framework ├── Headers │ ├── CalabashServer.h │ ├── LPHTTPAsyncFileResponse.h │ ├── LPHTTPDataResponse.h │ ├── LPHTTPDynamicFileResponse.h │ ├── LPHTTPFileResponse.h │ ├── LPHTTPResponse.h │ ├── LPRoute.h │ ├── LPRouter.h │ ├── LPVersionRoute.h │ └── LPWebQuery.h ├── Resources │ └── version ├── Versions │ ├── 0.13.0 │ │ ├── Headers │ │ │ ├── CalabashServer.h │ │ │ ├── LPHTTPAsyncFileResponse.h │ │ │ ├── LPHTTPDataResponse.h │ │ │ ├── LPHTTPDynamicFileResponse.h │ │ │ ├── LPHTTPFileResponse.h │ │ │ ├── LPHTTPResponse.h │ │ │ ├── LPRoute.h │ │ │ ├── LPRouter.h │ │ │ ├── LPVersionRoute.h │ │ │ └── LPWebQuery.h │ │ ├── Resources │ │ │ └── version │ │ └── calabash │ ├── A │ │ ├── Headers │ │ │ ├── CalabashServer.h │ │ │ ├── LPHTTPAsyncFileResponse.h │ │ │ ├── LPHTTPDataResponse.h │ │ │ ├── LPHTTPDynamicFileResponse.h │ │ │ ├── LPHTTPFileResponse.h │ │ │ ├── LPHTTPResponse.h │ │ │ ├── LPRoute.h │ │ │ ├── LPRouter.h │ │ │ ├── LPVersionRoute.h │ │ │ └── LPWebQuery.h │ │ ├── Resources │ │ │ └── version │ │ └── calabash │ └── Current │ │ ├── Headers │ │ ├── CalabashServer.h │ │ ├── LPHTTPAsyncFileResponse.h │ │ ├── LPHTTPDataResponse.h │ │ ├── LPHTTPDynamicFileResponse.h │ │ ├── LPHTTPFileResponse.h │ │ ├── LPHTTPResponse.h │ │ ├── LPRoute.h │ │ ├── LPRouter.h │ │ ├── LPVersionRoute.h │ │ └── LPWebQuery.h │ │ ├── Resources │ │ └── version │ │ └── calabash └── calabash ├── features ├── Alerts.feature ├── home_page.feature ├── input_controls.feature ├── ios │ ├── Base │ │ ├── ADFBasePage.rb │ │ └── navigator.rb │ └── pages │ │ ├── alert_page.rb │ │ ├── home_page.rb │ │ ├── input_controls.rb │ │ ├── login_page.rb │ │ ├── native_component.rb │ │ └── nested_view_page.rb ├── login_page.feature ├── native_components.feature ├── nested_page.feature ├── network_test.feature ├── step_definitions │ ├── alert_page.rb │ ├── calabash_steps.rb │ ├── creds.rb │ ├── homepage.rb │ ├── input_controls.rb │ ├── login_page.rb │ ├── native_components.rb │ ├── navigation_steps.rb │ ├── nested_views_page.rb │ └── network_test.rb └── support │ ├── 01_launch.rb │ ├── 02_pre_stop_hooks.rb │ └── env.rb └── prebuilt ├── prebuiltSampleApp.ipa └── prebuiltXCUITests.ipa /.gitignore: -------------------------------------------------------------------------------- 1 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio 2 | 3 | *.iml 4 | 5 | ## Directory-based project format: 6 | .idea/ 7 | # if you remove the above rule, at least ignore the following: 8 | 9 | # User-specific stuff: 10 | # .idea/workspace.xml 11 | # .idea/tasks.xml 12 | # .idea/dictionaries 13 | 14 | # Sensitive or high-churn files: 15 | # .idea/dataSources.ids 16 | # .idea/dataSources.xml 17 | # .idea/sqlDataSources.xml 18 | # .idea/dynamic.xml 19 | # .idea/uiDesigner.xml 20 | 21 | # Gradle: 22 | # .idea/gradle.xml 23 | # .idea/libraries 24 | 25 | # Mongo Explorer plugin: 26 | # .idea/mongoSettings.xml 27 | 28 | ## File-based project format: 29 | *.ipr 30 | *.iws 31 | 32 | ## Plugin-specific files: 33 | 34 | # IntelliJ 35 | /out/ 36 | 37 | # mpeltonen/sbt-idea plugin 38 | .idea_modules/ 39 | 40 | # JIRA plugin 41 | atlassian-ide-plugin.xml 42 | 43 | # Crashlytics plugin (for Android Studio and IntelliJ) 44 | com_crashlytics_export_strings.xml 45 | crashlytics.properties 46 | crashlytics-build.properties 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | # Xcode 56 | # 57 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 58 | 59 | 60 | 61 | 62 | 63 | 64 | .DS_STORE 65 | 66 | ## Build generated 67 | build/ 68 | DerivedData 69 | 70 | ## Various settings 71 | *.pbxuser 72 | !default.pbxuser 73 | *.mode1v3 74 | !default.mode1v3 75 | *.mode2v3 76 | !default.mode2v3 77 | *.perspectivev3 78 | !default.perspectivev3 79 | xcuserdata 80 | 81 | ## Other 82 | *.xccheckout 83 | *.moved-aside 84 | *.xcuserstate 85 | *.xcscmblueprint 86 | 87 | ## Obj-C/Swift specific 88 | *.hmap 89 | *.ipa 90 | 91 | # CocoaPods 92 | # 93 | # We recommend against adding the Pods directory to your .gitignore. However 94 | # you should judge for yourself, the pros and cons are mentioned at: 95 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 96 | # 97 | #Pods/ 98 | 99 | # Carthage 100 | # 101 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 102 | # Carthage/Checkouts 103 | 104 | Carthage/Build 105 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ADFBaseViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | #import 16 | #import "UIColor+ColorExtension.h" 17 | #import "UIFont+FontExtension.h" 18 | 19 | /** 20 | * A base controller for the view controllers within the app. 21 | * 22 | * Contains app specific defaults and convienience methods 23 | */ 24 | @interface ADFBaseViewController : UIViewController 25 | -(id)initWithTitle:(NSString*)title andImage:(UIImage*)image; 26 | -(void)subtractTabBarHeightFromFrame:(UIView*)view; 27 | -(void)putView:(UIView*)bottom belowView:(UIView*)topView withPadding:(CGFloat)padding; 28 | -(CGRect)frameFromCGPoint:(CGPoint)point AndCGSize:(CGSize)frameSize; 29 | -(void)centerViewByWidth:(UIView*)givenView; 30 | -(void)centerViewByHeight:(UIView*)givenView; 31 | -(void)centerView:(UIView*)givenView; 32 | -(void)fillScreenWithView:(UIView*)givenView; 33 | -(void)putViewBelowStatusBar:(UIView*)givenView; 34 | -(CGFloat)getStatusBarHeight; 35 | -(CGFloat)getTabBarHeight; 36 | -(CGFloat)getNavigationBarHeight; 37 | -(CGFloat)getSmallWidthPadding; 38 | -(CGFloat)getLargeWidthPadding; 39 | -(CGFloat)getMicroHeightPadding; 40 | -(CGFloat)getSmallHeightPadding; 41 | -(CGFloat)getLargeHeightPadding; 42 | -(CGFloat)getWidthMinusSmallPadding; 43 | -(CGFloat)getWidthMinusLargePadding; 44 | -(CGSize) getSmallSquareSize; 45 | -(CGSize) getLargeSquareSize; 46 | -(CGSize)makeSquareSize:(CGFloat)size; 47 | -(CGFloat)getDefaultTextfieldHeight; 48 | -(CGFloat)getTopPosition; 49 | -(CGFloat)getTopPositionRounded; 50 | -(CGSize)calculateMovieAspectRatioSize; 51 | -(void)putViewAtBottom:(UIView*)givenView withPadding:(CGFloat)padding; 52 | @end 53 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | #import 16 | 17 | /** 18 | * Initializes the app. Called first when the app is loaded. 19 | */ 20 | @interface AppDelegate : UIResponder 21 | 22 | @property (strong, nonatomic) UIWindow *window; 23 | 24 | @end 25 | 26 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/CameraViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A camera view controller 21 | */ 22 | @interface CameraViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/CameraViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "CameraViewController.h" 17 | #import 18 | 19 | @interface CameraViewController () 20 | @property AVCaptureSession *session; 21 | @end 22 | 23 | /** 24 | * A camera view controller 25 | */ 26 | @implementation CameraViewController 27 | 28 | /** 29 | * Creates the camera preview 30 | */ 31 | - (void)viewDidLoad { 32 | [super viewDidLoad]; 33 | _session = [[AVCaptureSession alloc] init]; 34 | _session.sessionPreset = AVCaptureSessionPresetPhoto; 35 | 36 | AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; 37 | NSError *error; 38 | 39 | AVCaptureDeviceInput *deviceInput = [[AVCaptureDeviceInput alloc] initWithDevice:device error:&error]; 40 | 41 | if ([_session canAddInput:deviceInput]) { 42 | [_session addInput:deviceInput]; 43 | } 44 | 45 | AVCaptureVideoPreviewLayer *previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:_session]; 46 | 47 | previewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill; 48 | CALayer *rootLayer = self.view.layer; 49 | rootLayer.masksToBounds = YES; 50 | previewLayer.frame = [self frameFromCGPoint:CGPointMake(0, [self getLargeHeightPadding] + [self getTopPositionRounded]) AndCGSize:[self calculateMovieAspectRatioSize]]; 51 | 52 | [rootLayer insertSublayer:previewLayer atIndex:0]; 53 | [_session startRunning]; 54 | } 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ContactAddButtonViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A add contact controller 20 | */ 21 | @interface ContactAddButtonViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ContactAddButtonViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "ContactAddButtonViewController.h" 17 | 18 | @interface ContactAddButtonViewController () 19 | @property UIButton *contactAddButton; 20 | @end 21 | 22 | /** 23 | * A add contact controller 24 | */ 25 | @implementation ContactAddButtonViewController 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | [self setUpView]; 30 | } 31 | 32 | -(void)setUpView{ 33 | _contactAddButton = [UIButton buttonWithType:UIButtonTypeContactAdd]; 34 | _contactAddButton.frame = CGRectZero; 35 | [_contactAddButton sizeToFit]; 36 | [_contactAddButton addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside]; 37 | [self centerView:_contactAddButton]; 38 | [self.view addSubview:_contactAddButton]; 39 | } 40 | 41 | -(void)buttonPressed:(UIButton*)sender{ 42 | CGRect oldFrame = _contactAddButton.frame; 43 | [_contactAddButton removeFromSuperview]; 44 | if (sender.buttonType == UIButtonTypeContactAdd) { 45 | _contactAddButton = [UIButton buttonWithType:UIButtonTypeInfoDark]; 46 | } else { 47 | _contactAddButton = [UIButton buttonWithType:UIButtonTypeContactAdd]; 48 | } 49 | _contactAddButton.frame = oldFrame; 50 | [_contactAddButton addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside]; 51 | [self.view addSubview:_contactAddButton]; 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/CrashViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "ADFBaseViewController.h" 17 | 18 | /** 19 | * A controller for the crash page 20 | * 21 | * Used to test fuzz testing and to handle expected errors. 22 | * 23 | */ 24 | @interface CrashViewController : ADFBaseViewController 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/CustomWebSiteNavigationViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | 17 | #import 18 | 19 | /** 20 | A controller to navigate to a specific web url 21 | */ 22 | @interface CustomWebSiteNavigationViewController : UINavigationController 23 | -(id)initWithTitle:(NSString*)title andImage:(UIImage*)image; 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/CustomWebSiteNavigationViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | 17 | #import "CustomWebSiteNavigationViewController.h" 18 | #import "CustomWebSitePickerViewController.h" 19 | 20 | @interface CustomWebSiteNavigationViewController () 21 | @property CustomWebSitePickerViewController *webSitePickerViewController; 22 | @end 23 | 24 | /** 25 | A controller to navigate to a specific web url 26 | */ 27 | @implementation CustomWebSiteNavigationViewController 28 | 29 | -(id)initWithTitle:(NSString*)title andImage:(UIImage*)image { 30 | _webSitePickerViewController = [[CustomWebSitePickerViewController alloc] init]; 31 | self = [super initWithRootViewController:_webSitePickerViewController]; 32 | if (self) { 33 | self.view.autoresizesSubviews = NO; 34 | self.navigationController.navigationBar.autoresizesSubviews = NO; 35 | self.tabBarItem.title = title; 36 | self.tabBarItem.image = image; 37 | } 38 | return self; 39 | } 40 | 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/CustomWebSitePickerViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A web site picker to navigate a specific web url 21 | */ 22 | @interface CustomWebSitePickerViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/DataPickerViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * The data picker controller 20 | */ 21 | @interface DataPickerViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/DatePickerViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A date picker controller 20 | */ 21 | @interface DatePickerViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/DatePickerViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "DatePickerViewController.h" 17 | 18 | @interface DatePickerViewController () 19 | @property UILabel *dateDisplayLabel; 20 | @property UIDatePicker *datePicker; 21 | @end 22 | static NSString* const DEFAULT_DATE_LABEL_TEXT = @"Please select a date from the date picker"; 23 | static NSString* const DATE_LABEL_FORMAT = @"%@"; 24 | 25 | /** 26 | * A date picker controller 27 | */ 28 | @implementation DatePickerViewController 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | [self setUpView]; 33 | } 34 | 35 | -(void)setUpView{ 36 | _dateDisplayLabel = [[UILabel alloc] initWithFrame: 37 | CGRectMake(0, [self getTopPositionRounded] + [self getSmallHeightPadding], [self getWidthMinusSmallPadding], 0)]; 38 | [_dateDisplayLabel setText:DEFAULT_DATE_LABEL_TEXT]; 39 | _dateDisplayLabel.numberOfLines = 0; 40 | [_dateDisplayLabel sizeToFit]; 41 | [self centerViewByWidth:_dateDisplayLabel]; 42 | [self.view addSubview:_dateDisplayLabel]; 43 | 44 | _datePicker = [[UIDatePicker alloc] initWithFrame:CGRectZero]; 45 | [_datePicker sizeToFit]; 46 | [self centerViewByWidth:_datePicker]; 47 | [self putView:_datePicker belowView:_dateDisplayLabel withPadding:[self getSmallHeightPadding]]; 48 | [self centerViewByWidth:_datePicker]; 49 | 50 | //Sets the datepicker mode, date, and adds a action 51 | _datePicker.datePickerMode = UIDatePickerModeDate; 52 | _datePicker.date = [NSDate date]; 53 | [_datePicker addTarget:self action:@selector(dateChange:) forControlEvents:UIControlEventValueChanged]; 54 | [self.view addSubview:_datePicker]; 55 | } 56 | 57 | /** 58 | * A action when the date picker is changed 59 | * 60 | * @param sender the datepicker 61 | */ 62 | -(void)dateChange:(id)sender{ 63 | NSDateFormatter *df = [[NSDateFormatter alloc] init]; 64 | df.dateStyle = NSDateFormatterMediumStyle; 65 | _dateDisplayLabel.text = [NSString stringWithFormat:DATE_LABEL_FORMAT, [df stringFromDate:_datePicker.date]]; 66 | [_dateDisplayLabel sizeToFit]; 67 | [self centerViewByWidth:_dateDisplayLabel]; 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ElementsTableViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | 18 | /** 19 | * A table list view controller 20 | */ 21 | @interface ElementsTableViewController : UITableViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ElementsTableViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "ElementsTableViewController.h" 17 | #import "UIColor+ColorExtension.h" 18 | 19 | @interface ElementsTableViewController () 20 | 21 | @end 22 | static NSString* const CELL_IDENTIFIER = @"elementTableCell"; 23 | static NSUInteger const NUMBER_OF_CELLS = 40; 24 | static NSUInteger const NUMBER_OF_SECTIONS = 1; 25 | 26 | /** 27 | * A table list view controller 28 | */ 29 | @implementation ElementsTableViewController 30 | 31 | - (void)viewDidLoad { 32 | [super viewDidLoad]; 33 | self.view.backgroundColor = [UIColor flatDarkOffWhite]; 34 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CELL_IDENTIFIER]; 35 | } 36 | 37 | #pragma mark - Table view data source 38 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 39 | // Return the number of sections. 40 | return NUMBER_OF_SECTIONS; 41 | } 42 | 43 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 44 | // Return the number of rows in the section. 45 | return NUMBER_OF_CELLS; 46 | } 47 | 48 | /** 49 | * Creates the cells and sets the text 50 | * 51 | * The text is just the index 52 | * 53 | * @param tableView <#tableView description#> 54 | * @param indexPath <#indexPath description#> 55 | * 56 | * @return <#return value description#> 57 | */ 58 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 59 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CELL_IDENTIFIER forIndexPath:indexPath]; 60 | 61 | cell.textLabel.text = [NSString stringWithFormat:@"%li",(long)indexPath.row]; 62 | return cell; 63 | } 64 | 65 | @end 66 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/FirstViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "NestedViewBase.h" 18 | 19 | @interface FirstViewController : NestedViewBase 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/FirstViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "FirstViewController.h" 17 | #import "SecondViewController.h" 18 | 19 | 20 | static NSString* const NEXT_VIEW_TITLE = @"View 2"; 21 | static NSString* const NEXT_VIEW_MESSAGE = @"This is the second view"; 22 | @implementation FirstViewController 23 | 24 | /** 25 | * Goes to the second view controller 26 | */ 27 | -(void)goNext{ 28 | SecondViewController *secondVC = [[SecondViewController alloc] initWithTitle:NEXT_VIEW_TITLE andImage:nil andText:NEXT_VIEW_MESSAGE andIsLast:NO]; 29 | [self.navigationController pushViewController:secondVC animated:YES]; 30 | } 31 | 32 | 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/FourthViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "NestedViewBase.h" 18 | 19 | @interface FourthViewController : NestedViewBase 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/FourthViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "FourthViewController.h" 17 | 18 | @implementation FourthViewController 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/GesturesViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A gesture controller using a image 20 | */ 21 | @interface GesturesViewController : InputBaseControlViewController 22 | -(IBAction)handlePanGesture:(UIPanGestureRecognizer*)recognizer; 23 | -(IBAction)handlePinchGesture:(UIPinchGestureRecognizer*)recognizer; 24 | -(IBAction)handleRotateGesture:(UIRotationGestureRecognizer*)recognizer; 25 | @end 26 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/HomePageViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A static homepage for the app 21 | * 22 | * Contains the app name and version number 23 | */ 24 | @interface HomePageViewController : ADFBaseViewController 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/HomePageViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "HomePageViewController.h" 17 | 18 | /** 19 | * A static homepage for the app 20 | * 21 | * Contains the app name and version number 22 | */ 23 | @interface HomePageViewController () 24 | @property UILabel *homepageTitle; 25 | @property UILabel *versionNumber; 26 | @end 27 | 28 | static NSString* const HOME_PAGE_TITLE = @"AWS Device Farm Sample app"; 29 | static NSString* const HOME_PAGE_VERSION_NUMBER = @"Version 1"; 30 | 31 | @implementation HomePageViewController 32 | 33 | - (void)viewDidLoad { 34 | [super viewDidLoad]; 35 | [self setUpView]; 36 | } 37 | 38 | /** 39 | * Configures and creates view 40 | */ 41 | -(void)setUpView{ 42 | _homepageTitle = [[UILabel alloc] initWithFrame:[self frameFromCGPoint:CGPointMake(0, [self getTopPositionRounded] + [self getSmallHeightPadding]) AndCGSize:CGSizeMake([self getWidthMinusLargePadding], 0)]]; 43 | 44 | _versionNumber = [[UILabel alloc] initWithFrame:[self frameFromCGPoint:CGPointZero AndCGSize:CGSizeMake([self getWidthMinusLargePadding], 0)]]; 45 | 46 | [self configureLabel:_homepageTitle withText:HOME_PAGE_TITLE]; 47 | [self configureLabel:_versionNumber withText:HOME_PAGE_VERSION_NUMBER]; 48 | 49 | [self centerViewByWidth:_versionNumber]; 50 | [self centerViewByWidth:_homepageTitle]; 51 | 52 | [self putView:_versionNumber belowView:_homepageTitle withPadding:[self getSmallHeightPadding]]; 53 | 54 | [self.view addSubview:_homepageTitle]; 55 | [self.view addSubview:_versionNumber]; 56 | } 57 | 58 | /** 59 | * Configures label 60 | * 61 | * @param label the label to configure 62 | * @param content the content of the label 63 | */ 64 | -(void)configureLabel:(UILabel*)label withText:(NSString*)content{ 65 | label.font = [UIFont largeBoldFont]; 66 | label.textAlignment = NSTextAlignmentCenter; 67 | label.text = content; 68 | [label sizeToFit]; 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ImageGalleryCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | 18 | /** 19 | Image gallery view controller cell that contains a image view 20 | */ 21 | @interface ImageGalleryCollectionViewCell : UICollectionViewCell 22 | @property UIImageView *imageView; 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ImageGalleryCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | 17 | #import "ImageGalleryCollectionViewCell.h" 18 | 19 | /** 20 | Image gallery view controller cell that contains a image view 21 | */ 22 | @implementation ImageGalleryCollectionViewCell 23 | -(id)initWithFrame:(CGRect)frame{ 24 | self = [super initWithFrame:frame]; 25 | 26 | if (self) { 27 | self.contentView.backgroundColor = [UIColor whiteColor]; 28 | self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height)]; 29 | 30 | [self.contentView addSubview:self.imageView]; 31 | } 32 | return self; 33 | } 34 | @end 35 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ImageGalleryViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * Loads pictures from the specified directory 21 | */ 22 | @interface ImageGalleryViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "appicon-Small.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-Small@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-Small@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "appicon.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "appicon@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-Small.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-Small@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "appicon-Small-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "appicon-Small-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "appicon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "appicon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "Icon-76@2x.png", 115 | "scale" : "2x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-72.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-72@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-Small-50.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-Small-50@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon-Small.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/AppIcon.appiconset/appicon@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/1.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/2.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/3.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/5.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/7.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "filename" : "Untitled.png", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "extent" : "full-screen", 13 | "idiom" : "iphone", 14 | "subtype" : "retina4", 15 | "filename" : "Default-568h@2x-1.png", 16 | "minimum-system-version" : "7.0", 17 | "orientation" : "portrait", 18 | "scale" : "2x" 19 | }, 20 | { 21 | "orientation" : "portrait", 22 | "idiom" : "ipad", 23 | "extent" : "full-screen", 24 | "minimum-system-version" : "7.0", 25 | "filename" : "7.png", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "orientation" : "landscape", 30 | "idiom" : "ipad", 31 | "extent" : "full-screen", 32 | "minimum-system-version" : "7.0", 33 | "filename" : "Default-Landscape.png", 34 | "scale" : "1x" 35 | }, 36 | { 37 | "orientation" : "portrait", 38 | "idiom" : "ipad", 39 | "extent" : "full-screen", 40 | "minimum-system-version" : "7.0", 41 | "filename" : "1.png", 42 | "scale" : "2x" 43 | }, 44 | { 45 | "orientation" : "landscape", 46 | "idiom" : "ipad", 47 | "extent" : "full-screen", 48 | "minimum-system-version" : "7.0", 49 | "filename" : "Default-Landscape@2x.png", 50 | "scale" : "2x" 51 | }, 52 | { 53 | "orientation" : "portrait", 54 | "idiom" : "iphone", 55 | "extent" : "full-screen", 56 | "filename" : "Default.png", 57 | "scale" : "1x" 58 | }, 59 | { 60 | "orientation" : "portrait", 61 | "idiom" : "iphone", 62 | "extent" : "full-screen", 63 | "filename" : "Default@2x.png", 64 | "scale" : "2x" 65 | }, 66 | { 67 | "orientation" : "portrait", 68 | "idiom" : "iphone", 69 | "extent" : "full-screen", 70 | "filename" : "Default-568h@2x.png", 71 | "subtype" : "retina4", 72 | "scale" : "2x" 73 | }, 74 | { 75 | "orientation" : "portrait", 76 | "idiom" : "ipad", 77 | "extent" : "to-status-bar", 78 | "filename" : "Untitled-1.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "orientation" : "landscape", 83 | "idiom" : "ipad", 84 | "extent" : "to-status-bar", 85 | "filename" : "3.png", 86 | "scale" : "1x" 87 | }, 88 | { 89 | "orientation" : "portrait", 90 | "idiom" : "ipad", 91 | "extent" : "to-status-bar", 92 | "filename" : "2.png", 93 | "scale" : "2x" 94 | }, 95 | { 96 | "orientation" : "landscape", 97 | "idiom" : "ipad", 98 | "extent" : "to-status-bar", 99 | "filename" : "5.png", 100 | "scale" : "2x" 101 | } 102 | ], 103 | "info" : { 104 | "version" : 1, 105 | "author" : "xcode" 106 | } 107 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x-1.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Untitled-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Untitled-1.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Untitled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/LaunchImage.launchimage/Untitled.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_account_box_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_account_box_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_account_box_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_account_box_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_account_box_white.imageset/ic_account_box_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_account_box_white.imageset/ic_account_box_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_account_box_white.imageset/ic_account_box_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_account_box_white.imageset/ic_account_box_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_account_box_white.imageset/ic_account_box_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_account_box_white.imageset/ic_account_box_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_announcement_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_announcement_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_announcement_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_announcement_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_announcement_white.imageset/ic_announcement_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_announcement_white.imageset/ic_announcement_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_announcement_white.imageset/ic_announcement_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_announcement_white.imageset/ic_announcement_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_announcement_white.imageset/ic_announcement_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_announcement_white.imageset/ic_announcement_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_bug_report_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_bug_report_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_bug_report_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_bug_report_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_bug_report_white.imageset/ic_bug_report_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_bug_report_white.imageset/ic_bug_report_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_bug_report_white.imageset/ic_bug_report_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_bug_report_white.imageset/ic_bug_report_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_bug_report_white.imageset/ic_bug_report_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_bug_report_white.imageset/ic_bug_report_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_collections_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_collections_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_collections_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_collections_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_collections_white.imageset/ic_collections_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_collections_white.imageset/ic_collections_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_collections_white.imageset/ic_collections_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_collections_white.imageset/ic_collections_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_collections_white.imageset/ic_collections_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_collections_white.imageset/ic_collections_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_error_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_error_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_error_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_error_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_error_white.imageset/ic_error_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_error_white.imageset/ic_error_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_error_white.imageset/ic_error_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_error_white.imageset/ic_error_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_error_white.imageset/ic_error_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_error_white.imageset/ic_error_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_filter_1_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_filter_1_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_filter_1_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_filter_1_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_filter_1_white.imageset/ic_filter_1_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_filter_1_white.imageset/ic_filter_1_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_filter_1_white.imageset/ic_filter_1_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_filter_1_white.imageset/ic_filter_1_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_filter_1_white.imageset/ic_filter_1_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_filter_1_white.imageset/ic_filter_1_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_format_list_numbered_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_format_list_numbered_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_format_list_numbered_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_format_list_numbered_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_format_list_numbered_white.imageset/ic_format_list_numbered_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_format_list_numbered_white.imageset/ic_format_list_numbered_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_format_list_numbered_white.imageset/ic_format_list_numbered_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_format_list_numbered_white.imageset/ic_format_list_numbered_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_format_list_numbered_white.imageset/ic_format_list_numbered_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_format_list_numbered_white.imageset/ic_format_list_numbered_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_input_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_input_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_input_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_input_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_input_white.imageset/ic_input_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_input_white.imageset/ic_input_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_input_white.imageset/ic_input_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_input_white.imageset/ic_input_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_input_white.imageset/ic_input_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_input_white.imageset/ic_input_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_person_outline_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_person_outline_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_person_outline_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_person_outline_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_person_outline_white.imageset/ic_person_outline_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_person_outline_white.imageset/ic_person_outline_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_person_outline_white.imageset/ic_person_outline_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_person_outline_white.imageset/ic_person_outline_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_person_outline_white.imageset/ic_person_outline_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_person_outline_white.imageset/ic_person_outline_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_photo_camera_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_photo_camera_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_photo_camera_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_photo_camera_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_photo_camera_white.imageset/ic_photo_camera_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_photo_camera_white.imageset/ic_photo_camera_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_photo_camera_white.imageset/ic_photo_camera_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_photo_camera_white.imageset/ic_photo_camera_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_photo_camera_white.imageset/ic_photo_camera_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_photo_camera_white.imageset/ic_photo_camera_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_public_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_public_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_public_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_public_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_public_white.imageset/ic_public_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_public_white.imageset/ic_public_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_public_white.imageset/ic_public_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_public_white.imageset/ic_public_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_public_white.imageset/ic_public_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_public_white.imageset/ic_public_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_radio_button_checked_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_radio_button_checked_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_radio_button_checked_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_radio_button_checked_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_radio_button_checked_white.imageset/ic_radio_button_checked_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_radio_button_checked_white.imageset/ic_radio_button_checked_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_radio_button_checked_white.imageset/ic_radio_button_checked_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_radio_button_checked_white.imageset/ic_radio_button_checked_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_radio_button_checked_white.imageset/ic_radio_button_checked_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_radio_button_checked_white.imageset/ic_radio_button_checked_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_store_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_store_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_store_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_store_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_store_white.imageset/ic_store_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_store_white.imageset/ic_store_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_store_white.imageset/ic_store_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_store_white.imageset/ic_store_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_store_white.imageset/ic_store_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_store_white.imageset/ic_store_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_warning_white_48pt.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_warning_white_48pt.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_warning_white_48pt_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_warning_white_48pt_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_warning_white_48pt.imageset/ic_warning_white_48pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_warning_white_48pt.imageset/ic_warning_white_48pt.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_warning_white_48pt.imageset/ic_warning_white_48pt_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_warning_white_48pt.imageset/ic_warning_white_48pt_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_warning_white_48pt.imageset/ic_warning_white_48pt_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_warning_white_48pt.imageset/ic_warning_white_48pt_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_wifi_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "ic_wifi_white.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x", 11 | "filename" : "ic_wifi_white_2x.png" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "ic_wifi_white_3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_wifi_white.imageset/ic_wifi_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_wifi_white.imageset/ic_wifi_white.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_wifi_white.imageset/ic_wifi_white_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_wifi_white.imageset/ic_wifi_white_2x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Images.xcassets/ic_wifi_white.imageset/ic_wifi_white_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Images.xcassets/ic_wifi_white.imageset/ic_wifi_white_3x.png -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | Amazon.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/InputBaseControlViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A base for the input page controller containing the index of the page 21 | */ 22 | @interface InputBaseControlViewController : ADFBaseViewController 23 | @property NSUInteger pageIndex; 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/InputBaseControlViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | @implementation InputBaseControlViewController 19 | @end 20 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/InputControlsPageViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | 17 | #import 18 | #import "ADFBaseViewController.h" 19 | 20 | /** 21 | * The page control for the input controls 22 | */ 23 | @interface InputControlsPageViewController : ADFBaseViewController 24 | @property (strong, nonatomic) UIPageViewController *pageController; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/InputTextFieldViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A controller for a input field 20 | */ 21 | @interface InputTextFieldViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/InputTextFieldViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputTextFieldViewController.h" 17 | 18 | @interface InputTextFieldViewController () 19 | @property UITextField *textField; 20 | @end 21 | 22 | static NSString* const TEXT_FIELD_PLACEHOLDER_TEXT = @"text field"; 23 | 24 | /** 25 | * A controller for a input field 26 | */ 27 | @implementation InputTextFieldViewController 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | [self setUpView]; 32 | } 33 | 34 | -(void)setUpView{ 35 | _textField = [[UITextField alloc] initWithFrame: 36 | CGRectMake(0, [self getTopPositionRounded] + [self getSmallHeightPadding], [self getWidthMinusSmallPadding], [self getDefaultTextfieldHeight])]; 37 | [self centerViewByWidth:_textField]; 38 | _textField.borderStyle = UITextBorderStyleRoundedRect; 39 | _textField.placeholder = TEXT_FIELD_PLACEHOLDER_TEXT; 40 | [self.view addSubview:_textField]; 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/LabelsViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A controller for labels 20 | */ 21 | @interface LabelsViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/LabelsViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "LabelsViewController.h" 17 | 18 | @interface LabelsViewController () 19 | @property UILabel *label1; 20 | @property UILabel *label2; 21 | @end 22 | 23 | static NSString* const LABEL1_TEXT = @"I am label 1"; 24 | static NSString* const LABEL2_TEXT = @"I am label 2"; 25 | 26 | /** 27 | * A controller for labels 28 | */ 29 | @implementation LabelsViewController 30 | 31 | - (void)viewDidLoad { 32 | [super viewDidLoad]; 33 | [self setUpView]; 34 | } 35 | 36 | -(void)setUpView{ 37 | _label1 = [[UILabel alloc] initWithFrame: 38 | CGRectMake(0, [self getTopPositionRounded] + [self getLargeHeightPadding], [self getWidthMinusSmallPadding], 0)]; 39 | _label2 = [[UILabel alloc] initWithFrame: 40 | CGRectMake(0, 0, [self getWidthMinusSmallPadding], 0)]; 41 | 42 | [self configureLabels:_label1 WithText:LABEL1_TEXT]; 43 | [self configureLabels:_label2 WithText:LABEL2_TEXT]; 44 | 45 | [self putView:_label2 belowView:_label1 withPadding:[self getSmallHeightPadding]]; 46 | [self.view addSubview:_label1]; 47 | [self.view addSubview:_label2]; 48 | } 49 | 50 | /** 51 | * Configures the labels 52 | * 53 | * @param label label 54 | * @param text text 55 | */ 56 | -(void)configureLabels:(UILabel*)label WithText:(NSString*)text{ 57 | label.text = text; 58 | label.textAlignment = NSTextAlignmentCenter; 59 | label.font = [UIFont largeFont]; 60 | [label sizeToFit]; 61 | [self centerViewByWidth:label]; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/LogInViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * The controller for the login view 21 | */ 22 | @interface LogInViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/MainTabBarViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | 18 | /** 19 | * The main tab bar navigation across the app. 20 | */ 21 | @interface MainTabBarViewController : UITabBarController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/MediaPlayerViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A video playing view controller 21 | */ 22 | @interface MediaPlayerViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/MediaPlayerViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "MediaPlayerViewController.h" 18 | 19 | @interface MediaPlayerViewController () 20 | @property MPMoviePlayerViewController *movieController; 21 | @end 22 | static NSString* const MOVIE_FILE_NAME = @"movie"; 23 | static NSString* const MOVIE_FILE_TYPE = @"mp4"; 24 | 25 | /** 26 | * A video playing view controller 27 | */ 28 | @implementation MediaPlayerViewController 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | [self setUpView]; 33 | } 34 | 35 | -(void)viewWillAppear:(BOOL)animated{ 36 | [super viewWillAppear:animated]; 37 | [self playVideo]; 38 | } 39 | 40 | /** 41 | * Creates media player and initializes the movie 42 | */ 43 | -(void)setUpView{ 44 | NSString *path = [[NSBundle mainBundle] pathForResource:MOVIE_FILE_NAME ofType:MOVIE_FILE_TYPE]; 45 | NSURL *url = [NSURL fileURLWithPath:path]; 46 | _movieController = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; 47 | _movieController.moviePlayer.controlStyle = MPMovieControlStyleNone; 48 | _movieController.moviePlayer.repeatMode = MPMovieRepeatModeOne; 49 | _movieController.moviePlayer.scalingMode = MPMovieScalingModeFill; 50 | _movieController.view.frame = [self frameFromCGPoint:CGPointZero AndCGSize:[self calculateMovieAspectRatioSize]]; 51 | [self centerView:_movieController.view]; 52 | [self.view addSubview:_movieController.view]; 53 | } 54 | 55 | /** 56 | * plays the video 57 | */ 58 | -(void)playVideo{ 59 | [_movieController.moviePlayer prepareToPlay]; 60 | [_movieController.moviePlayer play]; 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ModalViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A modal type notification 21 | */ 22 | @interface ModalViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ModalViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "ModalViewController.h" 17 | 18 | @interface ModalViewController () 19 | @property UILabel *modalMessage; 20 | @property UIButton *confirmButton; 21 | @end 22 | 23 | static NSString* const MODAL_MESSAGE = @"This is a modal view"; 24 | static NSString* const MODAL_CONFIRM_BUTTON_TITLE = @"OK"; 25 | static NSString* const ALERT_CANCEL_BUTTON = @"OK"; 26 | 27 | /** 28 | * A modal type notification 29 | */ 30 | @implementation ModalViewController 31 | #pragma mark - Controller Methods 32 | - (void)viewDidLoad { 33 | [super viewDidLoad]; 34 | [self setUpView]; 35 | } 36 | 37 | /** 38 | * Sets up the modal view 39 | */ 40 | -(void)setUpView{ 41 | self.view.backgroundColor = [UIColor flatLightBlue]; 42 | _modalMessage = [[UILabel alloc] initWithFrame:CGRectMake(0, [self getTopPositionRounded] + [self getLargeHeightPadding], 0, 0)]; 43 | [_modalMessage setText:MODAL_MESSAGE]; 44 | _modalMessage.font = [UIFont mediumFont]; 45 | [_modalMessage sizeToFit]; 46 | [self centerViewByWidth:_modalMessage]; 47 | 48 | CGSize buttonSize = [self getSmallSquareSize]; 49 | 50 | _confirmButton = [[UIButton alloc ] initWithFrame:[self frameFromCGPoint:CGPointZero AndCGSize:buttonSize]]; 51 | [self centerViewByWidth:_confirmButton]; 52 | [self putView:_confirmButton belowView:_modalMessage withPadding:[self getSmallHeightPadding]]; 53 | 54 | [_confirmButton setTitle:MODAL_CONFIRM_BUTTON_TITLE forState:UIControlStateNormal]; 55 | _confirmButton.backgroundColor = [UIColor flatOffWhite]; 56 | [_confirmButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 57 | [_confirmButton addTarget:self action:@selector(modalButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; 58 | _confirmButton.titleLabel.font = [UIFont mediumFont]; 59 | 60 | [self.view addSubview:_modalMessage]; 61 | [self.view addSubview:_confirmButton]; 62 | } 63 | 64 | #pragma mark - Button Events 65 | /** 66 | * Dismisses modal 67 | * 68 | * @param sender the modal button 69 | */ 70 | -(void)modalButtonPressed:(id)sender{ 71 | [self dismissViewControllerAnimated:YES completion:nil]; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NativeViewCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | 18 | /** 19 | The cell for the native navigation 20 | */ 21 | @interface NativeViewCollectionViewCell : UICollectionViewCell 22 | @property UILabel *cellTitle; 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NativeViewCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "NativeViewCollectionViewCell.h" 17 | #import "UIColor+ColorExtension.h" 18 | #import "UIFont+FontExtension.h" 19 | 20 | /** 21 | The cell for the native navigation 22 | */ 23 | @implementation NativeViewCollectionViewCell 24 | -(id)initWithFrame:(CGRect)frame{ 25 | self = [super initWithFrame:frame]; 26 | 27 | if (self) { 28 | 29 | self.cellTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)]; 30 | self.cellTitle.textColor = [UIColor whiteColor]; 31 | self.cellTitle.backgroundColor = [UIColor flatDarkBlue]; 32 | self.cellTitle.textAlignment = NSTextAlignmentCenter; 33 | self.cellTitle.font = [UIFont mediumFont]; 34 | self.cellTitle.numberOfLines = 0; 35 | 36 | [self.contentView addSubview:self.cellTitle]; 37 | } 38 | 39 | return self; 40 | } 41 | @end 42 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NativeViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | #import 16 | #import "ADFBaseViewController.h" 17 | 18 | /** 19 | * Main view controller for the native view 20 | * 21 | * Creates the navigation across all of the different native view controllers 22 | * 23 | */ 24 | @interface NativeViewController : ADFBaseViewController 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NativeViewMenuNavigationViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | 18 | /** 19 | The native view menu navigation controller 20 | */ 21 | @interface NativeViewMenuNavigationViewController : UINavigationController 22 | -(id)initWithTitle:(NSString*)title andImage:(UIImage*)image; 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NativeViewMenuNavigationViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "NativeViewMenuNavigationViewController.h" 17 | #import "NativeViewController.h" 18 | 19 | @interface NativeViewMenuNavigationViewController () 20 | 21 | @end 22 | 23 | /** 24 | The native view menu navigation controller 25 | */ 26 | @implementation NativeViewMenuNavigationViewController 27 | 28 | -(id)initWithTitle:(NSString*)title andImage:(UIImage*)image{ 29 | NativeViewController *rootVC = [[NativeViewController alloc] init]; 30 | self = [super initWithRootViewController:rootVC]; 31 | if (self) { 32 | self.view.backgroundColor = [UIColor whiteColor]; 33 | self.tabBarItem.title = title; 34 | self.tabBarItem.image = image; 35 | self.view.autoresizesSubviews = NO; 36 | self.navigationController.navigationBar.autoresizesSubviews = NO; 37 | } 38 | return self; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NestedNavigationViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * The nested view base controller 21 | */ 22 | @interface NestedNavigationViewController : UINavigationController 23 | -(id)initWithTitle:(NSString*)title andImage:(UIImage*)image; 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NestedNavigationViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "NestedNavigationViewController.h" 17 | #import "FirstViewController.h" 18 | 19 | static NSString* const NEXT_VIEW_TITLE = @"View 1"; 20 | static NSString* const NEXT_VIEW_MESSAGE = @"This is the first view"; 21 | 22 | /** 23 | Creates the first view controller 24 | */ 25 | @implementation NestedNavigationViewController 26 | 27 | -(id)initWithTitle:(NSString*)title andImage:(UIImage*)image{ 28 | FirstViewController *firstVC = [[FirstViewController alloc] initWithTitle:NEXT_VIEW_TITLE andImage:nil andText:NEXT_VIEW_MESSAGE andIsLast:NO]; 29 | self = [super initWithRootViewController:firstVC]; 30 | if (self) { 31 | self.view.backgroundColor = [UIColor whiteColor]; 32 | self.tabBarItem.title = title; 33 | self.tabBarItem.image = image; 34 | self.view.autoresizesSubviews = NO; 35 | self.navigationController.navigationBar.autoresizesSubviews = NO; 36 | } 37 | return self; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NestedViewBase.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * The nested view base controller 21 | */ 22 | @interface NestedViewBase : ADFBaseViewController 23 | -(id)initWithTitle:(NSString *)title andImage:(UIImage *)image andText:(NSString*)text andIsLast:(BOOL)last; 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NestedViewBase.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "NestedViewBase.h" 17 | @interface NestedViewBase () 18 | @property UILabel *textLabel; 19 | @property NSString *text; 20 | @property NSString *pageTitle; 21 | @end 22 | 23 | /** 24 | * The nested view base controller 25 | */ 26 | @implementation NestedViewBase 27 | static NSString* const NEXT_BUTTON_TEXT = @"Next"; 28 | 29 | #pragma mark - Controller Methods 30 | -(id)initWithTitle:(NSString *)title andImage:(UIImage *)image andText:(NSString*)text andIsLast:(BOOL)last{ 31 | self = [super initWithTitle:title andImage:image]; 32 | if (self) { 33 | _text = text; 34 | if (!last) { 35 | UIBarButtonItem *nextButton = [[UIBarButtonItem alloc] initWithTitle:NEXT_BUTTON_TEXT style:UIBarButtonItemStyleBordered target:self action:@selector(goNext)]; 36 | self.navigationItem.rightBarButtonItem = nextButton; 37 | } 38 | } 39 | return self; 40 | } 41 | 42 | -(id)initWithTitle:(NSString *)title andImage:(UIImage *)image{ 43 | self = [super init]; 44 | if (self) { 45 | _pageTitle = title; 46 | } 47 | return self; 48 | } 49 | 50 | - (void)viewDidLoad { 51 | [super viewDidLoad]; 52 | [self setUpView]; 53 | } 54 | 55 | -(void)setUpView{ 56 | self.navigationItem.title = _pageTitle; 57 | _textLabel = [[UILabel alloc] initWithFrame:CGRectZero]; 58 | _textLabel.text = _text; 59 | _textLabel.font = [UIFont defaultFontAtSize:27]; 60 | _textLabel.textAlignment = NSTextAlignmentCenter; 61 | [_textLabel sizeToFit]; 62 | [self centerViewByHeight:_textLabel]; 63 | [self centerViewByWidth:_textLabel]; 64 | [self.view addSubview:_textLabel]; 65 | } 66 | 67 | /** 68 | * Goes to the next controller 69 | */ 70 | -(void)goNext{ 71 | } 72 | @end 73 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/NotificationsViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * View notification controller 21 | */ 22 | @interface NotificationsViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/amber.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/amber.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/central_park.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/central_park.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/chicken.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/chicken.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/duck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/duck.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/fish.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/fish.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/key_west.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/key_west.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/nelly.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/nelly.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/Pictures/nola.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/Pictures/nola.jpg -------------------------------------------------------------------------------- /ADFiOSReferenceApp/PopOverViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A popover notification 21 | */ 22 | @interface PopOverViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/PopOverViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "PopOverViewController.h" 17 | 18 | @interface PopOverViewController () 19 | 20 | @end 21 | 22 | /** 23 | * A popover notification 24 | */ 25 | @implementation PopOverViewController 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | self.view.backgroundColor = [UIColor flatSilver]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/RefreshControlViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A controller for a refresh control view controller 20 | */ 21 | @interface RefreshControlViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/RefreshControlViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "RefreshControlViewController.h" 17 | 18 | @interface RefreshControlViewController () 19 | @property UILabel *timeDisplay; 20 | @property UIRefreshControl *refreshControl; 21 | @property UIScrollView *scrollView; 22 | @end 23 | 24 | static NSString* const TEXT_FIELD_PLACEHOLDER_TEXT = @"Refresh to get the time"; 25 | 26 | /** 27 | * A controller for a refresh control view controller 28 | */ 29 | @implementation RefreshControlViewController 30 | 31 | - (void)viewDidLoad { 32 | [super viewDidLoad]; 33 | [self setUpView]; 34 | } 35 | 36 | -(void)setUpView{ 37 | _timeDisplay = [[UILabel alloc] initWithFrame: 38 | CGRectMake(0, [self getTopPositionRounded] + [self getLargeHeightPadding], [self getWidthMinusSmallPadding], 0)]; 39 | _timeDisplay.text = TEXT_FIELD_PLACEHOLDER_TEXT; 40 | [_timeDisplay sizeToFit]; 41 | [self centerViewByWidth:_timeDisplay]; 42 | 43 | _scrollView = [[UIScrollView alloc] initWithFrame: 44 | CGRectMake(0, [self getTopPosition], self.view.frame.size.width, self.view.frame.size.height)]; 45 | 46 | _refreshControl = [[UIRefreshControl alloc] init]; 47 | [_refreshControl addTarget:self action:@selector(refreshEvent:) forControlEvents:UIControlEventValueChanged]; 48 | _scrollView.showsVerticalScrollIndicator = NO; 49 | [_scrollView addSubview:_refreshControl]; 50 | [self.view addSubview:_scrollView]; 51 | [self.view addSubview:_timeDisplay]; 52 | } 53 | 54 | /** 55 | * Sets the view larger so you have space to pull to swipe down 56 | */ 57 | -(void)viewWillLayoutSubviews{ 58 | _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height+88); 59 | } 60 | 61 | /** 62 | * A event for when the refresh occurs 63 | * 64 | * Gets the current time and sets it to the display 65 | * 66 | * @param refreshControl the refresh control 67 | */ 68 | -(void)refreshEvent:(UIRefreshControl *)refreshControl{ 69 | NSDateFormatter *df = [[NSDateFormatter alloc] init]; 70 | [df setTimeStyle:NSDateFormatterLongStyle]; 71 | _timeDisplay.text = [df stringFromDate:[NSDate date]]; 72 | 73 | [_timeDisplay sizeToFit]; 74 | [self centerViewByWidth:_timeDisplay]; 75 | 76 | [refreshControl endRefreshing]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ScrollOutOfViewViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * Scroll out of view view controller 21 | */ 22 | @interface ScrollOutOfViewViewController : ADFBaseViewController 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ScrollOutOfViewViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "ScrollOutOfViewViewController.h" 17 | 18 | @interface ScrollOutOfViewViewController () 19 | @property UILabel *label; 20 | @end 21 | 22 | static NSString* const HIDDENT_TEXT = @"This is hidden text"; 23 | 24 | /** 25 | * Scroll out of view view controller 26 | */ 27 | @implementation ScrollOutOfViewViewController 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | [self setUpView]; 32 | } 33 | 34 | /** 35 | * Creates a label that is positioned 2 times the size of the frame height 36 | */ 37 | -(void)setUpView{ 38 | _label = [[UILabel alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height * 2, 0, 0)]; 39 | _label.text = HIDDENT_TEXT; 40 | [_label sizeToFit]; 41 | 42 | UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame]; 43 | scrollView.contentSize = CGSizeMake(self.view.frame.size.width, _label.frame.origin.y + _label.frame.size.height); 44 | [scrollView addSubview:_label]; 45 | [self.view addSubview:scrollView]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ScrollingViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | 17 | #import 18 | #import "ADFBaseViewController.h" 19 | 20 | /** 21 | * Scrolling view controller 22 | */ 23 | @interface ScrollingViewController : ADFBaseViewController 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/SecondViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "NestedViewBase.h" 18 | 19 | @interface SecondViewController : NestedViewBase 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/SecondViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "SecondViewController.h" 17 | #import "ThirdViewController.h" 18 | 19 | static NSString* const NEXT_VIEW_TITLE = @"View 3"; 20 | static NSString* const NEXT_VIEW_MESSAGE = @"This is the third view"; 21 | 22 | @implementation SecondViewController 23 | 24 | /** 25 | * Goes to the 3rd view controller 26 | */ 27 | -(void)goNext{ 28 | ThirdViewController *thirdVC = [[ThirdViewController alloc] initWithTitle:NEXT_VIEW_TITLE andImage:nil andText:NEXT_VIEW_MESSAGE andIsLast:NO]; 29 | [self.navigationController pushViewController:thirdVC animated:YES]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/SubmitButtonViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * The submit button (changes the buttons color when pressed) 20 | */ 21 | @interface SubmitButtonViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/SubmitButtonViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "SubmitButtonViewController.h" 17 | 18 | @interface SubmitButtonViewController () 19 | @property UIButton *submitButton; 20 | @end 21 | static NSString * const SUBMIT_BUTTON_TEXT = @"Submit"; 22 | 23 | /** 24 | * The submit button (changes the buttons color when pressed) 25 | */ 26 | @implementation SubmitButtonViewController 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | _submitButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 31 | _submitButton.frame = [self frameFromCGPoint:CGPointZero AndCGSize:[self getLargeSquareSize]]; 32 | [_submitButton setTitle:SUBMIT_BUTTON_TEXT forState:UIControlStateNormal]; 33 | _submitButton.titleLabel.font = [UIFont largeFont]; 34 | [_submitButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; 35 | 36 | _submitButton.backgroundColor = [UIColor flatGreen]; 37 | [_submitButton addTarget:self action:@selector(submitButtonPressed:) forControlEvents:UIControlEventTouchDown]; 38 | [_submitButton addTarget:self action:@selector(submitButtonReleased:) forControlEvents:UIControlEventTouchUpInside]; 39 | [self centerView:_submitButton]; 40 | [self.view addSubview:_submitButton]; 41 | } 42 | 43 | /** 44 | * Changes the button color when pressed 45 | * 46 | * @param sender the button 47 | */ 48 | -(void)submitButtonPressed:(UIButton*)sender{ 49 | _submitButton.backgroundColor = [UIColor flatDarkRed]; 50 | } 51 | 52 | /** 53 | * Changes the button's color to origional when released 54 | * 55 | * @param sender the button 56 | */ 57 | -(void)submitButtonReleased:(UIButton*)sender{ 58 | _submitButton.backgroundColor = [UIColor flatGreen]; 59 | } 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/SwitchViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A controller for a switch control 20 | */ 21 | @interface SwitchViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/SwitchViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "SwitchViewController.h" 17 | 18 | @interface SwitchViewController () 19 | @property UISwitch *switchControl; 20 | @end 21 | 22 | /** 23 | * A controller for a switch control 24 | */ 25 | @implementation SwitchViewController 26 | 27 | - (void)viewDidLoad { 28 | [super viewDidLoad]; 29 | [self setUpView]; 30 | } 31 | 32 | -(void)setUpView{ 33 | self.view.backgroundColor = [UIColor flatWetAsphalt]; 34 | _switchControl = [[UISwitch alloc] initWithFrame:CGRectZero]; 35 | [_switchControl sizeToFit]; 36 | [self centerView:_switchControl]; 37 | [_switchControl addTarget:self action:@selector(switchFlipped:) forControlEvents:UIControlEventValueChanged]; 38 | [self.view addSubview:_switchControl]; 39 | } 40 | 41 | /** 42 | * A switch action (changes the view's background color) 43 | * 44 | * @param controller the switch 45 | */ 46 | -(void)switchFlipped:(UISwitch*)controller{ 47 | if ([controller isOn]) { 48 | self.view.backgroundColor = [UIColor flatYellow]; 49 | return; 50 | } 51 | 52 | self.view.backgroundColor = [UIColor flatWetAsphalt]; 53 | } 54 | @end 55 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/TextViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "InputBaseControlViewController.h" 17 | 18 | /** 19 | * A text input controller 20 | */ 21 | @interface TextViewController : InputBaseControlViewController 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/TextViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "TextViewController.h" 17 | 18 | @interface TextViewController () 19 | @property UITextView *textView; 20 | @end 21 | static NSString* const TEXTVIEW_DEFAULT_TEXT = @"I am a textview"; 22 | 23 | /** 24 | * A text input controller 25 | */ 26 | @implementation TextViewController 27 | 28 | - (void)viewDidLoad { 29 | [super viewDidLoad]; 30 | [self setUpView]; 31 | } 32 | 33 | -(void)setUpView{ 34 | _textView = [[UITextView alloc] initWithFrame: 35 | CGRectMake(0, [self getTopPositionRounded] + [self getSmallHeightPadding], [self getWidthMinusSmallPadding], self.view.bounds.size.height / 3)]; 36 | [_textView setText:TEXTVIEW_DEFAULT_TEXT]; 37 | [self centerViewByWidth:_textView]; 38 | [self.view addSubview:_textView]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ThirdViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | #import 16 | #import "NestedViewBase.h" 17 | 18 | @interface ThirdViewController : NestedViewBase 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/ThirdViewController.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "ThirdViewController.h" 17 | #import "FourthViewController.h" 18 | 19 | static NSString* const NEXT_VIEW_TITLE = @"View 4"; 20 | static NSString* const NEXT_VIEW_MESSAGE = @"This is the fourth view"; 21 | 22 | @implementation ThirdViewController 23 | 24 | /** 25 | * Goes to the 4th view controller 26 | */ 27 | -(void)goNext{ 28 | FourthViewController *fourthVC = [[FourthViewController alloc] initWithTitle:NEXT_VIEW_TITLE andImage:nil andText:NEXT_VIEW_MESSAGE andIsLast:YES]; 29 | [self.navigationController pushViewController:fourthVC animated:YES]; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/UIColor+ColorExtension.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | 18 | /** 19 | * A convience class that returns app specific colours 20 | */ 21 | @interface UIColor (ColorExtension) 22 | + (UIColor*)flatOrange; 23 | + (UIColor*)flatYellow; 24 | + (UIColor*)flatGray; 25 | + (UIColor*)flatLightGray; 26 | + (UIColor*)flatDarkGray; 27 | + (UIColor*)flatOffWhite; 28 | + (UIColor*)flatDarkOffWhite; 29 | + (UIColor*)flatLightBlue; 30 | + (UIColor*)flatDarkBlue; 31 | + (UIColor*)flatGreen; 32 | + (UIColor*)flatLightRed; 33 | + (UIColor*)flatDarkRed; 34 | + (UIColor*)flatSilver; 35 | + (UIColor*)flatMidnightBlue; 36 | + (UIColor*)flatWetAsphalt; 37 | @end 38 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/UIColor+ColorExtension.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import "UIColor+ColorExtension.h" 17 | 18 | /** 19 | * A convience class that returns app specific colours 20 | */ 21 | @implementation UIColor (ColorExtension) 22 | + (UIColor*)flatOrange { 23 | return [UIColor colorWithRed:255/255.0f green:153/255.0f blue:0/255.0f alpha:1.0f]; 24 | } 25 | 26 | + (UIColor*)flatYellow { 27 | return [UIColor colorWithRed:241/255.0f green:196/255.0f blue:15/255.0f alpha:1.0f]; 28 | } 29 | 30 | + (UIColor*)flatGray { 31 | return [UIColor colorWithRed:99/255.0f green:102/255.0f blue:106/255.0f alpha:1.0f]; 32 | } 33 | 34 | + (UIColor*)flatLightGray { 35 | return [UIColor colorWithRed:149/255.0f green:165/255.0f blue:166/255.0f alpha:1.0f]; 36 | } 37 | 38 | + (UIColor*)flatDarkGray { 39 | return [UIColor colorWithRed:127/255.0f green:140/255.0f blue:141/255.0f alpha:1.0f]; 40 | } 41 | 42 | + (UIColor*)flatOffWhite { 43 | return [UIColor colorWithRed:236/255.0f green:240/255.0f blue:241/255.0f alpha:1.0f]; 44 | } 45 | 46 | + (UIColor*)flatDarkOffWhite { 47 | return [UIColor colorWithRed:189/255.0f green:195/255.0f blue:199/255.0f alpha:1.0f]; 48 | } 49 | 50 | + (UIColor*)flatLightBlue { 51 | return [UIColor colorWithRed:52/255.0f green:152/255.0f blue:219/255.0f alpha:1.0f]; 52 | } 53 | 54 | + (UIColor*)flatDarkBlue { 55 | return [UIColor colorWithRed:41/255.0f green:128/255.0f blue:185/255.0f alpha:1.0f]; 56 | } 57 | 58 | + (UIColor*)flatGreen { 59 | return [UIColor colorWithRed:46/255.0f green:204/255.0f blue:113/255.0f alpha:1.0f]; 60 | } 61 | 62 | + (UIColor*)flatLightRed { 63 | return [UIColor colorWithRed:231/255.0f green:76/255.0f blue:60/255.0f alpha:1.0f]; 64 | } 65 | 66 | + (UIColor*)flatDarkRed { 67 | return [UIColor colorWithRed:192/255.0f green:57/255.0f blue:43/255.0f alpha:1.0f]; 68 | } 69 | 70 | + (UIColor*)flatSilver { 71 | return [UIColor colorWithRed:218/255.0f green:216/255.0f blue:214/255.0f alpha:1.0f]; 72 | } 73 | 74 | + (UIColor*)flatMidnightBlue { 75 | return [UIColor colorWithRed:44/255.0f green:62/255.0f blue:80/255.0f alpha:1.0f]; 76 | } 77 | + (UIColor*)flatWetAsphalt { 78 | return [UIColor colorWithRed:52/255.0f green:73/255.0f blue:94/255.0f alpha:1.0f]; 79 | } 80 | 81 | @end 82 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/UIFont+FontExtension.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | 18 | /** 19 | * A convenience class for a uniform font style/size within the app 20 | */ 21 | @interface UIFont (FontExtension) 22 | FOUNDATION_EXPORT NSString *const DEFAULT_FONT_NAME; 23 | FOUNDATION_EXPORT NSString *const DEFAULT_BOLD_NAME; 24 | 25 | + (UIFont*)defaultFontAtSize:(CGFloat)size; 26 | + (UIFont*)defaultBoldFontAtSize:(CGFloat)size; 27 | + (UIFont*)smallFont; 28 | + (UIFont*)mediumFont; 29 | + (UIFont*)largeFont; 30 | + (UIFont*)smallBoldFont; 31 | + (UIFont*)mediumBoldFont; 32 | + (UIFont*)largeBoldFont; 33 | @end 34 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/WebViewController.h: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "ADFBaseViewController.h" 18 | 19 | /** 20 | * A controller to test a web view 21 | */ 22 | @interface WebViewController : ADFBaseViewController 23 | -(id)initWithURL:(NSURL*)url; 24 | -(id)initWithTitle:(NSString *)title andImage:(UIImage *)image andURL:(NSURL*)url; 25 | @end 26 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/main.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | 16 | #import 17 | #import "AppDelegate.h" 18 | 19 | int main(int argc, char * argv[]) { 20 | @autoreleasepool { 21 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ADFiOSReferenceApp/movie.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/movie.mp4 -------------------------------------------------------------------------------- /ADFiOSReferenceApp/solid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/ADFiOSReferenceApp/solid.png -------------------------------------------------------------------------------- /ADFiOSReferenceAppTests/ADFiOSReferenceAppTests.m: -------------------------------------------------------------------------------- 1 | /* * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | * 3 | * Licensed under the Apache License, Version 2.0 (the "License"). 4 | * You may not use this file except in compliance with the License. 5 | * A copy of the License is located at 6 | * 7 | * http://aws.amazon.com/apache2.0 8 | * 9 | * or in the "license" file accompanying this file. This file is distributed 10 | * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 | * express or implied. See the License for the specific language governing 12 | * permissions and limitations under the License. 13 | */ 14 | 15 | #import 16 | #import 17 | 18 | @interface ADFiOSReferenceAppTests : XCTestCase 19 | 20 | @end 21 | 22 | @implementation ADFiOSReferenceAppTests 23 | 24 | - (void)setUp { 25 | [super setUp]; 26 | // Put setup code here. This method is called before the invocation of each test method in the class. 27 | } 28 | 29 | - (void)tearDown { 30 | // Put teardown code here. This method is called after the invocation of each test method in the class. 31 | [super tearDown]; 32 | } 33 | 34 | - (void)testExample { 35 | // This is an example of a functional test case. 36 | XCTAssert(YES, @"Pass"); 37 | } 38 | 39 | - (void)testPerformanceExample { 40 | // This is an example of a performance test case. 41 | [self measureBlock:^{ 42 | // Put the code you want to measure the time of here. 43 | }]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ADFiOSReferenceAppTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | Amazon.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /AWSDeviceFarmiOSReferenceApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README_Images/build-ios.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/README_Images/build-ios.gif -------------------------------------------------------------------------------- /README_Images/record-xcui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/README_Images/record-xcui.png -------------------------------------------------------------------------------- /README_Images/xcode-ipa.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/README_Images/xcode-ipa.gif -------------------------------------------------------------------------------- /calabash.framework/Headers/CalabashServer.h: -------------------------------------------------------------------------------- 1 | // Created by Karl Krukow on 11/08/11. 2 | // Copyright 2011 LessPainful. All rights reserved. 3 | 4 | #import "LPHTTPServer.h" 5 | 6 | @class LPHTTPServer; 7 | 8 | @interface CalabashServer : NSObject { 9 | LPHTTPServer *_httpServer; 10 | } 11 | 12 | + (void) start; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /calabash.framework/Headers/LPHTTPAsyncFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | /** 7 | * This is an asynchronous version of LPHTTPFileResponse. 8 | * It reads data from the given file asynchronously via LPGCD. 9 | * 10 | * It may be overriden to allow custom post-processing of the data that has been read from the file. 11 | * An example of this is the LPHTTPDynamicFileResponse class. 12 | **/ 13 | 14 | @interface LPHTTPAsyncFileResponse : NSObject 15 | { 16 | LPHTTPConnection *connection; 17 | 18 | NSString *filePath; 19 | UInt64 fileLength; 20 | UInt64 fileOffset; // File offset as pertains to data given to connection 21 | UInt64 readOffset; // File offset as pertains to data read from file (but maybe not returned to connection) 22 | 23 | BOOL aborted; 24 | 25 | NSData *data; 26 | 27 | int fileFD; 28 | void *readBuffer; 29 | NSUInteger readBufferSize; // Malloced size of readBuffer 30 | NSUInteger readBufferOffset; // Offset within readBuffer where the end of existing data is 31 | NSUInteger readRequestLength; 32 | dispatch_queue_t readQueue; 33 | dispatch_source_t readSource; 34 | BOOL readSourceSuspended; 35 | } 36 | 37 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 38 | - (NSString *)filePath; 39 | 40 | @end 41 | 42 | /** 43 | * Explanation of Variables (excluding those that are obvious) 44 | * 45 | * fileOffset 46 | * This is the number of bytes that have been returned to the connection via the readDataOfLength method. 47 | * If 1KB of data has been read from the file, but none of that data has yet been returned to the connection, 48 | * then the fileOffset variable remains at zero. 49 | * This variable is used in the calculation of the isDone method. 50 | * Only after all data has been returned to the connection are we actually done. 51 | * 52 | * readOffset 53 | * Represents the offset of the file descriptor. 54 | * In other words, the file position indidcator for our read stream. 55 | * It might be easy to think of it as the total number of bytes that have been read from the file. 56 | * However, this isn't entirely accurate, as the setOffset: method may have caused us to 57 | * jump ahead in the file (lseek). 58 | * 59 | * readBuffer 60 | * Malloc'd buffer to hold data read from the file. 61 | * 62 | * readBufferSize 63 | * Total allocation size of malloc'd buffer. 64 | * 65 | * readBufferOffset 66 | * Represents the position in the readBuffer where we should store new bytes. 67 | * 68 | * readRequestLength 69 | * The total number of bytes that were requested from the connection. 70 | * It's OK if we return a lesser number of bytes to the connection. 71 | * It's NOT OK if we return a greater number of bytes to the connection. 72 | * Doing so would disrupt proper support for range requests. 73 | * If, however, the response is chunked then we don't need to worry about this. 74 | * Chunked responses inheritly don't support range requests. 75 | **/ -------------------------------------------------------------------------------- /calabash.framework/Headers/LPHTTPDataResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | 5 | @interface LPHTTPDataResponse : NSObject 6 | { 7 | NSUInteger offset; 8 | NSData *data; 9 | } 10 | 11 | - (id)initWithData:(NSData *)data; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /calabash.framework/Headers/LPHTTPDynamicFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | #import "LPHTTPAsyncFileResponse.h" 4 | 5 | /** 6 | * This class is designed to assist with dynamic content. 7 | * Imagine you have a file that you want to make dynamic: 8 | * 9 | * 10 | * 11 | *

ComputerName Control Panel

12 | * ... 13 | *
  • System Time: SysTime
  • 14 | * 15 | * 16 | * 17 | * Now you could generate the entire file in Objective-C, 18 | * but this would be a horribly tedious process. 19 | * Beside, you want to design the file with professional tools to make it look pretty. 20 | * 21 | * So all you have to do is escape your dynamic content like this: 22 | * 23 | * ... 24 | *

    %%ComputerName%% Control Panel

    25 | * ... 26 | *
  • System Time: %%SysTime%%
  • 27 | * 28 | * And then you create an instance of this class with: 29 | * 30 | * - separator = @"%%" 31 | * - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" } 32 | * 33 | * This class will then perform the replacements for you, on the fly, as it reads the file data. 34 | * This class is also asynchronous, so it will perform the file IO using its own LPGCD queue. 35 | **/ 36 | 37 | @interface LPHTTPDynamicFileResponse : LPHTTPAsyncFileResponse 38 | { 39 | NSData *separator; 40 | NSDictionary *replacementDict; 41 | } 42 | 43 | - (id)initWithFilePath:(NSString *)filePath 44 | forConnection:(LPHTTPConnection *)connection 45 | separator:(NSString *)separatorStr 46 | replacementDictionary:(NSDictionary *)dictionary; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /calabash.framework/Headers/LPHTTPFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | 7 | @interface LPHTTPFileResponse : NSObject 8 | { 9 | LPHTTPConnection *connection; 10 | 11 | NSString *filePath; 12 | UInt64 fileLength; 13 | UInt64 fileOffset; 14 | 15 | BOOL aborted; 16 | 17 | int fileFD; 18 | void *buffer; 19 | NSUInteger bufferSize; 20 | } 21 | 22 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 23 | - (NSString *)filePath; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /calabash.framework/Headers/LPRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRoute.h 3 | // 4 | // Created by Karl Krukow on 13/08/11. 5 | // Copyright 2011 LessPainful. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class LPHTTPConnection; 11 | 12 | @protocol LPRoute 13 | 14 | @optional 15 | - (void) setParameters:(NSDictionary *) parameters; 16 | 17 | - (void) setConnection:(LPHTTPConnection *) connection; 18 | 19 | - (BOOL) supportsMethod:(NSString *) method atPath:(NSString *) path; 20 | 21 | - (NSDictionary *) JSONResponseForMethod:(NSString *) method URI:(NSString *) path data:(NSDictionary *) data; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /calabash.framework/Headers/LPRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRouter.h 3 | // Created by Karl Krukow on 13/08/11. 4 | // Copyright 2011 LessPainful. All rights reserved. 5 | 6 | #import "LPHTTPConnection.h" 7 | #import "LPRoute.h" 8 | 9 | @interface LPRouter : LPHTTPConnection { 10 | NSMutableData *_postData; 11 | } 12 | @property(nonatomic, retain, readonly) NSData *postData; 13 | 14 | + (void) addRoute:(id ) route forPath:(NSString *) path; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /calabash.framework/Headers/LPVersionRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPVersionRoute.h 3 | // calabash 4 | // 5 | // Created by Karl Krukow on 22/06/12. 6 | // Copyright (c) 2012 LessPainful. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LPRoute.h" 11 | 12 | /*** UNEXPECTED *** 13 | We have tools that search the strings in the compiled binary for a match on 14 | 'CALABASH VERSION'. 15 | 16 | eg. $ strings Briar-cal.app/Briar-cal | grep -E 'CALABASH VERSION' 17 | 18 | We use this information to determine the version of the server that is compiled 19 | into binary. 20 | 21 | Do not change the 'CALABASH VERSION' portion of the following constant without 22 | updating the ruby API. 23 | ******************/ 24 | #define kLPCALABASHVERSION @"CALABASH VERSION: 0.13.0" 25 | 26 | @interface LPVersionRoute : NSObject 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /calabash.framework/Resources/version: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/Resources/version -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/CalabashServer.h: -------------------------------------------------------------------------------- 1 | // Created by Karl Krukow on 11/08/11. 2 | // Copyright 2011 LessPainful. All rights reserved. 3 | 4 | #import "LPHTTPServer.h" 5 | 6 | @class LPHTTPServer; 7 | 8 | @interface CalabashServer : NSObject { 9 | LPHTTPServer *_httpServer; 10 | } 11 | 12 | + (void) start; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/LPHTTPAsyncFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | /** 7 | * This is an asynchronous version of LPHTTPFileResponse. 8 | * It reads data from the given file asynchronously via LPGCD. 9 | * 10 | * It may be overriden to allow custom post-processing of the data that has been read from the file. 11 | * An example of this is the LPHTTPDynamicFileResponse class. 12 | **/ 13 | 14 | @interface LPHTTPAsyncFileResponse : NSObject 15 | { 16 | LPHTTPConnection *connection; 17 | 18 | NSString *filePath; 19 | UInt64 fileLength; 20 | UInt64 fileOffset; // File offset as pertains to data given to connection 21 | UInt64 readOffset; // File offset as pertains to data read from file (but maybe not returned to connection) 22 | 23 | BOOL aborted; 24 | 25 | NSData *data; 26 | 27 | int fileFD; 28 | void *readBuffer; 29 | NSUInteger readBufferSize; // Malloced size of readBuffer 30 | NSUInteger readBufferOffset; // Offset within readBuffer where the end of existing data is 31 | NSUInteger readRequestLength; 32 | dispatch_queue_t readQueue; 33 | dispatch_source_t readSource; 34 | BOOL readSourceSuspended; 35 | } 36 | 37 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 38 | - (NSString *)filePath; 39 | 40 | @end 41 | 42 | /** 43 | * Explanation of Variables (excluding those that are obvious) 44 | * 45 | * fileOffset 46 | * This is the number of bytes that have been returned to the connection via the readDataOfLength method. 47 | * If 1KB of data has been read from the file, but none of that data has yet been returned to the connection, 48 | * then the fileOffset variable remains at zero. 49 | * This variable is used in the calculation of the isDone method. 50 | * Only after all data has been returned to the connection are we actually done. 51 | * 52 | * readOffset 53 | * Represents the offset of the file descriptor. 54 | * In other words, the file position indidcator for our read stream. 55 | * It might be easy to think of it as the total number of bytes that have been read from the file. 56 | * However, this isn't entirely accurate, as the setOffset: method may have caused us to 57 | * jump ahead in the file (lseek). 58 | * 59 | * readBuffer 60 | * Malloc'd buffer to hold data read from the file. 61 | * 62 | * readBufferSize 63 | * Total allocation size of malloc'd buffer. 64 | * 65 | * readBufferOffset 66 | * Represents the position in the readBuffer where we should store new bytes. 67 | * 68 | * readRequestLength 69 | * The total number of bytes that were requested from the connection. 70 | * It's OK if we return a lesser number of bytes to the connection. 71 | * It's NOT OK if we return a greater number of bytes to the connection. 72 | * Doing so would disrupt proper support for range requests. 73 | * If, however, the response is chunked then we don't need to worry about this. 74 | * Chunked responses inheritly don't support range requests. 75 | **/ -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/LPHTTPDataResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | 5 | @interface LPHTTPDataResponse : NSObject 6 | { 7 | NSUInteger offset; 8 | NSData *data; 9 | } 10 | 11 | - (id)initWithData:(NSData *)data; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/LPHTTPDynamicFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | #import "LPHTTPAsyncFileResponse.h" 4 | 5 | /** 6 | * This class is designed to assist with dynamic content. 7 | * Imagine you have a file that you want to make dynamic: 8 | * 9 | * 10 | * 11 | *

    ComputerName Control Panel

    12 | * ... 13 | *
  • System Time: SysTime
  • 14 | * 15 | * 16 | * 17 | * Now you could generate the entire file in Objective-C, 18 | * but this would be a horribly tedious process. 19 | * Beside, you want to design the file with professional tools to make it look pretty. 20 | * 21 | * So all you have to do is escape your dynamic content like this: 22 | * 23 | * ... 24 | *

    %%ComputerName%% Control Panel

    25 | * ... 26 | *
  • System Time: %%SysTime%%
  • 27 | * 28 | * And then you create an instance of this class with: 29 | * 30 | * - separator = @"%%" 31 | * - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" } 32 | * 33 | * This class will then perform the replacements for you, on the fly, as it reads the file data. 34 | * This class is also asynchronous, so it will perform the file IO using its own LPGCD queue. 35 | **/ 36 | 37 | @interface LPHTTPDynamicFileResponse : LPHTTPAsyncFileResponse 38 | { 39 | NSData *separator; 40 | NSDictionary *replacementDict; 41 | } 42 | 43 | - (id)initWithFilePath:(NSString *)filePath 44 | forConnection:(LPHTTPConnection *)connection 45 | separator:(NSString *)separatorStr 46 | replacementDictionary:(NSDictionary *)dictionary; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/LPHTTPFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | 7 | @interface LPHTTPFileResponse : NSObject 8 | { 9 | LPHTTPConnection *connection; 10 | 11 | NSString *filePath; 12 | UInt64 fileLength; 13 | UInt64 fileOffset; 14 | 15 | BOOL aborted; 16 | 17 | int fileFD; 18 | void *buffer; 19 | NSUInteger bufferSize; 20 | } 21 | 22 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 23 | - (NSString *)filePath; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/LPRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRoute.h 3 | // 4 | // Created by Karl Krukow on 13/08/11. 5 | // Copyright 2011 LessPainful. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class LPHTTPConnection; 11 | 12 | @protocol LPRoute 13 | 14 | @optional 15 | - (void) setParameters:(NSDictionary *) parameters; 16 | 17 | - (void) setConnection:(LPHTTPConnection *) connection; 18 | 19 | - (BOOL) supportsMethod:(NSString *) method atPath:(NSString *) path; 20 | 21 | - (NSDictionary *) JSONResponseForMethod:(NSString *) method URI:(NSString *) path data:(NSDictionary *) data; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/LPRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRouter.h 3 | // Created by Karl Krukow on 13/08/11. 4 | // Copyright 2011 LessPainful. All rights reserved. 5 | 6 | #import "LPHTTPConnection.h" 7 | #import "LPRoute.h" 8 | 9 | @interface LPRouter : LPHTTPConnection { 10 | NSMutableData *_postData; 11 | } 12 | @property(nonatomic, retain, readonly) NSData *postData; 13 | 14 | + (void) addRoute:(id ) route forPath:(NSString *) path; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Headers/LPVersionRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPVersionRoute.h 3 | // calabash 4 | // 5 | // Created by Karl Krukow on 22/06/12. 6 | // Copyright (c) 2012 LessPainful. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LPRoute.h" 11 | 12 | /*** UNEXPECTED *** 13 | We have tools that search the strings in the compiled binary for a match on 14 | 'CALABASH VERSION'. 15 | 16 | eg. $ strings Briar-cal.app/Briar-cal | grep -E 'CALABASH VERSION' 17 | 18 | We use this information to determine the version of the server that is compiled 19 | into binary. 20 | 21 | Do not change the 'CALABASH VERSION' portion of the following constant without 22 | updating the ruby API. 23 | ******************/ 24 | #define kLPCALABASHVERSION @"CALABASH VERSION: 0.13.0" 25 | 26 | @interface LPVersionRoute : NSObject 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/Resources/version: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/Versions/0.13.0/Resources/version -------------------------------------------------------------------------------- /calabash.framework/Versions/0.13.0/calabash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/Versions/0.13.0/calabash -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/CalabashServer.h: -------------------------------------------------------------------------------- 1 | // Created by Karl Krukow on 11/08/11. 2 | // Copyright 2011 LessPainful. All rights reserved. 3 | 4 | #import "LPHTTPServer.h" 5 | 6 | @class LPHTTPServer; 7 | 8 | @interface CalabashServer : NSObject { 9 | LPHTTPServer *_httpServer; 10 | } 11 | 12 | + (void) start; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/LPHTTPAsyncFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | /** 7 | * This is an asynchronous version of LPHTTPFileResponse. 8 | * It reads data from the given file asynchronously via LPGCD. 9 | * 10 | * It may be overriden to allow custom post-processing of the data that has been read from the file. 11 | * An example of this is the LPHTTPDynamicFileResponse class. 12 | **/ 13 | 14 | @interface LPHTTPAsyncFileResponse : NSObject 15 | { 16 | LPHTTPConnection *connection; 17 | 18 | NSString *filePath; 19 | UInt64 fileLength; 20 | UInt64 fileOffset; // File offset as pertains to data given to connection 21 | UInt64 readOffset; // File offset as pertains to data read from file (but maybe not returned to connection) 22 | 23 | BOOL aborted; 24 | 25 | NSData *data; 26 | 27 | int fileFD; 28 | void *readBuffer; 29 | NSUInteger readBufferSize; // Malloced size of readBuffer 30 | NSUInteger readBufferOffset; // Offset within readBuffer where the end of existing data is 31 | NSUInteger readRequestLength; 32 | dispatch_queue_t readQueue; 33 | dispatch_source_t readSource; 34 | BOOL readSourceSuspended; 35 | } 36 | 37 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 38 | - (NSString *)filePath; 39 | 40 | @end 41 | 42 | /** 43 | * Explanation of Variables (excluding those that are obvious) 44 | * 45 | * fileOffset 46 | * This is the number of bytes that have been returned to the connection via the readDataOfLength method. 47 | * If 1KB of data has been read from the file, but none of that data has yet been returned to the connection, 48 | * then the fileOffset variable remains at zero. 49 | * This variable is used in the calculation of the isDone method. 50 | * Only after all data has been returned to the connection are we actually done. 51 | * 52 | * readOffset 53 | * Represents the offset of the file descriptor. 54 | * In other words, the file position indidcator for our read stream. 55 | * It might be easy to think of it as the total number of bytes that have been read from the file. 56 | * However, this isn't entirely accurate, as the setOffset: method may have caused us to 57 | * jump ahead in the file (lseek). 58 | * 59 | * readBuffer 60 | * Malloc'd buffer to hold data read from the file. 61 | * 62 | * readBufferSize 63 | * Total allocation size of malloc'd buffer. 64 | * 65 | * readBufferOffset 66 | * Represents the position in the readBuffer where we should store new bytes. 67 | * 68 | * readRequestLength 69 | * The total number of bytes that were requested from the connection. 70 | * It's OK if we return a lesser number of bytes to the connection. 71 | * It's NOT OK if we return a greater number of bytes to the connection. 72 | * Doing so would disrupt proper support for range requests. 73 | * If, however, the response is chunked then we don't need to worry about this. 74 | * Chunked responses inheritly don't support range requests. 75 | **/ -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/LPHTTPDataResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | 5 | @interface LPHTTPDataResponse : NSObject 6 | { 7 | NSUInteger offset; 8 | NSData *data; 9 | } 10 | 11 | - (id)initWithData:(NSData *)data; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/LPHTTPDynamicFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | #import "LPHTTPAsyncFileResponse.h" 4 | 5 | /** 6 | * This class is designed to assist with dynamic content. 7 | * Imagine you have a file that you want to make dynamic: 8 | * 9 | * 10 | * 11 | *

    ComputerName Control Panel

    12 | * ... 13 | *
  • System Time: SysTime
  • 14 | * 15 | * 16 | * 17 | * Now you could generate the entire file in Objective-C, 18 | * but this would be a horribly tedious process. 19 | * Beside, you want to design the file with professional tools to make it look pretty. 20 | * 21 | * So all you have to do is escape your dynamic content like this: 22 | * 23 | * ... 24 | *

    %%ComputerName%% Control Panel

    25 | * ... 26 | *
  • System Time: %%SysTime%%
  • 27 | * 28 | * And then you create an instance of this class with: 29 | * 30 | * - separator = @"%%" 31 | * - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" } 32 | * 33 | * This class will then perform the replacements for you, on the fly, as it reads the file data. 34 | * This class is also asynchronous, so it will perform the file IO using its own LPGCD queue. 35 | **/ 36 | 37 | @interface LPHTTPDynamicFileResponse : LPHTTPAsyncFileResponse 38 | { 39 | NSData *separator; 40 | NSDictionary *replacementDict; 41 | } 42 | 43 | - (id)initWithFilePath:(NSString *)filePath 44 | forConnection:(LPHTTPConnection *)connection 45 | separator:(NSString *)separatorStr 46 | replacementDictionary:(NSDictionary *)dictionary; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/LPHTTPFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | 7 | @interface LPHTTPFileResponse : NSObject 8 | { 9 | LPHTTPConnection *connection; 10 | 11 | NSString *filePath; 12 | UInt64 fileLength; 13 | UInt64 fileOffset; 14 | 15 | BOOL aborted; 16 | 17 | int fileFD; 18 | void *buffer; 19 | NSUInteger bufferSize; 20 | } 21 | 22 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 23 | - (NSString *)filePath; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/LPRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRoute.h 3 | // 4 | // Created by Karl Krukow on 13/08/11. 5 | // Copyright 2011 LessPainful. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class LPHTTPConnection; 11 | 12 | @protocol LPRoute 13 | 14 | @optional 15 | - (void) setParameters:(NSDictionary *) parameters; 16 | 17 | - (void) setConnection:(LPHTTPConnection *) connection; 18 | 19 | - (BOOL) supportsMethod:(NSString *) method atPath:(NSString *) path; 20 | 21 | - (NSDictionary *) JSONResponseForMethod:(NSString *) method URI:(NSString *) path data:(NSDictionary *) data; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/LPRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRouter.h 3 | // Created by Karl Krukow on 13/08/11. 4 | // Copyright 2011 LessPainful. All rights reserved. 5 | 6 | #import "LPHTTPConnection.h" 7 | #import "LPRoute.h" 8 | 9 | @interface LPRouter : LPHTTPConnection { 10 | NSMutableData *_postData; 11 | } 12 | @property(nonatomic, retain, readonly) NSData *postData; 13 | 14 | + (void) addRoute:(id ) route forPath:(NSString *) path; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Headers/LPVersionRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPVersionRoute.h 3 | // calabash 4 | // 5 | // Created by Karl Krukow on 22/06/12. 6 | // Copyright (c) 2012 LessPainful. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LPRoute.h" 11 | 12 | /*** UNEXPECTED *** 13 | We have tools that search the strings in the compiled binary for a match on 14 | 'CALABASH VERSION'. 15 | 16 | eg. $ strings Briar-cal.app/Briar-cal | grep -E 'CALABASH VERSION' 17 | 18 | We use this information to determine the version of the server that is compiled 19 | into binary. 20 | 21 | Do not change the 'CALABASH VERSION' portion of the following constant without 22 | updating the ruby API. 23 | ******************/ 24 | #define kLPCALABASHVERSION @"CALABASH VERSION: 0.13.0" 25 | 26 | @interface LPVersionRoute : NSObject 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /calabash.framework/Versions/A/Resources/version: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/Versions/A/Resources/version -------------------------------------------------------------------------------- /calabash.framework/Versions/A/calabash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/Versions/A/calabash -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/CalabashServer.h: -------------------------------------------------------------------------------- 1 | // Created by Karl Krukow on 11/08/11. 2 | // Copyright 2011 LessPainful. All rights reserved. 3 | 4 | #import "LPHTTPServer.h" 5 | 6 | @class LPHTTPServer; 7 | 8 | @interface CalabashServer : NSObject { 9 | LPHTTPServer *_httpServer; 10 | } 11 | 12 | + (void) start; 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/LPHTTPAsyncFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | /** 7 | * This is an asynchronous version of LPHTTPFileResponse. 8 | * It reads data from the given file asynchronously via LPGCD. 9 | * 10 | * It may be overriden to allow custom post-processing of the data that has been read from the file. 11 | * An example of this is the LPHTTPDynamicFileResponse class. 12 | **/ 13 | 14 | @interface LPHTTPAsyncFileResponse : NSObject 15 | { 16 | LPHTTPConnection *connection; 17 | 18 | NSString *filePath; 19 | UInt64 fileLength; 20 | UInt64 fileOffset; // File offset as pertains to data given to connection 21 | UInt64 readOffset; // File offset as pertains to data read from file (but maybe not returned to connection) 22 | 23 | BOOL aborted; 24 | 25 | NSData *data; 26 | 27 | int fileFD; 28 | void *readBuffer; 29 | NSUInteger readBufferSize; // Malloced size of readBuffer 30 | NSUInteger readBufferOffset; // Offset within readBuffer where the end of existing data is 31 | NSUInteger readRequestLength; 32 | dispatch_queue_t readQueue; 33 | dispatch_source_t readSource; 34 | BOOL readSourceSuspended; 35 | } 36 | 37 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 38 | - (NSString *)filePath; 39 | 40 | @end 41 | 42 | /** 43 | * Explanation of Variables (excluding those that are obvious) 44 | * 45 | * fileOffset 46 | * This is the number of bytes that have been returned to the connection via the readDataOfLength method. 47 | * If 1KB of data has been read from the file, but none of that data has yet been returned to the connection, 48 | * then the fileOffset variable remains at zero. 49 | * This variable is used in the calculation of the isDone method. 50 | * Only after all data has been returned to the connection are we actually done. 51 | * 52 | * readOffset 53 | * Represents the offset of the file descriptor. 54 | * In other words, the file position indidcator for our read stream. 55 | * It might be easy to think of it as the total number of bytes that have been read from the file. 56 | * However, this isn't entirely accurate, as the setOffset: method may have caused us to 57 | * jump ahead in the file (lseek). 58 | * 59 | * readBuffer 60 | * Malloc'd buffer to hold data read from the file. 61 | * 62 | * readBufferSize 63 | * Total allocation size of malloc'd buffer. 64 | * 65 | * readBufferOffset 66 | * Represents the position in the readBuffer where we should store new bytes. 67 | * 68 | * readRequestLength 69 | * The total number of bytes that were requested from the connection. 70 | * It's OK if we return a lesser number of bytes to the connection. 71 | * It's NOT OK if we return a greater number of bytes to the connection. 72 | * Doing so would disrupt proper support for range requests. 73 | * If, however, the response is chunked then we don't need to worry about this. 74 | * Chunked responses inheritly don't support range requests. 75 | **/ -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/LPHTTPDataResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | 5 | @interface LPHTTPDataResponse : NSObject 6 | { 7 | NSUInteger offset; 8 | NSData *data; 9 | } 10 | 11 | - (id)initWithData:(NSData *)data; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/LPHTTPDynamicFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | #import "LPHTTPAsyncFileResponse.h" 4 | 5 | /** 6 | * This class is designed to assist with dynamic content. 7 | * Imagine you have a file that you want to make dynamic: 8 | * 9 | * 10 | * 11 | *

    ComputerName Control Panel

    12 | * ... 13 | *
  • System Time: SysTime
  • 14 | * 15 | * 16 | * 17 | * Now you could generate the entire file in Objective-C, 18 | * but this would be a horribly tedious process. 19 | * Beside, you want to design the file with professional tools to make it look pretty. 20 | * 21 | * So all you have to do is escape your dynamic content like this: 22 | * 23 | * ... 24 | *

    %%ComputerName%% Control Panel

    25 | * ... 26 | *
  • System Time: %%SysTime%%
  • 27 | * 28 | * And then you create an instance of this class with: 29 | * 30 | * - separator = @"%%" 31 | * - replacementDictionary = { "ComputerName"="Black MacBook", "SysTime"="2010-04-30 03:18:24" } 32 | * 33 | * This class will then perform the replacements for you, on the fly, as it reads the file data. 34 | * This class is also asynchronous, so it will perform the file IO using its own LPGCD queue. 35 | **/ 36 | 37 | @interface LPHTTPDynamicFileResponse : LPHTTPAsyncFileResponse 38 | { 39 | NSData *separator; 40 | NSDictionary *replacementDict; 41 | } 42 | 43 | - (id)initWithFilePath:(NSString *)filePath 44 | forConnection:(LPHTTPConnection *)connection 45 | separator:(NSString *)separatorStr 46 | replacementDictionary:(NSDictionary *)dictionary; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/LPHTTPFileResponse.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "LPHTTPResponse.h" 3 | 4 | @class LPHTTPConnection; 5 | 6 | 7 | @interface LPHTTPFileResponse : NSObject 8 | { 9 | LPHTTPConnection *connection; 10 | 11 | NSString *filePath; 12 | UInt64 fileLength; 13 | UInt64 fileOffset; 14 | 15 | BOOL aborted; 16 | 17 | int fileFD; 18 | void *buffer; 19 | NSUInteger bufferSize; 20 | } 21 | 22 | - (id)initWithFilePath:(NSString *)filePath forConnection:(LPHTTPConnection *)connection; 23 | - (NSString *)filePath; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/LPRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRoute.h 3 | // 4 | // Created by Karl Krukow on 13/08/11. 5 | // Copyright 2011 LessPainful. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | @class LPHTTPConnection; 11 | 12 | @protocol LPRoute 13 | 14 | @optional 15 | - (void) setParameters:(NSDictionary *) parameters; 16 | 17 | - (void) setConnection:(LPHTTPConnection *) connection; 18 | 19 | - (BOOL) supportsMethod:(NSString *) method atPath:(NSString *) path; 20 | 21 | - (NSDictionary *) JSONResponseForMethod:(NSString *) method URI:(NSString *) path data:(NSDictionary *) data; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/LPRouter.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPRouter.h 3 | // Created by Karl Krukow on 13/08/11. 4 | // Copyright 2011 LessPainful. All rights reserved. 5 | 6 | #import "LPHTTPConnection.h" 7 | #import "LPRoute.h" 8 | 9 | @interface LPRouter : LPHTTPConnection { 10 | NSMutableData *_postData; 11 | } 12 | @property(nonatomic, retain, readonly) NSData *postData; 13 | 14 | + (void) addRoute:(id ) route forPath:(NSString *) path; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Headers/LPVersionRoute.h: -------------------------------------------------------------------------------- 1 | // 2 | // LPVersionRoute.h 3 | // calabash 4 | // 5 | // Created by Karl Krukow on 22/06/12. 6 | // Copyright (c) 2012 LessPainful. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LPRoute.h" 11 | 12 | /*** UNEXPECTED *** 13 | We have tools that search the strings in the compiled binary for a match on 14 | 'CALABASH VERSION'. 15 | 16 | eg. $ strings Briar-cal.app/Briar-cal | grep -E 'CALABASH VERSION' 17 | 18 | We use this information to determine the version of the server that is compiled 19 | into binary. 20 | 21 | Do not change the 'CALABASH VERSION' portion of the following constant without 22 | updating the ruby API. 23 | ******************/ 24 | #define kLPCALABASHVERSION @"CALABASH VERSION: 0.13.0" 25 | 26 | @interface LPVersionRoute : NSObject 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/Resources/version: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/Versions/Current/Resources/version -------------------------------------------------------------------------------- /calabash.framework/Versions/Current/calabash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/Versions/Current/calabash -------------------------------------------------------------------------------- /calabash.framework/calabash: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/calabash.framework/calabash -------------------------------------------------------------------------------- /features/Alerts.feature: -------------------------------------------------------------------------------- 1 | Feature: Alert Page 2 | As a Device Farm user 3 | I would like to be able to see examples of testing alerts 4 | So I can apply it to my future tests. 5 | 6 | Background: Navigate to Alert Page 7 | Given that I navigate to the "More" menu category 8 | And I select the "Alerts" option 9 | And I am on the Alerts Page 10 | 11 | @Modal 12 | Scenario: Modal Alert 13 | When I select the "Modal" label tile 14 | Then I should see the Modal Alert Page with text "This is a modal view" and button labelled "OK" 15 | And I take a screenshot 16 | When I press the "OK" button 17 | Then I should not see the Modal Alert Page with text "This is a modal view" 18 | 19 | @Alert 20 | Scenario: Alert 21 | When I select the "Alert" label tile 22 | Then I should see the Alert Message with text "This is an alert" and button labelled "OK" 23 | And I take a screenshot 24 | When I select the "OK" label tile 25 | Then I should not see the Alert Message with text "This is an alert" 26 | -------------------------------------------------------------------------------- /features/home_page.feature: -------------------------------------------------------------------------------- 1 | Feature: Home Page 2 | As a Device Farm user 3 | I would like to be able to see examples of testing a static homepage 4 | So I can apply it to my future tests. 5 | 6 | @Homepage 7 | Scenario: A Valid Homepage 8 | Given that I navigate to the "Home" menu category 9 | And I am on the Homepage 10 | Then I should see all the information 11 | And I take a screenshot 12 | -------------------------------------------------------------------------------- /features/input_controls.feature: -------------------------------------------------------------------------------- 1 | Feature: Input Controls 2 | As a Device Farm user 3 | I would like to be able to see examples of testing input controls 4 | So I can apply it to my future tests. 5 | 6 | Background: Navigate to Input Controls 7 | Given that I navigate to the "Inputs" menu category 8 | And I am on the Input Controls page 9 | 10 | @TextView 11 | Scenario: TextView 12 | Then I should see a text view 13 | -------------------------------------------------------------------------------- /features/ios/Base/ADFBasePage.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | require 'calabash-cucumber/core' 16 | require 'calabash-cucumber/ibase' 17 | 18 | 19 | # A base class for all of the different pages within the app 20 | # Contains helper methods for convenience 21 | #class ADFBasePage < Calabash::Core 22 | class ADFBasePage < Calabash::IBase 23 | 24 | # Returns the current title of the toolbar 25 | def get_toolbar_title(name) 26 | "AppCompatTextView id:'toolbar_title' text:'#{name}'" 27 | end 28 | 29 | # Waits and checks to see if a specific element with an id exists within the view 30 | def check_if_id_exists(id) 31 | wait_for_element_exists("* id:'#{id}'") 32 | end 33 | 34 | # waits and checks if a specific element containing a specific test is within the view 35 | def check_if_id_contains_text(id, text) 36 | wait_for_element_exists("* id:'#{id}' {text CONTAINS[c] '#{text}'}") 37 | end 38 | 39 | def check_if_label_contains_text(text) 40 | check_element_exists("UILabel text:'#{text}'") 41 | end 42 | end -------------------------------------------------------------------------------- /features/ios/pages/alert_page.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | # The alert page 16 | class AlertPage < ADFBasePage 17 | # Ensures that the page is present by checking if it's title is displayed 18 | def trait 19 | get_toolbar_title('Alerts and Dialogues') 20 | end 21 | 22 | # Checks for modal alert message 23 | def check_for_modal_alert_page 24 | wait_for_element_exists("* text CONTAINS[c] 'toast'}") 25 | end 26 | 27 | # checks if alert is displayed 28 | def check_for_alert_message 29 | wait_for_element_exists("* {text CONTAINS[c] 'This is the alert message'}") 30 | end 31 | 32 | # Checks if alert dismissed 33 | def check_for_dismissed_alert 34 | wait_for_text_to_disappear('This is the alert message') 35 | end 36 | 37 | def check_modal_page_alert(arg1, arg2) 38 | wait_for_element_exists("UILabel text:'#{arg1}'") 39 | wait_for_element_exists("UIButtonLabel text:'#{arg2}'") 40 | end 41 | 42 | # checks if alert is displayed 43 | def check_for_alert_message(arg1, arg2) 44 | wait_for_element_exists("UILabel text:'#{arg1}'") 45 | wait_for_element_exists("UILabel text:'#{arg2}'") 46 | end 47 | 48 | def check_for_dismissed_modal_alert_page(arg) 49 | wait_for_element_does_not_exist("* text:'#{arg}'") 50 | end 51 | 52 | def check_for_dismissed_alert_message(arg) 53 | wait_for_element_does_not_exist("* text:'#{arg}'") 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /features/ios/pages/home_page.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | class HomePage < ADFBasePage 16 | # Ensures that the page is present by checking if it's title is displayed 17 | def trait 18 | get_toolbar_title('Homepage') 19 | end 20 | 21 | # Checks if all of the homepage's elements are within the view 22 | def assert_info_viewable 23 | #%w('Version 1').each do |value| 24 | # puts(value) 25 | check_if_label_contains_text('Version 1') 26 | #end 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /features/ios/pages/input_controls.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | include Calabash::Cucumber 16 | 17 | class InputControls < ADFBasePage 18 | def check_if_text_view_exists 19 | wait_for_element_exists("UITextView text:'I am a textview'") 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /features/ios/pages/login_page.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | class LoginPage < ADFBasePage 16 | # Ensures that the page is present by checking if it's title is displayed 17 | def trait 18 | get_toolbar_title('Login Page') 19 | end 20 | 21 | # Checks to see if the user name and password fields exist within the view 22 | def check_if_login_fields_exists 23 | wait_for_element_exists(user_name_field) 24 | wait_for_element_exists(password_field) 25 | end 26 | 27 | # checks if the login button exists within the view 28 | def check_if_login_button_exists 29 | wait_for_element_exists(login_button) 30 | end 31 | 32 | # Enters the credentials within the login form 33 | def enter_creds(username, password) 34 | touch("UITextField index:0") 35 | keyboard_enter_text(username) 36 | array = touch("UITextField index:1") 37 | keyboard_enter_text(password) 38 | tap_keyboard_action_key 39 | end 40 | 41 | # Checks to see if the logged in or login error text matches expected value 42 | def verify_alt_message (message) 43 | wait_for_element_exists("UILabel text:'#{message}'") 44 | end 45 | 46 | # Checks to see if the logged in or login error button text matches expected value 47 | def verify_alt_button_text (text) 48 | wait_for_element_exists("UIButtonLabel text:'#{text}'") 49 | end 50 | 51 | # The user name input id 52 | def user_name_field 53 | "UITextFieldLabel text:'Username'" 54 | end 55 | 56 | # The password input field id 57 | def password_field 58 | "UITextFieldLabel text:'Password'" 59 | end 60 | 61 | # The login button id 62 | def login_button 63 | "UIButtonLabel text:'Login'" 64 | end 65 | 66 | # The second screen's message id 67 | def alt_message_id 68 | 'login_alt_message_textView' 69 | end 70 | 71 | # The second screen logout/try again button id 72 | def alt_button_id 73 | 'alt_button' 74 | end 75 | 76 | end 77 | -------------------------------------------------------------------------------- /features/ios/pages/native_component.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | class NativeComponent < ADFBasePage 16 | # Ensures that the page is present by checking if its title is displayed 17 | def trait 18 | get_toolbar_title('Native Components') 19 | end 20 | 21 | # Checks if the image gridview exists within the view 22 | def check_for_image_gallery_grid 23 | wait_for_element_exists("ImageGalleryCollectionViewCell") 24 | end 25 | 26 | # Checks to see if the scrollview exists 27 | def check_for_scrollview 28 | wait_for_element_exists("UIScrollView") 29 | end 30 | 31 | # Checks to see if the movie is playing by checking its content description 32 | def check_for_movie_playing 33 | 34 | end 35 | 36 | # Checks to see if the camera preview is ongoing by checking its content description 37 | # Fails on devices with no camera support 38 | def check_for_camera_preview 39 | wait_for_element_exists("* id:'CameraView'") 40 | end 41 | 42 | # Scrolls to the content 43 | def scroll_to_see(content) 44 | scroll("UIScrollView", :up) 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /features/ios/pages/nested_view_page.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | class NestedViewPage < ADFBasePage 16 | # Ensures that the page is present by checking if it's title is displayed 17 | def trait 18 | get_toolbar_title('Nested') 19 | end 20 | 21 | # Navigates up 22 | def navigate_up 23 | touch("* contentDescription:'Navigate up'") 24 | end 25 | 26 | # Presses the back button for a specific amount of times 27 | def press_back_button_times(number_times) 28 | touch ("UILabel text:'Back'") 29 | end 30 | 31 | # Presses the next level back button a a specific amount of times 32 | def press_next_level_button(number_times) 33 | puts("Custom") 34 | number_times.to_i.times do 35 | tap_when_element_exists("* id:'back_navigation_next_button'") 36 | end 37 | end 38 | 39 | # Checks if the specified text is visible in the view 40 | def assert_info_viewable(text) 41 | check_if_label_contains_text(text) 42 | end 43 | 44 | def check_for_label_containing(text) 45 | wait_for_element_exists("UILabel text:'#{text}'") 46 | end 47 | 48 | end 49 | -------------------------------------------------------------------------------- /features/login_page.feature: -------------------------------------------------------------------------------- 1 | Feature: Login Page 2 | As a Device Farm user 3 | I would like to be able to see examples of testing a login page 4 | So I can apply it to my future tests. 5 | 6 | Background: Navigate to Login Page 7 | Given that I navigate to the "More" menu category 8 | And I select the "Login" option 9 | And I am on the Login Page 10 | Then I should see the login fields 11 | And I should see the login button 12 | 13 | @Login 14 | Scenario: Login Successfully 15 | When I type valid login credentials 16 | Then I should see the login message "Logged in as admin" 17 | And I should see the logout button with text "log out" 18 | And I take a screenshot 19 | When I press the "log out" button 20 | Then I should see the login fields 21 | And I should see the login button 22 | 23 | @InvalidLogin 24 | Scenario: Login Fail 25 | When I type invalid login credentials 26 | Then I should see the error message "PERMISSION DENIED" 27 | And I should see the try again button with text "try again" 28 | And I take a screenshot 29 | When I press the "try again" button 30 | Then I should see the login fields 31 | And I should see the login button 32 | -------------------------------------------------------------------------------- /features/native_components.feature: -------------------------------------------------------------------------------- 1 | Feature: Native Components 2 | As a Device Farm user 3 | I would like to be able to see examples of testing native components 4 | So I can apply it to my future tests. 5 | 6 | Background: Navigate to the Native Component Category 7 | Given that I navigate to the "Native" menu category 8 | And I am on the Native Component Page 9 | 10 | Scenario: Image Gallery 11 | When I select the "Image Gallery" label tile 12 | Then I should see the image gallery grid 13 | And I take a screenshot 14 | 15 | Scenario: Scroll View 16 | When I select the "Scrolling View" label tile 17 | Then I should see a scrollview 18 | And I scroll down 19 | And I take a screenshot 20 | 21 | @MediaPlayer 22 | Scenario: Media Player 23 | When I select the "Video Player" label tile 24 | Then I should see a movie playing 25 | And I take a screenshot 26 | 27 | # Scenario: Camera 28 | # When I select the "Camera" label tile 29 | # Then I should see a camera preview 30 | # And I take a screenshot 31 | 32 | @OutOfView 33 | Scenario: Out of View Content 34 | When I select the "Out of View Component" label tile 35 | Then I should scroll to see "This is hidden text" 36 | And I take a screenshot 37 | -------------------------------------------------------------------------------- /features/nested_page.feature: -------------------------------------------------------------------------------- 1 | Feature: Nested 2 | As a Device Farm user 3 | I would like to be able to see examples of testing nested views 4 | So I can apply it to my future tests. 5 | 6 | Background: Navigate to Nested View 7 | Given that I navigate to the "More" menu category 8 | And I select the "Nested" option 9 | And I am on the Nested View Page 10 | Then I should see text containing "This is the first view" 11 | 12 | @Navigate 13 | Scenario: Next Navigation 14 | When I press the "Next" button 15 | Then I should see text containing "This is the second view" 16 | When I press the "Next" button 17 | Then I should see text containing "This is the third view" 18 | When I press the "Next" button 19 | Then I should see text containing "This is the fourth view" 20 | And I take a screenshot 21 | 22 | @Back 23 | Scenario: Back Navigation 24 | When I press the "Next" button 25 | Then I should see label containing "This is the second view" 26 | When I press the "Next" button 27 | Then I should see label containing "This is the third view" 28 | When I press the "Next" button 29 | Then I should see label containing "This is the fourth view" 30 | When I select the "Back" label tile 31 | Then I should see label containing "This is the third view" 32 | When I select the "Back" label tile 33 | Then I should see label containing "This is the second view" 34 | When I select the "Back" label tile 35 | Then I should see label containing "This is the first view" 36 | And I take a screenshot 37 | -------------------------------------------------------------------------------- /features/network_test.feature: -------------------------------------------------------------------------------- 1 | Feature: Checking if a device has a internet connection 2 | As an Device Farm developer 3 | I want to verify that a device has internet 4 | So that users will be able to have connected test devices 5 | 6 | Scenario: Ping Google 7 | Given I am on the ADF Welcome Screen 8 | Then I touch "HTTP" 9 | Then I fill in "navigation bar" with "http://www.google.com" 10 | Then I touch the "Go" button 11 | And take picture 12 | -------------------------------------------------------------------------------- /features/step_definitions/alert_page.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | And(/^I am on the Alerts Page$/) do 16 | @current_page = page(AlertPage) 17 | # Sleep to give page time to fully render 18 | sleep(STEP_PAUSE) 19 | end 20 | 21 | Then(/^I should see the Modal Alert Page with text "([^"]*)" and button labelled "([^"]*)"$/) do |arg1, arg2| 22 | @current_page.check_modal_page_alert(arg1, arg2) 23 | end 24 | 25 | Then(/^I should see the Alert Message with text "([^"]*)" and button labelled "([^"]*)"$/) do |arg1, arg2| 26 | @current_page.check_for_alert_message(arg1, arg2) 27 | end 28 | 29 | Then(/^I should not see the Modal Alert Page with text "([^"]*)"$/) do |arg| 30 | @current_page.check_for_dismissed_modal_alert_page(arg) 31 | end 32 | 33 | Then(/^I should not see the Alert Message with text "([^"]*)"$/) do |arg| 34 | @current_page.check_for_dismissed_alert_message(arg) 35 | end 36 | -------------------------------------------------------------------------------- /features/step_definitions/calabash_steps.rb: -------------------------------------------------------------------------------- 1 | require 'calabash-cucumber/calabash_steps' -------------------------------------------------------------------------------- /features/step_definitions/creds.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | CREDS = { 16 | valid: { 17 | username: 'admin', 18 | password: 'password' 19 | }, 20 | invalid: { 21 | username: 'Wrong Username', 22 | password: '12345' 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /features/step_definitions/homepage.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | Given(/^I am on the Homepage$/) do 16 | @current_page = page(HomePage) 17 | end 18 | 19 | Then(/^I should see all the information$/) do 20 | @current_page.assert_info_viewable 21 | end 22 | 23 | Then(/^I take a screenshot$/) do 24 | screenshot_embed 25 | end 26 | -------------------------------------------------------------------------------- /features/step_definitions/input_controls.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | And(/^I am on the Input Controls page$/) do 16 | @current_page = page(InputControls) 17 | end 18 | 19 | Then(/^I should see a text view$/) do 20 | @current_page.check_if_text_view_exists 21 | end 22 | -------------------------------------------------------------------------------- /features/step_definitions/login_page.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | And(/^I am on the Login Page$/) do 16 | @current_page = page(LoginPage) 17 | end 18 | 19 | Then(/^I should see the login message "([^"]*)"$/) do |arg| 20 | @current_page.verify_alt_message (arg) 21 | end 22 | 23 | And(/^I should see the login button$/) do 24 | @current_page.check_if_login_button_exists 25 | end 26 | 27 | When(/^I type valid login credentials$/) do 28 | creds = CREDS[:valid] 29 | @current_page.enter_creds(creds[:username], creds[:password]) 30 | end 31 | 32 | And(/^I should see the logout button with text "([^"]*)"$/) do |arg| 33 | @current_page.verify_alt_button_text(arg) 34 | end 35 | 36 | When(/^I type invalid login credentials$/) do 37 | creds = CREDS[:invalid] 38 | @current_page.enter_creds(creds[:username], creds[:password]) 39 | end 40 | 41 | Then(/^I should see the error message "([^"]*)"$/) do |arg| 42 | @current_page.verify_alt_message(arg) 43 | end 44 | 45 | And(/^I should see the try again button with text "([^"]*)"$/) do |arg| 46 | @current_page.verify_alt_button_text(arg) 47 | end 48 | 49 | Then(/^I should see the login fields$/) do 50 | @current_page.check_if_login_fields_exists 51 | end 52 | -------------------------------------------------------------------------------- /features/step_definitions/native_components.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | And(/^I am on the Native Component Page$/) do 16 | @current_page = page(NativeComponent) 17 | end 18 | 19 | Then(/^I should see the image gallery grid$/) do 20 | @current_page.check_for_image_gallery_grid 21 | end 22 | 23 | Then(/^I should see a scrollview$/) do 24 | @current_page.check_for_scrollview 25 | end 26 | 27 | Then(/^I should see a movie playing$/) do 28 | @current_page.check_for_movie_playing 29 | end 30 | 31 | Then(/^I should see a camera preview$/) do 32 | @current_page.check_for_camera_preview 33 | end 34 | 35 | Then(/^I should scroll to see "([^"]*)"$/) do |arg| 36 | @current_page.scroll_to_see(arg) 37 | end 38 | -------------------------------------------------------------------------------- /features/step_definitions/navigation_steps.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | 16 | Given(/^that I navigate to the "([^"]*)" menu category$/) do |arg| 17 | touch ("UITabBarButtonLabel text:'#{arg}'") 18 | end 19 | 20 | Given(/^I select the "([^"]*)" option$/) do |arg| 21 | touch("UILabel text:'#{arg}'") 22 | end 23 | 24 | Given(/^I swipe to the "([^"]*)" tab$/) do |arg| 25 | @navigation = Navigator.new 26 | @navigation.navigate_to_page(arg) 27 | end 28 | 29 | Given(/^I select the "([^"]*)" label tile$/) do |arg| 30 | touch("UILabel text:'#{arg}'") 31 | end 32 | -------------------------------------------------------------------------------- /features/step_definitions/nested_views_page.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"). 5 | # You may not use this file except in compliance with the License. 6 | # A copy of the License is located at 7 | # 8 | # http://aws.amazon.com/apache2.0 9 | # 10 | # or in the "license" file accompanying this file. This file is distributed 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 | # express or implied. See the License for the specific language governing 13 | # permissions and limitations under the License. 14 | # 15 | And(/^I am on the Nested View Page$/) do 16 | @current_page = page(NestedViewPage) 17 | # Sleep to give page time to fully render 18 | sleep(STEP_PAUSE) 19 | end 20 | 21 | When(/^I navigate up$/) do 22 | @current_page.navigate_up 23 | end 24 | 25 | Then(/^I should see the "([^"]*)" number$/) do |arg| 26 | @current_page.verify_number(arg) 27 | end 28 | 29 | Then(/^I should see label containing "([^"]*)"$/) do |arg| 30 | @current_page.check_for_label_containing(arg) 31 | end 32 | 33 | When(/^I press the Back button (\d+)$/) do |arg| 34 | @current_page.press_back_button_times(arg) 35 | end 36 | 37 | When(/^I press the Next button (\d+)$/) do |arg| 38 | @current_page.press_next_level_button(arg) 39 | end 40 | -------------------------------------------------------------------------------- /features/step_definitions/network_test.rb: -------------------------------------------------------------------------------- 1 | Given /^I am on the ADF Welcome Screen$/ do 2 | element_exists("view") 3 | # Sleep to give page time to fully render 4 | sleep(STEP_PAUSE) 5 | end 6 | 7 | Then /^the webview should be loaded$/ do 8 | 9 | end 10 | 11 | Then /^I wait for the webview to load$/ do 12 | 13 | end 14 | -------------------------------------------------------------------------------- /features/support/01_launch.rb: -------------------------------------------------------------------------------- 1 | require 'calabash-cucumber/launcher' 2 | 3 | 4 | # APP_BUNDLE_PATH = "#{ENV['HOME']}/Library/Developer/Xcode/DerivedData/??/Build/Products/Calabash-iphonesimulator/??.app" 5 | # You may uncomment the above to overwrite the APP_BUNDLE_PATH 6 | # However the recommended approach is to let Calabash find the app itself 7 | # or set the environment variable APP_BUNDLE_PATH 8 | 9 | 10 | Before do |scenario| 11 | @calabash_launcher = Calabash::Cucumber::Launcher.new 12 | unless @calabash_launcher.calabash_no_launch? 13 | @calabash_launcher.relaunch 14 | @calabash_launcher.calabash_notify(self) 15 | end 16 | end 17 | 18 | After do |scenario| 19 | unless @calabash_launcher.calabash_no_stop? 20 | calabash_exit 21 | if @calabash_launcher.active? 22 | @calabash_launcher.stop 23 | end 24 | end 25 | end 26 | 27 | at_exit do 28 | launcher = Calabash::Cucumber::Launcher.new 29 | if launcher.simulator_target? 30 | launcher.simulator_launcher.stop unless launcher.calabash_no_stop? 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /features/support/02_pre_stop_hooks.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/features/support/02_pre_stop_hooks.rb -------------------------------------------------------------------------------- /features/support/env.rb: -------------------------------------------------------------------------------- 1 | # Requiring this file will import Calabash and the Calabash predefined Steps. 2 | require 'calabash-cucumber/cucumber' 3 | 4 | # To use Calabash without the predefined Calabash Steps, uncomment these 5 | # three lines and delete the require above. 6 | # require 'calabash-cucumber/wait_helpers' 7 | # require 'calabash-cucumber/operations' 8 | # World(Calabash::Cucumber::Operations) 9 | -------------------------------------------------------------------------------- /prebuilt/prebuiltSampleApp.ipa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/prebuilt/prebuiltSampleApp.ipa -------------------------------------------------------------------------------- /prebuilt/prebuiltXCUITests.ipa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/aws-device-farm-sample-app-for-ios/58e48234db510bd4fbf643643e8808c5d6a13845/prebuilt/prebuiltXCUITests.ipa --------------------------------------------------------------------------------