Skip to content

Commit 29881ad

Browse files
committed
init
0 parents  commit 29881ad

File tree

18 files changed

+1074
-0
lines changed

18 files changed

+1074
-0
lines changed

YoriJori.xcodeproj/project.pbxproj

+620
Large diffs are not rendered by default.

YoriJori.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>YoriJori.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>

YoriJori/AppDelegate.swift

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//
2+
// AppDelegate.swift
3+
// YoriJori
4+
//
5+
// Created by 김강현 on 7/6/24.
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+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"platform" : "ios",
6+
"size" : "1024x1024"
7+
}
8+
],
9+
"info" : {
10+
"author" : "xcode",
11+
"version" : 1
12+
}
13+
}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--View Controller-->
10+
<scene sceneID="EHf-IW-A2E">
11+
<objects>
12+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
13+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16+
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
17+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18+
</view>
19+
</viewController>
20+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21+
</objects>
22+
<point key="canvasLocation" x="53" y="375"/>
23+
</scene>
24+
</scenes>
25+
</document>

YoriJori/Base.lproj/Main.storyboard

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BV1-FR-VrT">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
6+
</dependencies>
7+
<scenes>
8+
<!--View Controller-->
9+
<scene sceneID="tXr-a1-R10">
10+
<objects>
11+
<viewController id="BV1-FR-VrT" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
12+
<view key="view" contentMode="scaleToFill" id="U0K-SW-4ec">
13+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
14+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
15+
<subviews>
16+
<arscnView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BrB-h1-WRS">
17+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
18+
</arscnView>
19+
</subviews>
20+
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
21+
<constraints>
22+
<constraint firstItem="BrB-h1-WRS" firstAttribute="leading" secondItem="fQZ-KI-GVf" secondAttribute="leading" id="GsS-dJ-CKf"/>
23+
<constraint firstItem="BrB-h1-WRS" firstAttribute="bottom" secondItem="fQZ-KI-GVf" secondAttribute="bottom" id="VpT-BR-CcM"/>
24+
<constraint firstItem="BrB-h1-WRS" firstAttribute="trailing" secondItem="fQZ-KI-GVf" secondAttribute="trailing" id="XyZ-9z-H8e"/>
25+
<constraint firstItem="BrB-h1-WRS" firstAttribute="top" secondItem="U0K-SW-4ec" secondAttribute="top" id="rJc-2c-zQA"/>
26+
</constraints>
27+
<viewLayoutGuide key="safeArea" id="fQZ-KI-GVf"/>
28+
</view>
29+
<connections>
30+
<outlet property="sceneView" destination="BrB-h1-WRS" id="5nT-qQ-ynl"/>
31+
</connections>
32+
</viewController>
33+
<placeholder placeholderIdentifier="IBFirstResponder" id="SZV-WD-TEh" sceneMemberID="firstResponder"/>
34+
</objects>
35+
</scene>
36+
</scenes>
37+
</document>

YoriJori/ViewController.swift

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
//
2+
// ViewController.swift
3+
// YoriJori
4+
//
5+
// Created by 김강현 on 7/6/24.
6+
//
7+
8+
import UIKit
9+
import SceneKit
10+
import ARKit
11+
12+
class ViewController: UIViewController, ARSCNViewDelegate {
13+
14+
@IBOutlet var sceneView: ARSCNView!
15+
16+
override func viewDidLoad() {
17+
super.viewDidLoad()
18+
19+
// Set the view's delegate
20+
sceneView.delegate = self
21+
22+
// Show statistics such as fps and timing information
23+
sceneView.showsStatistics = true
24+
25+
// Create a new scene
26+
let scene = SCNScene(named: "art.scnassets/ship.scn")!
27+
28+
// Set the scene to the view
29+
sceneView.scene = scene
30+
}
31+
32+
override func viewWillAppear(_ animated: Bool) {
33+
super.viewWillAppear(animated)
34+
35+
// Create a session configuration
36+
let configuration = ARWorldTrackingConfiguration()
37+
38+
// Run the view's session
39+
sceneView.session.run(configuration)
40+
}
41+
42+
override func viewWillDisappear(_ animated: Bool) {
43+
super.viewWillDisappear(animated)
44+
45+
// Pause the view's session
46+
sceneView.session.pause()
47+
}
48+
49+
// MARK: - ARSCNViewDelegate
50+
51+
/*
52+
// Override to create and configure nodes for anchors added to the view's session.
53+
func renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? {
54+
let node = SCNNode()
55+
56+
return node
57+
}
58+
*/
59+
60+
func session(_ session: ARSession, didFailWithError error: Error) {
61+
// Present an error message to the user
62+
63+
}
64+
65+
func sessionWasInterrupted(_ session: ARSession) {
66+
// Inform the user that the session has been interrupted, for example, by presenting an overlay
67+
68+
}
69+
70+
func sessionInterruptionEnded(_ session: ARSession) {
71+
// Reset tracking and/or remove existing anchors if consistent tracking is required
72+
73+
}
74+
}

YoriJori/art.scnassets/ship.scn

215 KB
Binary file not shown.

YoriJori/art.scnassets/texture.png

341 KB
Loading

YoriJoriTests/YoriJoriTests.swift

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// YoriJoriTests.swift
3+
// YoriJoriTests
4+
//
5+
// Created by 김강현 on 7/6/24.
6+
//
7+
8+
import XCTest
9+
@testable import YoriJori
10+
11+
final class YoriJoriTests: XCTestCase {
12+
13+
override func setUpWithError() throws {
14+
// Put setup code here. This method is called before the invocation of each test method in the class.
15+
}
16+
17+
override func tearDownWithError() throws {
18+
// Put teardown code here. This method is called after the invocation of each test method in the class.
19+
}
20+
21+
func testExample() throws {
22+
// This is an example of a functional test case.
23+
// Use XCTAssert and related functions to verify your tests produce the correct results.
24+
// Any test you write for XCTest can be annotated as throws and async.
25+
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
26+
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
27+
}
28+
29+
func testPerformanceExample() throws {
30+
// This is an example of a performance test case.
31+
self.measure {
32+
// Put the code you want to measure the time of here.
33+
}
34+
}
35+
36+
}

YoriJoriUITests/YoriJoriUITests.swift

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//
2+
// YoriJoriUITests.swift
3+
// YoriJoriUITests
4+
//
5+
// Created by 김강현 on 7/6/24.
6+
//
7+
8+
import XCTest
9+
10+
final class YoriJoriUITests: XCTestCase {
11+
12+
override func setUpWithError() throws {
13+
// Put setup code here. This method is called before the invocation of each test method in the class.
14+
15+
// In UI tests it is usually best to stop immediately when a failure occurs.
16+
continueAfterFailure = false
17+
18+
// 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.
19+
}
20+
21+
override func tearDownWithError() throws {
22+
// Put teardown code here. This method is called after the invocation of each test method in the class.
23+
}
24+
25+
func testExample() throws {
26+
// UI tests must launch the application that they test.
27+
let app = XCUIApplication()
28+
app.launch()
29+
30+
// Use XCTAssert and related functions to verify your tests produce the correct results.
31+
}
32+
33+
func testLaunchPerformance() throws {
34+
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
35+
// This measures how long it takes to launch your application.
36+
measure(metrics: [XCTApplicationLaunchMetric()]) {
37+
XCUIApplication().launch()
38+
}
39+
}
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// YoriJoriUITestsLaunchTests.swift
3+
// YoriJoriUITests
4+
//
5+
// Created by 김강현 on 7/6/24.
6+
//
7+
8+
import XCTest
9+
10+
final class YoriJoriUITestsLaunchTests: XCTestCase {
11+
12+
override class var runsForEachTargetApplicationUIConfiguration: Bool {
13+
true
14+
}
15+
16+
override func setUpWithError() throws {
17+
continueAfterFailure = false
18+
}
19+
20+
func testLaunch() throws {
21+
let app = XCUIApplication()
22+
app.launch()
23+
24+
// Insert steps here to perform after app launch but before taking a screenshot,
25+
// such as logging into a test account or navigating somewhere in the app
26+
27+
let attachment = XCTAttachment(screenshot: app.screenshot())
28+
attachment.name = "Launch Screen"
29+
attachment.lifetime = .keepAlways
30+
add(attachment)
31+
}
32+
}

0 commit comments

Comments
 (0)