From d3a8805c659cf76d261b3e171bb326c2e4782442 Mon Sep 17 00:00:00 2001 From: yangsubinn Date: Wed, 5 Jan 2022 17:43:23 +0900 Subject: [PATCH 1/6] =?UTF-8?q?[Chore]=20#8=20-=20socialLogin=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=EC=A0=9D=ED=8A=B8=20=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialLogin.xcodeproj/project.pbxproj | 365 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../socialLogin/socialLogin/AppDelegate.swift | 36 ++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 98 +++++ .../socialLogin/Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 ++ .../socialLogin/Base.lproj/Main.storyboard | 24 ++ .../socialLogin/socialLogin/Info.plist | 25 ++ .../socialLogin/SceneDelegate.swift | 52 +++ .../socialLogin/ViewController.swift | 19 + 12 files changed, 676 insertions(+) create mode 100644 Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj create mode 100644 Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Practice-YSB/socialLogin/socialLogin/AppDelegate.swift create mode 100644 Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Practice-YSB/socialLogin/socialLogin/Assets.xcassets/Contents.json create mode 100644 Practice-YSB/socialLogin/socialLogin/Base.lproj/LaunchScreen.storyboard create mode 100644 Practice-YSB/socialLogin/socialLogin/Base.lproj/Main.storyboard create mode 100644 Practice-YSB/socialLogin/socialLogin/Info.plist create mode 100644 Practice-YSB/socialLogin/socialLogin/SceneDelegate.swift create mode 100644 Practice-YSB/socialLogin/socialLogin/ViewController.swift diff --git a/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj new file mode 100644 index 0000000..42e4886 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj @@ -0,0 +1,365 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 2B60D9592785911E00D4E760 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B60D9582785911E00D4E760 /* AppDelegate.swift */; }; + 2B60D95B2785911E00D4E760 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B60D95A2785911E00D4E760 /* SceneDelegate.swift */; }; + 2B60D95D2785911E00D4E760 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B60D95C2785911E00D4E760 /* ViewController.swift */; }; + 2B60D9602785911E00D4E760 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B60D95E2785911E00D4E760 /* Main.storyboard */; }; + 2B60D9622785911F00D4E760 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B60D9612785911F00D4E760 /* Assets.xcassets */; }; + 2B60D9652785911F00D4E760 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B60D9632785911F00D4E760 /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2B60D9552785911E00D4E760 /* socialLogin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = socialLogin.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2B60D9582785911E00D4E760 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 2B60D95A2785911E00D4E760 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 2B60D95C2785911E00D4E760 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 2B60D95F2785911E00D4E760 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 2B60D9612785911F00D4E760 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 2B60D9642785911F00D4E760 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 2B60D9662785911F00D4E760 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2B60D9522785911E00D4E760 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2B60D94C2785911E00D4E760 = { + isa = PBXGroup; + children = ( + 2B60D9572785911E00D4E760 /* socialLogin */, + 2B60D9562785911E00D4E760 /* Products */, + ); + sourceTree = ""; + }; + 2B60D9562785911E00D4E760 /* Products */ = { + isa = PBXGroup; + children = ( + 2B60D9552785911E00D4E760 /* socialLogin.app */, + ); + name = Products; + sourceTree = ""; + }; + 2B60D9572785911E00D4E760 /* socialLogin */ = { + isa = PBXGroup; + children = ( + 2B60D9582785911E00D4E760 /* AppDelegate.swift */, + 2B60D95A2785911E00D4E760 /* SceneDelegate.swift */, + 2B60D95C2785911E00D4E760 /* ViewController.swift */, + 2B60D95E2785911E00D4E760 /* Main.storyboard */, + 2B60D9612785911F00D4E760 /* Assets.xcassets */, + 2B60D9632785911F00D4E760 /* LaunchScreen.storyboard */, + 2B60D9662785911F00D4E760 /* Info.plist */, + ); + path = socialLogin; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2B60D9542785911E00D4E760 /* socialLogin */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2B60D9692785911F00D4E760 /* Build configuration list for PBXNativeTarget "socialLogin" */; + buildPhases = ( + 2B60D9512785911E00D4E760 /* Sources */, + 2B60D9522785911E00D4E760 /* Frameworks */, + 2B60D9532785911E00D4E760 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = socialLogin; + productName = socialLogin; + productReference = 2B60D9552785911E00D4E760 /* socialLogin.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2B60D94D2785911E00D4E760 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1300; + LastUpgradeCheck = 1300; + TargetAttributes = { + 2B60D9542785911E00D4E760 = { + CreatedOnToolsVersion = 13.0; + }; + }; + }; + buildConfigurationList = 2B60D9502785911E00D4E760 /* Build configuration list for PBXProject "socialLogin" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2B60D94C2785911E00D4E760; + productRefGroup = 2B60D9562785911E00D4E760 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2B60D9542785911E00D4E760 /* socialLogin */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2B60D9532785911E00D4E760 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2B60D9652785911F00D4E760 /* LaunchScreen.storyboard in Resources */, + 2B60D9622785911F00D4E760 /* Assets.xcassets in Resources */, + 2B60D9602785911E00D4E760 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2B60D9512785911E00D4E760 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2B60D95D2785911E00D4E760 /* ViewController.swift in Sources */, + 2B60D9592785911E00D4E760 /* AppDelegate.swift in Sources */, + 2B60D95B2785911E00D4E760 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 2B60D95E2785911E00D4E760 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2B60D95F2785911E00D4E760 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 2B60D9632785911F00D4E760 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 2B60D9642785911F00D4E760 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 2B60D9672785911F00D4E760 /* 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++17"; + CLANG_CXX_LIBRARY = "libc++"; + 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 = 15.0; + 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; + }; + 2B60D9682785911F00D4E760 /* 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++17"; + CLANG_CXX_LIBRARY = "libc++"; + 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 = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2B60D96A2785911F00D4E760 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4QG3GC35LA; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = socialLogin/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + 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 = subin.socialLogin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 2B60D96B2785911F00D4E760 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 4QG3GC35LA; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = socialLogin/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + 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 = subin.socialLogin; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2B60D9502785911E00D4E760 /* Build configuration list for PBXProject "socialLogin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2B60D9672785911F00D4E760 /* Debug */, + 2B60D9682785911F00D4E760 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2B60D9692785911F00D4E760 /* Build configuration list for PBXNativeTarget "socialLogin" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2B60D96A2785911F00D4E760 /* Debug */, + 2B60D96B2785911F00D4E760 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2B60D94D2785911E00D4E760 /* Project object */; +} diff --git a/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Practice-YSB/socialLogin/socialLogin/AppDelegate.swift b/Practice-YSB/socialLogin/socialLogin/AppDelegate.swift new file mode 100644 index 0000000..e17dff1 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// socialLogin +// +// Created by 양수빈 on 2022/01/05. +// + +import UIKit + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AccentColor.colorset/Contents.json b/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AppIcon.appiconset/Contents.json b/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..9221b9b --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/Contents.json b/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Practice-YSB/socialLogin/socialLogin/Base.lproj/LaunchScreen.storyboard b/Practice-YSB/socialLogin/socialLogin/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Practice-YSB/socialLogin/socialLogin/Base.lproj/Main.storyboard b/Practice-YSB/socialLogin/socialLogin/Base.lproj/Main.storyboard new file mode 100644 index 0000000..25a7638 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Practice-YSB/socialLogin/socialLogin/Info.plist b/Practice-YSB/socialLogin/socialLogin/Info.plist new file mode 100644 index 0000000..dd3c9af --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/Practice-YSB/socialLogin/socialLogin/SceneDelegate.swift b/Practice-YSB/socialLogin/socialLogin/SceneDelegate.swift new file mode 100644 index 0000000..b108fa0 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// socialLogin +// +// Created by 양수빈 on 2022/01/05. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/Practice-YSB/socialLogin/socialLogin/ViewController.swift b/Practice-YSB/socialLogin/socialLogin/ViewController.swift new file mode 100644 index 0000000..c7210b4 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/ViewController.swift @@ -0,0 +1,19 @@ +// +// ViewController.swift +// socialLogin +// +// Created by 양수빈 on 2022/01/05. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + +} + From 676c4fd10231c7b36d06d71f93d75804e390420d Mon Sep 17 00:00:00 2001 From: yangsubinn Date: Thu, 6 Jan 2022 15:26:33 +0900 Subject: [PATCH 2/6] =?UTF-8?q?[Add]=20#8=20-=20pod=20install=20=EB=B0=8F?= =?UTF-8?q?=20Snapkit=20=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=9F=AC=EB=A6=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Practice-YSB/socialLogin/Podfile | 11 +++ Practice-YSB/socialLogin/Podfile.lock | 16 ++++ .../socialLogin.xcodeproj/project.pbxproj | 83 ++++++++++++++++++- .../contents.xcworkspacedata | 10 +++ .../socialLogin/ViewController.swift | 4 + .../socialLogin/socialLogin.entitlements | 10 +++ 6 files changed, 130 insertions(+), 4 deletions(-) create mode 100644 Practice-YSB/socialLogin/Podfile create mode 100644 Practice-YSB/socialLogin/Podfile.lock create mode 100644 Practice-YSB/socialLogin/socialLogin.xcworkspace/contents.xcworkspacedata create mode 100644 Practice-YSB/socialLogin/socialLogin/socialLogin.entitlements diff --git a/Practice-YSB/socialLogin/Podfile b/Practice-YSB/socialLogin/Podfile new file mode 100644 index 0000000..231e80e --- /dev/null +++ b/Practice-YSB/socialLogin/Podfile @@ -0,0 +1,11 @@ +# Uncomment the next line to define a global platform for your project +# platform :ios, '9.0' + +target 'socialLogin' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for socialLogin + pod 'SnapKit', '~> 5.0.0' + +end diff --git a/Practice-YSB/socialLogin/Podfile.lock b/Practice-YSB/socialLogin/Podfile.lock new file mode 100644 index 0000000..05ba351 --- /dev/null +++ b/Practice-YSB/socialLogin/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - SnapKit (5.0.1) + +DEPENDENCIES: + - SnapKit (~> 5.0.0) + +SPEC REPOS: + trunk: + - SnapKit + +SPEC CHECKSUMS: + SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb + +PODFILE CHECKSUM: fb4ca78265042e20c9a4bf8dfa049e55b9cb7f34 + +COCOAPODS: 1.11.2 diff --git a/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj index 42e4886..2691ce4 100644 --- a/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj +++ b/Practice-YSB/socialLogin/socialLogin.xcodeproj/project.pbxproj @@ -13,9 +13,11 @@ 2B60D9602785911E00D4E760 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B60D95E2785911E00D4E760 /* Main.storyboard */; }; 2B60D9622785911F00D4E760 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2B60D9612785911F00D4E760 /* Assets.xcassets */; }; 2B60D9652785911F00D4E760 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2B60D9632785911F00D4E760 /* LaunchScreen.storyboard */; }; + D304DE4DFDE3D6D69BA91057 /* Pods_socialLogin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B71AFCCEBADF6DA4313DAE04 /* Pods_socialLogin.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 196CEE117A3B3DA1C39C0ABF /* Pods-socialLogin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-socialLogin.debug.xcconfig"; path = "Target Support Files/Pods-socialLogin/Pods-socialLogin.debug.xcconfig"; sourceTree = ""; }; 2B60D9552785911E00D4E760 /* socialLogin.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = socialLogin.app; sourceTree = BUILT_PRODUCTS_DIR; }; 2B60D9582785911E00D4E760 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 2B60D95A2785911E00D4E760 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -24,6 +26,9 @@ 2B60D9612785911F00D4E760 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 2B60D9642785911F00D4E760 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 2B60D9662785911F00D4E760 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2B60D96C278591E900D4E760 /* socialLogin.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = socialLogin.entitlements; sourceTree = ""; }; + 5D1964B8C00CE50E287F486F /* Pods-socialLogin.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-socialLogin.release.xcconfig"; path = "Target Support Files/Pods-socialLogin/Pods-socialLogin.release.xcconfig"; sourceTree = ""; }; + B71AFCCEBADF6DA4313DAE04 /* Pods_socialLogin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_socialLogin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -31,17 +36,28 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D304DE4DFDE3D6D69BA91057 /* Pods_socialLogin.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 0F81A3E6B6F1830E0B5DF132 /* Frameworks */ = { + isa = PBXGroup; + children = ( + B71AFCCEBADF6DA4313DAE04 /* Pods_socialLogin.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; 2B60D94C2785911E00D4E760 = { isa = PBXGroup; children = ( 2B60D9572785911E00D4E760 /* socialLogin */, 2B60D9562785911E00D4E760 /* Products */, + 4A9C4758AE0135CF3432F2CA /* Pods */, + 0F81A3E6B6F1830E0B5DF132 /* Frameworks */, ); sourceTree = ""; }; @@ -56,6 +72,7 @@ 2B60D9572785911E00D4E760 /* socialLogin */ = { isa = PBXGroup; children = ( + 2B60D96C278591E900D4E760 /* socialLogin.entitlements */, 2B60D9582785911E00D4E760 /* AppDelegate.swift */, 2B60D95A2785911E00D4E760 /* SceneDelegate.swift */, 2B60D95C2785911E00D4E760 /* ViewController.swift */, @@ -67,6 +84,16 @@ path = socialLogin; sourceTree = ""; }; + 4A9C4758AE0135CF3432F2CA /* Pods */ = { + isa = PBXGroup; + children = ( + 196CEE117A3B3DA1C39C0ABF /* Pods-socialLogin.debug.xcconfig */, + 5D1964B8C00CE50E287F486F /* Pods-socialLogin.release.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -74,9 +101,11 @@ isa = PBXNativeTarget; buildConfigurationList = 2B60D9692785911F00D4E760 /* Build configuration list for PBXNativeTarget "socialLogin" */; buildPhases = ( + 50FEBC384A44C0017A910551 /* [CP] Check Pods Manifest.lock */, 2B60D9512785911E00D4E760 /* Sources */, 2B60D9522785911E00D4E760 /* Frameworks */, 2B60D9532785911E00D4E760 /* Resources */, + FC5E25609AA64C9ED13D6A2F /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -133,6 +162,48 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 50FEBC384A44C0017A910551 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-socialLogin-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FC5E25609AA64C9ED13D6A2F /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-socialLogin/Pods-socialLogin-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-socialLogin/Pods-socialLogin-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-socialLogin/Pods-socialLogin-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 2B60D9512785911E00D4E760 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -284,12 +355,14 @@ }; 2B60D96A2785911F00D4E760 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 196CEE117A3B3DA1C39C0ABF /* Pods-socialLogin.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = socialLogin/socialLogin.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 4QG3GC35LA; + DEVELOPMENT_TEAM = L9D5M5DM3Y; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = socialLogin/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; @@ -302,7 +375,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = subin.socialLogin; + PRODUCT_BUNDLE_IDENTIFIER = subin.spark.socialLogin; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; @@ -312,12 +385,14 @@ }; 2B60D96B2785911F00D4E760 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 5D1964B8C00CE50E287F486F /* Pods-socialLogin.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = socialLogin/socialLogin.entitlements; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 4QG3GC35LA; + DEVELOPMENT_TEAM = L9D5M5DM3Y; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = socialLogin/Info.plist; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; @@ -330,7 +405,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = subin.socialLogin; + PRODUCT_BUNDLE_IDENTIFIER = subin.spark.socialLogin; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; diff --git a/Practice-YSB/socialLogin/socialLogin.xcworkspace/contents.xcworkspacedata b/Practice-YSB/socialLogin/socialLogin.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..ff690dc --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Practice-YSB/socialLogin/socialLogin/ViewController.swift b/Practice-YSB/socialLogin/socialLogin/ViewController.swift index c7210b4..e5787fb 100644 --- a/Practice-YSB/socialLogin/socialLogin/ViewController.swift +++ b/Practice-YSB/socialLogin/socialLogin/ViewController.swift @@ -7,7 +7,11 @@ import UIKit +import AuthenticationServices + class ViewController: UIViewController { + + let appleLoginButton = ASAuthorizationAppleIDButton() override func viewDidLoad() { super.viewDidLoad() diff --git a/Practice-YSB/socialLogin/socialLogin/socialLogin.entitlements b/Practice-YSB/socialLogin/socialLogin/socialLogin.entitlements new file mode 100644 index 0000000..a812db5 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin/socialLogin.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.applesignin + + Default + + + From 8c34077a2151acee82270e778a6f305c9a075acb Mon Sep 17 00:00:00 2001 From: yangsubinn Date: Thu, 6 Jan 2022 17:12:11 +0900 Subject: [PATCH 3/6] =?UTF-8?q?[Feat]=20#8=20-=20=EC=95=A0=ED=94=8C=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++ .../socialLogin/ViewController.swift | 104 +++++++++++++++++- 2 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 Practice-YSB/socialLogin/socialLogin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Practice-YSB/socialLogin/socialLogin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Practice-YSB/socialLogin/socialLogin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Practice-YSB/socialLogin/socialLogin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Practice-YSB/socialLogin/socialLogin/ViewController.swift b/Practice-YSB/socialLogin/socialLogin/ViewController.swift index e5787fb..05408bb 100644 --- a/Practice-YSB/socialLogin/socialLogin/ViewController.swift +++ b/Practice-YSB/socialLogin/socialLogin/ViewController.swift @@ -8,16 +8,116 @@ import UIKit import AuthenticationServices +import SnapKit class ViewController: UIViewController { - let appleLoginButton = ASAuthorizationAppleIDButton() + let appleLoginButton = ASAuthorizationAppleIDButton(type: .continue, style: .black) + var nameLabel = UILabel() + var emailLabel = UILabel() override func viewDidLoad() { super.viewDidLoad() - // Do any additional setup after loading the view. + + setLayout() + setUI() } + func setLayout() { + view.addSubview(appleLoginButton) + view.addSubview(nameLabel) + view.addSubview(emailLabel) + + appleLoginButton.snp.makeConstraints { make in + make.center.equalToSuperview() + } + + nameLabel.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(appleLoginButton.snp.bottom).offset(30) + } + + emailLabel.snp.makeConstraints { make in + make.centerX.equalToSuperview() + make.top.equalTo(nameLabel.snp.bottom).offset(20) + } + } + + func setUI() { + nameLabel.text = "name" + emailLabel.text = "email" + + appleLoginButton.addTarget(self, action: #selector(handleAuthorizationAppleIDButtonPress), for: .touchUpInside) + } + + @objc + func handleAuthorizationAppleIDButtonPress() { + let appleIDProvider = ASAuthorizationAppleIDProvider() + let request = appleIDProvider.createRequest() + request.requestedScopes = [.fullName, .email] + + let authorizationController = ASAuthorizationController(authorizationRequests: [request]) + authorizationController.delegate = self + authorizationController.presentationContextProvider = self + authorizationController.performRequests() + } +} + +extension ViewController: ASAuthorizationControllerDelegate { + func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { + switch authorization.credential { + case let appleIDCredential as ASAuthorizationAppleIDCredential: + + let userIdentifier = appleIDCredential.user + + if let fullName = appleIDCredential.fullName, + let email = appleIDCredential.email { + + let username: String = "\(fullName.familyName ?? "")" + "\(fullName.givenName ?? "")" + + print("fullName: \(fullName)") + print("userName: \(username), email: \(email)") + + UserDefaults.standard.set(username, forKey: "setFullName") + UserDefaults.standard.set(email, forKey: "setEmail") + } + + if let fullName = appleIDCredential.fullName, + let email = appleIDCredential.email, + let authorizationCode = appleIDCredential.authorizationCode, + let identityToken = appleIDCredential.identityToken, + let authString = String(data: authorizationCode, encoding: .utf8) { + + print("authorizationCode: \(authorizationCode)") + print("identityToken: \(identityToken)") + print("authString: \(authString)") + } + + print("useridentifier: \(userIdentifier)") + nameLabel.text = UserDefaults.standard.string(forKey: "setFullName") + emailLabel.text = UserDefaults.standard.string(forKey: "setEmail") + + case let passwordCredential as ASPasswordCredential: + + let username = passwordCredential.user + let password = passwordCredential.password + + print("username: \(username), password: \(password)") + + default: + break + } + } + + func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) { + print("login error wow") + } +} + +extension ViewController: ASAuthorizationControllerPresentationContextProviding { + func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor { + return self.view.window! + } } From 03b3c290dfc1b419dbd8a76bdb70b3aeb008d959 Mon Sep 17 00:00:00 2001 From: yangsubinn Date: Thu, 6 Jan 2022 17:30:43 +0900 Subject: [PATCH 4/6] =?UTF-8?q?[Remove]=20.DS=5FStore=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 10244 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 49031b161f09918916eaaf6f1b7fb67216f39cb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMTWl0n7(V~Bz|6FzhfASTSRAa>777+vE)|jO1u5k!TiQ|zWp-z1C+^OyJF{D$ zR_pD}TZ|DBgBs-(3>tY*V=z2;;Ym`XyrA-6B4}b_V&aqj=bYKn0?UIBhLAbQod2Bv zGH1^>-+xZdSwaZ3=FF9Z=!6g%A0}xzR<|k4&YoL}6lho+U_40;u8b$$bmkV%P!S>! zA`l`FA`l`FB5=1LfO|G8a+#1}9U>4S5F#*v09zk)e3*;{a!g3RbYR7g04PgQ%?q|E zYoOEv84Ki?kZ8dIA{3(zn2;izKydhgU}OkRD8NU@_v_r9KupN6 z4iN|uxD^3*b}uC>$RM$aKjr)` z?r_{U{G8WnWcRb)Zo?l+1nn-@O-;0oM7M1X574=7uHzfFV`X`;ZCdEk-(x$bJKXB# z9Mj|Pi3@|GD6%p@=Z%a+*F+ojrqM=yWL@*xMm-vhj*cqw{3Ru`sfaxUcODhQc_ib<%a?+idv?1_w=d*baozRyDQ_{ zuH$uESr6p^t@IF~tx4C}owb;~C+VhgX~!F&vyw(CnM)bI)sjlZ?PHeL>sv>B*6Q=z ztl!2Rdu@zmx&caap0&rq06TBBW0*I0Vw$1>%9--2$o+N8n$|qLsl8*z{OSs=Mq6002)`R~ zGOd++a|!#&ob4YSr!y-nR83#3$n@iW6MxnY*JJ~k+@fjv5?S8Q^le!SYoS)PhNT!_ zba^;4@d|atLyAJZt|yQdB2--+l@)64O&JL*6{yxXqiS1EUcehDH$EyWv!JmTFTm0` zO;4z`);3wD=MJ*5w;P_nD`Po0JfEGeZIR`D%+g|-sH~V@J#TBLruBJ4M%LOjj8vtU zWSQ%CqMm<8w6OPVHf`U{2F5+yNNp!?V@}`~7pZ~CQX5+;z6uAnHr6D13huTVW_^rw zkbca&3^__(A}7h)N z@HKn`7vVd&0>8p__zixCza&{wBvqOt)kzOZ^-_bhN?Iqy#7~zBN!BO&g<4{(QL!ZR z^1+HCWp0-`k;k@l+#RWNxtu4<>^XC*7S+}-U$u5aY=TgNf(6!1W-}-76xwqF^KX6| z=4mzR!pL4^xOL=4K26O-I)iapW<1sIQx`|*G|U0feL$^?(CNs3(QSw>Z6-5*{)H-hiQqlMJUUa|G?U_3^Sn`7C{}{WES%dONc;-K!`wyK!`wy zz`cn;iI|qo?*BIz|NsBqoP0Q|5P=W@jsTRl$J<-6S?mD7?%H*H4&lQJ^BWVAhhW8A zn4Vw9V~1VG*9W@b(t+D!fo@Dl9*%K59OeJ?X8_(PPQE$|&;K{y!-ePnd;R?XFRcZ_ AKL7v# From bf177b540ba30d58d1887d68d0dc615488aaac29 Mon Sep 17 00:00:00 2001 From: yangsubinn Date: Fri, 7 Jan 2022 01:36:52 +0900 Subject: [PATCH 5/6] =?UTF-8?q?[Add]=20#8=20-=20=EC=95=B1=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=20=EC=8B=9C=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=83=81?= =?UTF-8?q?=ED=83=9C=20=ED=99=95=EC=9D=B8=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socialLogin/socialLogin/AppDelegate.swift | 21 +++++++++++++++++++ .../socialLogin/ViewController.swift | 1 + 2 files changed, 22 insertions(+) diff --git a/Practice-YSB/socialLogin/socialLogin/AppDelegate.swift b/Practice-YSB/socialLogin/socialLogin/AppDelegate.swift index e17dff1..f0f5cda 100644 --- a/Practice-YSB/socialLogin/socialLogin/AppDelegate.swift +++ b/Practice-YSB/socialLogin/socialLogin/AppDelegate.swift @@ -6,6 +6,7 @@ // import UIKit +import AuthenticationServices @main class AppDelegate: UIResponder, UIApplicationDelegate { @@ -14,6 +15,26 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. + let appleIDProvider = ASAuthorizationAppleIDProvider() + appleIDProvider.getCredentialState(forUserID: UserDefaults.standard.string(forKey: "setUserIdentifier") ?? "") { credentialState, error in + switch credentialState { + case .authorized: + // Apple ID Credential is valid + // 로그인된 상태 -> 홈뷰 + print("해당 ID는 연동되어 있습니다.") + case .revoked: + // Apple ID Credential revoked, handle unlink + // 로그아웃된 상태 -> 로그인뷰 + print("해당 ID는 연동되어 있지 않습니다.") + case .notFound: + // Credential not found, show login UI + // 잘못된 userIdentifier -> 로그인뷰 + print("해당 ID를 찾을 수 없습니다.") + default: + break + } + } + return true } diff --git a/Practice-YSB/socialLogin/socialLogin/ViewController.swift b/Practice-YSB/socialLogin/socialLogin/ViewController.swift index 05408bb..f8c6896 100644 --- a/Practice-YSB/socialLogin/socialLogin/ViewController.swift +++ b/Practice-YSB/socialLogin/socialLogin/ViewController.swift @@ -94,6 +94,7 @@ extension ViewController: ASAuthorizationControllerDelegate { } print("useridentifier: \(userIdentifier)") + UserDefaults.standard.set(userIdentifier, forKey: "setUserIdentifier") nameLabel.text = UserDefaults.standard.string(forKey: "setFullName") emailLabel.text = UserDefaults.standard.string(forKey: "setEmail") From bfe4b739e276ee673b6557b3ecc97aebcf06dca9 Mon Sep 17 00:00:00 2001 From: yangsubinn Date: Fri, 7 Jan 2022 01:43:45 +0900 Subject: [PATCH 6/6] =?UTF-8?q?[Docs]=20=EB=A6=AC=EB=93=9C=EB=AF=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2753b63..1e7c5c0 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ Spark🎇 -| # | 작업 내용 | 작업한 사람 | -|:----------:|:-------------:|:------:| -| 1 | 카카오 소셜로그인 구현 | 이준호 | -| 2 | | | -| 3 | 플로팅버튼 구현(진행중) | 이준호 | -| 4 | | | -| 5 | Carousel 구현 및 애니메이션 연습(진행중) | 이준호 | +| # | 작업 내용 | 작업한 사람 | 📎 | +|:----------:|:-------------:|:------:|:------:| +| 1 | 카카오 소셜로그인 구현 | [L-j-h-c](https://github.com/L-j-h-c) | [📎](https://github.com/TeamSparker/Spark-Practice-iOS/pull/9) | +| 2 | 애플 소셜로그인 구현 | [yangsubinn](https://github.com/yangsubinn) | [📎](https://github.com/TeamSparker/Spark-Practice-iOS/pull/12) | +| 3 | 플로팅버튼 구현(진행중) | [L-j-h-c](https://github.com/L-j-h-c) | | +| 4 | | | | +| 5 | Carousel 구현 및 애니메이션 연습(진행중) | [L-j-h-c](https://github.com/L-j-h-c) | |