From b63945385413460903d3a708f6ec563ff412f646 Mon Sep 17 00:00:00 2001 From: hansoo Date: Wed, 19 Mar 2025 22:54:56 +0900 Subject: [PATCH] =?UTF-8?q?iOS=20=EB=B0=B1=EC=97=85=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cleanup-ios-backups.sh | 28 +++++++++++ ios/App/App/AppDelegate.swift.bak | 50 -------------------- ios/App/App/ViewController.swift.bak | 69 ---------------------------- 3 files changed, 28 insertions(+), 119 deletions(-) create mode 100755 cleanup-ios-backups.sh delete mode 100644 ios/App/App/AppDelegate.swift.bak delete mode 100644 ios/App/App/ViewController.swift.bak diff --git a/cleanup-ios-backups.sh b/cleanup-ios-backups.sh new file mode 100755 index 0000000..e1e4370 --- /dev/null +++ b/cleanup-ios-backups.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# iOS 백업 파일 정리 스크립트 +echo "iOS 백업 파일 정리 중..." + +# 프로젝트 디렉토리로 이동 +cd "$(dirname "$0")" + +# 백업 디렉토리 목록 +BACKUP_DIRS=( + "ios_backup_20250319_215301" + "ios_backup_final_20250319_220935" + "ios.bak.20250319204258" +) + +# 백업 디렉토리 삭제 +for dir in "${BACKUP_DIRS[@]}"; do + if [ -d "$dir" ]; then + echo "삭제: $dir" + rm -rf "$dir" + fi +done + +# .bak 파일 찾아서 삭제 +echo "백업(.bak) 파일 삭제 중..." +find . -name "*.bak" -type f -print -delete + +echo "정리 완료!" diff --git a/ios/App/App/AppDelegate.swift.bak b/ios/App/App/AppDelegate.swift.bak deleted file mode 100644 index 0f510c7..0000000 --- a/ios/App/App/AppDelegate.swift.bak +++ /dev/null @@ -1,50 +0,0 @@ -import UIKit -import Capacitor - -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate { - - var window: UIWindow? - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - SplashScreen.handleSplash(self.window) - 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. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - 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. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool { - // Called when the app was launched with a url. Feel free to add additional processing here, - // but if you want the App API to support tracking app url opens, make sure to keep this call - return ApplicationDelegateProxy.shared.application(app, open: url, options: options) - } - - func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { - // Called when the app was launched with an activity, including Universal Links. - // Feel free to add additional processing here, but if you want the App API to support - // tracking app url opens, make sure to keep this call - return ApplicationDelegateProxy.shared.application(application, continue: userActivity, restorationHandler: restorationHandler) - } - -} diff --git a/ios/App/App/ViewController.swift.bak b/ios/App/App/ViewController.swift.bak deleted file mode 100644 index 7783511..0000000 --- a/ios/App/App/ViewController.swift.bak +++ /dev/null @@ -1,69 +0,0 @@ -import UIKit -import Capacitor -import WebKit - -class ViewController: CAPBridgeViewController { - - private var splashView: UIView? - - override func viewDidLoad() { - super.viewDidLoad() - - // 스플래시 뷰 생성 - setupSplashView() - - // 웹뷰 로드 완료 감지 - NotificationCenter.default.addObserver(self, selector: #selector(webViewDidFinishLoad), name: NSNotification.Name(rawValue: "capacitorWebViewDidLoad"), object: nil) - } - - private func setupSplashView() { - // 스플래시 뷰 생성 - splashView = UIView(frame: self.view.bounds) - splashView?.backgroundColor = UIColor.white - - // 앱 이름 레이블 추가 - let titleLabel = UILabel() - titleLabel.text = "젤리의 적자탈출" - titleLabel.font = UIFont.boldSystemFont(ofSize: 36) - titleLabel.textAlignment = .center - titleLabel.translatesAutoresizingMaskIntoConstraints = false - - if let splashView = splashView { - self.view.addSubview(splashView) - splashView.addSubview(titleLabel) - - NSLayoutConstraint.activate([ - titleLabel.centerXAnchor.constraint(equalTo: splashView.centerXAnchor), - titleLabel.centerYAnchor.constraint(equalTo: splashView.centerYAnchor) - ]) - } - } - - @objc private func webViewDidFinishLoad() { - // 웹뷰 로드 완료 시 스플래시 화면 제거 - DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { - UIView.animate(withDuration: 0.3, animations: { - self.splashView?.alpha = 0 - }, completion: { _ in - self.splashView?.removeFromSuperview() - self.splashView = nil - }) - } - } - - override func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - - // 웹뷰 로드 시작 시 스크립트 실행 - DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { - if self.splashView != nil && self.splashView?.alpha == 1 { - UIView.animate(withDuration: 0.3, animations: { - self.splashView?.alpha = 0 - }, completion: { _ in - self.splashView?.removeFromSuperview() - self.splashView = nil - }) - } - } - } -}