[✨] 기능 추가 업데이트2 - (API 통신, 푸시, 카카오 로그인, 버전 비교)
This commit is contained in:
parent
33c7682801
commit
3e4aa99a18
|
@ -1,63 +0,0 @@
|
||||||
//
|
|
||||||
// ContentView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 11/26/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
private var cancellables = Set<AnyCancellable>()
|
|
||||||
|
|
||||||
struct ContentView: View {
|
|
||||||
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
VStack {
|
|
||||||
Image(systemName: "globe")
|
|
||||||
.imageScale(.large)
|
|
||||||
.foregroundStyle(.tint)
|
|
||||||
Text("Hello, world!")
|
|
||||||
.background(Color("Point/Dark"))
|
|
||||||
Button {
|
|
||||||
SNSLogin().login(type: .Kakao)
|
|
||||||
|
|
||||||
// self.versionCheck()
|
|
||||||
|
|
||||||
} label : {
|
|
||||||
Text("카카오")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.padding()
|
|
||||||
}
|
|
||||||
|
|
||||||
func versionCheck() {
|
|
||||||
loadAPIData(url: "https://devacamate.ipstein.myds.me",
|
|
||||||
path: "/api/v1/in/app/version",
|
|
||||||
method: .get,
|
|
||||||
parameters: [ "type": "I"],
|
|
||||||
decodingType: APIResponse<VersionData>.self)
|
|
||||||
.sink { completion in
|
|
||||||
switch completion {
|
|
||||||
case .failure(let error):
|
|
||||||
printLog("ERROR: \(error)")
|
|
||||||
case .finished:
|
|
||||||
printLog("Version call Successed")
|
|
||||||
}
|
|
||||||
} receiveValue: { data in
|
|
||||||
guard let responseData = data as? APIResponse<VersionData> else {return}
|
|
||||||
printLog(responseData.status.toStringDict())
|
|
||||||
printLog(responseData.data.toStringDict())
|
|
||||||
}
|
|
||||||
.store(in: &cancellables)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
ContentView()
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
//
|
|
||||||
// IntroView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 12/1/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
struct IntroView: View {
|
|
||||||
var body: some View {
|
|
||||||
VStack(spacing: 0) {
|
|
||||||
Spacer()
|
|
||||||
.frame(height: 100)
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 200, height: 200)
|
|
||||||
.background(.white)
|
|
||||||
.border(.black)
|
|
||||||
.padding()
|
|
||||||
Spacer()
|
|
||||||
HStack(spacing: 4) {
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 24, height: 24)
|
|
||||||
Text("STEIN")
|
|
||||||
.font(.nps(font: .bold, size: 16))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
|
||||||
}
|
|
||||||
.padding(.bottom,12)
|
|
||||||
Text("Copyright © Team.Stein")
|
|
||||||
.font(.nps(font: .regular, size: 14))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
|
||||||
.padding(.bottom,50)
|
|
||||||
}
|
|
||||||
.fullView(.Normal.normal)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
IntroView()
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
//
|
|
||||||
// LoginView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 12/1/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct LoginView: View {
|
|
||||||
var body: some View {
|
|
||||||
VStack(spacing: 0) {
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 200, height: 200)
|
|
||||||
.background(.white)
|
|
||||||
.border(.black)
|
|
||||||
.padding(.bottom, 84)
|
|
||||||
Button {
|
|
||||||
|
|
||||||
} label: {
|
|
||||||
HStack(spacing: 12) {
|
|
||||||
Image("Kakao_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 32, height: 32)
|
|
||||||
Text("카카오 계정으로 시작하기")
|
|
||||||
.font(.nps(font: .regular, size: 16))
|
|
||||||
.foregroundStyle(Color(.Text.black))
|
|
||||||
}
|
|
||||||
.padding(12)
|
|
||||||
.background {
|
|
||||||
RoundedRectangle(cornerRadius: 12)
|
|
||||||
.foregroundStyle(Color(.Other.yellow))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
.fullView(.Normal.normal)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
LoginView()
|
|
||||||
}
|
|
|
@ -7,6 +7,8 @@
|
||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
A771FFF22CFB70D100367DA6 /* KakaoSDK in Frameworks */ = {isa = PBXBuildFile; productRef = A771FFF12CFB70D100367DA6 /* KakaoSDK */; };
|
||||||
|
A78774722CF586AF002FE2EE /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = A78774712CF586AF002FE2EE /* Alamofire */; };
|
||||||
A7A518CF2CF555E200822D0D /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A7A518CE2CF555E200822D0D /* README.md */; };
|
A7A518CF2CF555E200822D0D /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A7A518CE2CF555E200822D0D /* README.md */; };
|
||||||
A7A518D12CF5588500822D0D /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = A7A518D02CF5588500822D0D /* .gitignore */; };
|
A7A518D12CF5588500822D0D /* .gitignore in Resources */ = {isa = PBXBuildFile; fileRef = A7A518D02CF5588500822D0D /* .gitignore */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
@ -17,9 +19,22 @@
|
||||||
A7A518D02CF5588500822D0D /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
|
A7A518D02CF5588500822D0D /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitignore; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||||
|
A7FE24F82CFD2F4F00A147F8 /* Exceptions for "AcaMate" folder in "AcaMate" target */ = {
|
||||||
|
isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
|
||||||
|
membershipExceptions = (
|
||||||
|
Info.plist,
|
||||||
|
);
|
||||||
|
target = A7A518BA2CF5558B00822D0D /* AcaMate */;
|
||||||
|
};
|
||||||
|
/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
|
||||||
|
|
||||||
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
/* Begin PBXFileSystemSynchronizedRootGroup section */
|
||||||
A7A518BD2CF5558B00822D0D /* AcaMate */ = {
|
A7FE24DF2CFD2F4E00A147F8 /* AcaMate */ = {
|
||||||
isa = PBXFileSystemSynchronizedRootGroup;
|
isa = PBXFileSystemSynchronizedRootGroup;
|
||||||
|
exceptions = (
|
||||||
|
A7FE24F82CFD2F4F00A147F8 /* Exceptions for "AcaMate" folder in "AcaMate" target */,
|
||||||
|
);
|
||||||
path = AcaMate;
|
path = AcaMate;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
@ -30,6 +45,8 @@
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
A78774722CF586AF002FE2EE /* Alamofire in Frameworks */,
|
||||||
|
A771FFF22CFB70D100367DA6 /* KakaoSDK in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -41,7 +58,7 @@
|
||||||
children = (
|
children = (
|
||||||
A7A518D02CF5588500822D0D /* .gitignore */,
|
A7A518D02CF5588500822D0D /* .gitignore */,
|
||||||
A7A518CE2CF555E200822D0D /* README.md */,
|
A7A518CE2CF555E200822D0D /* README.md */,
|
||||||
A7A518BD2CF5558B00822D0D /* AcaMate */,
|
A7FE24DF2CFD2F4E00A147F8 /* AcaMate */,
|
||||||
A7A518BC2CF5558B00822D0D /* Products */,
|
A7A518BC2CF5558B00822D0D /* Products */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -70,10 +87,12 @@
|
||||||
dependencies = (
|
dependencies = (
|
||||||
);
|
);
|
||||||
fileSystemSynchronizedGroups = (
|
fileSystemSynchronizedGroups = (
|
||||||
A7A518BD2CF5558B00822D0D /* AcaMate */,
|
A7FE24DF2CFD2F4E00A147F8 /* AcaMate */,
|
||||||
);
|
);
|
||||||
name = AcaMate;
|
name = AcaMate;
|
||||||
packageProductDependencies = (
|
packageProductDependencies = (
|
||||||
|
A78774712CF586AF002FE2EE /* Alamofire */,
|
||||||
|
A771FFF12CFB70D100367DA6 /* KakaoSDK */,
|
||||||
);
|
);
|
||||||
productName = AcaMate;
|
productName = AcaMate;
|
||||||
productReference = A7A518BB2CF5558B00822D0D /* AcaMate.app */;
|
productReference = A7A518BB2CF5558B00822D0D /* AcaMate.app */;
|
||||||
|
@ -103,6 +122,10 @@
|
||||||
);
|
);
|
||||||
mainGroup = A7A518B22CF5558B00822D0D;
|
mainGroup = A7A518B22CF5558B00822D0D;
|
||||||
minimizedProjectReferenceProxies = 1;
|
minimizedProjectReferenceProxies = 1;
|
||||||
|
packageReferences = (
|
||||||
|
A78774702CF586AF002FE2EE /* XCRemoteSwiftPackageReference "Alamofire" */,
|
||||||
|
A771FFF02CFB70D100367DA6 /* XCRemoteSwiftPackageReference "kakao-ios-sdk" */,
|
||||||
|
);
|
||||||
preferredProjectObjectVersion = 77;
|
preferredProjectObjectVersion = 77;
|
||||||
productRefGroup = A7A518BC2CF5558B00822D0D /* Products */;
|
productRefGroup = A7A518BC2CF5558B00822D0D /* Products */;
|
||||||
projectDirPath = "";
|
projectDirPath = "";
|
||||||
|
@ -188,7 +211,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 18.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
|
||||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
|
@ -196,6 +219,7 @@
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
|
VALIDATE_PRODUCT = YES;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
|
@ -245,7 +269,7 @@
|
||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 18.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
|
||||||
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
|
@ -260,27 +284,36 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = AcaMate/AcaMate.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1.0.0.0;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"AcaMate/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"AcaMate/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 45MYH7ZHUQ;
|
DEVELOPMENT_TEAM = 45MYH7ZHUQ;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = AcaMate/Info.plist;
|
||||||
|
INFOPLIST_KEY_NSUserTrackingUsageDescription = "최적화된 개인 간 연결과 맞춤 헤택을 위해 사용합니다.";
|
||||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||||
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = me.myds.ipstein.acamate.AcaMate;
|
PRODUCT_BUNDLE_IDENTIFIER = me.myds.ipstein.acamate.AcaMate;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited) DEV";
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
|
@ -289,27 +322,35 @@
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
|
CODE_SIGN_ENTITLEMENTS = AcaMate/AcaMate.entitlements;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1.0.0.0;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"AcaMate/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"AcaMate/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 45MYH7ZHUQ;
|
DEVELOPMENT_TEAM = 45MYH7ZHUQ;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
INFOPLIST_FILE = AcaMate/Info.plist;
|
||||||
|
INFOPLIST_KEY_NSUserTrackingUsageDescription = "최적화된 개인 간 연결과 맞춤 헤택을 위해 사용합니다.";
|
||||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||||
|
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0;
|
MARKETING_VERSION = 1.0.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = me.myds.ipstein.acamate.AcaMate;
|
PRODUCT_BUNDLE_IDENTIFIER = me.myds.ipstein.acamate.AcaMate;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
|
||||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = 1;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
@ -335,6 +376,38 @@
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
|
|
||||||
|
/* Begin XCRemoteSwiftPackageReference section */
|
||||||
|
A771FFF02CFB70D100367DA6 /* XCRemoteSwiftPackageReference "kakao-ios-sdk" */ = {
|
||||||
|
isa = XCRemoteSwiftPackageReference;
|
||||||
|
repositoryURL = "https://github.com/kakao/kakao-ios-sdk";
|
||||||
|
requirement = {
|
||||||
|
branch = master;
|
||||||
|
kind = branch;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
A78774702CF586AF002FE2EE /* XCRemoteSwiftPackageReference "Alamofire" */ = {
|
||||||
|
isa = XCRemoteSwiftPackageReference;
|
||||||
|
repositoryURL = "https://github.com/Alamofire/Alamofire.git";
|
||||||
|
requirement = {
|
||||||
|
kind = upToNextMajorVersion;
|
||||||
|
minimumVersion = 5.10.2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
/* End XCRemoteSwiftPackageReference section */
|
||||||
|
|
||||||
|
/* Begin XCSwiftPackageProductDependency section */
|
||||||
|
A771FFF12CFB70D100367DA6 /* KakaoSDK */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = A771FFF02CFB70D100367DA6 /* XCRemoteSwiftPackageReference "kakao-ios-sdk" */;
|
||||||
|
productName = KakaoSDK;
|
||||||
|
};
|
||||||
|
A78774712CF586AF002FE2EE /* Alamofire */ = {
|
||||||
|
isa = XCSwiftPackageProductDependency;
|
||||||
|
package = A78774702CF586AF002FE2EE /* XCRemoteSwiftPackageReference "Alamofire" */;
|
||||||
|
productName = Alamofire;
|
||||||
|
};
|
||||||
|
/* End XCSwiftPackageProductDependency section */
|
||||||
};
|
};
|
||||||
rootObject = A7A518B32CF5558B00822D0D /* Project object */;
|
rootObject = A7A518B32CF5558B00822D0D /* Project object */;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"originHash" : "48d44fe9560aaa48bc97ae34cdb596f62fa2d739be3dafd4261b95db8f8c86ab",
|
||||||
|
"pins" : [
|
||||||
|
{
|
||||||
|
"identity" : "alamofire",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/Alamofire/Alamofire.git",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "513364f870f6bfc468f9d2ff0a95caccc10044c5",
|
||||||
|
"version" : "5.10.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "kakao-ios-sdk",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/kakao/kakao-ios-sdk",
|
||||||
|
"state" : {
|
||||||
|
"branch" : "master",
|
||||||
|
"revision" : "ab4309c1950550add307046ad1e08024c7514603"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version" : 3
|
||||||
|
}
|
Binary file not shown.
78
AcaMate.xcodeproj/xcshareddata/xcschemes/AcaMate.xcscheme
Normal file
78
AcaMate.xcodeproj/xcshareddata/xcschemes/AcaMate.xcscheme
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1610"
|
||||||
|
version = "1.7">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES"
|
||||||
|
buildArchitectures = "Automatic">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "A7A518BA2CF5558B00822D0D"
|
||||||
|
BuildableName = "AcaMate.app"
|
||||||
|
BlueprintName = "AcaMate"
|
||||||
|
ReferencedContainer = "container:AcaMate.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
shouldAutocreateTestPlan = "YES">
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "A7A518BA2CF5558B00822D0D"
|
||||||
|
BuildableName = "AcaMate.app"
|
||||||
|
BlueprintName = "AcaMate"
|
||||||
|
ReferencedContainer = "container:AcaMate.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "A7A518BA2CF5558B00822D0D"
|
||||||
|
BuildableName = "AcaMate.app"
|
||||||
|
BlueprintName = "AcaMate"
|
||||||
|
ReferencedContainer = "container:AcaMate.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Bucket
|
||||||
|
uuid = "A1652E22-5507-4B7C-A3E4-0E49172B1CE8"
|
||||||
|
type = "1"
|
||||||
|
version = "2.0">
|
||||||
|
</Bucket>
|
|
@ -10,5 +10,13 @@
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>SuppressBuildableAutocreation</key>
|
||||||
|
<dict>
|
||||||
|
<key>A7A518BA2CF5558B00822D0D</key>
|
||||||
|
<dict>
|
||||||
|
<key>primary</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
115
AcaMate/1. View/1. Intro & Login/IntroView.swift
Normal file
115
AcaMate/1. View/1. Intro & Login/IntroView.swift
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
//
|
||||||
|
// IntroView.swift
|
||||||
|
// AcaMate
|
||||||
|
//
|
||||||
|
// Created by Sean Kim on 12/1/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
import Combine
|
||||||
|
|
||||||
|
struct IntroView: View {
|
||||||
|
@State var cancellables: Set<AnyCancellable> = []
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationStack {
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
Spacer()
|
||||||
|
.frame(height: 100)
|
||||||
|
Image("Team_Icon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 200, height: 200)
|
||||||
|
.background(.white)
|
||||||
|
.border(.black)
|
||||||
|
.padding()
|
||||||
|
Spacer()
|
||||||
|
HStack(spacing: 4) {
|
||||||
|
Image("Team_Icon")
|
||||||
|
.resizable()
|
||||||
|
.frame(width: 24, height: 24)
|
||||||
|
Text("STEIN")
|
||||||
|
.font(.nps(font: .bold, size: 16))
|
||||||
|
.foregroundStyle(Color(.Text.detail))
|
||||||
|
}
|
||||||
|
.padding(.bottom,12)
|
||||||
|
Text("Copyright © Team.Stein")
|
||||||
|
.font(.nps(font: .regular, size: 14))
|
||||||
|
.foregroundStyle(Color(.Text.detail))
|
||||||
|
.padding(.bottom,50)
|
||||||
|
}
|
||||||
|
.fullView(.Normal.normal)
|
||||||
|
.onAppear {
|
||||||
|
printLog("IntroView_onAppear")
|
||||||
|
loadVersion()
|
||||||
|
.sink { completion in
|
||||||
|
switch completion {
|
||||||
|
case .failure(let error):
|
||||||
|
printLog(error)
|
||||||
|
case .finished: break
|
||||||
|
}
|
||||||
|
} receiveValue: { version in
|
||||||
|
switch compareVersion(version.force_ver, currentVersion()){
|
||||||
|
case .bigger:
|
||||||
|
printLog("강제 업데이트")
|
||||||
|
default:
|
||||||
|
switch compareVersion(version.final_ver, currentVersion()) {
|
||||||
|
case .bigger:
|
||||||
|
if version.choice_update_yn {
|
||||||
|
printLog("선택 업데이트")
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
printLog("정상 동작")
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
printLog("선택 업데이트 넘어감")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.store(in: &cancellables)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private func loadVersion() -> Future<VersionData, Error> {
|
||||||
|
return Future { promise in
|
||||||
|
loadAPIData(url: "\(API_URL)",
|
||||||
|
path: "/api/v1/in/app/version",
|
||||||
|
parameters: ["type":"I"],
|
||||||
|
decodingType: APIResponse<VersionData>.self)
|
||||||
|
.sink { completion in
|
||||||
|
switch completion {
|
||||||
|
case .failure(let error):
|
||||||
|
printLog("\(error)")
|
||||||
|
promise(.failure(error))
|
||||||
|
case .finished: break
|
||||||
|
}
|
||||||
|
} receiveValue: { data in
|
||||||
|
guard let apiData = data as? APIResponse<VersionData> else {return}
|
||||||
|
printLog("\(apiData.data.toStringDict())")
|
||||||
|
promise(.success(apiData.data))
|
||||||
|
}
|
||||||
|
.store(in: &cancellables)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private func currentVersion() -> String {
|
||||||
|
guard let currentVer = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String else { return "" }
|
||||||
|
return currentVer
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private func versionChange(ver: String) -> [Int] {
|
||||||
|
return ver.components(separatedBy: ["."]).map {Int($0) ?? 0}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
IntroView()
|
||||||
|
}
|
|
@ -1,43 +0,0 @@
|
||||||
//
|
|
||||||
// IntroView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 12/1/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
struct IntroView: View {
|
|
||||||
var body: some View {
|
|
||||||
VStack(spacing: 0) {
|
|
||||||
Spacer()
|
|
||||||
.frame(height: 100)
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 200, height: 200)
|
|
||||||
.background(.white)
|
|
||||||
.border(.black)
|
|
||||||
.padding()
|
|
||||||
Spacer()
|
|
||||||
HStack(spacing: 4) {
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 24, height: 24)
|
|
||||||
Text("STEIN")
|
|
||||||
.font(.nps(font: .bold, size: 16))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
|
||||||
}
|
|
||||||
.padding(.bottom,12)
|
|
||||||
Text("Copyright © Team.Stein")
|
|
||||||
.font(.nps(font: .regular, size: 14))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
|
||||||
.padding(.bottom,50)
|
|
||||||
}
|
|
||||||
.fullView(.Normal.normal)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
IntroView()
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
//
|
|
||||||
// ContentView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 11/26/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
private var cancellables = Set<AnyCancellable>()
|
|
||||||
|
|
||||||
struct ContentView: View {
|
|
||||||
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
VStack {
|
|
||||||
Image(systemName: "globe")
|
|
||||||
.imageScale(.large)
|
|
||||||
.foregroundStyle(.tint)
|
|
||||||
Text("Hello, world!")
|
|
||||||
.background(Color("Point/Dark"))
|
|
||||||
Button {
|
|
||||||
SNSLogin().login(type: .Kakao)
|
|
||||||
|
|
||||||
// self.versionCheck()
|
|
||||||
|
|
||||||
} label : {
|
|
||||||
Text("카카오")
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.padding()
|
|
||||||
}
|
|
||||||
|
|
||||||
func versionCheck() {
|
|
||||||
loadAPIData(url: "https://devacamate.ipstein.myds.me",
|
|
||||||
path: "/api/v1/in/app/version",
|
|
||||||
method: .get,
|
|
||||||
parameters: [ "type": "I"],
|
|
||||||
decodingType: APIResponse<VersionData>.self)
|
|
||||||
.sink { completion in
|
|
||||||
switch completion {
|
|
||||||
case .failure(let error):
|
|
||||||
printLog("ERROR: \(error)")
|
|
||||||
case .finished:
|
|
||||||
printLog("Version call Successed")
|
|
||||||
}
|
|
||||||
} receiveValue: { data in
|
|
||||||
guard let responseData = data as? APIResponse<VersionData> else {return}
|
|
||||||
printLog(responseData.status.toStringDict())
|
|
||||||
printLog(responseData.data.toStringDict())
|
|
||||||
}
|
|
||||||
.store(in: &cancellables)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
ContentView()
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
//
|
|
||||||
// IntroView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 12/1/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
import Combine
|
|
||||||
|
|
||||||
struct IntroView: View {
|
|
||||||
var body: some View {
|
|
||||||
VStack(spacing: 0) {
|
|
||||||
Spacer()
|
|
||||||
.frame(height: 100)
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 200, height: 200)
|
|
||||||
.background(.white)
|
|
||||||
.border(.black)
|
|
||||||
.padding()
|
|
||||||
Spacer()
|
|
||||||
HStack(spacing: 4) {
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 24, height: 24)
|
|
||||||
Text("STEIN")
|
|
||||||
.font(.nps(font: .bold, size: 16))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
|
||||||
}
|
|
||||||
.padding(.bottom,12)
|
|
||||||
Text("Copyright © Team.Stein")
|
|
||||||
.font(.nps(font: .regular, size: 14))
|
|
||||||
.foregroundStyle(Color(.Text.detail))
|
|
||||||
.padding(.bottom,50)
|
|
||||||
}
|
|
||||||
.fullView(.Normal.normal)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
IntroView()
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
//
|
|
||||||
// LoginView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 12/1/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct LoginView: View {
|
|
||||||
var body: some View {
|
|
||||||
VStack(spacing: 0) {
|
|
||||||
Image("Team_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 200, height: 200)
|
|
||||||
.background(.white)
|
|
||||||
.border(.black)
|
|
||||||
.padding(.bottom, 84)
|
|
||||||
Button {
|
|
||||||
|
|
||||||
} label: {
|
|
||||||
HStack(spacing: 12) {
|
|
||||||
Image("Kakao_Icon")
|
|
||||||
.resizable()
|
|
||||||
.frame(width: 32, height: 32)
|
|
||||||
Text("카카오 계정으로 시작하기")
|
|
||||||
.font(.nps(font: .regular, size: 16))
|
|
||||||
.foregroundStyle(Color(.Text.black))
|
|
||||||
}
|
|
||||||
.padding(12)
|
|
||||||
.background {
|
|
||||||
RoundedRectangle(cornerRadius: 12)
|
|
||||||
.foregroundStyle(Color(.Other.yellow))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
.fullView(.Normal.normal)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
LoginView()
|
|
||||||
}
|
|
|
@ -5,6 +5,13 @@
|
||||||
// Created by Sean Kim on 2/20/24.
|
// Created by Sean Kim on 2/20/24.
|
||||||
//
|
//
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
// MARK: - ACAMATE
|
||||||
|
#if DEV
|
||||||
|
public let API_URL: String = "https://devacamate.ipstein.myds.me"
|
||||||
|
#else
|
||||||
|
public let API_URL: String = "https://acamate.ipstein.myds.me"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// MARK: - TYPEALIAS
|
// MARK: - TYPEALIAS
|
||||||
typealias VOID_TO_VOID = () -> ()
|
typealias VOID_TO_VOID = () -> ()
|
||||||
|
|
|
@ -22,6 +22,8 @@ class Status: Codable {
|
||||||
class VersionData: Codable {
|
class VersionData: Codable {
|
||||||
let os_type, final_ver, dev_ver, force_ver: String
|
let os_type, final_ver, dev_ver, force_ver: String
|
||||||
let choice_update_yn: Bool
|
let choice_update_yn: Bool
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,22 @@
|
||||||
// Created by Sean Kim on 12/2/24.
|
// Created by Sean Kim on 12/2/24.
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import SwiftUI
|
||||||
|
|
||||||
|
struct AlertData {
|
||||||
|
var title: String
|
||||||
|
var body: String
|
||||||
|
var button: [ButtonType]
|
||||||
|
|
||||||
|
init(title: String = "알림", body: String, button: [ButtonType] = [.init(name: "확인", role: .none, function: nil)]) {
|
||||||
|
self.title = title
|
||||||
|
self.body = body
|
||||||
|
self.button = button
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct ButtonType {
|
||||||
|
var name: String
|
||||||
|
var role: ButtonRole?
|
||||||
|
var function: (()->())?
|
||||||
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
import Combine
|
||||||
|
|
||||||
import KakaoSDKCommon
|
import KakaoSDKCommon
|
||||||
import KakaoSDKAuth
|
import KakaoSDKAuth
|
||||||
|
@ -13,7 +14,11 @@ import KakaoSDKAuth
|
||||||
@main
|
@main
|
||||||
struct AcaMateApp: App {
|
struct AcaMateApp: App {
|
||||||
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
||||||
|
var cancellables: Set<AnyCancellable> = []
|
||||||
|
|
||||||
|
init() {
|
||||||
|
printLog("APP INIT")
|
||||||
|
}
|
||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
//
|
|
||||||
// IntroView.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 12/2/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct IntroView: View {
|
|
||||||
var body: some View {
|
|
||||||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
IntroView()
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
//
|
|
||||||
// LoginVIew.swift
|
|
||||||
// AcaMate
|
|
||||||
//
|
|
||||||
// Created by Sean Kim on 12/2/24.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct LoginVIew: View {
|
|
||||||
var body: some View {
|
|
||||||
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#Preview {
|
|
||||||
LoginVIew()
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user