diff --git a/IOSWorkSpace.xcworkspace/contents.xcworkspacedata b/IOSWorkSpace.xcworkspace/contents.xcworkspacedata index c23fb10..66d8c0e 100644 --- a/IOSWorkSpace.xcworkspace/contents.xcworkspacedata +++ b/IOSWorkSpace.xcworkspace/contents.xcworkspacedata @@ -1,6 +1,9 @@ + + diff --git a/SwiftARKit/SwiftARKit.xcodeproj/project.pbxproj b/SwiftARKit/SwiftARKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..12b85c4 --- /dev/null +++ b/SwiftARKit/SwiftARKit.xcodeproj/project.pbxproj @@ -0,0 +1,632 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 7B6A02792C18930200877E3F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02782C18930200877E3F /* AppDelegate.swift */; }; + 7B6A027B2C18930200877E3F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A027A2C18930200877E3F /* ContentView.swift */; }; + 7B6A027D2C18930200877E3F /* Experience.rcproject in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A027C2C18930200877E3F /* Experience.rcproject */; }; + 7B6A027F2C18930400877E3F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B6A027E2C18930400877E3F /* Assets.xcassets */; }; + 7B6A02822C18930400877E3F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7B6A02812C18930400877E3F /* Preview Assets.xcassets */; }; + 7B6A028C2C18930400877E3F /* SwiftARKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A028B2C18930400877E3F /* SwiftARKitTests.swift */; }; + 7B6A02962C18930400877E3F /* SwiftARKitUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02952C18930400877E3F /* SwiftARKitUITests.swift */; }; + 7B6A02982C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02972C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift */; }; + 7B6A02A82C18966400877E3F /* MySwiftUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02A72C18966400877E3F /* MySwiftUIView.swift */; }; + 7B6A02AC2C18A1B000877E3F /* MyARViewRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6A02AB2C18A1B000877E3F /* MyARViewRepresentable.swift */; }; + F0A2577F2C297CDF006C9826 /* board.usdz in Resources */ = {isa = PBXBuildFile; fileRef = F0A2577E2C297CDF006C9826 /* board.usdz */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 7B6A02882C18930400877E3F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7B6A026D2C18930200877E3F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7B6A02742C18930200877E3F; + remoteInfo = SwiftARKit; + }; + 7B6A02922C18930400877E3F /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7B6A026D2C18930200877E3F /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7B6A02742C18930200877E3F; + remoteInfo = SwiftARKit; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 7B6A02752C18930200877E3F /* SwiftARKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftARKit.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B6A02782C18930200877E3F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7B6A027A2C18930200877E3F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 7B6A027C2C18930200877E3F /* Experience.rcproject */ = {isa = PBXFileReference; lastKnownFileType = file.rcproject; path = Experience.rcproject; sourceTree = ""; }; + 7B6A027E2C18930400877E3F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7B6A02812C18930400877E3F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 7B6A02872C18930400877E3F /* SwiftARKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftARKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B6A028B2C18930400877E3F /* SwiftARKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftARKitTests.swift; sourceTree = ""; }; + 7B6A02912C18930400877E3F /* SwiftARKitUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftARKitUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7B6A02952C18930400877E3F /* SwiftARKitUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftARKitUITests.swift; sourceTree = ""; }; + 7B6A02972C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftARKitUITestsLaunchTests.swift; sourceTree = ""; }; + 7B6A02A72C18966400877E3F /* MySwiftUIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MySwiftUIView.swift; sourceTree = ""; }; + 7B6A02A92C189ED700877E3F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; + 7B6A02AB2C18A1B000877E3F /* MyARViewRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyARViewRepresentable.swift; sourceTree = ""; }; + F0A2577E2C297CDF006C9826 /* board.usdz */ = {isa = PBXFileReference; lastKnownFileType = file.usdz; name = board.usdz; path = objects/board.usdz; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7B6A02722C18930200877E3F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B6A02842C18930400877E3F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B6A028E2C18930400877E3F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7B6A026C2C18930200877E3F = { + isa = PBXGroup; + children = ( + 7B6A02772C18930200877E3F /* SwiftARKit */, + 7B6A028A2C18930400877E3F /* SwiftARKitTests */, + 7B6A02942C18930400877E3F /* SwiftARKitUITests */, + 7B6A02762C18930200877E3F /* Products */, + ); + sourceTree = ""; + }; + 7B6A02762C18930200877E3F /* Products */ = { + isa = PBXGroup; + children = ( + 7B6A02752C18930200877E3F /* SwiftARKit.app */, + 7B6A02872C18930400877E3F /* SwiftARKitTests.xctest */, + 7B6A02912C18930400877E3F /* SwiftARKitUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 7B6A02772C18930200877E3F /* SwiftARKit */ = { + isa = PBXGroup; + children = ( + F0A2577E2C297CDF006C9826 /* board.usdz */, + 7B6A02AA2C18A19C00877E3F /* Struct */, + 7B6A02A92C189ED700877E3F /* Info.plist */, + 7B6A02A62C18964F00877E3F /* View */, + 7B6A02782C18930200877E3F /* AppDelegate.swift */, + 7B6A027A2C18930200877E3F /* ContentView.swift */, + 7B6A027C2C18930200877E3F /* Experience.rcproject */, + 7B6A027E2C18930400877E3F /* Assets.xcassets */, + 7B6A02802C18930400877E3F /* Preview Content */, + ); + path = SwiftARKit; + sourceTree = ""; + }; + 7B6A02802C18930400877E3F /* Preview Content */ = { + isa = PBXGroup; + children = ( + 7B6A02812C18930400877E3F /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 7B6A028A2C18930400877E3F /* SwiftARKitTests */ = { + isa = PBXGroup; + children = ( + 7B6A028B2C18930400877E3F /* SwiftARKitTests.swift */, + ); + path = SwiftARKitTests; + sourceTree = ""; + }; + 7B6A02942C18930400877E3F /* SwiftARKitUITests */ = { + isa = PBXGroup; + children = ( + 7B6A02952C18930400877E3F /* SwiftARKitUITests.swift */, + 7B6A02972C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift */, + ); + path = SwiftARKitUITests; + sourceTree = ""; + }; + 7B6A02A62C18964F00877E3F /* View */ = { + isa = PBXGroup; + children = ( + 7B6A02A72C18966400877E3F /* MySwiftUIView.swift */, + ); + path = View; + sourceTree = ""; + }; + 7B6A02AA2C18A19C00877E3F /* Struct */ = { + isa = PBXGroup; + children = ( + 7B6A02AB2C18A1B000877E3F /* MyARViewRepresentable.swift */, + ); + path = Struct; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7B6A02742C18930200877E3F /* SwiftARKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7B6A029B2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKit" */; + buildPhases = ( + 7B6A02712C18930200877E3F /* Sources */, + 7B6A02722C18930200877E3F /* Frameworks */, + 7B6A02732C18930200877E3F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SwiftARKit; + productName = SwiftARKit; + productReference = 7B6A02752C18930200877E3F /* SwiftARKit.app */; + productType = "com.apple.product-type.application"; + }; + 7B6A02862C18930400877E3F /* SwiftARKitTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7B6A029E2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitTests" */; + buildPhases = ( + 7B6A02832C18930400877E3F /* Sources */, + 7B6A02842C18930400877E3F /* Frameworks */, + 7B6A02852C18930400877E3F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7B6A02892C18930400877E3F /* PBXTargetDependency */, + ); + name = SwiftARKitTests; + productName = SwiftARKitTests; + productReference = 7B6A02872C18930400877E3F /* SwiftARKitTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 7B6A02902C18930400877E3F /* SwiftARKitUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7B6A02A12C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitUITests" */; + buildPhases = ( + 7B6A028D2C18930400877E3F /* Sources */, + 7B6A028E2C18930400877E3F /* Frameworks */, + 7B6A028F2C18930400877E3F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7B6A02932C18930400877E3F /* PBXTargetDependency */, + ); + name = SwiftARKitUITests; + productName = SwiftARKitUITests; + productReference = 7B6A02912C18930400877E3F /* SwiftARKitUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7B6A026D2C18930200877E3F /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + 7B6A02742C18930200877E3F = { + CreatedOnToolsVersion = 14.2; + }; + 7B6A02862C18930400877E3F = { + CreatedOnToolsVersion = 14.2; + TestTargetID = 7B6A02742C18930200877E3F; + }; + 7B6A02902C18930400877E3F = { + CreatedOnToolsVersion = 14.2; + TestTargetID = 7B6A02742C18930200877E3F; + }; + }; + }; + buildConfigurationList = 7B6A02702C18930200877E3F /* Build configuration list for PBXProject "SwiftARKit" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7B6A026C2C18930200877E3F; + productRefGroup = 7B6A02762C18930200877E3F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7B6A02742C18930200877E3F /* SwiftARKit */, + 7B6A02862C18930400877E3F /* SwiftARKitTests */, + 7B6A02902C18930400877E3F /* SwiftARKitUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7B6A02732C18930200877E3F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F0A2577F2C297CDF006C9826 /* board.usdz in Resources */, + 7B6A02822C18930400877E3F /* Preview Assets.xcassets in Resources */, + 7B6A027F2C18930400877E3F /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B6A02852C18930400877E3F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B6A028F2C18930400877E3F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7B6A02712C18930200877E3F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B6A027B2C18930200877E3F /* ContentView.swift in Sources */, + 7B6A02792C18930200877E3F /* AppDelegate.swift in Sources */, + 7B6A02AC2C18A1B000877E3F /* MyARViewRepresentable.swift in Sources */, + 7B6A02A82C18966400877E3F /* MySwiftUIView.swift in Sources */, + 7B6A027D2C18930200877E3F /* Experience.rcproject in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B6A02832C18930400877E3F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B6A028C2C18930400877E3F /* SwiftARKitTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7B6A028D2C18930400877E3F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7B6A02982C18930400877E3F /* SwiftARKitUITestsLaunchTests.swift in Sources */, + 7B6A02962C18930400877E3F /* SwiftARKitUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 7B6A02892C18930400877E3F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7B6A02742C18930200877E3F /* SwiftARKit */; + targetProxy = 7B6A02882C18930400877E3F /* PBXContainerItemProxy */; + }; + 7B6A02932C18930400877E3F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7B6A02742C18930200877E3F /* SwiftARKit */; + targetProxy = 7B6A02922C18930400877E3F /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 7B6A02992C18930400877E3F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 7B6A029A2C18930400877E3F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 7B6A029C2C18930400877E3F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SwiftARKit/Preview Content\""; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 67U885533Q; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SwiftARKit/Info.plist; + INFOPLIST_KEY_NSCameraUsageDescription = "Camera needed for AR app"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UIRequiredDeviceCapabilities = arkit; + INFOPLIST_KEY_UIStatusBarHidden = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = fr.uca.iut.SwiftARKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = tpiOS_2024_06_21_off; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 7B6A029D2C18930400877E3F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"SwiftARKit/Preview Content\""; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 67U885533Q; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = SwiftARKit/Info.plist; + INFOPLIST_KEY_NSCameraUsageDescription = "Camera needed for AR app"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UIRequiredDeviceCapabilities = arkit; + INFOPLIST_KEY_UIStatusBarHidden = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = fr.uca.iut.SwiftARKit; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = tpiOS_2024_06_21_off; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 7B6A029F2C18930400877E3F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftARKit.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftARKit"; + }; + name = Debug; + }; + 7B6A02A02C18930400877E3F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftARKit.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/SwiftARKit"; + }; + name = Release; + }; + 7B6A02A22C18930400877E3F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = SwiftARKit; + }; + name = Debug; + }; + 7B6A02A32C18930400877E3F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = PierreFerreira.SwiftARKitUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = SwiftARKit; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7B6A02702C18930200877E3F /* Build configuration list for PBXProject "SwiftARKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B6A02992C18930400877E3F /* Debug */, + 7B6A029A2C18930400877E3F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7B6A029B2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B6A029C2C18930400877E3F /* Debug */, + 7B6A029D2C18930400877E3F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7B6A029E2C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B6A029F2C18930400877E3F /* Debug */, + 7B6A02A02C18930400877E3F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7B6A02A12C18930400877E3F /* Build configuration list for PBXNativeTarget "SwiftARKitUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7B6A02A22C18930400877E3F /* Debug */, + 7B6A02A32C18930400877E3F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7B6A026D2C18930200877E3F /* Project object */; +} diff --git a/SwiftARKit/SwiftARKit.xcodeproj/xcshareddata/xcschemes/SwiftARKit.xcscheme b/SwiftARKit/SwiftARKit.xcodeproj/xcshareddata/xcschemes/SwiftARKit.xcscheme new file mode 100644 index 0000000..5a046df --- /dev/null +++ b/SwiftARKit/SwiftARKit.xcodeproj/xcshareddata/xcschemes/SwiftARKit.xcscheme @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SwiftARKit/SwiftARKit/AppDelegate.swift b/SwiftARKit/SwiftARKit/AppDelegate.swift new file mode 100644 index 0000000..dcd79f4 --- /dev/null +++ b/SwiftARKit/SwiftARKit/AppDelegate.swift @@ -0,0 +1,48 @@ +// +// AppDelegate.swift +// SwiftARKit +// +// Created by Pierre FERREIRA on 11/06/2024. +// + +import UIKit +import SwiftUI + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + + // Create the SwiftUI view that provides the window contents. + let contentView = ContentView() + + // Use a UIHostingController as window root view controller. + let window = UIWindow(frame: UIScreen.main.bounds) + window.rootViewController = UIHostingController(rootView: contentView) + self.window = window + window.makeKeyAndVisible() + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // 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. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // 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. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // 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. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // 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. + } + + +} diff --git a/SwiftARKit/SwiftARKit/Assets.xcassets/AccentColor.colorset/Contents.json b/SwiftARKit/SwiftARKit/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftARKit/SwiftARKit/Assets.xcassets/AppIcon.appiconset/Contents.json b/SwiftARKit/SwiftARKit/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftARKit/SwiftARKit/Assets.xcassets/Contents.json b/SwiftARKit/SwiftARKit/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftARKit/SwiftARKit/Assets.xcassets/Data.dataset/Contents.json b/SwiftARKit/SwiftARKit/Assets.xcassets/Data.dataset/Contents.json new file mode 100644 index 0000000..3003bc2 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Assets.xcassets/Data.dataset/Contents.json @@ -0,0 +1,13 @@ +{ + "data" : [ + { + "filename" : "tv_retro.usdz", + "idiom" : "universal", + "universal-type-identifier" : "com.pixar.universal-scene-description-mobile" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftARKit/SwiftARKit/Assets.xcassets/Data.dataset/tv_retro.usdz b/SwiftARKit/SwiftARKit/Assets.xcassets/Data.dataset/tv_retro.usdz new file mode 100644 index 0000000..3c32465 Binary files /dev/null and b/SwiftARKit/SwiftARKit/Assets.xcassets/Data.dataset/tv_retro.usdz differ diff --git a/SwiftARKit/SwiftARKit/Assets.xcassets/Image.imageset/Contents.json b/SwiftARKit/SwiftARKit/Assets.xcassets/Image.imageset/Contents.json new file mode 100644 index 0000000..e5d476d --- /dev/null +++ b/SwiftARKit/SwiftARKit/Assets.xcassets/Image.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "board.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SwiftARKit/SwiftARKit/Assets.xcassets/Image.imageset/board.png b/SwiftARKit/SwiftARKit/Assets.xcassets/Image.imageset/board.png new file mode 100644 index 0000000..faea3d9 Binary files /dev/null and b/SwiftARKit/SwiftARKit/Assets.xcassets/Image.imageset/board.png differ diff --git a/SwiftARKit/SwiftARKit/ContentView.swift b/SwiftARKit/SwiftARKit/ContentView.swift new file mode 100644 index 0000000..77328a2 --- /dev/null +++ b/SwiftARKit/SwiftARKit/ContentView.swift @@ -0,0 +1,45 @@ +// +// ContentView.swift +// SwiftARKit +// +// Created by Pierre FERREIRA on 11/06/2024. +// + +import SwiftUI +import RealityKit + +struct ContentView : View { + var body: some View { + //ARViewContainer().edgesIgnoringSafeArea(.all) + MyARViewRepresentable().edgesIgnoringSafeArea(.all) + + } +} + +struct ARViewContainer: UIViewRepresentable { + + func makeUIView(context: Context) -> ARView { + + let arView = ARView(frame: .zero) + + // Load the "Box" scene from the "Experience" Reality File + let boxAnchor = try! Experience.loadBox() + + // Add the box anchor to the scene + arView.scene.anchors.append(boxAnchor) + + return arView + + } + + func updateUIView(_ uiView: ARView, context: Context) {} + +} + +#if DEBUG +struct ContentView_Previews : PreviewProvider { + static var previews: some View { + ContentView() + } +} +#endif diff --git a/SwiftARKit/SwiftARKit/Experience.rcproject/Library/ProjectLibrary/Contents.json b/SwiftARKit/SwiftARKit/Experience.rcproject/Library/ProjectLibrary/Contents.json new file mode 100644 index 0000000..c44dc44 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Experience.rcproject/Library/ProjectLibrary/Contents.json @@ -0,0 +1,3 @@ +[ + +] \ No newline at end of file diff --git a/SwiftARKit/SwiftARKit/Experience.rcproject/Library/ProjectLibrary/Version.json b/SwiftARKit/SwiftARKit/Experience.rcproject/Library/ProjectLibrary/Version.json new file mode 100644 index 0000000..ea86f98 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Experience.rcproject/Library/ProjectLibrary/Version.json @@ -0,0 +1,4 @@ +{ + "LibraryID" : "BBB5EDD2-CBE1-49E5-931D-2C81F724D19D", + "Version" : "1.0" +} \ No newline at end of file diff --git a/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3 b/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3 new file mode 100644 index 0000000..69378c2 Binary files /dev/null and b/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3 differ diff --git a/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/square b/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/square new file mode 100644 index 0000000..a69f880 Binary files /dev/null and b/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/square differ diff --git a/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/wide b/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/wide new file mode 100644 index 0000000..51516d2 Binary files /dev/null and b/SwiftARKit/SwiftARKit/Experience.rcproject/SceneThumbnails/F9610871-0955-494F-A5C3-51D1A281BAB3.thumbnails/wide differ diff --git a/SwiftARKit/SwiftARKit/Experience.rcproject/com.apple.RCFoundation.Project b/SwiftARKit/SwiftARKit/Experience.rcproject/com.apple.RCFoundation.Project new file mode 100644 index 0000000..b47d290 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Experience.rcproject/com.apple.RCFoundation.Project @@ -0,0 +1,155 @@ +{ + "__version" : 1, + "__content" : [ + { + "tags" : { + "__version" : 1, + "__content" : [ + { + "tagsStore" : { + + } + } + ] + }, + "scenes" : [ + { + "__version" : 2, + "__content" : [ + { + "hasGroundPlane" : true, + "gravity" : [ + 0, + -9.8000001907348633, + 0 + ], + "arAnchorSpecification" : { + "name" : "surface", + "classification" : 0, + "alignment" : 1 + }, + "title" : "Box", + "material" : "concrete", + "layoutData" : { + "version" : 1, + "constraints" : [ + + ] + }, + "identifier" : "F9610871-0955-494F-A5C3-51D1A281BAB3", + "behaviors" : [ + + ], + "overrides" : { + "factory" : null, + "children" : { + "4A213441-135C-450E-8EF8-1A4EAB267C1D" : { + "overrides" : { + "factory" : { + "version" : "1.0", + "identifier" : "com.apple.rc.af.CoreAssetFactories.PrimitiveShapeAssetFactory" + }, + "arguments" : [ + [ + "material", + { + "value" : "steel", + "typeName" : "String" + } + ], + [ + "type", + { + "value" : "box", + "typeName" : "String" + } + ] + ], + "runtimeAttributes" : [ + [ + "RuntimeIdentifier", + { + "value" : "3788A5B5-0388-488A-8304-7B90FEBA6FAC", + "typeName" : "UUID" + } + ], + [ + "entityName", + { + "value" : "Steel Box", + "typeName" : "String" + } + ] + ] + }, + "transform" : { + "matrix" : [ + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0.05000000074505806, + 0, + 1 + ] + } + }, + "B91C7CA3-4AB1-4253-9A84-07383168A8A8" : null, + "7F5F1ADC-E5E4-4EF5-A5B5-FC43B071FFA5" : null, + "632E476F-1E55-4E30-9723-1C51DD2E8B89" : null + } + }, + "viewTransform" : { + "sceneTransform" : [ + 1, + 0, + 0, + 0, + 0, + 0.99999994039535522, + 0, + 0, + 0, + 0, + 0.99999994039535522, + 0, + 0, + 0, + 0, + 1 + ], + "cameraTransform" : [ + 0.99999994039535522, + 0, + 0, + 0, + 0, + 0.80754852294921875, + -0.58980101346969604, + 0, + 0, + 0.58980101346969604, + 0.80754852294921875, + 0, + 0, + 1.135667085647583, + 1.5549418926239014, + 1 + ] + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/SwiftARKit/SwiftARKit/Info.plist b/SwiftARKit/SwiftARKit/Info.plist new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Info.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/SwiftARKit/SwiftARKit/Preview Content/Preview Assets.xcassets/Contents.json b/SwiftARKit/SwiftARKit/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/SwiftARKit/SwiftARKit/Struct/MyARViewRepresentable.swift b/SwiftARKit/SwiftARKit/Struct/MyARViewRepresentable.swift new file mode 100644 index 0000000..fd4fb77 --- /dev/null +++ b/SwiftARKit/SwiftARKit/Struct/MyARViewRepresentable.swift @@ -0,0 +1,33 @@ +// +// MyARView.swift +// SwiftARKit +// +// Created by Pierre FERREIRA on 11/06/2024. +// + +import SwiftUI +import ARKit +import RealityKit + +struct MyARViewRepresentable : UIViewRepresentable{ + + public func makeUIView(context: Context) -> MyARView { +// +// let arView = MyARView(frame: .zero) +// let mesh = MeshResource.generateBox(size: 0.1, cornerRadius: 0.005) +// +// //let mesh = MeshResource.generateBox(width: 150, height: 500, depth: 50) +// let material = SimpleMaterial(color: .red, isMetallic: true) +// let model = ModelEntity(mesh: mesh, materials: [material]) //, materials: material +// model.transform.translation.y = 0.05 +// +// let anchor = AnchorEntity(.plane(.horizontal, classification: .table, minimumBounds: .zero)) +// +// arView.scene.anchors.append(anchor) +// return arView +// + return MyARView() + } + + public func updateUIView(_ uiView: UIViewType, context: Context) { } +} diff --git a/SwiftARKit/SwiftARKit/View/MySwiftUIView.swift b/SwiftARKit/SwiftARKit/View/MySwiftUIView.swift new file mode 100644 index 0000000..9f3cc3b --- /dev/null +++ b/SwiftARKit/SwiftARKit/View/MySwiftUIView.swift @@ -0,0 +1,99 @@ +// +// MySwiftUIView.swift +// SwiftARKit +// +// Created by Pierre FERREIRA on 11/06/2024. +// + +import SwiftUI +import ARKit +import RealityKit + + +class MyARView : ARView{ + required init (frame frameRect : CGRect){ + super.init(frame: frameRect) + } + + required init?(coder decoder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + convenience init() { + self.init(frame: UIScreen.main.bounds) + addBoardToTheFloor() + addMeepleToBoard() + } + + + + ///Repère où attacher le plan + func applyRunConfiguration(){ + //ARWorldTrackingConfiguration.self + let conf = ARWorldTrackingConfiguration() + //conf.planeDetection = .horizontal + session.run(conf) + } + + func defineAnchors() { + let anchor = AnchorEntity(world: .zero) + scene.addAnchor(anchor) + } + + func addBoardToTheFloor() { + //let configuration = ARWorldTrackingConfiguration() + //session.run(configuration) + + let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: SIMD2(0.2, 0.2))) + scene.addAnchor(anchor) + + let board = try? Entity.load(named: "board") + if let board { + anchor.addChild(board) + } + } + + func addMeepleToBoard(){ //boardAnchor : AnchorEntity + //let configuration = ARWorldTrackingConfiguration() + //session.run(configuration) + + let objectsName = [ "rat", "cat", "dog", "wolf", "leopard", "tiger", "lion", "elephant"] + var iterator : Int = 0 + + let anchor = AnchorEntity(.plane(.horizontal, classification: .any, minimumBounds: SIMD2(0.3, 0.3))) //Une anchor par case ou une pour tout le plateau ? + scene.addAnchor(anchor) + + /// TODO : Lier au model ? + for row in 0...7{ + for col in 0...7{ + if (col % 2 == row % 2 ){ + let meeple = try? Entity.load(named: objectsName[iterator % 7]) //miteux + iterator += 1 + if let meeple { + + meeple.position.x += 0.1145 * Float(row) + meeple.position.y += 0.1145 * Float(col) + + anchor.addChild(meeple) + } + } + } + } + } + +// func createAnchor(){ +// let anchor : AnchorEntity = AnchorEntity(world: .zero) +// self.scene.addAnchor(anchor) +// +// let mesh = MeshResource.generateBox(size: 10) +// let material = SimpleMaterial(color: .red, isMetallic: true) +// let model = ModelEntity(mesh: mesh, materials: [material]) +// model.transform.translation.y = 0.05 +// +// anchor.addChild(model) +// +//// let tv = try? Entity.load(named: "Data") +//// anchor.addChild(tv!) +// +// } +} diff --git a/SwiftARKit/SwiftARKit/objects/board.usdz b/SwiftARKit/SwiftARKit/objects/board.usdz new file mode 100644 index 0000000..740af5d Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/board.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/cat.usdz b/SwiftARKit/SwiftARKit/objects/cat.usdz new file mode 100644 index 0000000..83112d6 Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/cat.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/dog.usdz b/SwiftARKit/SwiftARKit/objects/dog.usdz new file mode 100644 index 0000000..88ab0f4 Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/dog.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/elephant.usdz b/SwiftARKit/SwiftARKit/objects/elephant.usdz new file mode 100644 index 0000000..9565263 Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/elephant.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/leopard.usdz b/SwiftARKit/SwiftARKit/objects/leopard.usdz new file mode 100644 index 0000000..f018773 Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/leopard.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/lion.usdz b/SwiftARKit/SwiftARKit/objects/lion.usdz new file mode 100644 index 0000000..aa901d0 Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/lion.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/rat.usdz b/SwiftARKit/SwiftARKit/objects/rat.usdz new file mode 100644 index 0000000..d8cc30d Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/rat.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/tiger.usdz b/SwiftARKit/SwiftARKit/objects/tiger.usdz new file mode 100644 index 0000000..dc6792d Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/tiger.usdz differ diff --git a/SwiftARKit/SwiftARKit/objects/wolf.usdz b/SwiftARKit/SwiftARKit/objects/wolf.usdz new file mode 100644 index 0000000..0b45669 Binary files /dev/null and b/SwiftARKit/SwiftARKit/objects/wolf.usdz differ diff --git a/SwiftARKit/SwiftARKitTests/SwiftARKitTests.swift b/SwiftARKit/SwiftARKitTests/SwiftARKitTests.swift new file mode 100644 index 0000000..6037398 --- /dev/null +++ b/SwiftARKit/SwiftARKitTests/SwiftARKitTests.swift @@ -0,0 +1,36 @@ +// +// SwiftARKitTests.swift +// SwiftARKitTests +// +// Created by Pierre FERREIRA on 11/06/2024. +// + +import XCTest +@testable import SwiftARKit + +final class SwiftARKitTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/SwiftARKit/SwiftARKitUITests/SwiftARKitUITests.swift b/SwiftARKit/SwiftARKitUITests/SwiftARKitUITests.swift new file mode 100644 index 0000000..889e64a --- /dev/null +++ b/SwiftARKit/SwiftARKitUITests/SwiftARKitUITests.swift @@ -0,0 +1,41 @@ +// +// SwiftARKitUITests.swift +// SwiftARKitUITests +// +// Created by Pierre FERREIRA on 11/06/2024. +// + +import XCTest + +final class SwiftARKitUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/SwiftARKit/SwiftARKitUITests/SwiftARKitUITestsLaunchTests.swift b/SwiftARKit/SwiftARKitUITests/SwiftARKitUITestsLaunchTests.swift new file mode 100644 index 0000000..74a92e8 --- /dev/null +++ b/SwiftARKit/SwiftARKitUITests/SwiftARKitUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// SwiftARKitUITestsLaunchTests.swift +// SwiftARKitUITests +// +// Created by Pierre FERREIRA on 11/06/2024. +// + +import XCTest + +final class SwiftARKitUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +}