Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
596 changes: 596 additions & 0 deletions arkit/ARKit_test/ARKit_test.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
49 changes: 49 additions & 0 deletions arkit/ARKit_test/ARKit_test/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// AppDelegate.swift
// ARKit_test
//
// Created by Abigail Kim on 2023/10/21.
//

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.
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"images" : [
{
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions arkit/ARKit_test/ARKit_test/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
43 changes: 43 additions & 0 deletions arkit/ARKit_test/ARKit_test/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//
// ContentView.swift
// ARKit_test
//
// Created by Abigail Kim on 2023/10/21.
//

import SwiftUI
import RealityKit

struct ContentView : View {
var body: some View {
ARViewContainer().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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[

]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"LibraryID" : "BBB5EDD2-CBE1-49E5-931D-2C81F724D19D",
"Version" : "1.0"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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
]
}
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
36 changes: 36 additions & 0 deletions arkit/ARKit_test/ARKit_testTests/ARKit_testTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// ARKit_testTests.swift
// ARKit_testTests
//
// Created by Abigail Kim on 2023/10/21.
//

import XCTest
@testable import ARKit_test

final class ARKit_testTests: 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.
}
}

}
41 changes: 41 additions & 0 deletions arkit/ARKit_test/ARKit_testUITests/ARKit_testUITests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// ARKit_testUITests.swift
// ARKit_testUITests
//
// Created by Abigail Kim on 2023/10/21.
//

import XCTest

final class ARKit_testUITests: 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()
}
}
}
}
Loading