├── .azure-pipelines.yml ├── .eslintignore ├── .eslintrc ├── .github └── dependabot.yml ├── .gitignore ├── .npmrc ├── Default-568h@2x.png ├── LICENSE ├── README.md ├── Test App 2 ├── GestureTestViewController.h ├── GestureTestViewController.m ├── GestureTestViewController.xib ├── MyViewControllerViewController.h ├── MyViewControllerViewController.m ├── TA2AppDelegate.h ├── TA2AppDelegate.m ├── TestApp-Info.plist ├── TestApp-Prefix.pch ├── en.lproj │ ├── InfoPlist.strings │ ├── Localizable.strings │ └── MyViewControllerViewController.xib └── main.m ├── TestApp.xcodeproj ├── project.pbxproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── gulpfile.js ├── index.js └── package.json /.azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | # Starter pipeline 2 | # Start with a minimal pipeline that you can customize to build and deploy your code. 3 | # Add steps that build, run tests, deploy, and more: 4 | # https://aka.ms/yaml 5 | 6 | trigger: 7 | - master 8 | 9 | pool: 10 | vmImage: macOS-10.15 11 | 12 | steps: 13 | - task: NodeTool@0 14 | inputs: 15 | versionSpec: "12.x" 16 | - script: sudo xcode-select --switch "/Applications/Xcode_11.6.app/Contents/Developer" 17 | - script: npm install 18 | displayName: Xcode 11.6 19 | - script: sudo xcode-select --switch "/Applications/Xcode_12.4.app/Contents/Developer" 20 | - script: npm install 21 | displayName: Xcode 12.4 22 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build-js 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@appium/eslint-config-appium" 3 | } 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "11:00" 8 | open-pull-requests-limit: 10 9 | commit-message: 10 | prefix: "chore" 11 | include: "scope" 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | build 3 | build-js 4 | *.log 5 | .DS_Store 6 | xcuserdata 7 | package-lock.json* 8 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appium/ios-test-app/1768792d14f901a82ed8676d54fccf1036e0cd34/Default-568h@2x.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright JS Foundation and other contributors, https://js.foundation 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ios-test-app 2 | 3 | A simple test application for iOS, used by [Appium](https://github.com/appium/appium) for certain tests. 4 | 5 | ### Building 6 | 7 | `npm install` will build the app for a simulator. If you want also to build for 8 | a real device, set the environment variable `IOS_REAL_DEVICE` or `REAL_DEVICE` 9 | to a truthy value. 10 | 11 | ``` 12 | REAL_DEVICE=1 npm install 13 | ``` 14 | 15 | If any special build information is needed, the `XCCONFIG_FILE` environment 16 | variable can be set to the path to an `xcconfig` file. 17 | 18 | ## Watch 19 | 20 | ``` 21 | npm run watch 22 | ``` 23 | 24 | ## Test 25 | 26 | ``` 27 | npm test 28 | ``` 29 | -------------------------------------------------------------------------------- /Test App 2/GestureTestViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GestureTestViewController.h 3 | // TestApp 4 | // 5 | // Created by ThinkSys- Amit on 12/07/13. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface GestureTestViewController : UIViewController 13 | @property (retain, nonatomic) IBOutlet MKMapView *mapView; 14 | 15 | 16 | - (IBAction)handleRotation:(UIRotationGestureRecognizer*)sender; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Test App 2/GestureTestViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GestureTestViewController.m 3 | // TestApp 4 | // 5 | // Created by ThinkSys- Amit on 12/07/13. 6 | // 7 | // 8 | 9 | #import "GestureTestViewController.h" 10 | 11 | @interface GestureTestViewController () 12 | 13 | @end 14 | 15 | @implementation GestureTestViewController 16 | 17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 18 | { 19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 20 | if (self) { 21 | // Custom initialization 22 | } 23 | return self; 24 | } 25 | 26 | - (void)viewDidLoad 27 | { 28 | [super viewDidLoad]; 29 | // Do any additional setup after loading the view from its nib. 30 | } 31 | 32 | - (void)didReceiveMemoryWarning 33 | { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | - (IBAction)handleRotation:(UIRotationGestureRecognizer*)sender 39 | { 40 | NSLog(@"Rotation Starts"); 41 | sender.view.transform = CGAffineTransformRotate(sender.view.transform, sender.rotation); 42 | sender.rotation = 0; 43 | } 44 | - (void)dealloc { 45 | [_mapView release]; 46 | [super dealloc]; 47 | } 48 | @end 49 | -------------------------------------------------------------------------------- /Test App 2/GestureTestViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Test App 2/MyViewControllerViewController.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2012 Appium Committers 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | #import 23 | #import 24 | #import "GestureTestViewController.h" 25 | 26 | @interface MyViewControllerViewController : UIViewController 27 | @property (retain, nonatomic) IBOutlet UITextField *firstArg; 28 | @property (retain, nonatomic) IBOutlet UITextField *secondArg; 29 | @property (retain, nonatomic) IBOutlet UILabel *answerLabel; 30 | @property (retain, nonatomic) IBOutlet UISwitch *locationStatus; 31 | @property (retain, nonatomic) IBOutlet UIButton *computeSumButton; 32 | @property (nonatomic, retain) CLLocationManager *locationMgr; 33 | 34 | - (IBAction)testGesture:(id)sender; 35 | - (IBAction)computeAction:(id)sender; 36 | - (IBAction)showAlert:(id)sender; 37 | - (IBAction)crashApp:(id)sender; 38 | - (BOOL)textFieldShouldReturn:(UITextField *)textField; 39 | - (void)logLocationAuthFromTimer:(NSTimer *)timer; 40 | - (void)logLocationAuth; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /Test App 2/MyViewControllerViewController.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2012 Appium Committers 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | #import "MyViewControllerViewController.h" 23 | #import 24 | #import 25 | #import 26 | 27 | @interface MyViewControllerViewController () 28 | 29 | @end 30 | 31 | @implementation MyViewControllerViewController 32 | @synthesize computeSumButton; 33 | @synthesize answerLabel; 34 | @synthesize firstArg; 35 | @synthesize secondArg; 36 | @synthesize locationMgr; 37 | @synthesize locationStatus; 38 | 39 | 40 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 41 | { 42 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 43 | if (self) { 44 | // Custom initialization 45 | self.locationMgr = [[CLLocationManager alloc] init]; 46 | self.locationMgr.desiredAccuracy = kCLLocationAccuracyBest; 47 | self.locationMgr.delegate = self; 48 | [self logLocationAuth]; 49 | } 50 | 51 | return self; 52 | } 53 | 54 | - (IBAction)checkCalendarAuthorized:(id)sender { 55 | EKAuthorizationStatus status = [EKEventStore authorizationStatusForEntityType:(EKEntityTypeEvent)]; 56 | NSString *authorizationStatus; 57 | if (status == EKAuthorizationStatusAuthorized) { 58 | authorizationStatus = @"authorized"; 59 | } else { 60 | authorizationStatus = @"not authorized"; 61 | } 62 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Calendar Authorization Status" 63 | message:authorizationStatus 64 | delegate:nil 65 | cancelButtonTitle:@"Cancel" 66 | otherButtonTitles:@"OK", nil]; 67 | [alert show]; 68 | [alert release]; 69 | 70 | } 71 | 72 | - (void)viewDidLoad 73 | { 74 | [super viewDidLoad]; 75 | // Do any additional setup after loading the view from its nib. 76 | firstArg.returnKeyType = UIReturnKeyDone; 77 | secondArg.returnKeyType = UIReturnKeyDone; 78 | firstArg.delegate = self; 79 | secondArg.delegate = self; 80 | [NSTimer scheduledTimerWithTimeInterval:0.2 81 | target:self 82 | selector:@selector(logLocationAuthFromTimer:) 83 | userInfo:nil 84 | repeats:NO]; 85 | 86 | [firstArg setAccessibilityIdentifier:@"IntegerA"]; 87 | [secondArg setAccessibilityIdentifier:@"IntegerB"]; 88 | [computeSumButton setAccessibilityIdentifier:@"ComputeSumButton"]; 89 | [answerLabel setAccessibilityIdentifier:@"Answer"]; 90 | [locationStatus setAccessibilityIdentifier:@"locationStatus"]; 91 | 92 | computeSumButton.titleLabel.text = NSLocalizedString(@"main.button.computeSum", @"Compute Sum button"); 93 | } 94 | 95 | - (void)logLocationAuthFromTimer:(NSTimer *)timer 96 | { 97 | [self logLocationAuth]; 98 | } 99 | 100 | - (void)logLocationAuth 101 | { 102 | CLAuthorizationStatus status = [CLLocationManager authorizationStatus]; 103 | if (status != kCLAuthorizationStatusRestricted && status != kCLAuthorizationStatusDenied) { 104 | locationStatus.on = YES; 105 | } else { 106 | locationStatus.on = NO; 107 | } 108 | } 109 | 110 | - (void)viewDidUnload 111 | { 112 | [self setFirstArg:nil]; 113 | [self setSecondArg:nil]; 114 | [self setAnswerLabel:nil]; 115 | [self setLocationStatus:nil]; 116 | [super viewDidUnload]; 117 | // Release any retained subviews of the main view. 118 | // e.g. self.myOutlet = nil; 119 | } 120 | 121 | - (BOOL)textFieldShouldReturn:(UITextField *)textField { 122 | [textField resignFirstResponder]; 123 | return YES; 124 | } 125 | 126 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 127 | { 128 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 129 | } 130 | 131 | - (void)dealloc { 132 | [self.locationMgr release]; 133 | self.locationMgr = nil; 134 | [firstArg release]; 135 | [secondArg release]; 136 | [answerLabel release]; 137 | [computeSumButton release]; 138 | [super dealloc]; 139 | } 140 | - (IBAction)testGesture:(id)sender 141 | { 142 | GestureTestViewController *test = [[GestureTestViewController alloc] initWithNibName:@"GestureTestViewController" bundle:nil]; 143 | [self presentViewController:test animated:YES completion:NULL]; 144 | } 145 | 146 | - (IBAction)computeAction:(id)sender { 147 | int a = [[firstArg text] intValue]; 148 | int b = [[secondArg text] intValue]; 149 | int sum = a + b; 150 | NSString *newLabelValue = [NSString stringWithFormat:@"%d",sum]; 151 | [answerLabel setText:newLabelValue]; 152 | [answerLabel setAccessibilityLabel:newLabelValue]; 153 | } 154 | 155 | - (IBAction)showAlert:(id)sender { 156 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Cool title" 157 | message:@"this alert is so cool." 158 | delegate:nil 159 | cancelButtonTitle:@"Cancel" 160 | otherButtonTitles:@"OK", nil]; 161 | [alert show]; 162 | [alert release]; 163 | } 164 | 165 | - (IBAction)crashApp:(id)sender { 166 | abort(); 167 | } 168 | 169 | - (void)requestContactsPermission { 170 | ABAddressBookRef book = [MyViewControllerViewController addressBookForPermissionRequest]; 171 | [self popContactsPermissionDialogWithAddressBook:book]; 172 | } 173 | 174 | - (void)popContactsPermissionDialogWithAddressBook:(ABAddressBookRef)book { 175 | ABAddressBookRequestAccessWithCompletion(book, ^(bool granted, CFErrorRef error) { 176 | }); 177 | CFRelease (book); 178 | } 179 | 180 | + (ABAddressBookRef)addressBookForPermissionRequest { 181 | CFErrorRef error = NULL; 182 | return ABAddressBookCreateWithOptions(NULL, &error); 183 | } 184 | 185 | - (IBAction)accessContactsAlert:(id)sender { 186 | if ([MyViewControllerViewController addressBookAuthorizationStatus] == kABAuthorizationStatusNotDetermined) { 187 | [self requestContactsPermission]; 188 | } 189 | } 190 | 191 | - (IBAction)accessLocationAlert:(id)sender { 192 | CLLocationManager *locationManager = [[CLLocationManager alloc] init]; 193 | 194 | [locationManager startUpdatingLocation]; 195 | [locationManager stopUpdatingLocation]; 196 | } 197 | 198 | + (ABAuthorizationStatus)addressBookAuthorizationStatus { 199 | return ABAddressBookGetAuthorizationStatus(); 200 | } 201 | 202 | @end 203 | -------------------------------------------------------------------------------- /Test App 2/TA2AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2012 Appium Committers 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | #import 23 | 24 | @interface TA2AppDelegate : UIResponder 25 | 26 | @property (strong, nonatomic) UIWindow *window; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Test App 2/TA2AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2012 Appium Committers 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | #import "TA2AppDelegate.h" 23 | #import "MyViewControllerViewController.h" 24 | 25 | @interface TA2AppDelegate () 26 | 27 | @property (nonatomic, retain) UIViewController *myAddVC; 28 | @end 29 | 30 | @implementation TA2AppDelegate 31 | 32 | @synthesize window = _window; 33 | @synthesize myAddVC; 34 | 35 | 36 | 37 | 38 | - (void)dealloc 39 | { 40 | [_window release]; 41 | [super dealloc]; 42 | } 43 | 44 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 45 | { 46 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 47 | // Override point for customization after application launch. 48 | self.window.backgroundColor = [UIColor whiteColor]; 49 | [self.window makeKeyAndVisible]; 50 | 51 | self.myAddVC = [[MyViewControllerViewController alloc] init]; 52 | self.myAddVC.view.frame = self.window.bounds; 53 | [self.window setRootViewController:self.myAddVC]; 54 | 55 | return YES; 56 | } 57 | 58 | - (void)applicationWillResignActive:(UIApplication *)application 59 | { 60 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 61 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 62 | } 63 | 64 | - (void)applicationDidEnterBackground:(UIApplication *)application 65 | { 66 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 67 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 68 | } 69 | 70 | - (void)applicationWillEnterForeground:(UIApplication *)application 71 | { 72 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 73 | } 74 | 75 | - (void)applicationDidBecomeActive:(UIApplication *)application 76 | { 77 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 78 | } 79 | 80 | - (void)applicationWillTerminate:(UIApplication *)application 81 | { 82 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /Test App 2/TestApp-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | io.appium.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleURLTypes 24 | 25 | 26 | CFBundleTypeRole 27 | Editor 28 | CFBundleURLName 29 | io.appium.TestApp 30 | CFBundleURLSchemes 31 | 32 | testapp 33 | 34 | 35 | 36 | CFBundleVersion 37 | 1.0 38 | LSRequiresIPhoneOS 39 | 40 | UIApplicationExitsOnSuspend 41 | 42 | UIRequiredDeviceCapabilities 43 | 44 | armv7 45 | 46 | UISupportedInterfaceOrientations 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Test App 2/TestApp-Prefix.pch: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | #import 21 | 22 | #ifndef __IPHONE_3_0 23 | #warning "This project uses features only available in iOS SDK 3.0 and later." 24 | #endif 25 | 26 | #ifdef __OBJC__ 27 | #import 28 | #import 29 | #endif 30 | -------------------------------------------------------------------------------- /Test App 2/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /** 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | /* Localized versions of Info.plist keys */ 21 | 22 | -------------------------------------------------------------------------------- /Test App 2/en.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/appium/ios-test-app/1768792d14f901a82ed8676d54fccf1036e0cd34/Test App 2/en.lproj/Localizable.strings -------------------------------------------------------------------------------- /Test App 2/en.lproj/MyViewControllerViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 55 | 65 | 73 | 74 | 75 | 76 | 77 | 78 | 86 | 97 | 107 | 117 | 130 | 131 | 132 | 133 | 134 | 135 | 145 | 155 | 166 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /Test App 2/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2012 Appium Committers 3 | * 4 | * Licensed to the Apache Software Foundation (ASF) under one 5 | * or more contributor license agreements. See the NOTICE file 6 | * distributed with this work for additional information 7 | * regarding copyright ownership. The ASF licenses this file 8 | * to you under the Apache License, Version 2.0 (the 9 | * "License"); you may not use this file except in compliance 10 | * with the License. You may obtain a copy of the License at 11 | * 12 | * http://www.apache.org/licenses/LICENSE-2.0 13 | * 14 | * Unless required by applicable law or agreed to in writing, 15 | * software distributed under the License is distributed on an 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 | * KIND, either express or implied. See the License for the 18 | * specific language governing permissions and limitations 19 | * under the License. 20 | */ 21 | 22 | #import 23 | 24 | #import "TA2AppDelegate.h" 25 | 26 | int main(int argc, char *argv[]) 27 | { 28 | @autoreleasepool { 29 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([TA2AppDelegate class])); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /TestApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 47; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0FD861CB19A2933400F753B7 /* MyViewControllerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0FD861CD19A2933400F753B7 /* MyViewControllerViewController.xib */; }; 11 | 1BB2B952189053DC00D0591D /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1BB2B951189053DC00D0591D /* CoreLocation.framework */; }; 12 | 255BAFEC1790223300DE7158 /* GestureTestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 255BAFEA1790223300DE7158 /* GestureTestViewController.m */; }; 13 | 255BAFED1790223300DE7158 /* GestureTestViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 255BAFEB1790223300DE7158 /* GestureTestViewController.xib */; }; 14 | 255BAFEF1790249F00DE7158 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 255BAFEE1790249F00DE7158 /* MapKit.framework */; }; 15 | 3647AE1315CA0082006F70D6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3647AE1215CA0082006F70D6 /* UIKit.framework */; }; 16 | 3647AE1515CA0082006F70D6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3647AE1415CA0082006F70D6 /* Foundation.framework */; }; 17 | 3647AE1715CA0082006F70D6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3647AE1615CA0082006F70D6 /* CoreGraphics.framework */; }; 18 | 3647AE1D15CA0082006F70D6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3647AE1B15CA0082006F70D6 /* InfoPlist.strings */; }; 19 | 3647AE1F15CA0082006F70D6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3647AE1E15CA0082006F70D6 /* main.m */; }; 20 | 3647AE2315CA0082006F70D6 /* TA2AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3647AE2215CA0082006F70D6 /* TA2AppDelegate.m */; }; 21 | 3647AE2C15CA00D5006F70D6 /* MyViewControllerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3647AE2A15CA00D5006F70D6 /* MyViewControllerViewController.m */; }; 22 | 36FEEFEE1656DD6000100C04 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 36FEEFED1656DD6000100C04 /* Default-568h@2x.png */; }; 23 | 8A7C969E1E6F8E38006281C9 /* EventKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8A7C969D1E6F8E38006281C9 /* EventKit.framework */; }; 24 | ABB96E8E192ECF150022BE43 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = ABB96E8C192ECF150022BE43 /* Localizable.strings */; }; 25 | EA040B6118D3DF5E00AC02D8 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EA040B6018D3DF5E00AC02D8 /* AddressBook.framework */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 0FD861CC19A2933400F753B7 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MyViewControllerViewController.xib; sourceTree = ""; }; 30 | 1BB2B951189053DC00D0591D /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; 31 | 255BAFE91790223300DE7158 /* GestureTestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GestureTestViewController.h; sourceTree = ""; }; 32 | 255BAFEA1790223300DE7158 /* GestureTestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GestureTestViewController.m; sourceTree = ""; }; 33 | 255BAFEB1790223300DE7158 /* GestureTestViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GestureTestViewController.xib; sourceTree = ""; }; 34 | 255BAFEE1790249F00DE7158 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 35 | 3647AE0E15CA0082006F70D6 /* TestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 3647AE1215CA0082006F70D6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 37 | 3647AE1415CA0082006F70D6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 38 | 3647AE1615CA0082006F70D6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 39 | 3647AE1A15CA0082006F70D6 /* TestApp-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TestApp-Info.plist"; sourceTree = ""; }; 40 | 3647AE1C15CA0082006F70D6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 41 | 3647AE1E15CA0082006F70D6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 42 | 3647AE2015CA0082006F70D6 /* TestApp-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TestApp-Prefix.pch"; sourceTree = ""; }; 43 | 3647AE2115CA0082006F70D6 /* TA2AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TA2AppDelegate.h; sourceTree = ""; }; 44 | 3647AE2215CA0082006F70D6 /* TA2AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TA2AppDelegate.m; sourceTree = ""; }; 45 | 3647AE2915CA00D5006F70D6 /* MyViewControllerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyViewControllerViewController.h; sourceTree = ""; }; 46 | 3647AE2A15CA00D5006F70D6 /* MyViewControllerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyViewControllerViewController.m; sourceTree = ""; }; 47 | 36FEEFED1656DD6000100C04 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 48 | 8A7C969D1E6F8E38006281C9 /* EventKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = EventKit.framework; path = System/Library/Frameworks/EventKit.framework; sourceTree = SDKROOT; }; 49 | ABB96E8D192ECF150022BE43 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 50 | EA040B6018D3DF5E00AC02D8 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; 51 | /* End PBXFileReference section */ 52 | 53 | /* Begin PBXFrameworksBuildPhase section */ 54 | 3647AE0B15CA0082006F70D6 /* Frameworks */ = { 55 | isa = PBXFrameworksBuildPhase; 56 | buildActionMask = 2147483647; 57 | files = ( 58 | 8A7C969E1E6F8E38006281C9 /* EventKit.framework in Frameworks */, 59 | EA040B6118D3DF5E00AC02D8 /* AddressBook.framework in Frameworks */, 60 | 1BB2B952189053DC00D0591D /* CoreLocation.framework in Frameworks */, 61 | 255BAFEF1790249F00DE7158 /* MapKit.framework in Frameworks */, 62 | 3647AE1315CA0082006F70D6 /* UIKit.framework in Frameworks */, 63 | 3647AE1515CA0082006F70D6 /* Foundation.framework in Frameworks */, 64 | 3647AE1715CA0082006F70D6 /* CoreGraphics.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 3647AE0315CA0082006F70D6 = { 72 | isa = PBXGroup; 73 | children = ( 74 | 255BAFEE1790249F00DE7158 /* MapKit.framework */, 75 | 36FEEFED1656DD6000100C04 /* Default-568h@2x.png */, 76 | 3647AE1815CA0082006F70D6 /* TestApp */, 77 | 3647AE1115CA0082006F70D6 /* Frameworks */, 78 | 3647AE0F15CA0082006F70D6 /* Products */, 79 | ); 80 | sourceTree = ""; 81 | }; 82 | 3647AE0F15CA0082006F70D6 /* Products */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 3647AE0E15CA0082006F70D6 /* TestApp.app */, 86 | ); 87 | name = Products; 88 | sourceTree = ""; 89 | }; 90 | 3647AE1115CA0082006F70D6 /* Frameworks */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 8A7C969D1E6F8E38006281C9 /* EventKit.framework */, 94 | EA040B6018D3DF5E00AC02D8 /* AddressBook.framework */, 95 | 1BB2B951189053DC00D0591D /* CoreLocation.framework */, 96 | 3647AE1215CA0082006F70D6 /* UIKit.framework */, 97 | 3647AE1415CA0082006F70D6 /* Foundation.framework */, 98 | 3647AE1615CA0082006F70D6 /* CoreGraphics.framework */, 99 | ); 100 | name = Frameworks; 101 | sourceTree = ""; 102 | }; 103 | 3647AE1815CA0082006F70D6 /* TestApp */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 3647AE2115CA0082006F70D6 /* TA2AppDelegate.h */, 107 | 3647AE2215CA0082006F70D6 /* TA2AppDelegate.m */, 108 | 3647AE1915CA0082006F70D6 /* Supporting Files */, 109 | 3647AE2915CA00D5006F70D6 /* MyViewControllerViewController.h */, 110 | 3647AE2A15CA00D5006F70D6 /* MyViewControllerViewController.m */, 111 | 0FD861CD19A2933400F753B7 /* MyViewControllerViewController.xib */, 112 | 255BAFE91790223300DE7158 /* GestureTestViewController.h */, 113 | 255BAFEA1790223300DE7158 /* GestureTestViewController.m */, 114 | 255BAFEB1790223300DE7158 /* GestureTestViewController.xib */, 115 | ); 116 | name = TestApp; 117 | path = "Test App 2"; 118 | sourceTree = ""; 119 | }; 120 | 3647AE1915CA0082006F70D6 /* Supporting Files */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 3647AE1A15CA0082006F70D6 /* TestApp-Info.plist */, 124 | ABB96E8C192ECF150022BE43 /* Localizable.strings */, 125 | 3647AE1B15CA0082006F70D6 /* InfoPlist.strings */, 126 | 3647AE1E15CA0082006F70D6 /* main.m */, 127 | 3647AE2015CA0082006F70D6 /* TestApp-Prefix.pch */, 128 | ); 129 | name = "Supporting Files"; 130 | sourceTree = ""; 131 | }; 132 | /* End PBXGroup section */ 133 | 134 | /* Begin PBXNativeTarget section */ 135 | 3647AE0D15CA0082006F70D6 /* TestApp */ = { 136 | isa = PBXNativeTarget; 137 | buildConfigurationList = 3647AE2615CA0082006F70D6 /* Build configuration list for PBXNativeTarget "TestApp" */; 138 | buildPhases = ( 139 | 3647AE0A15CA0082006F70D6 /* Sources */, 140 | 3647AE0B15CA0082006F70D6 /* Frameworks */, 141 | 3647AE0C15CA0082006F70D6 /* Resources */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = TestApp; 148 | productName = "Test App 2"; 149 | productReference = 3647AE0E15CA0082006F70D6 /* TestApp.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | /* End PBXNativeTarget section */ 153 | 154 | /* Begin PBXProject section */ 155 | 3647AE0515CA0082006F70D6 /* Project object */ = { 156 | isa = PBXProject; 157 | attributes = { 158 | CLASSPREFIX = TA2; 159 | LastUpgradeCheck = 0820; 160 | }; 161 | buildConfigurationList = 3647AE0815CA0082006F70D6 /* Build configuration list for PBXProject "TestApp" */; 162 | compatibilityVersion = "Xcode 6.3"; 163 | developmentRegion = English; 164 | hasScannedForEncodings = 0; 165 | knownRegions = ( 166 | en, 167 | ); 168 | mainGroup = 3647AE0315CA0082006F70D6; 169 | productRefGroup = 3647AE0F15CA0082006F70D6 /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 3647AE0D15CA0082006F70D6 /* TestApp */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 3647AE0C15CA0082006F70D6 /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | ABB96E8E192ECF150022BE43 /* Localizable.strings in Resources */, 184 | 3647AE1D15CA0082006F70D6 /* InfoPlist.strings in Resources */, 185 | 0FD861CB19A2933400F753B7 /* MyViewControllerViewController.xib in Resources */, 186 | 36FEEFEE1656DD6000100C04 /* Default-568h@2x.png in Resources */, 187 | 255BAFED1790223300DE7158 /* GestureTestViewController.xib in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXSourcesBuildPhase section */ 194 | 3647AE0A15CA0082006F70D6 /* Sources */ = { 195 | isa = PBXSourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | 3647AE1F15CA0082006F70D6 /* main.m in Sources */, 199 | 3647AE2315CA0082006F70D6 /* TA2AppDelegate.m in Sources */, 200 | 3647AE2C15CA00D5006F70D6 /* MyViewControllerViewController.m in Sources */, 201 | 255BAFEC1790223300DE7158 /* GestureTestViewController.m in Sources */, 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | }; 205 | /* End PBXSourcesBuildPhase section */ 206 | 207 | /* Begin PBXVariantGroup section */ 208 | 0FD861CD19A2933400F753B7 /* MyViewControllerViewController.xib */ = { 209 | isa = PBXVariantGroup; 210 | children = ( 211 | 0FD861CC19A2933400F753B7 /* en */, 212 | ); 213 | name = MyViewControllerViewController.xib; 214 | sourceTree = ""; 215 | }; 216 | 3647AE1B15CA0082006F70D6 /* InfoPlist.strings */ = { 217 | isa = PBXVariantGroup; 218 | children = ( 219 | 3647AE1C15CA0082006F70D6 /* en */, 220 | ); 221 | name = InfoPlist.strings; 222 | sourceTree = ""; 223 | }; 224 | ABB96E8C192ECF150022BE43 /* Localizable.strings */ = { 225 | isa = PBXVariantGroup; 226 | children = ( 227 | ABB96E8D192ECF150022BE43 /* en */, 228 | ); 229 | name = Localizable.strings; 230 | sourceTree = ""; 231 | }; 232 | /* End PBXVariantGroup section */ 233 | 234 | /* Begin XCBuildConfiguration section */ 235 | 3647AE2415CA0082006F70D6 /* Debug */ = { 236 | isa = XCBuildConfiguration; 237 | buildSettings = { 238 | ALWAYS_SEARCH_USER_PATHS = NO; 239 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 240 | CLANG_WARN_BOOL_CONVERSION = YES; 241 | CLANG_WARN_COMMA = YES; 242 | CLANG_WARN_CONSTANT_CONVERSION = YES; 243 | CLANG_WARN_EMPTY_BODY = YES; 244 | CLANG_WARN_ENUM_CONVERSION = YES; 245 | CLANG_WARN_INFINITE_RECURSION = YES; 246 | CLANG_WARN_INT_CONVERSION = YES; 247 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 248 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 249 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 250 | CLANG_WARN_STRICT_PROTOTYPES = YES; 251 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 252 | CLANG_WARN_UNREACHABLE_CODE = YES; 253 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 254 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 255 | COPY_PHASE_STRIP = NO; 256 | ENABLE_STRICT_OBJC_MSGSEND = YES; 257 | ENABLE_TESTABILITY = YES; 258 | GCC_C_LANGUAGE_STANDARD = gnu99; 259 | GCC_DYNAMIC_NO_PIC = NO; 260 | GCC_NO_COMMON_BLOCKS = YES; 261 | GCC_OPTIMIZATION_LEVEL = 0; 262 | GCC_PREPROCESSOR_DEFINITIONS = ( 263 | "DEBUG=1", 264 | "$(inherited)", 265 | ); 266 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 267 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 268 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 269 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | ONLY_ACTIVE_ARCH = YES; 277 | SDKROOT = iphoneos; 278 | }; 279 | name = Debug; 280 | }; 281 | 3647AE2515CA0082006F70D6 /* Release */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 286 | CLANG_WARN_BOOL_CONVERSION = YES; 287 | CLANG_WARN_COMMA = YES; 288 | CLANG_WARN_CONSTANT_CONVERSION = YES; 289 | CLANG_WARN_EMPTY_BODY = YES; 290 | CLANG_WARN_ENUM_CONVERSION = YES; 291 | CLANG_WARN_INFINITE_RECURSION = YES; 292 | CLANG_WARN_INT_CONVERSION = YES; 293 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 294 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 295 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 296 | CLANG_WARN_STRICT_PROTOTYPES = YES; 297 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 298 | CLANG_WARN_UNREACHABLE_CODE = YES; 299 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 300 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 301 | COPY_PHASE_STRIP = NO; 302 | ENABLE_STRICT_OBJC_MSGSEND = YES; 303 | GCC_C_LANGUAGE_STANDARD = gnu99; 304 | GCC_NO_COMMON_BLOCKS = YES; 305 | GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; 306 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 307 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 308 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO; 309 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 310 | GCC_WARN_UNDECLARED_SELECTOR = YES; 311 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 312 | GCC_WARN_UNUSED_FUNCTION = YES; 313 | GCC_WARN_UNUSED_VARIABLE = YES; 314 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 315 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 316 | SDKROOT = iphoneos; 317 | VALIDATE_PRODUCT = YES; 318 | }; 319 | name = Release; 320 | }; 321 | 3647AE2715CA0082006F70D6 /* Debug */ = { 322 | isa = XCBuildConfiguration; 323 | buildSettings = { 324 | CODE_SIGN_IDENTITY = "iPhone Developer"; 325 | DEVELOPMENT_TEAM = ""; 326 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 327 | GCC_PREFIX_HEADER = "Test App 2/TestApp-Prefix.pch"; 328 | INFOPLIST_FILE = "Test App 2/TestApp-Info.plist"; 329 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 330 | PRODUCT_BUNDLE_IDENTIFIER = io.appium.TestApp; 331 | PRODUCT_NAME = TestApp; 332 | PROVISIONING_PROFILE = ""; 333 | WRAPPER_EXTENSION = app; 334 | }; 335 | name = Debug; 336 | }; 337 | 3647AE2815CA0082006F70D6 /* Release */ = { 338 | isa = XCBuildConfiguration; 339 | buildSettings = { 340 | CODE_SIGN_IDENTITY = "iPhone Developer"; 341 | DEVELOPMENT_TEAM = ""; 342 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 343 | GCC_PREFIX_HEADER = "Test App 2/TestApp-Prefix.pch"; 344 | INFOPLIST_FILE = "Test App 2/TestApp-Info.plist"; 345 | INSTALL_PATH = "${LOCAL_APPS_DIR}"; 346 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 347 | PRODUCT_BUNDLE_IDENTIFIER = io.appium.TestApp; 348 | PRODUCT_NAME = TestApp; 349 | PROVISIONING_PROFILE = ""; 350 | WRAPPER_EXTENSION = app; 351 | }; 352 | name = Release; 353 | }; 354 | /* End XCBuildConfiguration section */ 355 | 356 | /* Begin XCConfigurationList section */ 357 | 3647AE0815CA0082006F70D6 /* Build configuration list for PBXProject "TestApp" */ = { 358 | isa = XCConfigurationList; 359 | buildConfigurations = ( 360 | 3647AE2415CA0082006F70D6 /* Debug */, 361 | 3647AE2515CA0082006F70D6 /* Release */, 362 | ); 363 | defaultConfigurationIsVisible = 0; 364 | defaultConfigurationName = Release; 365 | }; 366 | 3647AE2615CA0082006F70D6 /* Build configuration list for PBXNativeTarget "TestApp" */ = { 367 | isa = XCConfigurationList; 368 | buildConfigurations = ( 369 | 3647AE2715CA0082006F70D6 /* Debug */, 370 | 3647AE2815CA0082006F70D6 /* Release */, 371 | ); 372 | defaultConfigurationIsVisible = 0; 373 | defaultConfigurationName = Release; 374 | }; 375 | /* End XCConfigurationList section */ 376 | }; 377 | rootObject = 3647AE0515CA0082006F70D6 /* Project object */; 378 | } 379 | -------------------------------------------------------------------------------- /TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const gulp = require('gulp'); 4 | const boilerplate = require('@appium/gulp-plugins').boilerplate.use(gulp); 5 | const { relative } = require('.'); 6 | 7 | 8 | boilerplate({ 9 | build: 'ios-test-app', 10 | projectRoot: __dirname, 11 | transpile: false, 12 | iosApps: { 13 | relativeLocations: { 14 | iphoneos: relative.iphoneos, 15 | iphonesimulator: relative.iphonesimulator, 16 | }, 17 | appName: 'TestApp.app', 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | 6 | const relative = { 7 | iphoneos: 'build/Release-iphoneos/TestApp-iphoneos.app', 8 | iphonesimulator: 'build/Release-iphonesimulator/TestApp-iphonesimulator.app' 9 | }; 10 | 11 | const absolute = { 12 | iphoneos: path.resolve('build', 'Release-iphoneos', 'TestApp-iphoneos.app'), 13 | iphonesimulator: path.resolve('build', 'Release-iphonesimulator', 'TestApp-iphonesimulator.app') 14 | }; 15 | 16 | module.exports = { 17 | relative, 18 | absolute, 19 | }; 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ios-test-app", 3 | "description": "iOS app for testing", 4 | "keywords": [ 5 | "appium", 6 | "ios", 7 | "testapp" 8 | ], 9 | "version": "3.1.0", 10 | "author": "appium", 11 | "license": "Apache-2.0", 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/appium/ios-test-app.git" 15 | }, 16 | "bugs": { 17 | "url": "https://github.com/appium/ios-test-app/issues" 18 | }, 19 | "engines": { 20 | "node": ">=12" 21 | }, 22 | "os": [ 23 | "darwin" 24 | ], 25 | "main": "index.js", 26 | "bin": {}, 27 | "directories": { 28 | "lib": "lib" 29 | }, 30 | "files": [ 31 | "Default-568h@2x.png", 32 | "gulpfile.js", 33 | "index.js", 34 | "lib", 35 | "Test App 2", 36 | "TestApp.xcodeproj" 37 | ], 38 | "dependencies": { 39 | "gulp": "^4.0.0" 40 | }, 41 | "scripts": { 42 | "clean": "rm -rf node_modules && rm -f package-lock.json && npm install", 43 | "build": "gulp ios-apps:install", 44 | "install": "gulp ios-apps:install", 45 | "test": "gulp once", 46 | "watch": "gulp watch", 47 | "lint": "gulp lint", 48 | "lint:fix": "gulp lint --fix", 49 | "precommit-msg": "echo 'Pre-commit checks...' && exit 0", 50 | "precommit-test": "gulp lint" 51 | }, 52 | "pre-commit": [ 53 | "precommit-msg", 54 | "precommit-test" 55 | ], 56 | "devDependencies": { 57 | "@appium/eslint-config-appium": "^8.0.0", 58 | "@appium/gulp-plugins": "^8.0.0", 59 | "eslint-config-prettier": "^8.5.0", 60 | "pre-commit": "^1.2.2" 61 | } 62 | } 63 | --------------------------------------------------------------------------------