├── ARkitGame ├── Assets.xcassets │ ├── Contents.json │ ├── box.imageset │ │ ├── box.png │ │ └── Contents.json │ ├── green.imageset │ │ ├── green.png │ │ └── Contents.json │ ├── gridDash.imageset │ │ ├── gridDash.jpg │ │ └── Contents.json │ ├── tracker.imageset │ │ ├── tracker.png │ │ └── Contents.json │ ├── ballTexture.imageset │ │ ├── ballTexture.jpg │ │ └── Contents.json │ ├── greenTexture.imageset │ │ ├── greenTexture.jpg │ │ └── Contents.json │ ├── grid.imageset │ │ ├── MicrosoftTeams-image.png │ │ └── Contents.json │ ├── congratulations.imageset │ │ ├── congratulations.png │ │ └── Contents.json │ ├── AccentColor.colorset │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── art.scnassets │ ├── scene.scn │ ├── spark.png │ ├── star.png │ ├── Explode.scnp │ ├── reactor.scnp │ ├── CircleParticle.png │ └── CustomParticle.scn ├── Congratulations View │ ├── Congratulations.swift │ └── Congratulations.xib ├── Extensions │ └── UIView+Animations.swift ├── Storyboards │ └── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard ├── AppLifeCycle │ └── AppDelegate.swift ├── Info.plist └── ViewControllers │ └── GameViewController.swift ├── ARkitGame.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── project.pbxproj ├── README.md ├── .gitignore └── LICENSE /ARkitGame/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ARkitGame/art.scnassets/scene.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/art.scnassets/scene.scn -------------------------------------------------------------------------------- /ARkitGame/art.scnassets/spark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/art.scnassets/spark.png -------------------------------------------------------------------------------- /ARkitGame/art.scnassets/star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/art.scnassets/star.png -------------------------------------------------------------------------------- /ARkitGame/art.scnassets/Explode.scnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/art.scnassets/Explode.scnp -------------------------------------------------------------------------------- /ARkitGame/art.scnassets/reactor.scnp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/art.scnassets/reactor.scnp -------------------------------------------------------------------------------- /ARkitGame/art.scnassets/CircleParticle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/art.scnassets/CircleParticle.png -------------------------------------------------------------------------------- /ARkitGame/art.scnassets/CustomParticle.scn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/art.scnassets/CustomParticle.scn -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/box.imageset/box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/box.imageset/box.png -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/green.imageset/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/green.imageset/green.png -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/gridDash.imageset/gridDash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/gridDash.imageset/gridDash.jpg -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/tracker.imageset/tracker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/tracker.imageset/tracker.png -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/ballTexture.imageset/ballTexture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/ballTexture.imageset/ballTexture.jpg -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/greenTexture.imageset/greenTexture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/greenTexture.imageset/greenTexture.jpg -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/grid.imageset/MicrosoftTeams-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/grid.imageset/MicrosoftTeams-image.png -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/congratulations.imageset/congratulations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/Game-With-AR/HEAD/ARkitGame/Assets.xcassets/congratulations.imageset/congratulations.png -------------------------------------------------------------------------------- /ARkitGame.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/box.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "box.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/green.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "green.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/grid.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "MicrosoftTeams-image.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/congratulations.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "congratulations.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ARkitGame.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/tracker.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "tracker.png", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/gridDash.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "gridDash.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/ballTexture.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ballTexture.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/greenTexture.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "greenTexture.jpg", 5 | "idiom" : "universal" 6 | } 7 | ], 8 | "info" : { 9 | "author" : "xcode", 10 | "version" : 1 11 | }, 12 | "properties" : { 13 | "preserves-vector-representation" : true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ARkitGame/Congratulations View/Congratulations.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Congratulations.swift 3 | // ARkitGame 4 | // 5 | // Created by Mansi Vadodariya on 21/04/21. 6 | // 7 | 8 | import UIKit 9 | 10 | class Congratulations: UIView { 11 | 12 | @IBOutlet weak var imgCongratulations: UIImageView! 13 | 14 | override func draw(_ rect: CGRect) { 15 | super.draw(rect) 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ARkitGame/Extensions/UIView+Animations.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Animations.swift 3 | // ARkitGame 4 | // 5 | // Created by Mansi Vadodariya on 20/04/21. 6 | // 7 | 8 | import Foundation 9 | import UIKit 10 | 11 | extension UIView { 12 | 13 | /// Rotate 180 degree to self 14 | /// - Parameters: 15 | /// - duration: duration 16 | /// - options: options 17 | func rotate180(duration: TimeInterval, options: UIView.AnimationOptions) { 18 | UIView.animate(withDuration: duration, delay: 0, options: options, animations: { [weak self] in 19 | guard let `self` = self else { return } 20 | self.transform = self.transform.rotated(by: CGFloat.pi) 21 | }, completion: nil) 22 | } 23 | 24 | /// Apply radius with border to view 25 | /// - Parameters: 26 | /// - radius: radius 27 | /// - borderWidth: borderWidth 28 | /// - borderColor: borderColor 29 | func applyRadius(radius: CGFloat, borderWidth: CGFloat = 0, borderColor: CGColor = UIColor.clear.cgColor) { 30 | self.layer.borderColor = borderColor 31 | self.layer.borderWidth = borderWidth 32 | self.layer.cornerRadius = radius 33 | self.layer.masksToBounds = true 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Game-With-AR 2 | The Boxshot game built with ARKit 3 | 4 | [![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://swift.org) 5 | 6 | Following the introduction of Apple's ARKit, we are continuously exploring the impact of augmented reality on the gaming industry. 7 | 8 | ## Getting Started 9 | 10 | ### Features in this demo 11 | 12 | This demo is created using ARKit: 13 | - Place the stack of boxes in the plain surface 14 | - User can try to hit the boxes with the ball in AR world 15 | - Calculate the score based on the remaining box and available shots 16 | 17 | ### Prerequisites 18 | 19 | - Xcode 12 (or above) 20 | - iOS 14.0 (or above) 21 | - iPhone 7 or above 22 | 23 | ### Summary 24 | 25 | - Discover a flat surface and tap to launch the game. The stack of boxes will be placed on the surface, allowing the user to interact by hitting the box with the AR ball. 26 | - Take a look at the demo below: 27 | 28 | ![ARKit Game](https://github.com/SimformSolutionsPvtLtd/Game-With-AR/assets/63225913/58de1010-6a11-4614-91df-f58314922ea5) 29 | 30 | ### Find this example useful? ❤️ 31 | 32 | Give a ⭐️ if this project helped you! 33 | 34 | ### Check out our other Libraries 35 | 36 |

🗂 Simform Solutions Libraries→

37 | 38 | ### Copyright 39 | 40 | Copyright © 2023 Simform. All Rights Reserved. 41 | -------------------------------------------------------------------------------- /ARkitGame/Storyboards/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 | -------------------------------------------------------------------------------- /ARkitGame/AppLifeCycle/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ARkitGame 4 | // 5 | // Created by Mansi Vadodariya on 10/02/21. 6 | // 7 | 8 | import UIKit 9 | 10 | @main 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | func applicationWillResignActive(_ application: UIApplication) { 22 | // 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. 23 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 24 | } 25 | 26 | func applicationDidEnterBackground(_ application: UIApplication) { 27 | // 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. 28 | } 29 | 30 | func applicationWillEnterForeground(_ application: UIApplication) { 31 | // 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. 32 | } 33 | 34 | func applicationDidBecomeActive(_ application: UIApplication) { 35 | // 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. 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /ARkitGame/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 | $(PRODUCT_NAME) requires access to your phone’s camera. 25 | UIApplicationSupportsIndirectInputEvents 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | arkit 35 | 36 | UIStatusBarHidden 37 | 38 | UISupportedInterfaceOrientations 39 | 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | UIInterfaceOrientationPortrait 43 | 44 | UISupportedInterfaceOrientations~ipad 45 | 46 | UIInterfaceOrientationPortrait 47 | UIInterfaceOrientationPortraitUpsideDown 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /ARkitGame/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /ARkitGame/Congratulations View/Congratulations.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /ARkitGame/Storyboards/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 | 31 | 32 | 33 | 34 | 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 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ARkitGame/ViewControllers/GameViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // GameViewController.swift 3 | // ARkitGame 4 | // 5 | // Created by Mansi Vadodariya on 10/02/21. 6 | // 7 | 8 | import UIKit 9 | import SceneKit 10 | import ARKit 11 | 12 | struct GameConstants { 13 | static let availableShots: Int = 6 14 | static let remainingBoxes: Int = 6 15 | } 16 | 17 | class GameViewController: UIViewController { 18 | 19 | // MARK: - 20 | // MARK: - Outlets 21 | 22 | @IBOutlet var sceneView: ARSCNView! 23 | @IBOutlet weak var lblAvailable: UILabel! 24 | @IBOutlet weak var lblRemaining: UILabel! 25 | @IBOutlet weak var imgAvailableBG: UIImageView! 26 | @IBOutlet weak var imgRemainingBG: UIImageView! 27 | 28 | // MARK: - 29 | // MARK: - Variables & Declarations 30 | 31 | var trackerNode: SCNNode? 32 | var foundSurface = false 33 | var directionalLightNode: SCNNode? 34 | var ambientLightNode: SCNNode? 35 | var tracking = true 36 | var availableShots = GameConstants.availableShots 37 | var remainingBoxes = GameConstants.remainingBoxes 38 | var planeNode: SCNNode? 39 | var modelRootB: SCNNode? 40 | 41 | // MARK: - 42 | // MARK: - ViewController Life cycle 43 | 44 | override func viewDidLoad() { 45 | super.viewDidLoad() 46 | initialSetup() 47 | } 48 | 49 | override func viewWillAppear(_ animated: Bool) { 50 | super.viewWillAppear(animated) 51 | // Create a session configuration 52 | let configuration = ARWorldTrackingConfiguration() 53 | // Detect horizontal planes in the scene 54 | configuration.planeDetection = .horizontal 55 | // Run the view's session 56 | sceneView.session.run(configuration) 57 | } 58 | 59 | override func viewWillDisappear(_ animated: Bool) { 60 | super.viewWillDisappear(animated) 61 | // Pause the view's session 62 | sceneView.session.pause() 63 | } 64 | 65 | override func touchesBegan(_ touches: Set, with event: UIEvent?) { 66 | if tracking { 67 | //Set up the scene 68 | guard foundSurface else { return } 69 | trackerNode?.removeFromParentNode() 70 | addContainer() 71 | sceneView.scene.physicsWorld.contactDelegate = self 72 | tracking = false 73 | } else { 74 | //Handle the shooting 75 | guard let frame = sceneView.session.currentFrame else { 76 | return 77 | } 78 | let camMatrix = SCNMatrix4(frame.camera.transform) 79 | let direction = SCNVector3Make(-camMatrix.m31 * 5.0, -camMatrix.m32 * 10.0, -camMatrix.m33 * 5.0) 80 | let position = SCNVector3Make(camMatrix.m41, camMatrix.m42, camMatrix.m43) 81 | 82 | let ball = SCNSphere(radius: 0.06) 83 | ball.firstMaterial?.diffuse.contents = UIImage(named: "greenTexture") 84 | ball.firstMaterial?.emission.contents = UIImage(named: "greenTexture") 85 | let ballNode = SCNNode(geometry: ball) 86 | ballNode.name = "Ball" 87 | ballNode.position = position 88 | ballNode.physicsBody = SCNPhysicsBody(type: .dynamic, shape: nil) 89 | ballNode.physicsBody?.categoryBitMask = 3 90 | ballNode.physicsBody?.contactTestBitMask = 1 91 | sceneView.scene.rootNode.addChildNode(ballNode) 92 | ballNode.runAction(SCNAction.sequence([SCNAction.wait(duration: 10.0), SCNAction.removeFromParentNode()])) 93 | let velocityInLocalSpace = SCNVector3(0, 0, -0.15) 94 | let velocityInWorldSpace = ballNode.presentation.convertVector(velocityInLocalSpace, to: nil) 95 | ballNode.physicsBody?.velocity = velocityInWorldSpace 96 | ballNode.physicsBody?.applyForce(direction, asImpulse: true) 97 | 98 | // Shot gets fired here 99 | didFiredShot() 100 | if self.planeNode != nil { 101 | planeNode?.removeFromParentNode() 102 | planeNode = nil 103 | } 104 | } 105 | } 106 | 107 | // MARK: - 108 | // MARK: - Internal setup functions 109 | 110 | fileprivate func initialSetup() { 111 | // Set the view's delegate 112 | sceneView.delegate = self 113 | // Show statistics such as fps and timing information 114 | sceneView.showsStatistics = true 115 | // Create a new scene 116 | let scene = SCNScene(named: "art.scnassets/scene.scn")! 117 | // Set the scene to the view 118 | sceneView.scene = scene 119 | 120 | [imgAvailableBG, imgRemainingBG].forEach { imageView in 121 | if let imageView = imageView { 122 | imageView.layer.cornerRadius = 5.0 123 | imageView.clipsToBounds = true 124 | } 125 | } 126 | clearTexts() 127 | } 128 | 129 | /// Add Root Container to Scene 130 | func addContainer() { 131 | guard let backboardScene = SCNScene(named: "art.scnassets/scene.scn") else { 132 | return 133 | } 134 | guard let backBoardNode = backboardScene.rootNode.childNode(withName: "container", recursively: true) else { 135 | return 136 | } 137 | backBoardNode.isHidden = false 138 | sceneView.scene.rootNode.addChildNode(backBoardNode) 139 | resetGame() 140 | addChildNode() 141 | } 142 | 143 | /// Add Boxes 144 | func addChildNode() { 145 | addBoxNodes(index: 0, position: SCNVector3(0, -0.138, -0.3)) 146 | addBoxNodes(index: 1, position: SCNVector3(0.12, -0.138, -0.3)) 147 | addBoxNodes(index: 2, position: SCNVector3(0.24, -0.138, -0.3)) 148 | addBoxNodes(index: 3, position: SCNVector3(0.06, -0.038, -0.3)) 149 | addBoxNodes(index: 4, position: SCNVector3(0.18, -0.038, -0.3)) 150 | addBoxNodes(index: 5, position: SCNVector3(0.12, 0.062, -0.3)) 151 | 152 | planeNode = SCNNode() 153 | if let planeNode = planeNode { 154 | planeNode.name = "Plane" 155 | planeNode.physicsBody = SCNPhysicsBody(type: .static, shape: nil) 156 | planeNode.geometry = SCNBox(width: 0.4, height: 0.015, length: 0.3, chamferRadius: 0) 157 | planeNode.geometry?.firstMaterial?.diffuse.contents = UIImage(named: "gridDash") 158 | planeNode.position = SCNVector3(0.125, -0.2, -0.28) 159 | self.sceneView.scene.rootNode.addChildNode(planeNode) 160 | } 161 | } 162 | 163 | /// Add boxes inside scene view 164 | /// - Parameters: 165 | /// - index: Index 166 | /// - position: Position 167 | func addBoxNodes(index: Int, position: SCNVector3) { 168 | let node = SCNNode() 169 | node.name = "Node\(index)" 170 | node.physicsBody = SCNPhysicsBody(type: .static, shape: nil) 171 | node.geometry = SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0) 172 | node.geometry?.firstMaterial?.diffuse.contents = UIImage(named: "box") 173 | node.position = position 174 | node.physicsBody?.contactTestBitMask = 1 175 | self.sceneView.scene.rootNode.addChildNode(node) 176 | } 177 | 178 | }// End of Class 179 | 180 | // MARK: - 181 | // MARK: - Game Logic 182 | 183 | extension GameViewController { 184 | 185 | /// Reset Game 186 | func resetGame() { 187 | availableShots = GameConstants.availableShots 188 | remainingBoxes = GameConstants.remainingBoxes 189 | setTexts() 190 | showHideViews(shouldShow: true) 191 | } 192 | 193 | /// Show Hide views based on game state 194 | /// - Parameter shouldShow: shouldShow 195 | func showHideViews(shouldShow: Bool) { 196 | [lblAvailable, lblRemaining, imgAvailableBG, imgRemainingBG].forEach { 197 | if let subView = $0 { 198 | subView.isHidden = !shouldShow 199 | } 200 | } 201 | } 202 | 203 | /// Setup shots count text 204 | func setTexts() { 205 | DispatchQueue.main.async { [weak self] in 206 | guard let `self` = self else { return } 207 | self.lblRemaining.text = "Remaining Boxes: \(self.remainingBoxes)" 208 | self.lblAvailable.text = "Available Shots: \(self.availableShots)" 209 | } 210 | } 211 | 212 | /// Clear texts 213 | func clearTexts() { 214 | lblRemaining.text = "" 215 | lblAvailable.text = "" 216 | showHideViews(shouldShow: false) 217 | } 218 | 219 | /// This will be called once shot is fired 220 | /// - Parameter manageShotForSingle: manage shot for single remaining item 221 | func didFiredShot(manageShotForSingle: Bool = true) { 222 | if availableShots == 1, manageShotForSingle { 223 | manageShotForSingleShot() 224 | return 225 | } 226 | // AvailableShots are not 1 here 227 | availableShots -= 1 228 | if availableShots == 0, remainingBoxes > 0 { 229 | showAlertToUser(title: "Oops!!!", message: "You lose the game.") 230 | } 231 | setTexts() 232 | } 233 | 234 | /// Manage shot count for single only shot 235 | func manageShotForSingleShot() { 236 | DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { [weak self] in 237 | guard let `self` = self else { return } 238 | self.didFiredShot(manageShotForSingle: false) 239 | } 240 | } 241 | 242 | func showCongratulations() { 243 | DispatchQueue.main.async { 244 | //load congratulations XIB. 245 | guard let congratsView = UINib(nibName: "Congratulations", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as? Congratulations else { 246 | return 247 | } 248 | self.clearTexts() 249 | congratsView.imgCongratulations.applyRadius(radius: 20.0) 250 | congratsView.frame = CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: congratsView.frame.size.height) 251 | congratsView.alpha = 0 252 | self.sceneView.addSubview(congratsView) 253 | UIView.animate(withDuration: 1.0) { [weak self] in 254 | guard let `self` = self else { return } 255 | congratsView.alpha = 1.0 256 | congratsView.frame = CGRect(x: 0, 257 | y: (self.view.center.y - congratsView.frame.size.height / 2), 258 | width: self.view.frame.size.width, 259 | height: congratsView.frame.size.height) 260 | guard let activeSceneB = SCNScene(named: "art.scnassets/CustomParticle.scn"), 261 | let modelRootB = activeSceneB.rootNode.childNode(withName: "particles", recursively: false) else { return } 262 | self.modelRootB = modelRootB 263 | self.sceneView.scene.rootNode.addChildNode(modelRootB) 264 | } completion: { (isCompleted) in 265 | if isCompleted { 266 | DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { [weak self] in 267 | guard let `self` = self else { return } 268 | congratsView.removeFromSuperview() 269 | self.modelRootB?.removeFromParentNode() 270 | self.removeAllNodes() 271 | self.resetGame() 272 | self.addChildNode() 273 | } 274 | } 275 | } 276 | } 277 | } 278 | 279 | /// Used did shot the box 280 | func didShotBox() { 281 | self.remainingBoxes -= 1 282 | setTexts() 283 | if self.remainingBoxes == 0 { 284 | showCongratulations() 285 | } else if availableShots == 0 { 286 | showAlertToUser(title: "Oops!!!", message: "You lose the game.") 287 | } 288 | } 289 | 290 | func showAlertToUser(title: String, message: String) { 291 | let okAction = UIAlertAction(title: "Ok", style: .default) { [weak self] _ in 292 | guard let `self` = self else { return } 293 | self.removeAllNodes() 294 | self.resetGame() 295 | self.addChildNode() 296 | } 297 | let alert = UIAlertController(title: title, message: message, preferredStyle: .alert) 298 | alert.addAction(okAction) 299 | DispatchQueue.main.async { [weak self] in 300 | guard let `self` = self else { return } 301 | self.clearTexts() 302 | self.present(alert, animated: true, completion: nil) 303 | } 304 | } 305 | 306 | /// Remove all nodes 307 | func removeAllNodes() { 308 | self.sceneView.scene.rootNode.enumerateChildNodes { (node, _ ) in 309 | node.removeFromParentNode() 310 | } 311 | } 312 | 313 | }// End of Extension 314 | 315 | // MARK: - 316 | // MARK: - ARSCNViewDelegate 317 | 318 | extension GameViewController: ARSCNViewDelegate { 319 | 320 | func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) { 321 | DispatchQueue.main.async { 322 | guard self.tracking else { return } 323 | let hitTest = self.sceneView.hitTest(CGPoint(x: self.view.frame.midX, y: self.view.frame.midY), types: .featurePoint) 324 | guard let result = hitTest.first else { return } 325 | let translation = SCNMatrix4(result.worldTransform) 326 | let position = SCNVector3Make(translation.m41, translation.m42, translation.m43) 327 | if self.trackerNode == nil { //1 328 | let plane = SCNPlane(width: 0.15, height: 0.15) 329 | plane.firstMaterial?.diffuse.contents = UIImage(named: "tracker.png") 330 | plane.firstMaterial?.isDoubleSided = true 331 | self.trackerNode = SCNNode(geometry: plane) //2 332 | self.trackerNode?.eulerAngles.x = -.pi * 0.5 //3 333 | self.sceneView.scene.rootNode.addChildNode(self.trackerNode!) 334 | self.foundSurface = true //4 335 | } 336 | self.trackerNode?.position = position //5 337 | } 338 | } 339 | 340 | }// End of Extension 341 | 342 | extension GameViewController: SCNPhysicsContactDelegate { 343 | 344 | func physicsWorld(_ world: SCNPhysicsWorld, didEnd contact: SCNPhysicsContact) { 345 | let ball = contact.nodeA.name == "Ball" ? contact.nodeA : contact.nodeB 346 | let box = contact.nodeA.name != "Ball" ? contact.nodeA : contact.nodeB 347 | if ((contact.nodeA.name ?? "").hasPrefix("Node")) || ((contact.nodeB.name ?? "").hasPrefix("Node")) { 348 | didShotBox() 349 | createExplosion(geometry: box.geometry!, position: box.presentation.position, rotation: box.presentation.rotation) 350 | contact.nodeA.removeFromParentNode() 351 | contact.nodeB.removeFromParentNode() 352 | } else { 353 | ball.removeFromParentNode() 354 | } 355 | } 356 | 357 | func createExplosion(geometry: SCNGeometry, position: SCNVector3, rotation: SCNVector4) { 358 | let explosion = SCNParticleSystem(named: "art.scnassets/reactor.scnp", inDirectory: nil)! 359 | explosion.emitterShape = SCNBox(width: 0.01, height: 0.01, length: 0.01, chamferRadius: 0) //geometry 360 | explosion.birthLocation = .vertex 361 | let rotationMatrix = SCNMatrix4MakeRotation(rotation.w, rotation.x, rotation.y, rotation.z) 362 | let translationMatrix = SCNMatrix4MakeTranslation(position.x, position.y, position.z) 363 | let transformMatrix = SCNMatrix4Mult(rotationMatrix, translationMatrix) 364 | sceneView.scene.addParticleSystem(explosion, transform: transformMatrix) 365 | } 366 | 367 | }// End of Extension 368 | -------------------------------------------------------------------------------- /ARkitGame.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0314B988262EA6A300228590 /* UIView+Animations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0314B987262EA6A300228590 /* UIView+Animations.swift */; }; 11 | 0339CEBC263018BB000AFADD /* Congratulations.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0339CEBB263018BB000AFADD /* Congratulations.xib */; }; 12 | 0339CEBF263018CA000AFADD /* Congratulations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0339CEBE263018CA000AFADD /* Congratulations.swift */; }; 13 | 03EED90225D3E471005E3A48 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EED90125D3E471005E3A48 /* AppDelegate.swift */; }; 14 | 03EED90425D3E471005E3A48 /* art.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = 03EED90325D3E471005E3A48 /* art.scnassets */; }; 15 | 03EED90625D3E471005E3A48 /* GameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03EED90525D3E471005E3A48 /* GameViewController.swift */; }; 16 | 03EED90925D3E471005E3A48 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 03EED90725D3E471005E3A48 /* Main.storyboard */; }; 17 | 03EED90B25D3E472005E3A48 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03EED90A25D3E472005E3A48 /* Assets.xcassets */; }; 18 | 03EED90E25D3E472005E3A48 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 03EED90C25D3E472005E3A48 /* LaunchScreen.storyboard */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | 0314B987262EA6A300228590 /* UIView+Animations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Animations.swift"; sourceTree = ""; }; 23 | 0339CEBB263018BB000AFADD /* Congratulations.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Congratulations.xib; sourceTree = ""; }; 24 | 0339CEBE263018CA000AFADD /* Congratulations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Congratulations.swift; sourceTree = ""; }; 25 | 03EED8FE25D3E471005E3A48 /* ARkitGame.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ARkitGame.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | 03EED90125D3E471005E3A48 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 27 | 03EED90325D3E471005E3A48 /* art.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = art.scnassets; sourceTree = ""; }; 28 | 03EED90525D3E471005E3A48 /* GameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GameViewController.swift; sourceTree = ""; }; 29 | 03EED90825D3E471005E3A48 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 30 | 03EED90A25D3E472005E3A48 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 31 | 03EED90D25D3E472005E3A48 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 32 | 03EED90F25D3E472005E3A48 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | 03EED8FB25D3E471005E3A48 /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXFrameworksBuildPhase section */ 44 | 45 | /* Begin PBXGroup section */ 46 | 03EED8F525D3E471005E3A48 = { 47 | isa = PBXGroup; 48 | children = ( 49 | 03EED90025D3E471005E3A48 /* ARkitGame */, 50 | 03EED8FF25D3E471005E3A48 /* Products */, 51 | ); 52 | sourceTree = ""; 53 | }; 54 | 03EED8FF25D3E471005E3A48 /* Products */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | 03EED8FE25D3E471005E3A48 /* ARkitGame.app */, 58 | ); 59 | name = Products; 60 | sourceTree = ""; 61 | }; 62 | 03EED90025D3E471005E3A48 /* ARkitGame */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 737B93AD26380C30006929AD /* AppLifeCycle */, 66 | 03EED90325D3E471005E3A48 /* art.scnassets */, 67 | 03EED90A25D3E472005E3A48 /* Assets.xcassets */, 68 | 737B93B326380C7D006929AD /* ViewControllers */, 69 | 737B93B226380C6F006929AD /* Storyboards */, 70 | 737B93AF26380C42006929AD /* Extensions */, 71 | 737B93B026380C56006929AD /* Congratulations View */, 72 | 03EED90F25D3E472005E3A48 /* Info.plist */, 73 | ); 74 | path = ARkitGame; 75 | sourceTree = ""; 76 | }; 77 | 737B93AD26380C30006929AD /* AppLifeCycle */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 03EED90125D3E471005E3A48 /* AppDelegate.swift */, 81 | ); 82 | path = AppLifeCycle; 83 | sourceTree = ""; 84 | }; 85 | 737B93AF26380C42006929AD /* Extensions */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 0314B987262EA6A300228590 /* UIView+Animations.swift */, 89 | ); 90 | path = Extensions; 91 | sourceTree = ""; 92 | }; 93 | 737B93B026380C56006929AD /* Congratulations View */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 0339CEBB263018BB000AFADD /* Congratulations.xib */, 97 | 0339CEBE263018CA000AFADD /* Congratulations.swift */, 98 | ); 99 | path = "Congratulations View"; 100 | sourceTree = ""; 101 | }; 102 | 737B93B226380C6F006929AD /* Storyboards */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 03EED90C25D3E472005E3A48 /* LaunchScreen.storyboard */, 106 | 03EED90725D3E471005E3A48 /* Main.storyboard */, 107 | ); 108 | path = Storyboards; 109 | sourceTree = ""; 110 | }; 111 | 737B93B326380C7D006929AD /* ViewControllers */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 03EED90525D3E471005E3A48 /* GameViewController.swift */, 115 | ); 116 | path = ViewControllers; 117 | sourceTree = ""; 118 | }; 119 | /* End PBXGroup section */ 120 | 121 | /* Begin PBXNativeTarget section */ 122 | 03EED8FD25D3E471005E3A48 /* ARkitGame */ = { 123 | isa = PBXNativeTarget; 124 | buildConfigurationList = 03EED91225D3E472005E3A48 /* Build configuration list for PBXNativeTarget "ARkitGame" */; 125 | buildPhases = ( 126 | 03EED8FA25D3E471005E3A48 /* Sources */, 127 | 03EED8FB25D3E471005E3A48 /* Frameworks */, 128 | 03EED8FC25D3E471005E3A48 /* Resources */, 129 | ); 130 | buildRules = ( 131 | ); 132 | dependencies = ( 133 | ); 134 | name = ARkitGame; 135 | productName = ARkitGame; 136 | productReference = 03EED8FE25D3E471005E3A48 /* ARkitGame.app */; 137 | productType = "com.apple.product-type.application"; 138 | }; 139 | /* End PBXNativeTarget section */ 140 | 141 | /* Begin PBXProject section */ 142 | 03EED8F625D3E471005E3A48 /* Project object */ = { 143 | isa = PBXProject; 144 | attributes = { 145 | LastSwiftUpdateCheck = 1230; 146 | LastUpgradeCheck = 1230; 147 | TargetAttributes = { 148 | 03EED8FD25D3E471005E3A48 = { 149 | CreatedOnToolsVersion = 12.3; 150 | }; 151 | }; 152 | }; 153 | buildConfigurationList = 03EED8F925D3E471005E3A48 /* Build configuration list for PBXProject "ARkitGame" */; 154 | compatibilityVersion = "Xcode 9.3"; 155 | developmentRegion = en; 156 | hasScannedForEncodings = 0; 157 | knownRegions = ( 158 | en, 159 | Base, 160 | ); 161 | mainGroup = 03EED8F525D3E471005E3A48; 162 | productRefGroup = 03EED8FF25D3E471005E3A48 /* Products */; 163 | projectDirPath = ""; 164 | projectRoot = ""; 165 | targets = ( 166 | 03EED8FD25D3E471005E3A48 /* ARkitGame */, 167 | ); 168 | }; 169 | /* End PBXProject section */ 170 | 171 | /* Begin PBXResourcesBuildPhase section */ 172 | 03EED8FC25D3E471005E3A48 /* Resources */ = { 173 | isa = PBXResourcesBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | 03EED90425D3E471005E3A48 /* art.scnassets in Resources */, 177 | 03EED90E25D3E472005E3A48 /* LaunchScreen.storyboard in Resources */, 178 | 03EED90B25D3E472005E3A48 /* Assets.xcassets in Resources */, 179 | 0339CEBC263018BB000AFADD /* Congratulations.xib in Resources */, 180 | 03EED90925D3E471005E3A48 /* Main.storyboard in Resources */, 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | }; 184 | /* End PBXResourcesBuildPhase section */ 185 | 186 | /* Begin PBXSourcesBuildPhase section */ 187 | 03EED8FA25D3E471005E3A48 /* Sources */ = { 188 | isa = PBXSourcesBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 03EED90625D3E471005E3A48 /* GameViewController.swift in Sources */, 192 | 0339CEBF263018CA000AFADD /* Congratulations.swift in Sources */, 193 | 03EED90225D3E471005E3A48 /* AppDelegate.swift in Sources */, 194 | 0314B988262EA6A300228590 /* UIView+Animations.swift in Sources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXSourcesBuildPhase section */ 199 | 200 | /* Begin PBXVariantGroup section */ 201 | 03EED90725D3E471005E3A48 /* Main.storyboard */ = { 202 | isa = PBXVariantGroup; 203 | children = ( 204 | 03EED90825D3E471005E3A48 /* Base */, 205 | ); 206 | name = Main.storyboard; 207 | sourceTree = ""; 208 | }; 209 | 03EED90C25D3E472005E3A48 /* LaunchScreen.storyboard */ = { 210 | isa = PBXVariantGroup; 211 | children = ( 212 | 03EED90D25D3E472005E3A48 /* Base */, 213 | ); 214 | name = LaunchScreen.storyboard; 215 | sourceTree = ""; 216 | }; 217 | /* End PBXVariantGroup section */ 218 | 219 | /* Begin XCBuildConfiguration section */ 220 | 03EED91025D3E472005E3A48 /* Debug */ = { 221 | isa = XCBuildConfiguration; 222 | buildSettings = { 223 | ALWAYS_SEARCH_USER_PATHS = NO; 224 | CLANG_ANALYZER_NONNULL = YES; 225 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 226 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 227 | CLANG_CXX_LIBRARY = "libc++"; 228 | CLANG_ENABLE_MODULES = YES; 229 | CLANG_ENABLE_OBJC_ARC = YES; 230 | CLANG_ENABLE_OBJC_WEAK = YES; 231 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 232 | CLANG_WARN_BOOL_CONVERSION = YES; 233 | CLANG_WARN_COMMA = YES; 234 | CLANG_WARN_CONSTANT_CONVERSION = YES; 235 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 236 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 237 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 238 | CLANG_WARN_EMPTY_BODY = YES; 239 | CLANG_WARN_ENUM_CONVERSION = YES; 240 | CLANG_WARN_INFINITE_RECURSION = YES; 241 | CLANG_WARN_INT_CONVERSION = YES; 242 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 243 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 244 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 245 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 246 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 247 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 248 | CLANG_WARN_STRICT_PROTOTYPES = YES; 249 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 250 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 251 | CLANG_WARN_UNREACHABLE_CODE = YES; 252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 253 | COPY_PHASE_STRIP = NO; 254 | DEBUG_INFORMATION_FORMAT = dwarf; 255 | ENABLE_STRICT_OBJC_MSGSEND = YES; 256 | ENABLE_TESTABILITY = YES; 257 | GCC_C_LANGUAGE_STANDARD = gnu11; 258 | GCC_DYNAMIC_NO_PIC = NO; 259 | GCC_NO_COMMON_BLOCKS = YES; 260 | GCC_OPTIMIZATION_LEVEL = 0; 261 | GCC_PREPROCESSOR_DEFINITIONS = ( 262 | "DEBUG=1", 263 | "$(inherited)", 264 | ); 265 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 266 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 267 | GCC_WARN_UNDECLARED_SELECTOR = YES; 268 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 269 | GCC_WARN_UNUSED_FUNCTION = YES; 270 | GCC_WARN_UNUSED_VARIABLE = YES; 271 | IPHONEOS_DEPLOYMENT_TARGET = 14.3; 272 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 273 | MTL_FAST_MATH = YES; 274 | ONLY_ACTIVE_ARCH = YES; 275 | SDKROOT = iphoneos; 276 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 277 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 278 | }; 279 | name = Debug; 280 | }; 281 | 03EED91125D3E472005E3A48 /* Release */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ALWAYS_SEARCH_USER_PATHS = NO; 285 | CLANG_ANALYZER_NONNULL = YES; 286 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 287 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 288 | CLANG_CXX_LIBRARY = "libc++"; 289 | CLANG_ENABLE_MODULES = YES; 290 | CLANG_ENABLE_OBJC_ARC = YES; 291 | CLANG_ENABLE_OBJC_WEAK = YES; 292 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 293 | CLANG_WARN_BOOL_CONVERSION = YES; 294 | CLANG_WARN_COMMA = YES; 295 | CLANG_WARN_CONSTANT_CONVERSION = YES; 296 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 297 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 298 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 299 | CLANG_WARN_EMPTY_BODY = YES; 300 | CLANG_WARN_ENUM_CONVERSION = YES; 301 | CLANG_WARN_INFINITE_RECURSION = YES; 302 | CLANG_WARN_INT_CONVERSION = YES; 303 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 304 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 305 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 307 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 308 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 309 | CLANG_WARN_STRICT_PROTOTYPES = YES; 310 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 311 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 312 | CLANG_WARN_UNREACHABLE_CODE = YES; 313 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 314 | COPY_PHASE_STRIP = NO; 315 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 316 | ENABLE_NS_ASSERTIONS = NO; 317 | ENABLE_STRICT_OBJC_MSGSEND = YES; 318 | GCC_C_LANGUAGE_STANDARD = gnu11; 319 | GCC_NO_COMMON_BLOCKS = YES; 320 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 321 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 322 | GCC_WARN_UNDECLARED_SELECTOR = YES; 323 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 324 | GCC_WARN_UNUSED_FUNCTION = YES; 325 | GCC_WARN_UNUSED_VARIABLE = YES; 326 | IPHONEOS_DEPLOYMENT_TARGET = 14.3; 327 | MTL_ENABLE_DEBUG_INFO = NO; 328 | MTL_FAST_MATH = YES; 329 | SDKROOT = iphoneos; 330 | SWIFT_COMPILATION_MODE = wholemodule; 331 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 332 | VALIDATE_PRODUCT = YES; 333 | }; 334 | name = Release; 335 | }; 336 | 03EED91325D3E472005E3A48 /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 340 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 341 | CODE_SIGN_STYLE = Automatic; 342 | DEVELOPMENT_TEAM = K7XJG666ZW; 343 | INFOPLIST_FILE = ARkitGame/Info.plist; 344 | LD_RUNPATH_SEARCH_PATHS = ( 345 | "$(inherited)", 346 | "@executable_path/Frameworks", 347 | ); 348 | PRODUCT_BUNDLE_IDENTIFIER = com.simform.ARkitGame; 349 | PRODUCT_NAME = "$(TARGET_NAME)"; 350 | SWIFT_VERSION = 5.0; 351 | TARGETED_DEVICE_FAMILY = 1; 352 | }; 353 | name = Debug; 354 | }; 355 | 03EED91425D3E472005E3A48 /* Release */ = { 356 | isa = XCBuildConfiguration; 357 | buildSettings = { 358 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 359 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 360 | CODE_SIGN_STYLE = Automatic; 361 | DEVELOPMENT_TEAM = K7XJG666ZW; 362 | INFOPLIST_FILE = ARkitGame/Info.plist; 363 | LD_RUNPATH_SEARCH_PATHS = ( 364 | "$(inherited)", 365 | "@executable_path/Frameworks", 366 | ); 367 | PRODUCT_BUNDLE_IDENTIFIER = com.simform.ARkitGame; 368 | PRODUCT_NAME = "$(TARGET_NAME)"; 369 | SWIFT_VERSION = 5.0; 370 | TARGETED_DEVICE_FAMILY = 1; 371 | }; 372 | name = Release; 373 | }; 374 | /* End XCBuildConfiguration section */ 375 | 376 | /* Begin XCConfigurationList section */ 377 | 03EED8F925D3E471005E3A48 /* Build configuration list for PBXProject "ARkitGame" */ = { 378 | isa = XCConfigurationList; 379 | buildConfigurations = ( 380 | 03EED91025D3E472005E3A48 /* Debug */, 381 | 03EED91125D3E472005E3A48 /* Release */, 382 | ); 383 | defaultConfigurationIsVisible = 0; 384 | defaultConfigurationName = Release; 385 | }; 386 | 03EED91225D3E472005E3A48 /* Build configuration list for PBXNativeTarget "ARkitGame" */ = { 387 | isa = XCConfigurationList; 388 | buildConfigurations = ( 389 | 03EED91325D3E472005E3A48 /* Debug */, 390 | 03EED91425D3E472005E3A48 /* Release */, 391 | ); 392 | defaultConfigurationIsVisible = 0; 393 | defaultConfigurationName = Release; 394 | }; 395 | /* End XCConfigurationList section */ 396 | }; 397 | rootObject = 03EED8F625D3E471005E3A48 /* Project object */; 398 | } 399 | --------------------------------------------------------------------------------