├── .gitignore ├── LICENSE ├── README.md ├── SlaloML.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── SlaloML ├── 20171211_224011963_iOS.jpg ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── BuildCyan.colorset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── CameraViewController.swift ├── Info.plist ├── SlalomLogoClassifier.mlmodel ├── Utilities.swift └── ViewController.swift ├── SlaloMLTests ├── Info.plist └── SlaloMLTests.swift └── SlaloMLUITests ├── Info.plist └── SlaloMLUITests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | .DS_Store 21 | 22 | ## Other 23 | *.moved-aside 24 | *.xccheckout 25 | *.xcscmblueprint 26 | 27 | ## Obj-C/Swift specific 28 | *.hmap 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | .build/ 43 | 44 | # CocoaPods 45 | # 46 | # We recommend against adding the Pods directory to your .gitignore. However 47 | # you should judge for yourself, the pros and cons are mentioned at: 48 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 49 | # 50 | # Pods/ 51 | 52 | # Carthage 53 | # 54 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 55 | # Carthage/Checkouts 56 | 57 | Carthage/Build 58 | 59 | # fastlane 60 | # 61 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 62 | # screenshots whenever they are needed. 63 | # For more information about the recommended setup visit: 64 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 65 | 66 | fastlane/report.xml 67 | fastlane/Preview.html 68 | fastlane/screenshots 69 | fastlane/test_output 70 | -------------------------------------------------------------------------------- /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 [yyyy] [name of copyright owner] 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 | # Object Detection with CoreML and Xcode 10.x 2 | 3 | A project building in Xcode 10 that uses a trained model from Turi Create 5.x to detect an object in an iOS app using CoreML and Vision 4 | 5 | [Blog post with details](https://blog.ichibod.com/posts/2019/04/15/coreml-machine-learning-for-2019/) 6 | -------------------------------------------------------------------------------- /SlaloML.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DA36215F206D599400F35969 /* SlalomLogoClassifier.mlmodel in Sources */ = {isa = PBXBuildFile; fileRef = DADC60981FE0250300C8DBFB /* SlalomLogoClassifier.mlmodel */; }; 11 | DA4E065B1FEB0FFB005AA17B /* CameraViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA4E065A1FEB0FFB005AA17B /* CameraViewController.swift */; }; 12 | DAACEF981FE9B44400C059CB /* 20171211_224011963_iOS.jpg in Resources */ = {isa = PBXBuildFile; fileRef = DAACEF971FE9B44400C059CB /* 20171211_224011963_iOS.jpg */; }; 13 | DADC60691FE024E000C8DBFB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DADC60681FE024E000C8DBFB /* AppDelegate.swift */; }; 14 | DADC606B1FE024E000C8DBFB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DADC606A1FE024E000C8DBFB /* ViewController.swift */; }; 15 | DADC606E1FE024E000C8DBFB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DADC606C1FE024E000C8DBFB /* Main.storyboard */; }; 16 | DADC60701FE024E000C8DBFB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DADC606F1FE024E000C8DBFB /* Assets.xcassets */; }; 17 | DADC60731FE024E000C8DBFB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DADC60711FE024E000C8DBFB /* LaunchScreen.storyboard */; }; 18 | DADC607E1FE024E000C8DBFB /* SlaloMLTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DADC607D1FE024E000C8DBFB /* SlaloMLTests.swift */; }; 19 | DADC60891FE024E000C8DBFB /* SlaloMLUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DADC60881FE024E000C8DBFB /* SlaloMLUITests.swift */; }; 20 | DADC609F1FE0352E00C8DBFB /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = DADC609E1FE0352E00C8DBFB /* Utilities.swift */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | DADC607A1FE024E000C8DBFB /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = DADC605D1FE024E000C8DBFB /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = DADC60641FE024E000C8DBFB; 29 | remoteInfo = SlaloML; 30 | }; 31 | DADC60851FE024E000C8DBFB /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = DADC605D1FE024E000C8DBFB /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = DADC60641FE024E000C8DBFB; 36 | remoteInfo = SlaloML; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | DA4E065A1FEB0FFB005AA17B /* CameraViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CameraViewController.swift; sourceTree = ""; }; 42 | DAACEF971FE9B44400C059CB /* 20171211_224011963_iOS.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 20171211_224011963_iOS.jpg; sourceTree = ""; }; 43 | DADC60651FE024E000C8DBFB /* SlaloML.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SlaloML.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | DADC60681FE024E000C8DBFB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | DADC606A1FE024E000C8DBFB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 46 | DADC606D1FE024E000C8DBFB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | DADC606F1FE024E000C8DBFB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 48 | DADC60721FE024E000C8DBFB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 49 | DADC60741FE024E000C8DBFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | DADC60791FE024E000C8DBFB /* SlaloMLTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SlaloMLTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | DADC607D1FE024E000C8DBFB /* SlaloMLTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlaloMLTests.swift; sourceTree = ""; }; 52 | DADC607F1FE024E000C8DBFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | DADC60841FE024E000C8DBFB /* SlaloMLUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SlaloMLUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | DADC60881FE024E000C8DBFB /* SlaloMLUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SlaloMLUITests.swift; sourceTree = ""; }; 55 | DADC608A1FE024E000C8DBFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | DADC60981FE0250300C8DBFB /* SlalomLogoClassifier.mlmodel */ = {isa = PBXFileReference; lastKnownFileType = file.mlmodel; path = SlalomLogoClassifier.mlmodel; sourceTree = ""; }; 57 | DADC609E1FE0352E00C8DBFB /* Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | DADC60621FE024E000C8DBFB /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | DADC60761FE024E000C8DBFB /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | DADC60811FE024E000C8DBFB /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | ); 80 | runOnlyForDeploymentPostprocessing = 0; 81 | }; 82 | /* End PBXFrameworksBuildPhase section */ 83 | 84 | /* Begin PBXGroup section */ 85 | DADC605C1FE024E000C8DBFB = { 86 | isa = PBXGroup; 87 | children = ( 88 | DADC60671FE024E000C8DBFB /* SlaloML */, 89 | DADC607C1FE024E000C8DBFB /* SlaloMLTests */, 90 | DADC60871FE024E000C8DBFB /* SlaloMLUITests */, 91 | DADC60661FE024E000C8DBFB /* Products */, 92 | ); 93 | sourceTree = ""; 94 | }; 95 | DADC60661FE024E000C8DBFB /* Products */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | DADC60651FE024E000C8DBFB /* SlaloML.app */, 99 | DADC60791FE024E000C8DBFB /* SlaloMLTests.xctest */, 100 | DADC60841FE024E000C8DBFB /* SlaloMLUITests.xctest */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | DADC60671FE024E000C8DBFB /* SlaloML */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | DADC60981FE0250300C8DBFB /* SlalomLogoClassifier.mlmodel */, 109 | DAACEF971FE9B44400C059CB /* 20171211_224011963_iOS.jpg */, 110 | DADC60681FE024E000C8DBFB /* AppDelegate.swift */, 111 | DADC606A1FE024E000C8DBFB /* ViewController.swift */, 112 | DA4E065A1FEB0FFB005AA17B /* CameraViewController.swift */, 113 | DADC609E1FE0352E00C8DBFB /* Utilities.swift */, 114 | DADC606C1FE024E000C8DBFB /* Main.storyboard */, 115 | DADC606F1FE024E000C8DBFB /* Assets.xcassets */, 116 | DADC60711FE024E000C8DBFB /* LaunchScreen.storyboard */, 117 | DADC60741FE024E000C8DBFB /* Info.plist */, 118 | ); 119 | path = SlaloML; 120 | sourceTree = ""; 121 | }; 122 | DADC607C1FE024E000C8DBFB /* SlaloMLTests */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | DADC607D1FE024E000C8DBFB /* SlaloMLTests.swift */, 126 | DADC607F1FE024E000C8DBFB /* Info.plist */, 127 | ); 128 | path = SlaloMLTests; 129 | sourceTree = ""; 130 | }; 131 | DADC60871FE024E000C8DBFB /* SlaloMLUITests */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | DADC60881FE024E000C8DBFB /* SlaloMLUITests.swift */, 135 | DADC608A1FE024E000C8DBFB /* Info.plist */, 136 | ); 137 | path = SlaloMLUITests; 138 | sourceTree = ""; 139 | }; 140 | /* End PBXGroup section */ 141 | 142 | /* Begin PBXNativeTarget section */ 143 | DADC60641FE024E000C8DBFB /* SlaloML */ = { 144 | isa = PBXNativeTarget; 145 | buildConfigurationList = DADC608D1FE024E000C8DBFB /* Build configuration list for PBXNativeTarget "SlaloML" */; 146 | buildPhases = ( 147 | DADC60611FE024E000C8DBFB /* Sources */, 148 | DADC60621FE024E000C8DBFB /* Frameworks */, 149 | DADC60631FE024E000C8DBFB /* Resources */, 150 | ); 151 | buildRules = ( 152 | ); 153 | dependencies = ( 154 | ); 155 | name = SlaloML; 156 | productName = SlaloML; 157 | productReference = DADC60651FE024E000C8DBFB /* SlaloML.app */; 158 | productType = "com.apple.product-type.application"; 159 | }; 160 | DADC60781FE024E000C8DBFB /* SlaloMLTests */ = { 161 | isa = PBXNativeTarget; 162 | buildConfigurationList = DADC60901FE024E000C8DBFB /* Build configuration list for PBXNativeTarget "SlaloMLTests" */; 163 | buildPhases = ( 164 | DADC60751FE024E000C8DBFB /* Sources */, 165 | DADC60761FE024E000C8DBFB /* Frameworks */, 166 | DADC60771FE024E000C8DBFB /* Resources */, 167 | ); 168 | buildRules = ( 169 | ); 170 | dependencies = ( 171 | DADC607B1FE024E000C8DBFB /* PBXTargetDependency */, 172 | ); 173 | name = SlaloMLTests; 174 | productName = SlaloMLTests; 175 | productReference = DADC60791FE024E000C8DBFB /* SlaloMLTests.xctest */; 176 | productType = "com.apple.product-type.bundle.unit-test"; 177 | }; 178 | DADC60831FE024E000C8DBFB /* SlaloMLUITests */ = { 179 | isa = PBXNativeTarget; 180 | buildConfigurationList = DADC60931FE024E000C8DBFB /* Build configuration list for PBXNativeTarget "SlaloMLUITests" */; 181 | buildPhases = ( 182 | DADC60801FE024E000C8DBFB /* Sources */, 183 | DADC60811FE024E000C8DBFB /* Frameworks */, 184 | DADC60821FE024E000C8DBFB /* Resources */, 185 | ); 186 | buildRules = ( 187 | ); 188 | dependencies = ( 189 | DADC60861FE024E000C8DBFB /* PBXTargetDependency */, 190 | ); 191 | name = SlaloMLUITests; 192 | productName = SlaloMLUITests; 193 | productReference = DADC60841FE024E000C8DBFB /* SlaloMLUITests.xctest */; 194 | productType = "com.apple.product-type.bundle.ui-testing"; 195 | }; 196 | /* End PBXNativeTarget section */ 197 | 198 | /* Begin PBXProject section */ 199 | DADC605D1FE024E000C8DBFB /* Project object */ = { 200 | isa = PBXProject; 201 | attributes = { 202 | LastSwiftUpdateCheck = 0920; 203 | LastUpgradeCheck = 0920; 204 | ORGANIZATIONNAME = Slalom; 205 | TargetAttributes = { 206 | DADC60641FE024E000C8DBFB = { 207 | CreatedOnToolsVersion = 9.2; 208 | ProvisioningStyle = Automatic; 209 | }; 210 | DADC60781FE024E000C8DBFB = { 211 | CreatedOnToolsVersion = 9.2; 212 | ProvisioningStyle = Automatic; 213 | TestTargetID = DADC60641FE024E000C8DBFB; 214 | }; 215 | DADC60831FE024E000C8DBFB = { 216 | CreatedOnToolsVersion = 9.2; 217 | ProvisioningStyle = Automatic; 218 | TestTargetID = DADC60641FE024E000C8DBFB; 219 | }; 220 | }; 221 | }; 222 | buildConfigurationList = DADC60601FE024E000C8DBFB /* Build configuration list for PBXProject "SlaloML" */; 223 | compatibilityVersion = "Xcode 8.0"; 224 | developmentRegion = en; 225 | hasScannedForEncodings = 0; 226 | knownRegions = ( 227 | en, 228 | Base, 229 | ); 230 | mainGroup = DADC605C1FE024E000C8DBFB; 231 | productRefGroup = DADC60661FE024E000C8DBFB /* Products */; 232 | projectDirPath = ""; 233 | projectRoot = ""; 234 | targets = ( 235 | DADC60641FE024E000C8DBFB /* SlaloML */, 236 | DADC60781FE024E000C8DBFB /* SlaloMLTests */, 237 | DADC60831FE024E000C8DBFB /* SlaloMLUITests */, 238 | ); 239 | }; 240 | /* End PBXProject section */ 241 | 242 | /* Begin PBXResourcesBuildPhase section */ 243 | DADC60631FE024E000C8DBFB /* Resources */ = { 244 | isa = PBXResourcesBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | DADC60731FE024E000C8DBFB /* LaunchScreen.storyboard in Resources */, 248 | DAACEF981FE9B44400C059CB /* 20171211_224011963_iOS.jpg in Resources */, 249 | DADC60701FE024E000C8DBFB /* Assets.xcassets in Resources */, 250 | DADC606E1FE024E000C8DBFB /* Main.storyboard in Resources */, 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | DADC60771FE024E000C8DBFB /* Resources */ = { 255 | isa = PBXResourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | DADC60821FE024E000C8DBFB /* Resources */ = { 262 | isa = PBXResourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | /* End PBXResourcesBuildPhase section */ 269 | 270 | /* Begin PBXSourcesBuildPhase section */ 271 | DADC60611FE024E000C8DBFB /* Sources */ = { 272 | isa = PBXSourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | DA36215F206D599400F35969 /* SlalomLogoClassifier.mlmodel in Sources */, 276 | DADC606B1FE024E000C8DBFB /* ViewController.swift in Sources */, 277 | DADC609F1FE0352E00C8DBFB /* Utilities.swift in Sources */, 278 | DADC60691FE024E000C8DBFB /* AppDelegate.swift in Sources */, 279 | DA4E065B1FEB0FFB005AA17B /* CameraViewController.swift in Sources */, 280 | ); 281 | runOnlyForDeploymentPostprocessing = 0; 282 | }; 283 | DADC60751FE024E000C8DBFB /* Sources */ = { 284 | isa = PBXSourcesBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | DADC607E1FE024E000C8DBFB /* SlaloMLTests.swift in Sources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | DADC60801FE024E000C8DBFB /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | DADC60891FE024E000C8DBFB /* SlaloMLUITests.swift in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | /* End PBXSourcesBuildPhase section */ 300 | 301 | /* Begin PBXTargetDependency section */ 302 | DADC607B1FE024E000C8DBFB /* PBXTargetDependency */ = { 303 | isa = PBXTargetDependency; 304 | target = DADC60641FE024E000C8DBFB /* SlaloML */; 305 | targetProxy = DADC607A1FE024E000C8DBFB /* PBXContainerItemProxy */; 306 | }; 307 | DADC60861FE024E000C8DBFB /* PBXTargetDependency */ = { 308 | isa = PBXTargetDependency; 309 | target = DADC60641FE024E000C8DBFB /* SlaloML */; 310 | targetProxy = DADC60851FE024E000C8DBFB /* PBXContainerItemProxy */; 311 | }; 312 | /* End PBXTargetDependency section */ 313 | 314 | /* Begin PBXVariantGroup section */ 315 | DADC606C1FE024E000C8DBFB /* Main.storyboard */ = { 316 | isa = PBXVariantGroup; 317 | children = ( 318 | DADC606D1FE024E000C8DBFB /* Base */, 319 | ); 320 | name = Main.storyboard; 321 | sourceTree = ""; 322 | }; 323 | DADC60711FE024E000C8DBFB /* LaunchScreen.storyboard */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | DADC60721FE024E000C8DBFB /* Base */, 327 | ); 328 | name = LaunchScreen.storyboard; 329 | sourceTree = ""; 330 | }; 331 | /* End PBXVariantGroup section */ 332 | 333 | /* Begin XCBuildConfiguration section */ 334 | DADC608B1FE024E000C8DBFB /* Debug */ = { 335 | isa = XCBuildConfiguration; 336 | buildSettings = { 337 | ALWAYS_SEARCH_USER_PATHS = NO; 338 | CLANG_ANALYZER_NONNULL = YES; 339 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 345 | CLANG_WARN_BOOL_CONVERSION = YES; 346 | CLANG_WARN_COMMA = YES; 347 | CLANG_WARN_CONSTANT_CONVERSION = YES; 348 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 349 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 350 | CLANG_WARN_EMPTY_BODY = YES; 351 | CLANG_WARN_ENUM_CONVERSION = YES; 352 | CLANG_WARN_INFINITE_RECURSION = YES; 353 | CLANG_WARN_INT_CONVERSION = YES; 354 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 356 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 357 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 358 | CLANG_WARN_STRICT_PROTOTYPES = YES; 359 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 360 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | CODE_SIGN_IDENTITY = "iPhone Developer"; 364 | COPY_PHASE_STRIP = NO; 365 | DEBUG_INFORMATION_FORMAT = dwarf; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | ENABLE_TESTABILITY = YES; 368 | GCC_C_LANGUAGE_STANDARD = gnu11; 369 | GCC_DYNAMIC_NO_PIC = NO; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_OPTIMIZATION_LEVEL = 0; 372 | GCC_PREPROCESSOR_DEFINITIONS = ( 373 | "DEBUG=1", 374 | "$(inherited)", 375 | ); 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 383 | MTL_ENABLE_DEBUG_INFO = YES; 384 | ONLY_ACTIVE_ARCH = YES; 385 | SDKROOT = iphoneos; 386 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 387 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 388 | }; 389 | name = Debug; 390 | }; 391 | DADC608C1FE024E000C8DBFB /* Release */ = { 392 | isa = XCBuildConfiguration; 393 | buildSettings = { 394 | ALWAYS_SEARCH_USER_PATHS = NO; 395 | CLANG_ANALYZER_NONNULL = YES; 396 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 397 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 398 | CLANG_CXX_LIBRARY = "libc++"; 399 | CLANG_ENABLE_MODULES = YES; 400 | CLANG_ENABLE_OBJC_ARC = YES; 401 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 402 | CLANG_WARN_BOOL_CONVERSION = YES; 403 | CLANG_WARN_COMMA = YES; 404 | CLANG_WARN_CONSTANT_CONVERSION = YES; 405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 406 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 407 | CLANG_WARN_EMPTY_BODY = YES; 408 | CLANG_WARN_ENUM_CONVERSION = YES; 409 | CLANG_WARN_INFINITE_RECURSION = YES; 410 | CLANG_WARN_INT_CONVERSION = YES; 411 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 412 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 414 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 415 | CLANG_WARN_STRICT_PROTOTYPES = YES; 416 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 417 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 418 | CLANG_WARN_UNREACHABLE_CODE = YES; 419 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 420 | CODE_SIGN_IDENTITY = "iPhone Developer"; 421 | COPY_PHASE_STRIP = NO; 422 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 423 | ENABLE_NS_ASSERTIONS = NO; 424 | ENABLE_STRICT_OBJC_MSGSEND = YES; 425 | GCC_C_LANGUAGE_STANDARD = gnu11; 426 | GCC_NO_COMMON_BLOCKS = YES; 427 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 428 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 429 | GCC_WARN_UNDECLARED_SELECTOR = YES; 430 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 431 | GCC_WARN_UNUSED_FUNCTION = YES; 432 | GCC_WARN_UNUSED_VARIABLE = YES; 433 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 434 | MTL_ENABLE_DEBUG_INFO = NO; 435 | SDKROOT = iphoneos; 436 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 437 | VALIDATE_PRODUCT = YES; 438 | }; 439 | name = Release; 440 | }; 441 | DADC608E1FE024E000C8DBFB /* Debug */ = { 442 | isa = XCBuildConfiguration; 443 | buildSettings = { 444 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 445 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 446 | CODE_SIGN_STYLE = Automatic; 447 | DEVELOPMENT_TEAM = HKT82ARDDJ; 448 | INFOPLIST_FILE = SlaloML/Info.plist; 449 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 451 | PRODUCT_BUNDLE_IDENTIFIER = com.Slalom.SlaloML2; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | PROVISIONING_PROFILE_SPECIFIER = ""; 454 | SWIFT_VERSION = 4.0; 455 | TARGETED_DEVICE_FAMILY = "1,2"; 456 | }; 457 | name = Debug; 458 | }; 459 | DADC608F1FE024E000C8DBFB /* Release */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 463 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 464 | CODE_SIGN_STYLE = Automatic; 465 | DEVELOPMENT_TEAM = HKT82ARDDJ; 466 | INFOPLIST_FILE = SlaloML/Info.plist; 467 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 468 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 469 | PRODUCT_BUNDLE_IDENTIFIER = com.Slalom.SlaloML2; 470 | PRODUCT_NAME = "$(TARGET_NAME)"; 471 | PROVISIONING_PROFILE_SPECIFIER = ""; 472 | SWIFT_VERSION = 4.0; 473 | TARGETED_DEVICE_FAMILY = "1,2"; 474 | }; 475 | name = Release; 476 | }; 477 | DADC60911FE024E000C8DBFB /* Debug */ = { 478 | isa = XCBuildConfiguration; 479 | buildSettings = { 480 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 481 | BUNDLE_LOADER = "$(TEST_HOST)"; 482 | CODE_SIGN_STYLE = Automatic; 483 | INFOPLIST_FILE = SlaloMLTests/Info.plist; 484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 485 | PRODUCT_BUNDLE_IDENTIFIER = com.Slalom.SlaloMLTests; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | SWIFT_VERSION = 4.0; 488 | TARGETED_DEVICE_FAMILY = "1,2"; 489 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SlaloML.app/SlaloML"; 490 | }; 491 | name = Debug; 492 | }; 493 | DADC60921FE024E000C8DBFB /* Release */ = { 494 | isa = XCBuildConfiguration; 495 | buildSettings = { 496 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 497 | BUNDLE_LOADER = "$(TEST_HOST)"; 498 | CODE_SIGN_STYLE = Automatic; 499 | INFOPLIST_FILE = SlaloMLTests/Info.plist; 500 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 501 | PRODUCT_BUNDLE_IDENTIFIER = com.Slalom.SlaloMLTests; 502 | PRODUCT_NAME = "$(TARGET_NAME)"; 503 | SWIFT_VERSION = 4.0; 504 | TARGETED_DEVICE_FAMILY = "1,2"; 505 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SlaloML.app/SlaloML"; 506 | }; 507 | name = Release; 508 | }; 509 | DADC60941FE024E000C8DBFB /* Debug */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 513 | CODE_SIGN_STYLE = Automatic; 514 | INFOPLIST_FILE = SlaloMLUITests/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 516 | PRODUCT_BUNDLE_IDENTIFIER = com.Slalom.SlaloMLUITests; 517 | PRODUCT_NAME = "$(TARGET_NAME)"; 518 | SWIFT_VERSION = 4.0; 519 | TARGETED_DEVICE_FAMILY = "1,2"; 520 | TEST_TARGET_NAME = SlaloML; 521 | }; 522 | name = Debug; 523 | }; 524 | DADC60951FE024E000C8DBFB /* Release */ = { 525 | isa = XCBuildConfiguration; 526 | buildSettings = { 527 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 528 | CODE_SIGN_STYLE = Automatic; 529 | INFOPLIST_FILE = SlaloMLUITests/Info.plist; 530 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 531 | PRODUCT_BUNDLE_IDENTIFIER = com.Slalom.SlaloMLUITests; 532 | PRODUCT_NAME = "$(TARGET_NAME)"; 533 | SWIFT_VERSION = 4.0; 534 | TARGETED_DEVICE_FAMILY = "1,2"; 535 | TEST_TARGET_NAME = SlaloML; 536 | }; 537 | name = Release; 538 | }; 539 | /* End XCBuildConfiguration section */ 540 | 541 | /* Begin XCConfigurationList section */ 542 | DADC60601FE024E000C8DBFB /* Build configuration list for PBXProject "SlaloML" */ = { 543 | isa = XCConfigurationList; 544 | buildConfigurations = ( 545 | DADC608B1FE024E000C8DBFB /* Debug */, 546 | DADC608C1FE024E000C8DBFB /* Release */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | defaultConfigurationName = Release; 550 | }; 551 | DADC608D1FE024E000C8DBFB /* Build configuration list for PBXNativeTarget "SlaloML" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | DADC608E1FE024E000C8DBFB /* Debug */, 555 | DADC608F1FE024E000C8DBFB /* Release */, 556 | ); 557 | defaultConfigurationIsVisible = 0; 558 | defaultConfigurationName = Release; 559 | }; 560 | DADC60901FE024E000C8DBFB /* Build configuration list for PBXNativeTarget "SlaloMLTests" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | DADC60911FE024E000C8DBFB /* Debug */, 564 | DADC60921FE024E000C8DBFB /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | DADC60931FE024E000C8DBFB /* Build configuration list for PBXNativeTarget "SlaloMLUITests" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | DADC60941FE024E000C8DBFB /* Debug */, 573 | DADC60951FE024E000C8DBFB /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | /* End XCConfigurationList section */ 579 | }; 580 | rootObject = DADC605D1FE024E000C8DBFB /* Project object */; 581 | } 582 | -------------------------------------------------------------------------------- /SlaloML.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SlaloML.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SlaloML/20171211_224011963_iOS.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ichibod/object-detection-coreml-xcode/225d96ec3665feaf4744e8f323340caefa526f63/SlaloML/20171211_224011963_iOS.jpg -------------------------------------------------------------------------------- /SlaloML/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SlaloML 4 | // 5 | // Created by Ryan Jones on 12/12/17. 6 | // Copyright © 2017 Slalom. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /SlaloML/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /SlaloML/Assets.xcassets/BuildCyan.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "colors" : [ 7 | { 8 | "idiom" : "universal", 9 | "color" : { 10 | "color-space" : "srgb", 11 | "components" : { 12 | "red" : "27", 13 | "alpha" : "1.000", 14 | "blue" : "242", 15 | "green" : "225" 16 | } 17 | } 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /SlaloML/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /SlaloML/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /SlaloML/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 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 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /SlaloML/CameraViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import AVFoundation 3 | import Vision 4 | import CoreML 5 | 6 | enum Label: String { 7 | case buildSquare = "_b" 8 | case buildLogo = "_build" 9 | case slalomLogo = "Slalom" 10 | } 11 | 12 | final class CameraViewController: UIViewController { 13 | @IBOutlet private weak var classificationText: UILabel! 14 | @IBOutlet private weak var cameraView: UIView! 15 | private var bufferSize: CGSize = .zero 16 | 17 | private let videoDataOutputQueue = DispatchQueue(label: "VideoDataOutput", qos: .userInitiated, attributes: [], autoreleaseFrequency: .workItem) 18 | 19 | private var requests = [VNRequest]() 20 | 21 | // Create a layer to display camera frames in the UIView 22 | private var cameraLayer: AVCaptureVideoPreviewLayer! 23 | private var detectionOverlay: CALayer! = nil 24 | // Create an AVCaptureSession 25 | private let session = AVCaptureSession() 26 | private let videoOutput = AVCaptureVideoDataOutput() 27 | 28 | private lazy var classifier: SlalomLogoClassifier = SlalomLogoClassifier() 29 | 30 | override func viewDidLoad() { 31 | super.viewDidLoad() 32 | 33 | setUpAVCapture() 34 | setUpLayers() 35 | updateLayerGeometry() 36 | setUpVision() 37 | session.startRunning() 38 | } 39 | 40 | private func setUpAVCapture() { 41 | session.sessionPreset = AVCaptureSession.Preset.photo 42 | let backCamera = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) 43 | let deviceInput: AVCaptureDeviceInput 44 | do { 45 | deviceInput = try AVCaptureDeviceInput(device: backCamera!) 46 | } catch { 47 | print("Could not create video device input: \(error)") 48 | return 49 | } 50 | session.beginConfiguration() 51 | session.sessionPreset = .vga640x480 52 | guard session.canAddInput(deviceInput) else { 53 | print("Could not add video device input to the session") 54 | session.commitConfiguration() 55 | return 56 | } 57 | 58 | if session.canAddOutput(videoOutput) { 59 | videoOutput.alwaysDiscardsLateVideoFrames = true 60 | videoOutput.videoSettings = [kCVPixelBufferPixelFormatTypeKey as String: Int(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange)] 61 | videoOutput.setSampleBufferDelegate(self, queue: videoDataOutputQueue) 62 | } 63 | self.session.addOutput(videoOutput) 64 | let captureConnection = videoOutput.connection(with: .video) 65 | // Always process the frames 66 | captureConnection?.isEnabled = true 67 | do { 68 | try backCamera!.lockForConfiguration() 69 | let dimensions = CMVideoFormatDescriptionGetDimensions((backCamera?.activeFormat.formatDescription)!) 70 | bufferSize.width = CGFloat(dimensions.width) 71 | bufferSize.height = CGFloat(dimensions.height) 72 | backCamera!.unlockForConfiguration() 73 | } catch { 74 | print(error) 75 | } 76 | session.addInput(deviceInput) 77 | session.commitConfiguration() 78 | 79 | cameraLayer = AVCaptureVideoPreviewLayer(session: session) 80 | cameraLayer.videoGravity = .resizeAspectFill 81 | cameraLayer.frame = cameraView.bounds 82 | cameraView?.layer.addSublayer(cameraLayer) 83 | } 84 | 85 | private func setUpLayers() { 86 | detectionOverlay = CALayer() // container layer that has all the renderings of the observations 87 | detectionOverlay.name = "DetectionOverlay" 88 | detectionOverlay.backgroundColor = UIColor.orange.withAlphaComponent(0.2).cgColor 89 | detectionOverlay.bounds = CGRect(x: 0.0, 90 | y: 0.0, 91 | width: bufferSize.width, 92 | height: bufferSize.height) 93 | detectionOverlay.position = CGPoint(x: cameraView.layer.bounds.midX, y: cameraView.layer.bounds.midY) 94 | cameraView?.layer.addSublayer(detectionOverlay) 95 | } 96 | 97 | func setUpVision() { 98 | guard let visionModel = try? VNCoreMLModel(for: classifier.model) else { 99 | fatalError("Can’t load VisionML model") 100 | } 101 | let classificationRequest = VNCoreMLRequest(model: visionModel) { request, error in 102 | DispatchQueue.main.async { [weak self] in 103 | self?.handleClassifications(request: request, error: error) 104 | } 105 | } 106 | classificationRequest.imageCropAndScaleOption = VNImageCropAndScaleOption.scaleFill 107 | requests = [classificationRequest] 108 | } 109 | 110 | func handleClassifications(request: VNRequest, error: Error?) { 111 | detectionOverlay.removeAllAnimations() 112 | if let layers = detectionOverlay.sublayers { 113 | for layer in layers { 114 | layer.removeFromSuperlayer() 115 | } 116 | } 117 | guard let results = request.results, !results.isEmpty else { return } 118 | 119 | CATransaction.begin() 120 | CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) 121 | for observation in results where observation is VNRecognizedObjectObservation { 122 | guard let objectObservation = observation as? VNRecognizedObjectObservation else { 123 | continue 124 | } 125 | // Select only the label with the highest confidence. 126 | let topLabelObservation = objectObservation.labels[0] 127 | 128 | let objectBounds = VNImageRectForNormalizedRect(objectObservation.boundingBox, Int(bufferSize.width), Int(bufferSize.height)) 129 | 130 | let shapeLayer = layerWithBounds(objectBounds, identifier: topLabelObservation.identifier, confidence: objectObservation.confidence) 131 | detectionOverlay.addSublayer(shapeLayer) 132 | } 133 | CATransaction.commit() 134 | self.updateLayerGeometry() 135 | } 136 | 137 | func layerWithBounds(_ rect: CGRect, identifier: String, confidence: VNConfidence) -> CALayer { 138 | let layer = CAShapeLayer() 139 | layer.bounds = rect 140 | layer.path = UIBezierPath(roundedRect: rect, cornerRadius: 8).cgPath 141 | layer.lineWidth = 8 142 | if confidence < 0.45 { 143 | layer.lineDashPattern = [8,12] 144 | } 145 | switch identifier { 146 | case Label.buildLogo.rawValue: 147 | layer.strokeColor = UIColor(named: "BuildCyan")!.cgColor 148 | case Label.buildSquare.rawValue: 149 | layer.strokeColor = UIColor(named: "BuildCyan")!.cgColor 150 | default: 151 | layer.strokeColor = UIColor.red.cgColor 152 | } 153 | layer.shadowOpacity = 0.7 154 | layer.shadowOffset = CGSize.zero 155 | layer.fillColor = UIColor.clear.cgColor 156 | layer.position = CGPoint(x: rect.midX, y: rect.midY) 157 | return layer 158 | } 159 | 160 | @IBAction func dismiss(_ sender: Any) { 161 | session.stopRunning() 162 | navigationController?.dismiss(animated: true, completion: nil) 163 | } 164 | 165 | public func exifOrientationFromDeviceOrientation() -> CGImagePropertyOrientation { 166 | let curDeviceOrientation = UIDevice.current.orientation 167 | let exifOrientation: CGImagePropertyOrientation 168 | 169 | switch curDeviceOrientation { 170 | case UIDeviceOrientation.portraitUpsideDown: // Device oriented vertically, home button on the top 171 | exifOrientation = .left 172 | case UIDeviceOrientation.landscapeLeft: // Device oriented horizontally, home button on the right 173 | exifOrientation = .upMirrored 174 | case UIDeviceOrientation.landscapeRight: // Device oriented horizontally, home button on the left 175 | exifOrientation = .down 176 | case UIDeviceOrientation.portrait: // Device oriented vertically, home button on the bottom 177 | exifOrientation = .up 178 | default: 179 | exifOrientation = .up 180 | } 181 | return exifOrientation 182 | } 183 | 184 | func updateLayerGeometry() { 185 | let bounds = cameraView.layer.bounds 186 | var scale: CGFloat 187 | 188 | let xScale: CGFloat = bounds.size.width / bufferSize.height 189 | let yScale: CGFloat = bounds.size.height / bufferSize.width 190 | 191 | scale = fmax(xScale, yScale) 192 | if scale.isInfinite { 193 | scale = 1.0 194 | } 195 | CATransaction.begin() 196 | CATransaction.setValue(kCFBooleanTrue, forKey: kCATransactionDisableActions) 197 | 198 | // rotate the layer into screen orientation and scale and mirror 199 | detectionOverlay.setAffineTransform(CGAffineTransform(rotationAngle: CGFloat(.pi / 2.0)).scaledBy(x: scale, y: -scale)) 200 | // center the layer 201 | detectionOverlay.position = CGPoint (x: bounds.midX, y: bounds.midY) 202 | 203 | CATransaction.commit() 204 | 205 | } 206 | } 207 | 208 | extension CameraViewController: AVCaptureVideoDataOutputSampleBufferDelegate { 209 | 210 | func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) { 211 | guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { 212 | return 213 | } 214 | let orientation = exifOrientationFromDeviceOrientation() 215 | let imageRequestHandler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: orientation, options: [:]) 216 | do { 217 | try imageRequestHandler.perform(self.requests) 218 | } catch { 219 | print(error) 220 | } 221 | } 222 | 223 | } 224 | -------------------------------------------------------------------------------- /SlaloML/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSCameraUsageDescription 24 | Trying to find things through the lens… 25 | NSMicrophoneUsageDescription 26 | Video usually uses audio… 27 | NSPhotoLibraryUsageDescription 28 | Might save to the roll… 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /SlaloML/SlalomLogoClassifier.mlmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ichibod/object-detection-coreml-xcode/225d96ec3665feaf4744e8f323340caefa526f63/SlaloML/SlalomLogoClassifier.mlmodel -------------------------------------------------------------------------------- /SlaloML/Utilities.swift: -------------------------------------------------------------------------------- 1 | /* 2 | See LICENSE folder for this sample’s licensing information. 3 | 4 | Abstract: 5 | Core Graphics utility extensions used in the sample code. 6 | */ 7 | 8 | import UIKit 9 | import CoreGraphics 10 | import ImageIO 11 | 12 | extension CGImagePropertyOrientation { 13 | init(_ orientation: UIImageOrientation) { 14 | switch orientation { 15 | case .up: self = .up 16 | case .upMirrored: self = .upMirrored 17 | case .down: self = .down 18 | case .downMirrored: self = .downMirrored 19 | case .left: self = .left 20 | case .leftMirrored: self = .leftMirrored 21 | case .right: self = .right 22 | case .rightMirrored: self = .rightMirrored 23 | } 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /SlaloML/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright © 2017 Slalom. All rights reserved. 3 | // 4 | 5 | import UIKit 6 | import CoreML 7 | import Vision 8 | import ImageIO 9 | 10 | class ViewController: UIViewController { 11 | 12 | @IBOutlet var classificationLabel: UILabel! 13 | @IBOutlet var imageView: UIImageView! 14 | private var detectionOverlay: CALayer! 15 | 16 | var inputImage: CIImage? 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | guard let image = imageView.image else { 21 | return 22 | } 23 | guard let ciImage = CIImage(image: image) 24 | else { fatalError("can't create CIImage from UIImage") } 25 | 26 | let orientation = CGImagePropertyOrientation(image.imageOrientation) 27 | inputImage = ciImage.oriented(forExifOrientation: Int32(orientation.rawValue)) 28 | 29 | // Show the image in the UI. 30 | imageView.image = image 31 | 32 | // Run the rectangle detector 33 | let handler = VNImageRequestHandler(ciImage: ciImage, orientation: orientation) 34 | DispatchQueue.global(qos: .userInteractive).async { 35 | do { 36 | try handler.perform([self.detectionRequest]) 37 | } catch { 38 | print(error) 39 | } 40 | } 41 | } 42 | 43 | lazy var detectionRequest: VNCoreMLRequest = { 44 | // Load the ML model through its generated class and create a Vision request for it. 45 | do { 46 | let model = try VNCoreMLModel(for: SlalomLogoClassifier().model) 47 | 48 | return VNCoreMLRequest(model: model, completionHandler: self.handleDetection) 49 | } catch { 50 | fatalError("can't load Vision ML model: \(error)") 51 | } 52 | }() 53 | 54 | func handleDetection(request: VNRequest, error: Error?) { 55 | guard let results = request.results, !results.isEmpty else { return } 56 | 57 | var strings: [String] = [] 58 | for observation in results where observation is VNRecognizedObjectObservation { 59 | guard let observation = observation as? VNRecognizedObjectObservation else { 60 | continue 61 | } 62 | let bestLabel = observation.labels.first! // Label with highest confidence 63 | let objectBounds = observation.boundingBox 64 | 65 | let pct = Float(Int(observation.confidence * 10000)) / 100 66 | strings.append("\(pct)%") 67 | drawRectangle(detectedRectangle: objectBounds, identifier: bestLabel.identifier, confidence: observation.confidence) 68 | 69 | print(bestLabel.identifier, observation.confidence, objectBounds) 70 | } 71 | 72 | DispatchQueue.main.async { 73 | self.classificationLabel.text = strings.joined(separator: ", ") 74 | } 75 | } 76 | 77 | public func drawRectangle(detectedRectangle: CGRect, identifier: String, confidence: VNConfidence) { 78 | DispatchQueue.main.async { [unowned self] in 79 | let boundingBox = VNImageRectForNormalizedRect(detectedRectangle, Int(self.imageView.frame.width), Int(self.imageView.frame.height)) 80 | let layer = self.layerWithBounds(boundingBox, identifier: identifier, confidence: confidence) 81 | self.imageView.layer.addSublayer(layer) 82 | } 83 | } 84 | 85 | func layerWithBounds(_ rect: CGRect, identifier: String, confidence: VNConfidence) -> CALayer { 86 | let layer = CAShapeLayer() 87 | layer.bounds = rect 88 | layer.path = UIBezierPath(roundedRect: rect, cornerRadius: 8).cgPath 89 | layer.lineWidth = 3 90 | if confidence < 0.45 { 91 | layer.lineDashPattern = [8,12] 92 | } 93 | switch identifier { 94 | case Label.buildLogo.rawValue: 95 | layer.strokeColor = UIColor(named: "BuildCyan")!.cgColor 96 | case Label.buildSquare.rawValue: 97 | layer.strokeColor = UIColor(named: "BuildCyan")!.cgColor 98 | default: 99 | layer.strokeColor = UIColor.red.cgColor 100 | } 101 | layer.shadowOpacity = 0.7 102 | layer.shadowOffset = CGSize.zero 103 | layer.fillColor = UIColor.clear.cgColor 104 | layer.position = CGPoint(x: imageView.frame.midX, y: imageView.frame.midY) 105 | return layer 106 | } 107 | } 108 | 109 | -------------------------------------------------------------------------------- /SlaloMLTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SlaloMLTests/SlaloMLTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SlaloMLTests.swift 3 | // SlaloMLTests 4 | // 5 | // Created by Ryan Jones on 12/12/17. 6 | // Copyright © 2017 Slalom. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SlaloML 11 | 12 | class SlaloMLTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /SlaloMLUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SlaloMLUITests/SlaloMLUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SlaloMLUITests.swift 3 | // SlaloMLUITests 4 | // 5 | // Created by Ryan Jones on 12/12/17. 6 | // Copyright © 2017 Slalom. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class SlaloMLUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | --------------------------------------------------------------------------------