├── .gitignore ├── LICENSE ├── README.md ├── quickstart-ios-swift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved └── xcshareddata │ └── xcschemes │ └── quickstart-ios-swift.xcscheme └── quickstart-ios-swift ├── AppDelegate.swift ├── Assets.xcassets ├── AppIcon.appiconset │ └── Contents.json ├── Contents.json └── SwitchCamera.imageset │ ├── Contents.json │ ├── camera-white.png │ ├── camera-white@2x.png │ └── camera-white@3x.png ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Effects ├── Elephant_Trunk.deepar ├── Emotion_Meter.deepar ├── Emotions_Exaggerator.deepar ├── Fire_Effect.deepar ├── Hope.deepar ├── Humanoid.deepar ├── MakeupLook.deepar ├── Neon_Devil_Horns.deepar ├── Ping_Pong.deepar ├── Pixel_Hearts.deepar ├── Snail.deepar ├── Split_View_Look.deepar ├── Stallone.deepar ├── Vendetta_Mask.deepar ├── burning_effect.deepar ├── flower_face.deepar ├── galaxy_background.deepar └── viking_helmet.deepar ├── Info.plist ├── StartViewController.swift └── ViewController.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 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 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | 92 | . 93 | .DS_Store 94 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 DeepAR SDK 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # quickstart-ios-swift 2 | 3 | ## Overview 4 | 5 | This is an example app demonstrating DeepAR SDK. 6 | 7 | - Preview of fun face filters, effects and background replacement. 8 | - Carousel with filter thumbnails. 9 | - Take screenshot. 10 | - Record video. 11 | - Front and back camera. 12 | - Source code demonstrates how to integrate DeepAR for iOS in your app. 13 | 14 | For more info on DeepAR for iOS see: https://docs.deepar.ai/deepar-sdk/platforms/ios/overview 15 | 16 | ## How to run 17 | 18 | 1. Open the project in Xcode. 19 | 2. Create a DeepAR developer account: https://developer.deepar.ai/signup. 20 | 3. Create a project: https://developer.deepar.ai/projects. 21 | 4. Add a iOS app to the project. Note that you need to specify the bundle id of your app. In this case it is "ai.deepar.quickstart-ios". 22 | 5. Copy the generated license key in the `ViewController.swift` instead of your_license_key_here. 23 | 24 | -------------------------------------------------------------------------------- /quickstart-ios-swift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 54; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 19FB9DA5239E65ED0056E3AB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FB9DA4239E65ED0056E3AB /* AppDelegate.swift */; }; 11 | 19FB9DA9239E65ED0056E3AB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19FB9DA8239E65ED0056E3AB /* ViewController.swift */; }; 12 | 19FB9DAC239E65ED0056E3AB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 19FB9DAA239E65ED0056E3AB /* Main.storyboard */; }; 13 | 19FB9DAE239E65EE0056E3AB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 19FB9DAD239E65EE0056E3AB /* Assets.xcassets */; }; 14 | 19FB9DB1239E65EE0056E3AB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 19FB9DAF239E65EE0056E3AB /* LaunchScreen.storyboard */; }; 15 | 662DAA532A65E36D002DE21D /* DeepAR in Frameworks */ = {isa = PBXBuildFile; productRef = 662DAA522A65E36D002DE21D /* DeepAR */; }; 16 | 8DF1C83C2852328C002E231B /* Vendetta_Mask.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C82A2852328B002E231B /* Vendetta_Mask.deepar */; }; 17 | 8DF1C83D2852328C002E231B /* Humanoid.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C82B2852328B002E231B /* Humanoid.deepar */; }; 18 | 8DF1C83E2852328C002E231B /* Fire_Effect.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C82C2852328B002E231B /* Fire_Effect.deepar */; }; 19 | 8DF1C83F2852328C002E231B /* Neon_Devil_Horns.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C82D2852328B002E231B /* Neon_Devil_Horns.deepar */; }; 20 | 8DF1C8402852328C002E231B /* Hope.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C82E2852328B002E231B /* Hope.deepar */; }; 21 | 8DF1C8412852328C002E231B /* MakeupLook.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C82F2852328B002E231B /* MakeupLook.deepar */; }; 22 | 8DF1C8422852328C002E231B /* Split_View_Look.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8302852328B002E231B /* Split_View_Look.deepar */; }; 23 | 8DF1C8432852328C002E231B /* viking_helmet.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8312852328B002E231B /* viking_helmet.deepar */; }; 24 | 8DF1C8442852328C002E231B /* Emotion_Meter.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8322852328C002E231B /* Emotion_Meter.deepar */; }; 25 | 8DF1C8452852328C002E231B /* Emotions_Exaggerator.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8332852328C002E231B /* Emotions_Exaggerator.deepar */; }; 26 | 8DF1C8462852328C002E231B /* flower_face.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8342852328C002E231B /* flower_face.deepar */; }; 27 | 8DF1C8472852328C002E231B /* burning_effect.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8352852328C002E231B /* burning_effect.deepar */; }; 28 | 8DF1C8482852328C002E231B /* Elephant_Trunk.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8362852328C002E231B /* Elephant_Trunk.deepar */; }; 29 | 8DF1C8492852328C002E231B /* Ping_Pong.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8372852328C002E231B /* Ping_Pong.deepar */; }; 30 | 8DF1C84A2852328C002E231B /* Snail.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8382852328C002E231B /* Snail.deepar */; }; 31 | 8DF1C84B2852328C002E231B /* Stallone.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C8392852328C002E231B /* Stallone.deepar */; }; 32 | 8DF1C84C2852328C002E231B /* galaxy_background.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C83A2852328C002E231B /* galaxy_background.deepar */; }; 33 | 8DF1C84D2852328C002E231B /* Pixel_Hearts.deepar in Resources */ = {isa = PBXBuildFile; fileRef = 8DF1C83B2852328C002E231B /* Pixel_Hearts.deepar */; }; 34 | 9A49710124FE579800DD9C86 /* StartViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A49710024FE579800DD9C86 /* StartViewController.swift */; }; 35 | /* End PBXBuildFile section */ 36 | 37 | /* Begin PBXCopyFilesBuildPhase section */ 38 | 9A34D6D72429622A00FE3662 /* Embed Frameworks */ = { 39 | isa = PBXCopyFilesBuildPhase; 40 | buildActionMask = 2147483647; 41 | dstPath = ""; 42 | dstSubfolderSpec = 10; 43 | files = ( 44 | ); 45 | name = "Embed Frameworks"; 46 | runOnlyForDeploymentPostprocessing = 0; 47 | }; 48 | /* End PBXCopyFilesBuildPhase section */ 49 | 50 | /* Begin PBXFileReference section */ 51 | 19FB9DA1239E65EC0056E3AB /* quickstart-ios-swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "quickstart-ios-swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 19FB9DA4239E65ED0056E3AB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 53 | 19FB9DA8239E65ED0056E3AB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 54 | 19FB9DAB239E65ED0056E3AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 19FB9DAD239E65EE0056E3AB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 19FB9DB0239E65EE0056E3AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | 19FB9DB2239E65EE0056E3AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 8DF1C82A2852328B002E231B /* Vendetta_Mask.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Vendetta_Mask.deepar; sourceTree = ""; }; 59 | 8DF1C82B2852328B002E231B /* Humanoid.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Humanoid.deepar; sourceTree = ""; }; 60 | 8DF1C82C2852328B002E231B /* Fire_Effect.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Fire_Effect.deepar; sourceTree = ""; }; 61 | 8DF1C82D2852328B002E231B /* Neon_Devil_Horns.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Neon_Devil_Horns.deepar; sourceTree = ""; }; 62 | 8DF1C82E2852328B002E231B /* Hope.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Hope.deepar; sourceTree = ""; }; 63 | 8DF1C82F2852328B002E231B /* MakeupLook.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = MakeupLook.deepar; sourceTree = ""; }; 64 | 8DF1C8302852328B002E231B /* Split_View_Look.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Split_View_Look.deepar; sourceTree = ""; }; 65 | 8DF1C8312852328B002E231B /* viking_helmet.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = viking_helmet.deepar; sourceTree = ""; }; 66 | 8DF1C8322852328C002E231B /* Emotion_Meter.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Emotion_Meter.deepar; sourceTree = ""; }; 67 | 8DF1C8332852328C002E231B /* Emotions_Exaggerator.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Emotions_Exaggerator.deepar; sourceTree = ""; }; 68 | 8DF1C8342852328C002E231B /* flower_face.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = flower_face.deepar; sourceTree = ""; }; 69 | 8DF1C8352852328C002E231B /* burning_effect.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = burning_effect.deepar; sourceTree = ""; }; 70 | 8DF1C8362852328C002E231B /* Elephant_Trunk.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Elephant_Trunk.deepar; sourceTree = ""; }; 71 | 8DF1C8372852328C002E231B /* Ping_Pong.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Ping_Pong.deepar; sourceTree = ""; }; 72 | 8DF1C8382852328C002E231B /* Snail.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Snail.deepar; sourceTree = ""; }; 73 | 8DF1C8392852328C002E231B /* Stallone.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Stallone.deepar; sourceTree = ""; }; 74 | 8DF1C83A2852328C002E231B /* galaxy_background.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = galaxy_background.deepar; sourceTree = ""; }; 75 | 8DF1C83B2852328C002E231B /* Pixel_Hearts.deepar */ = {isa = PBXFileReference; lastKnownFileType = file; path = Pixel_Hearts.deepar; sourceTree = ""; }; 76 | 9A49710024FE579800DD9C86 /* StartViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StartViewController.swift; sourceTree = ""; }; 77 | /* End PBXFileReference section */ 78 | 79 | /* Begin PBXFrameworksBuildPhase section */ 80 | 19FB9D9E239E65EC0056E3AB /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | 662DAA532A65E36D002DE21D /* DeepAR in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | /* End PBXFrameworksBuildPhase section */ 89 | 90 | /* Begin PBXGroup section */ 91 | 198B5D5C239FDE4F0035E21B /* Effects */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 8DF1C83B2852328C002E231B /* Pixel_Hearts.deepar */, 95 | 8DF1C8352852328C002E231B /* burning_effect.deepar */, 96 | 8DF1C8362852328C002E231B /* Elephant_Trunk.deepar */, 97 | 8DF1C8322852328C002E231B /* Emotion_Meter.deepar */, 98 | 8DF1C8332852328C002E231B /* Emotions_Exaggerator.deepar */, 99 | 8DF1C82C2852328B002E231B /* Fire_Effect.deepar */, 100 | 8DF1C8342852328C002E231B /* flower_face.deepar */, 101 | 8DF1C83A2852328C002E231B /* galaxy_background.deepar */, 102 | 8DF1C82E2852328B002E231B /* Hope.deepar */, 103 | 8DF1C82B2852328B002E231B /* Humanoid.deepar */, 104 | 8DF1C82F2852328B002E231B /* MakeupLook.deepar */, 105 | 8DF1C82D2852328B002E231B /* Neon_Devil_Horns.deepar */, 106 | 8DF1C8372852328C002E231B /* Ping_Pong.deepar */, 107 | 8DF1C8382852328C002E231B /* Snail.deepar */, 108 | 8DF1C8302852328B002E231B /* Split_View_Look.deepar */, 109 | 8DF1C8392852328C002E231B /* Stallone.deepar */, 110 | 8DF1C82A2852328B002E231B /* Vendetta_Mask.deepar */, 111 | 8DF1C8312852328B002E231B /* viking_helmet.deepar */, 112 | ); 113 | path = Effects; 114 | sourceTree = ""; 115 | }; 116 | 19FB9D98239E65EC0056E3AB = { 117 | isa = PBXGroup; 118 | children = ( 119 | 19FB9DA3239E65ED0056E3AB /* quickstart-ios-swift */, 120 | 19FB9DA2239E65EC0056E3AB /* Products */, 121 | ); 122 | sourceTree = ""; 123 | }; 124 | 19FB9DA2239E65EC0056E3AB /* Products */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 19FB9DA1239E65EC0056E3AB /* quickstart-ios-swift.app */, 128 | ); 129 | name = Products; 130 | sourceTree = ""; 131 | }; 132 | 19FB9DA3239E65ED0056E3AB /* quickstart-ios-swift */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 198B5D5C239FDE4F0035E21B /* Effects */, 136 | 19FB9DA4239E65ED0056E3AB /* AppDelegate.swift */, 137 | 9A49710024FE579800DD9C86 /* StartViewController.swift */, 138 | 19FB9DA8239E65ED0056E3AB /* ViewController.swift */, 139 | 19FB9DAA239E65ED0056E3AB /* Main.storyboard */, 140 | 19FB9DAD239E65EE0056E3AB /* Assets.xcassets */, 141 | 19FB9DAF239E65EE0056E3AB /* LaunchScreen.storyboard */, 142 | 19FB9DB2239E65EE0056E3AB /* Info.plist */, 143 | ); 144 | path = "quickstart-ios-swift"; 145 | sourceTree = ""; 146 | }; 147 | /* End PBXGroup section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | 19FB9DA0239E65EC0056E3AB /* quickstart-ios-swift */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = 19FB9DB5239E65EE0056E3AB /* Build configuration list for PBXNativeTarget "quickstart-ios-swift" */; 153 | buildPhases = ( 154 | 19FB9D9D239E65EC0056E3AB /* Sources */, 155 | 19FB9D9E239E65EC0056E3AB /* Frameworks */, 156 | 19FB9D9F239E65EC0056E3AB /* Resources */, 157 | 9A34D6D72429622A00FE3662 /* Embed Frameworks */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = "quickstart-ios-swift"; 164 | packageProductDependencies = ( 165 | 662DAA522A65E36D002DE21D /* DeepAR */, 166 | ); 167 | productName = "quickstart-ios-swift"; 168 | productReference = 19FB9DA1239E65EC0056E3AB /* quickstart-ios-swift.app */; 169 | productType = "com.apple.product-type.application"; 170 | }; 171 | /* End PBXNativeTarget section */ 172 | 173 | /* Begin PBXProject section */ 174 | 19FB9D99239E65EC0056E3AB /* Project object */ = { 175 | isa = PBXProject; 176 | attributes = { 177 | LastSwiftUpdateCheck = 1120; 178 | LastUpgradeCheck = 1120; 179 | ORGANIZATIONNAME = "Lara Vertlberg"; 180 | TargetAttributes = { 181 | 19FB9DA0239E65EC0056E3AB = { 182 | CreatedOnToolsVersion = 11.2.1; 183 | }; 184 | }; 185 | }; 186 | buildConfigurationList = 19FB9D9C239E65EC0056E3AB /* Build configuration list for PBXProject "quickstart-ios-swift" */; 187 | compatibilityVersion = "Xcode 9.3"; 188 | developmentRegion = en; 189 | hasScannedForEncodings = 0; 190 | knownRegions = ( 191 | en, 192 | Base, 193 | ); 194 | mainGroup = 19FB9D98239E65EC0056E3AB; 195 | packageReferences = ( 196 | 662DAA512A65E36D002DE21D /* XCRemoteSwiftPackageReference "swift-deepar" */, 197 | ); 198 | productRefGroup = 19FB9DA2239E65EC0056E3AB /* Products */; 199 | projectDirPath = ""; 200 | projectRoot = ""; 201 | targets = ( 202 | 19FB9DA0239E65EC0056E3AB /* quickstart-ios-swift */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 19FB9D9F239E65EC0056E3AB /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 8DF1C84C2852328C002E231B /* galaxy_background.deepar in Resources */, 213 | 19FB9DB1239E65EE0056E3AB /* LaunchScreen.storyboard in Resources */, 214 | 8DF1C83F2852328C002E231B /* Neon_Devil_Horns.deepar in Resources */, 215 | 8DF1C84D2852328C002E231B /* Pixel_Hearts.deepar in Resources */, 216 | 8DF1C8442852328C002E231B /* Emotion_Meter.deepar in Resources */, 217 | 8DF1C8432852328C002E231B /* viking_helmet.deepar in Resources */, 218 | 8DF1C83C2852328C002E231B /* Vendetta_Mask.deepar in Resources */, 219 | 19FB9DAE239E65EE0056E3AB /* Assets.xcassets in Resources */, 220 | 8DF1C84B2852328C002E231B /* Stallone.deepar in Resources */, 221 | 8DF1C84A2852328C002E231B /* Snail.deepar in Resources */, 222 | 8DF1C8472852328C002E231B /* burning_effect.deepar in Resources */, 223 | 19FB9DAC239E65ED0056E3AB /* Main.storyboard in Resources */, 224 | 8DF1C8482852328C002E231B /* Elephant_Trunk.deepar in Resources */, 225 | 8DF1C83D2852328C002E231B /* Humanoid.deepar in Resources */, 226 | 8DF1C8462852328C002E231B /* flower_face.deepar in Resources */, 227 | 8DF1C8452852328C002E231B /* Emotions_Exaggerator.deepar in Resources */, 228 | 8DF1C8412852328C002E231B /* MakeupLook.deepar in Resources */, 229 | 8DF1C8492852328C002E231B /* Ping_Pong.deepar in Resources */, 230 | 8DF1C8402852328C002E231B /* Hope.deepar in Resources */, 231 | 8DF1C83E2852328C002E231B /* Fire_Effect.deepar in Resources */, 232 | 8DF1C8422852328C002E231B /* Split_View_Look.deepar in Resources */, 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXResourcesBuildPhase section */ 237 | 238 | /* Begin PBXSourcesBuildPhase section */ 239 | 19FB9D9D239E65EC0056E3AB /* Sources */ = { 240 | isa = PBXSourcesBuildPhase; 241 | buildActionMask = 2147483647; 242 | files = ( 243 | 19FB9DA9239E65ED0056E3AB /* ViewController.swift in Sources */, 244 | 19FB9DA5239E65ED0056E3AB /* AppDelegate.swift in Sources */, 245 | 9A49710124FE579800DD9C86 /* StartViewController.swift in Sources */, 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | }; 249 | /* End PBXSourcesBuildPhase section */ 250 | 251 | /* Begin PBXVariantGroup section */ 252 | 19FB9DAA239E65ED0056E3AB /* Main.storyboard */ = { 253 | isa = PBXVariantGroup; 254 | children = ( 255 | 19FB9DAB239E65ED0056E3AB /* Base */, 256 | ); 257 | name = Main.storyboard; 258 | sourceTree = ""; 259 | }; 260 | 19FB9DAF239E65EE0056E3AB /* LaunchScreen.storyboard */ = { 261 | isa = PBXVariantGroup; 262 | children = ( 263 | 19FB9DB0239E65EE0056E3AB /* Base */, 264 | ); 265 | name = LaunchScreen.storyboard; 266 | sourceTree = ""; 267 | }; 268 | /* End PBXVariantGroup section */ 269 | 270 | /* Begin XCBuildConfiguration section */ 271 | 19FB9DB3239E65EE0056E3AB /* Debug */ = { 272 | isa = XCBuildConfiguration; 273 | buildSettings = { 274 | ALWAYS_SEARCH_USER_PATHS = NO; 275 | CLANG_ANALYZER_NONNULL = YES; 276 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 277 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 278 | CLANG_CXX_LIBRARY = "libc++"; 279 | CLANG_ENABLE_MODULES = YES; 280 | CLANG_ENABLE_OBJC_ARC = YES; 281 | CLANG_ENABLE_OBJC_WEAK = YES; 282 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 283 | CLANG_WARN_BOOL_CONVERSION = YES; 284 | CLANG_WARN_COMMA = YES; 285 | CLANG_WARN_CONSTANT_CONVERSION = YES; 286 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 287 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 288 | CLANG_WARN_DOCUMENTATION_COMMENTS = 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_IMPLICIT_RETAIN_SELF = YES; 295 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 296 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 297 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 298 | CLANG_WARN_STRICT_PROTOTYPES = YES; 299 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 300 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 301 | CLANG_WARN_UNREACHABLE_CODE = YES; 302 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 303 | COPY_PHASE_STRIP = NO; 304 | DEBUG_INFORMATION_FORMAT = dwarf; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | ENABLE_TESTABILITY = YES; 307 | GCC_C_LANGUAGE_STANDARD = gnu11; 308 | GCC_DYNAMIC_NO_PIC = NO; 309 | GCC_NO_COMMON_BLOCKS = YES; 310 | GCC_OPTIMIZATION_LEVEL = 0; 311 | GCC_PREPROCESSOR_DEFINITIONS = ( 312 | "DEBUG=1", 313 | "$(inherited)", 314 | ); 315 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 316 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 317 | GCC_WARN_UNDECLARED_SELECTOR = YES; 318 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 319 | GCC_WARN_UNUSED_FUNCTION = YES; 320 | GCC_WARN_UNUSED_VARIABLE = YES; 321 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 322 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 323 | MTL_FAST_MATH = YES; 324 | ONLY_ACTIVE_ARCH = YES; 325 | SDKROOT = iphoneos; 326 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 327 | SWIFT_INSTALL_OBJC_HEADER = YES; 328 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 329 | }; 330 | name = Debug; 331 | }; 332 | 19FB9DB4239E65EE0056E3AB /* Release */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_ENABLE_OBJC_WEAK = YES; 343 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 344 | CLANG_WARN_BOOL_CONVERSION = YES; 345 | CLANG_WARN_COMMA = YES; 346 | CLANG_WARN_CONSTANT_CONVERSION = YES; 347 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_IMPLICIT_RETAIN_SELF = YES; 356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 359 | CLANG_WARN_STRICT_PROTOTYPES = YES; 360 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 361 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 362 | CLANG_WARN_UNREACHABLE_CODE = YES; 363 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 364 | COPY_PHASE_STRIP = NO; 365 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 366 | ENABLE_NS_ASSERTIONS = NO; 367 | ENABLE_STRICT_OBJC_MSGSEND = YES; 368 | GCC_C_LANGUAGE_STANDARD = gnu11; 369 | GCC_NO_COMMON_BLOCKS = YES; 370 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 371 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 372 | GCC_WARN_UNDECLARED_SELECTOR = YES; 373 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 374 | GCC_WARN_UNUSED_FUNCTION = YES; 375 | GCC_WARN_UNUSED_VARIABLE = YES; 376 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 377 | MTL_ENABLE_DEBUG_INFO = NO; 378 | MTL_FAST_MATH = YES; 379 | SDKROOT = iphoneos; 380 | SWIFT_COMPILATION_MODE = wholemodule; 381 | SWIFT_INSTALL_OBJC_HEADER = YES; 382 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 383 | VALIDATE_PRODUCT = YES; 384 | }; 385 | name = Release; 386 | }; 387 | 19FB9DB6239E65EE0056E3AB /* Debug */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 391 | CODE_SIGN_STYLE = Automatic; 392 | DEVELOPMENT_TEAM = ""; 393 | FRAMEWORK_SEARCH_PATHS = ( 394 | "$(inherited)", 395 | "$(PROJECT_DIR)/quickstart-ios-swift/Frameworks", 396 | "$(PROJECT_DIR)", 397 | ); 398 | INFOPLIST_FILE = "quickstart-ios-swift/Info.plist"; 399 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 400 | LD_RUNPATH_SEARCH_PATHS = ( 401 | "$(inherited)", 402 | "@executable_path/Frameworks", 403 | ); 404 | PRODUCT_BUNDLE_IDENTIFIER = "ai.deepar.quickstart-ios"; 405 | PRODUCT_NAME = "$(TARGET_NAME)"; 406 | SWIFT_VERSION = 5.0; 407 | TARGETED_DEVICE_FAMILY = "1,2"; 408 | }; 409 | name = Debug; 410 | }; 411 | 19FB9DB7239E65EE0056E3AB /* Release */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 415 | CODE_SIGN_STYLE = Automatic; 416 | DEVELOPMENT_TEAM = ""; 417 | FRAMEWORK_SEARCH_PATHS = ( 418 | "$(inherited)", 419 | "$(PROJECT_DIR)/quickstart-ios-swift/Frameworks", 420 | "$(PROJECT_DIR)", 421 | ); 422 | INFOPLIST_FILE = "quickstart-ios-swift/Info.plist"; 423 | IPHONEOS_DEPLOYMENT_TARGET = 13.4; 424 | LD_RUNPATH_SEARCH_PATHS = ( 425 | "$(inherited)", 426 | "@executable_path/Frameworks", 427 | ); 428 | PRODUCT_BUNDLE_IDENTIFIER = "ai.deepar.quickstart-ios"; 429 | PRODUCT_NAME = "$(TARGET_NAME)"; 430 | SWIFT_VERSION = 5.0; 431 | TARGETED_DEVICE_FAMILY = "1,2"; 432 | }; 433 | name = Release; 434 | }; 435 | /* End XCBuildConfiguration section */ 436 | 437 | /* Begin XCConfigurationList section */ 438 | 19FB9D9C239E65EC0056E3AB /* Build configuration list for PBXProject "quickstart-ios-swift" */ = { 439 | isa = XCConfigurationList; 440 | buildConfigurations = ( 441 | 19FB9DB3239E65EE0056E3AB /* Debug */, 442 | 19FB9DB4239E65EE0056E3AB /* Release */, 443 | ); 444 | defaultConfigurationIsVisible = 0; 445 | defaultConfigurationName = Release; 446 | }; 447 | 19FB9DB5239E65EE0056E3AB /* Build configuration list for PBXNativeTarget "quickstart-ios-swift" */ = { 448 | isa = XCConfigurationList; 449 | buildConfigurations = ( 450 | 19FB9DB6239E65EE0056E3AB /* Debug */, 451 | 19FB9DB7239E65EE0056E3AB /* Release */, 452 | ); 453 | defaultConfigurationIsVisible = 0; 454 | defaultConfigurationName = Release; 455 | }; 456 | /* End XCConfigurationList section */ 457 | 458 | /* Begin XCRemoteSwiftPackageReference section */ 459 | 662DAA512A65E36D002DE21D /* XCRemoteSwiftPackageReference "swift-deepar" */ = { 460 | isa = XCRemoteSwiftPackageReference; 461 | repositoryURL = "https://github.com/DeepARSDK/swift-deepar"; 462 | requirement = { 463 | kind = upToNextMajorVersion; 464 | minimumVersion = 5.4.3; 465 | }; 466 | }; 467 | /* End XCRemoteSwiftPackageReference section */ 468 | 469 | /* Begin XCSwiftPackageProductDependency section */ 470 | 662DAA522A65E36D002DE21D /* DeepAR */ = { 471 | isa = XCSwiftPackageProductDependency; 472 | package = 662DAA512A65E36D002DE21D /* XCRemoteSwiftPackageReference "swift-deepar" */; 473 | productName = DeepAR; 474 | }; 475 | /* End XCSwiftPackageProductDependency section */ 476 | }; 477 | rootObject = 19FB9D99239E65EC0056E3AB /* Project object */; 478 | } 479 | -------------------------------------------------------------------------------- /quickstart-ios-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /quickstart-ios-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /quickstart-ios-swift.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "originHash" : "3a1bb971eb741d28e266be8fdb33fd09db169ffad2a2762d50569932d2cf44d7", 3 | "pins" : [ 4 | { 5 | "identity" : "swift-deepar", 6 | "kind" : "remoteSourceControl", 7 | "location" : "https://github.com/DeepARSDK/swift-deepar", 8 | "state" : { 9 | "revision" : "579b5bac6a25aa537cee3832c72f74c805cc46da", 10 | "version" : "5.6.15" 11 | } 12 | } 13 | ], 14 | "version" : 3 15 | } 16 | -------------------------------------------------------------------------------- /quickstart-ios-swift.xcodeproj/xcshareddata/xcschemes/quickstart-ios-swift.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /quickstart-ios-swift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // quickstart-ios-swift 4 | // 5 | // Created by Lara Vertlberg on 09/12/2019. 6 | // Copyright © 2019 Lara Vertlberg. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | 19 | return true 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /quickstart-ios-swift/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 | } -------------------------------------------------------------------------------- /quickstart-ios-swift/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /quickstart-ios-swift/Assets.xcassets/SwitchCamera.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "camera-white.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "camera-white@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "camera-white@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /quickstart-ios-swift/Assets.xcassets/SwitchCamera.imageset/camera-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Assets.xcassets/SwitchCamera.imageset/camera-white.png -------------------------------------------------------------------------------- /quickstart-ios-swift/Assets.xcassets/SwitchCamera.imageset/camera-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Assets.xcassets/SwitchCamera.imageset/camera-white@2x.png -------------------------------------------------------------------------------- /quickstart-ios-swift/Assets.xcassets/SwitchCamera.imageset/camera-white@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Assets.xcassets/SwitchCamera.imageset/camera-white@3x.png -------------------------------------------------------------------------------- /quickstart-ios-swift/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 | -------------------------------------------------------------------------------- /quickstart-ios-swift/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 31 | 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 | 67 | 74 | 81 | 82 | 83 | 84 | 85 | 86 | 93 | 100 | 107 | 108 | 109 | 110 | 111 | 112 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Elephant_Trunk.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Elephant_Trunk.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Emotion_Meter.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Emotion_Meter.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Emotions_Exaggerator.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Emotions_Exaggerator.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Fire_Effect.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Fire_Effect.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Hope.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Hope.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Humanoid.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Humanoid.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/MakeupLook.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/MakeupLook.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Neon_Devil_Horns.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Neon_Devil_Horns.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Ping_Pong.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Ping_Pong.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Pixel_Hearts.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Pixel_Hearts.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Snail.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Snail.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Split_View_Look.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Split_View_Look.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Stallone.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Stallone.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/Vendetta_Mask.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/Vendetta_Mask.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/burning_effect.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/burning_effect.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/flower_face.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/flower_face.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/galaxy_background.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/galaxy_background.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/Effects/viking_helmet.deepar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DeepARSDK/quickstart-ios-swift/f5dc124e3bf995a728697bab30f7a0aa2788e8d4/quickstart-ios-swift/Effects/viking_helmet.deepar -------------------------------------------------------------------------------- /quickstart-ios-swift/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | NSCameraUsageDescription 24 | App needs camera access 25 | NSMicrophoneUsageDescription 26 | App needs microphone access 27 | NSPhotoLibraryAddUsageDescription 28 | App needs photo library access 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 | -------------------------------------------------------------------------------- /quickstart-ios-swift/StartViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StartViewController.swift 3 | // quickstart-ios-swift 4 | // 5 | // Created by Matej Trbara on 01/09/2020. 6 | // Copyright © 2020 Lara Vertlberg. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | 13 | class StartViewController : UIViewController { 14 | 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | } 19 | @IBAction func goToDeepAR(_ sender: Any) { 20 | 21 | if let vc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ViewController") as? ViewController 22 | { 23 | present(vc, animated: true, completion: nil) 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /quickstart-ios-swift/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // quickstart-ios-swift 4 | // 5 | // Created by Lara Vertlberg on 09/12/2019. 6 | // Copyright © 2019 Lara Vertlberg. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import DeepAR 11 | import AVKit 12 | import AVFoundation 13 | 14 | enum RecordingMode : String { 15 | case photo 16 | case video 17 | case lowQualityVideo 18 | } 19 | 20 | 21 | enum Effects: String, CaseIterable { 22 | case viking_helmet = "viking_helmet.deepar" 23 | case MakeupLook = "MakeupLook.deepar" 24 | case Split_View_Look = "Split_View_Look.deepar" 25 | case Emotions_Exaggerator = "Emotions_Exaggerator.deepar" 26 | case Emotion_Meter = "Emotion_Meter.deepar" 27 | case Stallone = "Stallone.deepar" 28 | case flower_face = "flower_face.deepar" 29 | case galaxy_background = "galaxy_background.deepar" 30 | case Humanoid = "Humanoid.deepar" 31 | case Neon_Devil_Horns = "Neon_Devil_Horns.deepar" 32 | case Ping_Pong = "Ping_Pong.deepar" 33 | case Pixel_Hearts = "Pixel_Hearts.deepar" 34 | case Snail = "Snail.deepar" 35 | case Hope = "Hope.deepar" 36 | case Vendetta_Mask = "Vendetta_Mask.deepar" 37 | case Fire_Effect = "Fire_Effect.deepar" 38 | case burning_effect = "burning_effect.deepar" 39 | case Elephant_Trunk = "Elephant_Trunk.deepar" 40 | } 41 | 42 | class ViewController: UIViewController { 43 | 44 | // MARK: - IBOutlets - 45 | 46 | @IBOutlet weak var switchCameraButton: UIButton! 47 | 48 | @IBOutlet weak var masksButton: UIButton! 49 | @IBOutlet weak var effectsButton: UIButton! 50 | @IBOutlet weak var filtersButton: UIButton! 51 | 52 | @IBOutlet weak var previousButton: UIButton! 53 | @IBOutlet weak var nextButton: UIButton! 54 | @IBOutlet weak var recordActionButton: UIButton! 55 | 56 | @IBOutlet weak var lowQVideoButton: UIButton! 57 | @IBOutlet weak var videoButton: UIButton! 58 | @IBOutlet weak var photoButton: UIButton! 59 | @IBOutlet weak var arViewContainer: UIView! 60 | 61 | private var deepAR: DeepAR! 62 | private var arView: UIView! 63 | 64 | // This class handles camera interaction. Start/stop feed, check permissions etc. You can use it or you 65 | // can provide your own implementation 66 | private var cameraController: CameraController! 67 | 68 | // MARK: - Private properties - 69 | 70 | private var effectIndex: Int = 0 71 | private var effectPaths: [String?] { 72 | return Effects.allCases.map { $0.rawValue.path } 73 | } 74 | 75 | private var buttonRecordingModePairs: [(UIButton, RecordingMode)] = [] 76 | private var currentRecordingMode: RecordingMode! { 77 | didSet { 78 | updateRecordingModeAppearance() 79 | } 80 | } 81 | 82 | private var isRecordingInProcess: Bool = false 83 | 84 | // MARK: - Lifecycle - 85 | 86 | override func viewDidLoad() { 87 | super.viewDidLoad() 88 | 89 | setupDeepARAndCamera() 90 | addTargets() 91 | buttonRecordingModePairs = [ (photoButton, RecordingMode.photo), (videoButton, RecordingMode.video), (lowQVideoButton, RecordingMode.lowQualityVideo)] 92 | currentRecordingMode = .photo } 93 | 94 | override func viewWillAppear(_ animated: Bool) { 95 | super.viewWillAppear(animated) 96 | 97 | NotificationCenter.default.addObserver(self, selector: #selector(orientationDidChange), name: UIDevice.orientationDidChangeNotification, object: nil) 98 | } 99 | 100 | override func viewWillLayoutSubviews() { 101 | super.viewWillLayoutSubviews() 102 | arView.frame = self.view.bounds 103 | } 104 | 105 | override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 106 | super.viewWillTransition(to: size, with: coordinator) 107 | // sometimes UIDeviceOrientationDidChangeNotification will be delayed, so we call orientationChanged in 0.5 seconds anyway 108 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in 109 | self?.orientationDidChange() 110 | } 111 | } 112 | 113 | // MARK: - Private methods - 114 | 115 | private func setupDeepARAndCamera() { 116 | 117 | self.deepAR = DeepAR() 118 | self.deepAR.delegate = self 119 | self.deepAR.setLicenseKey("your_license_key_here") 120 | 121 | cameraController = CameraController() 122 | cameraController.deepAR = self.deepAR 123 | self.deepAR.videoRecordingWarmupEnabled = false; 124 | 125 | self.arView = self.deepAR.createARView(withFrame: self.arViewContainer.frame) 126 | self.arView.translatesAutoresizingMaskIntoConstraints = false 127 | self.arViewContainer.addSubview(self.arView) 128 | self.arView.leftAnchor.constraint(equalTo: self.arViewContainer.leftAnchor, constant: 0).isActive = true 129 | self.arView.rightAnchor.constraint(equalTo: self.arViewContainer.rightAnchor, constant: 0).isActive = true 130 | self.arView.topAnchor.constraint(equalTo: self.arViewContainer.topAnchor, constant: 0).isActive = true 131 | self.arView.bottomAnchor.constraint(equalTo: self.arViewContainer.bottomAnchor, constant: 0).isActive = true 132 | 133 | cameraController.startCamera(withAudio: true) 134 | } 135 | 136 | private func addTargets() { 137 | switchCameraButton.addTarget(self, action: #selector(didTapSwitchCameraButton), for: .touchUpInside) 138 | recordActionButton.addTarget(self, action: #selector(didTapRecordActionButton), for: .touchUpInside) 139 | previousButton.addTarget(self, action: #selector(didTapPreviousButton), for: .touchUpInside) 140 | nextButton.addTarget(self, action: #selector(didTapNextButton), for: .touchUpInside) 141 | 142 | photoButton.addTarget(self, action: #selector(didTapPhotoButton), for: .touchUpInside) 143 | videoButton.addTarget(self, action: #selector(didTapVideoButton), for: .touchUpInside) 144 | lowQVideoButton.addTarget(self, action: #selector(didTapLowQVideoButton), for: .touchUpInside) 145 | } 146 | 147 | private func updateRecordingModeAppearance() { 148 | buttonRecordingModePairs.forEach { (button, recordingMode) in 149 | button.isSelected = recordingMode == currentRecordingMode 150 | } 151 | } 152 | 153 | @objc 154 | private func orientationDidChange() { 155 | guard let orientation = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation else { return } 156 | switch orientation { 157 | case .landscapeLeft: 158 | cameraController.videoOrientation = .landscapeLeft 159 | break 160 | case .landscapeRight: 161 | cameraController.videoOrientation = .landscapeRight 162 | break 163 | case .portrait: 164 | cameraController.videoOrientation = .portrait 165 | break 166 | case .portraitUpsideDown: 167 | cameraController.videoOrientation = .portraitUpsideDown 168 | default: 169 | break 170 | } 171 | 172 | } 173 | 174 | @objc 175 | private func didTapSwitchCameraButton() { 176 | cameraController.position = cameraController.position == .back ? .front : .back 177 | } 178 | 179 | @objc 180 | private func didTapRecordActionButton() { 181 | 182 | if (currentRecordingMode == RecordingMode.photo) { 183 | deepAR.takeScreenshot() 184 | return 185 | } 186 | 187 | if (isRecordingInProcess) { 188 | deepAR.finishVideoRecording() 189 | isRecordingInProcess = false 190 | return 191 | } 192 | 193 | let width: Int32 = Int32(deepAR.renderingResolution.width) 194 | let height: Int32 = Int32(deepAR.renderingResolution.height) 195 | 196 | if (currentRecordingMode == RecordingMode.video) { 197 | if(deepAR.videoRecordingWarmupEnabled) { 198 | deepAR.resumeVideoRecording() 199 | } else { 200 | deepAR.startVideoRecording(withOutputWidth: width, outputHeight: height) 201 | } 202 | isRecordingInProcess = true 203 | return 204 | } 205 | 206 | if (currentRecordingMode == RecordingMode.lowQualityVideo) { 207 | if(deepAR.videoRecordingWarmupEnabled) { 208 | NSLog("Can't change video recording settings when video recording warmap enabled") 209 | return 210 | } 211 | let videoQuality = 0.1 212 | let bitrate = 1250000 213 | let videoSettings:[AnyHashable : AnyObject] = [ 214 | AVVideoQualityKey : (videoQuality as AnyObject), 215 | AVVideoAverageBitRateKey : (bitrate as AnyObject) 216 | ] 217 | 218 | let frame = CGRect(x: 0, y: 0, width: 1, height: 1) 219 | 220 | deepAR.startVideoRecording(withOutputWidth: width, outputHeight: height, subframe: frame, videoCompressionProperties: videoSettings, recordAudio: true) 221 | isRecordingInProcess = true 222 | } 223 | 224 | } 225 | 226 | @objc 227 | private func didTapPreviousButton() { 228 | var path: String? 229 | effectIndex = (effectIndex - 1 < 0) ? (effectPaths.count - 1) : (effectIndex - 1) 230 | path = effectPaths[effectIndex] 231 | deepAR.switchEffect(withSlot: "effect", path: path) 232 | } 233 | 234 | @objc 235 | private func didTapNextButton() { 236 | var path: String? 237 | effectIndex = (effectIndex + 1 > effectPaths.count - 1) ? 0 : (effectIndex + 1) 238 | path = effectPaths[effectIndex] 239 | deepAR.switchEffect(withSlot: "effect", path: path) 240 | } 241 | 242 | @objc 243 | private func didTapPhotoButton() { 244 | currentRecordingMode = .photo 245 | } 246 | 247 | @objc 248 | private func didTapVideoButton() { 249 | currentRecordingMode = .video 250 | } 251 | 252 | @objc 253 | private func didTapLowQVideoButton() { 254 | currentRecordingMode = .lowQualityVideo 255 | } 256 | 257 | override func touchesBegan(_ touches: Set, with event: UIEvent?) { 258 | super.touchesBegan(touches, with: event) 259 | let touch = touches.first 260 | let point = touch?.location(in: self.arView) 261 | let info = TouchInfo(x: point!.x, y: point!.y, type: TouchType.START); 262 | self.deepAR.touchOccurred(info) 263 | } 264 | 265 | override func touchesMoved(_ touches: Set, with event: UIEvent?) { 266 | super.touchesMoved(touches, with: event) 267 | let touch = touches.first 268 | let point = touch?.location(in: self.arView) 269 | let info = TouchInfo(x: point!.x, y: point!.y, type: TouchType.MOVE); 270 | self.deepAR.touchOccurred(info) 271 | } 272 | 273 | override func touchesEnded(_ touches: Set, with event: UIEvent?) { 274 | super.touchesEnded(touches, with: event) 275 | let touch = touches.first 276 | let point = touch?.location(in: self.arView) 277 | let info = TouchInfo(x: point!.x, y: point!.y, type: TouchType.END); 278 | self.deepAR.touchOccurred(info) 279 | } 280 | 281 | override func touchesCancelled(_ touches: Set, with event: UIEvent?) { 282 | super.touchesCancelled(touches, with: event) 283 | let touch = touches.first 284 | let point = touch?.location(in: self.arView) 285 | let info = TouchInfo(x: point!.x, y: point!.y, type: TouchType.END); 286 | self.deepAR.touchOccurred(info) 287 | } 288 | } 289 | 290 | // MARK: - ARViewDelegate - 291 | 292 | extension ViewController: DeepARDelegate { 293 | func didFinishPreparingForVideoRecording() { 294 | NSLog("didFinishPreparingForVideoRecording!!!!!") 295 | } 296 | 297 | func didStartVideoRecording() { 298 | NSLog("didStartVideoRecording!!!!!") 299 | } 300 | 301 | func didFinishVideoRecording(_ videoFilePath: String!) { 302 | 303 | NSLog("didFinishVideoRecording!!!!!") 304 | 305 | let documentsDirectory = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first! 306 | let components = videoFilePath.components(separatedBy: "/") 307 | guard let last = components.last else { return } 308 | let destination = URL(fileURLWithPath: String(format: "%@/%@", documentsDirectory, last)) 309 | 310 | let playerController = AVPlayerViewController() 311 | let player = AVPlayer(url: destination) 312 | playerController.player = player 313 | present(playerController, animated: true) { 314 | player.play() 315 | } 316 | } 317 | 318 | func recordingFailedWithError(_ error: Error!) {} 319 | 320 | func didTakeScreenshot(_ screenshot: UIImage!) { 321 | UIImageWriteToSavedPhotosAlbum(screenshot, nil, nil, nil) 322 | 323 | let imageView = UIImageView(image: screenshot) 324 | imageView.frame = view.frame 325 | view.insertSubview(imageView, aboveSubview: arView) 326 | 327 | let flashView = UIView(frame: view.frame) 328 | flashView.alpha = 0 329 | flashView.backgroundColor = .black 330 | view.insertSubview(flashView, aboveSubview: imageView) 331 | 332 | UIView.animate(withDuration: 0.1, animations: { 333 | flashView.alpha = 1 334 | }) { _ in 335 | flashView.removeFromSuperview() 336 | 337 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) { 338 | imageView.removeFromSuperview() 339 | } 340 | } 341 | } 342 | 343 | func didInitialize() { 344 | if (deepAR.videoRecordingWarmupEnabled) { 345 | DispatchQueue.main.async { [self] in 346 | let width: Int32 = Int32(deepAR.renderingResolution.width) 347 | let height: Int32 = Int32(deepAR.renderingResolution.height) 348 | deepAR.startVideoRecording(withOutputWidth: width, outputHeight: height) 349 | } 350 | } 351 | } 352 | 353 | override func viewDidDisappear(_ animated: Bool) { 354 | deepAR.shutdown() 355 | } 356 | 357 | func didFinishShutdown (){ 358 | NSLog("didFinishShutdown!!!!!") 359 | } 360 | 361 | func faceVisiblityDidChange(_ faceVisible: Bool) {} 362 | } 363 | 364 | extension String { 365 | var path: String? { 366 | return Bundle.main.path(forResource: self, ofType: nil) 367 | } 368 | } 369 | --------------------------------------------------------------------------------