diff --git a/.github/ISSUE_TEMPLATE/nada-bug-template.md b/.github/ISSUE_TEMPLATE/nada-bug-template.md index f4446cd4..45f573a3 100644 --- a/.github/ISSUE_TEMPLATE/nada-bug-template.md +++ b/.github/ISSUE_TEMPLATE/nada-bug-template.md @@ -7,14 +7,6 @@ assignees: '' --- ---- -name: DooRi Bug Template -about: 두리번 버그 이슈 템플릿 -title: '[BUG]' -labels: 'Bug' -assignees: '' ---- - # 🚨 버그 설명 어떤 버그인지 간결하게 설명해주세요. diff --git a/.gitignore b/.gitignore index 8776e37e..22a21569 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,15 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/macos,cocoapods,xcode,swift +# Edit at https://www.toptal.com/developers/gitignore?templates=macos,cocoapods,xcode,swift + +### CocoaPods ### +## CocoaPods GitIgnore Template + +# CocoaPods - Only use to conserve bandwidth / Save time on Pushing +# - Also handy if you have a large number of dependant pods +# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE +Pods/ + ### macOS ### # General .DS_Store @@ -27,7 +39,7 @@ Network Trash Folder Temporary Items .apdisk - +### Swift ### # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore @@ -65,13 +77,11 @@ timeline.xctimeline playground.xcworkspace # Swift Package Manager -# # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. # Packages/ # Package.pins # Package.resolved # *.xcodeproj -# # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata # hence it is not needed unless you have added a package configuration file to your project # .swiftpm @@ -79,18 +89,14 @@ playground.xcworkspace .build/ # CocoaPods -# # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# # Pods/ -# # Add this line if you want to avoid checking in source code from the Xcode workspace # *.xcworkspace # Carthage -# # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts @@ -101,7 +107,6 @@ Dependencies/ .accio/ # fastlane -# # It is recommended to not store the screenshots in the git repo. # Instead, use fastlane to re-generate the screenshots whenever they are needed. # For more information about the recommended setup visit: @@ -113,8 +118,26 @@ fastlane/screenshots/**/*.png fastlane/test_output # Code Injection -# # After new code Injection tools there's a generated folder /iOSInjectionProject # https://github.com/johnno1962/injectionforxcode iOSInjectionProject/ + +### Xcode ### +# Xcode +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + + + + +## Gcc Patch +/*.gcno + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +**/xcshareddata/WorkspaceSettings.xcsettings + +# End of https://www.toptal.com/developers/gitignore/api/macos,cocoapods,xcode,swift \ No newline at end of file diff --git a/.swiftlint.yml b/.swiftlint.yml index e7d3bc39..621fbcb4 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -2,8 +2,12 @@ disabled_rules: - line_length - trailing_whitespace - nesting +- function_parameter_count +- function_body_length +- cyclomatic_complexity +- file_length excluded: - Pods -- NADA-iOS-forRelease/AppDelegate.swift -- NADA-iOS-forRelease/SceneDelegate.swift +- NADA-iOS-forRelease/Sources/AppDelegate.swift +- NADA-iOS-forRelease/Sources/SceneDelegate.swift diff --git a/NADA-iOS-forRelease.xcodeproj/project.pbxproj b/NADA-iOS-forRelease.xcodeproj/project.pbxproj index d48cae43..e26ead3e 100644 --- a/NADA-iOS-forRelease.xcodeproj/project.pbxproj +++ b/NADA-iOS-forRelease.xcodeproj/project.pbxproj @@ -7,21 +7,141 @@ objects = { /* Begin PBXBuildFile section */ + 39007F2C27080D8200E7143E /* UIViewController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39007F2B27080D8200E7143E /* UIViewController+Extension.swift */; }; + 3903CC202769F4F40094C458 /* EmptyCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3903CC1E2769F4F40094C458 /* EmptyCardCell.swift */; }; + 3903CC212769F4F40094C458 /* EmptyCardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3903CC1F2769F4F40094C458 /* EmptyCardCell.xib */; }; + 390515B82706CEBB00C5F7A5 /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 390515B72706CEBB00C5F7A5 /* Colors.xcassets */; }; + 3909242F26FA15E800236C51 /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3909242E26FA15E800236C51 /* UIView+Extension.swift */; }; + 3918F66727719C4B00984648 /* UserTokenReissueRequset.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3918F66627719C4B00984648 /* UserTokenReissueRequset.swift */; }; + 3927A7D7275F2A9B008BCD2A /* UserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3927A7D6275F2A9B008BCD2A /* UserDefaults.swift */; }; + 392F7FB4274621F1008CDBF5 /* MoreListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 392F7FB2274621F1008CDBF5 /* MoreListTableViewCell.swift */; }; + 392F7FB5274621F1008CDBF5 /* MoreListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 392F7FB3274621F1008CDBF5 /* MoreListTableViewCell.xib */; }; + 39317D2227646F8E00D87166 /* GroupNameEditBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39317D2127646F8E00D87166 /* GroupNameEditBottomSheetViewController.swift */; }; + 39369935274A4FCB00684420 /* NotoSansCJKkr-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 39369930274A4FCB00684420 /* NotoSansCJKkr-Bold.otf */; }; + 39369936274A4FCB00684420 /* NotoSansCJKkr-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 39369931274A4FCB00684420 /* NotoSansCJKkr-Regular.otf */; }; + 39369937274A4FCB00684420 /* NotoSansCJKkr-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 39369932274A4FCB00684420 /* NotoSansCJKkr-Medium.otf */; }; + 39369938274A4FCB00684420 /* Spoqa Han Sans Neo Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 39369933274A4FCB00684420 /* Spoqa Han Sans Neo Bold.otf */; }; + 39369939274A4FCB00684420 /* Spoqa Han Sans Neo Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 39369934274A4FCB00684420 /* Spoqa Han Sans Neo Regular.otf */; }; + 3936993B274A53C600684420 /* GroupEdit.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3936993A274A53C600684420 /* GroupEdit.storyboard */; }; + 3936993E274A53E000684420 /* GroupEditViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3936993D274A53E000684420 /* GroupEditViewController.swift */; }; + 39369944274A568900684420 /* GroupEditTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39369942274A568900684420 /* GroupEditTableViewCell.swift */; }; + 39369945274A568900684420 /* GroupEditTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 39369943274A568900684420 /* GroupEditTableViewCell.xib */; }; + 393E3345275F69EE00965BBF /* SplashViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 393E3344275F69EE00965BBF /* SplashViewController.swift */; }; + 393E334A275F6A6600965BBF /* Splash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 393E3349275F6A6600965BBF /* Splash.storyboard */; }; + 39488E352706E17200BDC917 /* UIAlertController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39488E342706E17200BDC917 /* UIAlertController+Extension.swift */; }; + 394F314C27081B3A00C83291 /* FrontViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 394F314B27081B3A00C83291 /* FrontViewController.swift */; }; + 394F314F27081B4C00C83291 /* Front.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 394F314E27081B4C00C83291 /* Front.storyboard */; }; + 39523E09270184A700536900 /* CardListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39523E08270184A700536900 /* CardListViewController.swift */; }; + 39523E0B270184B100536900 /* CardList.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39523E0A270184B100536900 /* CardList.storyboard */; }; + 39523E5B2701A48900536900 /* CardListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39523E592701A48900536900 /* CardListTableViewCell.swift */; }; + 39523E5C2701A48900536900 /* CardListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 39523E5A2701A48900536900 /* CardListTableViewCell.xib */; }; + 39523E5F2701AA9000536900 /* CardListDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39523E5E2701AA9000536900 /* CardListDataModel.swift */; }; + 3958F239270FFBBF00B100B2 /* GroupViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3958F238270FFBBF00B100B2 /* GroupViewController.swift */; }; + 3958F23C270FFBD500B100B2 /* Group.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3958F23B270FFBD500B100B2 /* Group.storyboard */; }; + 3979709626FA0BE5003FB4F5 /* LoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3979709526FA0BE5003FB4F5 /* LoginViewController.swift */; }; + 3979709826FA0BF0003FB4F5 /* Login.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3979709726FA0BF0003FB4F5 /* Login.storyboard */; }; + 397B750D2763A5AF004AEB03 /* OpenSource.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 397B750C2763A5AF004AEB03 /* OpenSource.storyboard */; }; + 397B75102763A5F5004AEB03 /* OpenSourceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397B750F2763A5F5004AEB03 /* OpenSourceViewController.swift */; }; + 397B75132763A916004AEB03 /* OpenSourceTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397B75112763A916004AEB03 /* OpenSourceTableViewCell.swift */; }; + 397B75142763A916004AEB03 /* OpenSourceTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 397B75122763A916004AEB03 /* OpenSourceTableViewCell.xib */; }; + 397B75172763B5B7004AEB03 /* TeamNADA.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 397B75162763B5B7004AEB03 /* TeamNADA.storyboard */; }; + 397B751A2763B5F1004AEB03 /* TeamNADAViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397B75192763B5F1004AEB03 /* TeamNADAViewController.swift */; }; + 3981148E273BEBB300E28630 /* CardListEditRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3981148D273BEBB300E28630 /* CardListEditRequest.swift */; }; + 39811490273BEBCE00E28630 /* CardListRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3981148F273BEBCE00E28630 /* CardListRequest.swift */; }; + 398413B7274A7A1E005550BC /* AddGroupBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 398413B6274A7A1E005550BC /* AddGroupBottomSheetViewController.swift */; }; + 399C55DF2711949D00845A54 /* CGPoint+Distance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 399C55DE2711949D00845A54 /* CGPoint+Distance.swift */; }; + 39C1E88F270EC762006D2089 /* UIColor+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39C1E88E270EC762006D2089 /* UIColor+Extension.swift */; }; + 39C394D0277CCFD500DBA566 /* EmptyGroupEditTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39C394CE277CCFD400DBA566 /* EmptyGroupEditTableViewCell.swift */; }; + 39C394D1277CCFD500DBA566 /* EmptyGroupEditTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 39C394CF277CCFD400DBA566 /* EmptyGroupEditTableViewCell.xib */; }; + 39C394D4277CD33500DBA566 /* EmptyCardListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39C394D2277CD33500DBA566 /* EmptyCardListTableViewCell.swift */; }; + 39C394D5277CD33500DBA566 /* EmptyCardListTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 39C394D3277CD33500DBA566 /* EmptyCardListTableViewCell.xib */; }; + 39D13565273FDB9C00B1A148 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D13564273FDB9C00B1A148 /* User.swift */; }; + 39D13568273FDCB800B1A148 /* UserWithTokenRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D13567273FDCB800B1A148 /* UserWithTokenRequest.swift */; }; + 39D2E130270B43DA00AD0889 /* UIFont+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D2E12F270B43DA00AD0889 /* UIFont+Extension.swift */; }; + 39D88B5F2745FB7E00A72164 /* MoreViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D88B5E2745FB7E00A72164 /* MoreViewController.swift */; }; + 39D88B622745FBA900A72164 /* More.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39D88B612745FBA900A72164 /* More.storyboard */; }; + 39D88B642745FDD400A72164 /* TabBar.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 39D88B632745FDD400A72164 /* TabBar.storyboard */; }; + 39D88B662745FE5F00A72164 /* TabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D88B652745FE5F00A72164 /* TabBarViewController.swift */; }; + 39D88B6B274600B100A72164 /* CommonBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39D88B6A274600B100A72164 /* CommonBottomSheetViewController.swift */; }; + 39DC069A2778BEFB00C8ECCC /* CardListLookUp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39DC06992778BEFB00C8ECCC /* CardListLookUp.swift */; }; + 39F5A3D0271461EA00191F94 /* BackCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39F5A3CE271461EA00191F94 /* BackCardCell.swift */; }; + 39F5A3D1271461EA00191F94 /* BackCardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 39F5A3CF271461EA00191F94 /* BackCardCell.xib */; }; + 7705CF3E2752C7DB005195DF /* CardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7705CF3D2752C7DB005195DF /* CardView.swift */; }; + 7705CF402752C844005195DF /* CardView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7705CF3F2752C844005195DF /* CardView.xib */; }; + 770E58862778A78900498C2E /* Status.swift in Sources */ = {isa = PBXBuildFile; fileRef = 770E58852778A78900498C2E /* Status.swift */; }; + 7713E8482752E2A900724C8B /* SelectGroupBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7713E8472752E2A900724C8B /* SelectGroupBottomSheetViewController.swift */; }; + 7729171F2743D604001593E0 /* CardsInGroupResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7729171E2743D604001593E0 /* CardsInGroupResponse.swift */; }; + 7734D5AA27719520004360E4 /* CardShareBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7734D5A927719520004360E4 /* CardShareBottomSheetViewController.swift */; }; + 7734D5B427778EFB004360E4 /* HarmonyResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7734D5B327778EFB004360E4 /* HarmonyResponse.swift */; }; + 7734D5B627779EF0004360E4 /* QRCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7734D5B527779EF0004360E4 /* QRCodeView.swift */; }; + 7734D5B82777A8E8004360E4 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7734D5B72777A8E8004360E4 /* String+Extension.swift */; }; + 77607EDA274A68BE00204CD2 /* GroupCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77607ED8274A68BD00204CD2 /* GroupCollectionViewCell.swift */; }; + 77607EDB274A68BE00204CD2 /* GroupCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77607ED9274A68BD00204CD2 /* GroupCollectionViewCell.xib */; }; + 7766A40F274FEBE200714912 /* CardInGroupCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7766A40D274FEBE200714912 /* CardInGroupCollectionViewCell.swift */; }; + 7766A410274FEBE200714912 /* CardInGroupCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7766A40E274FEBE200714912 /* CardInGroupCollectionViewCell.xib */; }; + 77703157275005AA002CBD19 /* CardResultBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77703156275005AA002CBD19 /* CardResultBottomSheetViewController.swift */; }; + 7770315927500C49002CBD19 /* QRScan.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7770315827500C49002CBD19 /* QRScan.storyboard */; }; + 7770315B27500C7B002CBD19 /* QRScanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7770315A27500C7B002CBD19 /* QRScanViewController.swift */; }; + 777FF89B27359B7800BF69D3 /* Groups.swift in Sources */ = {isa = PBXBuildFile; fileRef = 777FF89A27359B7800BF69D3 /* Groups.swift */; }; + 777FF89D2735B16B00BF69D3 /* GroupAddRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 777FF89C2735B16B00BF69D3 /* GroupAddRequest.swift */; }; + 777FF89F27364B7B00BF69D3 /* GroupEditRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 777FF89E27364B7B00BF69D3 /* GroupEditRequest.swift */; }; + 77812947275F6EA3004B34F4 /* CardDetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77812946275F6EA3004B34F4 /* CardDetailViewController.swift */; }; + 7781294A275F6ED7004B34F4 /* CardDetail.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77812949275F6ED7004B34F4 /* CardDetail.storyboard */; }; + 77AA68EA273E0EC4009C89B0 /* CardAddInGroupRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77AA68E9273E0EC4009C89B0 /* CardAddInGroupRequest.swift */; }; + 77DFB871274F92F9000CD36F /* AddWithIdBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77DFB870274F92F9000CD36F /* AddWithIdBottomSheetViewController.swift */; }; + 77F2C0EB27632A91007641E3 /* CardHarmonyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77F2C0EA27632A91007641E3 /* CardHarmonyViewController.swift */; }; + 77F2C0ED27632AA7007641E3 /* CardHarmony.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77F2C0EC27632AA7007641E3 /* CardHarmony.storyboard */; }; + 77F47D93276C79B600414659 /* Header.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77F47D92276C79B600414659 /* Header.swift */; }; DBBB91E1639641F40C5B4416 /* Pods_NADA_iOS_forRelease.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A2183AE0E469153221624A0 /* Pods_NADA_iOS_forRelease.framework */; }; + F811720027383097002742CF /* ChangeGroupRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F81171FF27383097002742CF /* ChangeGroupRequest.swift */; }; + F822E7A92709CEB60020452C /* Notification.swift in Sources */ = {isa = PBXBuildFile; fileRef = F822E7A82709CEB60020452C /* Notification.swift */; }; + F8268DB927730B0100BF114B /* FirstCardAlertBottomSheetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8268DB827730B0100BF114B /* FirstCardAlertBottomSheetViewController.swift */; }; + F82FEB4C27639F3100DA7847 /* MainCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F82FEB4A27639F3100DA7847 /* MainCardCell.swift */; }; + F82FEB4D27639F3100DA7847 /* MainCardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F82FEB4B27639F3100DA7847 /* MainCardCell.xib */; }; + F82FF81D2701EBCE00E57F8B /* CardCreation.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F82FF81C2701EBCE00E57F8B /* CardCreation.storyboard */; }; + F82FF8252702000000E57F8B /* RequiredFlavorCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F82FF8232702000000E57F8B /* RequiredFlavorCollectionViewCell.swift */; }; + F82FF8262702000000E57F8B /* RequiredFlavorCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F82FF8242702000000E57F8B /* RequiredFlavorCollectionViewCell.xib */; }; + F83206AA26F61E3700D61711 /* FrontCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F83206A826F61E3700D61711 /* FrontCardCell.swift */; }; + F83206AB26F61E3700D61711 /* FrontCardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F83206A926F61E3700D61711 /* FrontCardCell.xib */; }; + F84BAF9D26FDB417004CA335 /* CardCreationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F84BAF9C26FDB417004CA335 /* CardCreationViewController.swift */; }; + F84BAFAD26FDB543004CA335 /* FrontCardCreationCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F84BAFAB26FDB543004CA335 /* FrontCardCreationCollectionViewCell.swift */; }; + F84BAFAE26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F84BAFAC26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib */; }; + F84BAFB126FDB552004CA335 /* BackCardCreationCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F84BAFAF26FDB552004CA335 /* BackCardCreationCollectionViewCell.swift */; }; + F84BAFB226FDB552004CA335 /* BackCardCreationCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F84BAFB026FDB552004CA335 /* BackCardCreationCollectionViewCell.xib */; }; + F8518054275D040C006BD5ED /* OnboardingCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8518052275D040C006BD5ED /* OnboardingCollectionViewCell.swift */; }; + F8518055275D040C006BD5ED /* OnboardingCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F8518053275D040C006BD5ED /* OnboardingCollectionViewCell.xib */; }; + F8518058275D042B006BD5ED /* Onboarding.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F8518057275D042B006BD5ED /* Onboarding.storyboard */; }; + F851805B275D047C006BD5ED /* OnboardingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F851805A275D047C006BD5ED /* OnboardingViewController.swift */; }; + F85711A5274A6B2200F59F0B /* CardCreationPreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F85711A4274A6B2200F59F0B /* CardCreationPreviewViewController.swift */; }; + F85711A7274A6B3400F59F0B /* CardCreationPreview.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F85711A6274A6B3400F59F0B /* CardCreationPreview.storyboard */; }; + F858079E2700354E00872484 /* BackgroundCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F858079C2700354E00872484 /* BackgroundCollectionViewCell.swift */; }; + F858079F2700354E00872484 /* BackgroundCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F858079D2700354E00872484 /* BackgroundCollectionViewCell.xib */; }; + F87122762733046300A24E74 /* Card.swift in Sources */ = {isa = PBXBuildFile; fileRef = F87122752733046300A24E74 /* Card.swift */; }; + F871227827330A3800A24E74 /* CardCreationRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F871227727330A3800A24E74 /* CardCreationRequest.swift */; }; + F8719DDB274F92E90081AD51 /* UITextField+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8719DDA274F92E90081AD51 /* UITextField+Extension.swift */; }; + F8915A22275728F20013D609 /* SelectBirthBottomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8915A20275728F20013D609 /* SelectBirthBottomViewController.swift */; }; + F8915A23275728F20013D609 /* SelectMBTIBottomViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8915A21275728F20013D609 /* SelectMBTIBottomViewController.swift */; }; + F8A9FE1A2743DC6B00BC60CE /* CardListInGroupRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A9FE192743DC6B00BC60CE /* CardListInGroupRequest.swift */; }; + F8C310C0273A7360008EC5BA /* FrontCardCreationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C310BF273A7360008EC5BA /* FrontCardCreationDelegate.swift */; }; + F8C83FAE272F99940009DF0D /* MoyaLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FAD272F99940009DF0D /* MoyaLoggerPlugin.swift */; }; + F8C83FB6272F9E380009DF0D /* UtilService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FB5272F9E380009DF0D /* UtilService.swift */; }; + F8C83FB8272F9E3F0009DF0D /* UtilAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FB7272F9E3F0009DF0D /* UtilAPI.swift */; }; + F8C83FBB272F9F370009DF0D /* NetworkResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FBA272F9F370009DF0D /* NetworkResult.swift */; }; + F8C83FBD272F9F430009DF0D /* GenericResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FBC272F9F430009DF0D /* GenericResponse.swift */; }; + F8C83FBF272FA0670009DF0D /* UserSevice.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FBE272FA0670009DF0D /* UserSevice.swift */; }; + F8C83FC1272FA06E0009DF0D /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FC0272FA06E0009DF0D /* UserAPI.swift */; }; + F8C83FC3272FA17B0009DF0D /* URL.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FC2272FA17B0009DF0D /* URL.swift */; }; + F8C83FC5272FA2940009DF0D /* CardAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FC4272FA2940009DF0D /* CardAPI.swift */; }; + F8C83FC7272FA2A20009DF0D /* CardService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FC6272FA2A20009DF0D /* CardService.swift */; }; + F8C83FC9272FA3190009DF0D /* GroupAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FC8272FA3190009DF0D /* GroupAPI.swift */; }; + F8C83FCB272FA32C0009DF0D /* GroupService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C83FCA272FA32C0009DF0D /* GroupService.swift */; }; + F8D74DD8276C7FB60071E5FC /* UIImageView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8D74DD7276C7FB60071E5FC /* UIImageView+Extension.swift */; }; + F8F5D0AA270800FD00D99D2E /* Xib.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8F5D0A9270800FD00D99D2E /* Xib.swift */; }; F8FC438626C01CDD0033E151 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC438526C01CDD0033E151 /* AppDelegate.swift */; }; F8FC438826C01CDD0033E151 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC438726C01CDD0033E151 /* SceneDelegate.swift */; }; - F8FC438A26C01CDD0033E151 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC438926C01CDD0033E151 /* MainViewController.swift */; }; - F8FC438D26C01CDD0033E151 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F8FC438B26C01CDD0033E151 /* Main.storyboard */; }; F8FC438F26C01CDE0033E151 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F8FC438E26C01CDE0033E151 /* Assets.xcassets */; }; F8FC439226C01CDE0033E151 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F8FC439026C01CDE0033E151 /* LaunchScreen.storyboard */; }; - F8FC43A726C020780033E151 /* TempExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43A626C020780033E151 /* TempExtensions.swift */; }; - F8FC43A926C0207F0033E151 /* TempFont.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43A826C0207F0033E151 /* TempFont.swift */; }; - F8FC43AB26C020880033E151 /* TempCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43AA26C020880033E151 /* TempCell.swift */; }; - F8FC43AD26C020940033E151 /* TempClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43AC26C020940033E151 /* TempClass.swift */; }; - F8FC43AF26C0209A0033E151 /* TempModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43AE26C0209A0033E151 /* TempModel.swift */; }; - F8FC43B126C020A70033E151 /* TempNetwork.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43B026C020A70033E151 /* TempNetwork.swift */; }; - F8FC43B326C020B90033E151 /* TempProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43B226C020B90033E151 /* TempProtocols.swift */; }; - F8FC43B526C020C10033E151 /* TempViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43B426C020C10033E151 /* TempViews.swift */; }; + F8FC43B326C020B90033E151 /* BackCardCreationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43B226C020B90033E151 /* BackCardCreationDelegate.swift */; }; F8FC43B826C0227D0033E151 /* Const.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43B726C0227D0033E151 /* Const.swift */; }; F8FC43BA26C022900033E151 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43B926C022900033E151 /* ViewController.swift */; }; F8FC43BC26C022A20033E151 /* Storyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8FC43BB26C022A20033E151 /* Storyboard.swift */; }; @@ -30,24 +150,145 @@ /* Begin PBXFileReference section */ 1E770167DDA25A2CE063AA5C /* Pods-NADA-iOS-forRelease.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NADA-iOS-forRelease.release.xcconfig"; path = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.release.xcconfig"; sourceTree = ""; }; + 39007F2B27080D8200E7143E /* UIViewController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIViewController+Extension.swift"; sourceTree = ""; }; + 3903CC1E2769F4F40094C458 /* EmptyCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyCardCell.swift; sourceTree = ""; }; + 3903CC1F2769F4F40094C458 /* EmptyCardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EmptyCardCell.xib; sourceTree = ""; }; + 390515B72706CEBB00C5F7A5 /* Colors.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Colors.xcassets; sourceTree = ""; }; + 3909242E26FA15E800236C51 /* UIView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Extension.swift"; sourceTree = ""; }; + 3918F6652771682F00984648 /* NADA-iOS-forRelease.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "NADA-iOS-forRelease.entitlements"; sourceTree = ""; }; + 3918F66627719C4B00984648 /* UserTokenReissueRequset.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserTokenReissueRequset.swift; sourceTree = ""; }; + 3927A7D6275F2A9B008BCD2A /* UserDefaults.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaults.swift; sourceTree = ""; }; + 392F7FB2274621F1008CDBF5 /* MoreListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreListTableViewCell.swift; sourceTree = ""; }; + 392F7FB3274621F1008CDBF5 /* MoreListTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MoreListTableViewCell.xib; sourceTree = ""; }; + 39317D2127646F8E00D87166 /* GroupNameEditBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupNameEditBottomSheetViewController.swift; sourceTree = ""; }; + 39369930274A4FCB00684420 /* NotoSansCJKkr-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSansCJKkr-Bold.otf"; sourceTree = ""; }; + 39369931274A4FCB00684420 /* NotoSansCJKkr-Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSansCJKkr-Regular.otf"; sourceTree = ""; }; + 39369932274A4FCB00684420 /* NotoSansCJKkr-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSansCJKkr-Medium.otf"; sourceTree = ""; }; + 39369933274A4FCB00684420 /* Spoqa Han Sans Neo Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Spoqa Han Sans Neo Bold.otf"; sourceTree = ""; }; + 39369934274A4FCB00684420 /* Spoqa Han Sans Neo Regular.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Spoqa Han Sans Neo Regular.otf"; sourceTree = ""; }; + 3936993A274A53C600684420 /* GroupEdit.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = GroupEdit.storyboard; sourceTree = ""; }; + 3936993D274A53E000684420 /* GroupEditViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupEditViewController.swift; sourceTree = ""; }; + 39369942274A568900684420 /* GroupEditTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupEditTableViewCell.swift; sourceTree = ""; }; + 39369943274A568900684420 /* GroupEditTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GroupEditTableViewCell.xib; sourceTree = ""; }; + 393E3344275F69EE00965BBF /* SplashViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashViewController.swift; sourceTree = ""; }; + 393E3349275F6A6600965BBF /* Splash.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Splash.storyboard; sourceTree = ""; }; + 39488E342706E17200BDC917 /* UIAlertController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAlertController+Extension.swift"; sourceTree = ""; }; + 394F314B27081B3A00C83291 /* FrontViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrontViewController.swift; sourceTree = ""; }; + 394F314E27081B4C00C83291 /* Front.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Front.storyboard; sourceTree = ""; }; + 39523E08270184A700536900 /* CardListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListViewController.swift; sourceTree = ""; }; + 39523E0A270184B100536900 /* CardList.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardList.storyboard; sourceTree = ""; }; + 39523E592701A48900536900 /* CardListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListTableViewCell.swift; sourceTree = ""; }; + 39523E5A2701A48900536900 /* CardListTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CardListTableViewCell.xib; sourceTree = ""; }; + 39523E5E2701AA9000536900 /* CardListDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListDataModel.swift; sourceTree = ""; }; + 3958F238270FFBBF00B100B2 /* GroupViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupViewController.swift; sourceTree = ""; }; + 3958F23B270FFBD500B100B2 /* Group.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Group.storyboard; sourceTree = ""; }; + 3979709526FA0BE5003FB4F5 /* LoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewController.swift; sourceTree = ""; }; + 3979709726FA0BF0003FB4F5 /* Login.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Login.storyboard; sourceTree = ""; }; + 397B750C2763A5AF004AEB03 /* OpenSource.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = OpenSource.storyboard; sourceTree = ""; }; + 397B750F2763A5F5004AEB03 /* OpenSourceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenSourceViewController.swift; sourceTree = ""; }; + 397B75112763A916004AEB03 /* OpenSourceTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenSourceTableViewCell.swift; sourceTree = ""; }; + 397B75122763A916004AEB03 /* OpenSourceTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OpenSourceTableViewCell.xib; sourceTree = ""; }; + 397B75162763B5B7004AEB03 /* TeamNADA.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TeamNADA.storyboard; sourceTree = ""; }; + 397B75192763B5F1004AEB03 /* TeamNADAViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TeamNADAViewController.swift; sourceTree = ""; }; + 3981148D273BEBB300E28630 /* CardListEditRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListEditRequest.swift; sourceTree = ""; }; + 3981148F273BEBCE00E28630 /* CardListRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListRequest.swift; sourceTree = ""; }; + 398413B6274A7A1E005550BC /* AddGroupBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddGroupBottomSheetViewController.swift; sourceTree = ""; }; + 399C55DE2711949D00845A54 /* CGPoint+Distance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGPoint+Distance.swift"; sourceTree = ""; }; + 39C1E88E270EC762006D2089 /* UIColor+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extension.swift"; sourceTree = ""; }; + 39C394CE277CCFD400DBA566 /* EmptyGroupEditTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyGroupEditTableViewCell.swift; sourceTree = ""; }; + 39C394CF277CCFD400DBA566 /* EmptyGroupEditTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EmptyGroupEditTableViewCell.xib; sourceTree = ""; }; + 39C394D2277CD33500DBA566 /* EmptyCardListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyCardListTableViewCell.swift; sourceTree = ""; }; + 39C394D3277CD33500DBA566 /* EmptyCardListTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = EmptyCardListTableViewCell.xib; sourceTree = ""; }; + 39D13564273FDB9C00B1A148 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + 39D13567273FDCB800B1A148 /* UserWithTokenRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserWithTokenRequest.swift; sourceTree = ""; }; + 39D2E12F270B43DA00AD0889 /* UIFont+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+Extension.swift"; sourceTree = ""; }; + 39D88B5E2745FB7E00A72164 /* MoreViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreViewController.swift; sourceTree = ""; }; + 39D88B612745FBA900A72164 /* More.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = More.storyboard; sourceTree = ""; }; + 39D88B632745FDD400A72164 /* TabBar.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = TabBar.storyboard; sourceTree = ""; }; + 39D88B652745FE5F00A72164 /* TabBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarViewController.swift; sourceTree = ""; }; + 39D88B6A274600B100A72164 /* CommonBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonBottomSheetViewController.swift; sourceTree = ""; }; + 39DC06992778BEFB00C8ECCC /* CardListLookUp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardListLookUp.swift; sourceTree = ""; }; + 39F5A3CE271461EA00191F94 /* BackCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackCardCell.swift; sourceTree = ""; }; + 39F5A3CF271461EA00191F94 /* BackCardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BackCardCell.xib; sourceTree = ""; }; 4A2183AE0E469153221624A0 /* Pods_NADA_iOS_forRelease.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NADA_iOS_forRelease.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7705CF3D2752C7DB005195DF /* CardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardView.swift; sourceTree = ""; }; + 7705CF3F2752C844005195DF /* CardView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CardView.xib; sourceTree = ""; }; + 770E58852778A78900498C2E /* Status.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Status.swift; sourceTree = ""; }; + 7713E8472752E2A900724C8B /* SelectGroupBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectGroupBottomSheetViewController.swift; sourceTree = ""; }; + 7729171E2743D604001593E0 /* CardsInGroupResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardsInGroupResponse.swift; sourceTree = ""; }; + 7734D5A927719520004360E4 /* CardShareBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardShareBottomSheetViewController.swift; sourceTree = ""; }; + 7734D5B327778EFB004360E4 /* HarmonyResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HarmonyResponse.swift; sourceTree = ""; }; + 7734D5B527779EF0004360E4 /* QRCodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRCodeView.swift; sourceTree = ""; }; + 7734D5B72777A8E8004360E4 /* String+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = ""; }; + 77607ED8274A68BD00204CD2 /* GroupCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupCollectionViewCell.swift; sourceTree = ""; }; + 77607ED9274A68BD00204CD2 /* GroupCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GroupCollectionViewCell.xib; sourceTree = ""; }; + 7766A40D274FEBE200714912 /* CardInGroupCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardInGroupCollectionViewCell.swift; sourceTree = ""; }; + 7766A40E274FEBE200714912 /* CardInGroupCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CardInGroupCollectionViewCell.xib; sourceTree = ""; }; + 77703156275005AA002CBD19 /* CardResultBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardResultBottomSheetViewController.swift; sourceTree = ""; }; + 7770315827500C49002CBD19 /* QRScan.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = QRScan.storyboard; sourceTree = ""; }; + 7770315A27500C7B002CBD19 /* QRScanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScanViewController.swift; sourceTree = ""; }; + 777FF89A27359B7800BF69D3 /* Groups.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Groups.swift; sourceTree = ""; }; + 777FF89C2735B16B00BF69D3 /* GroupAddRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupAddRequest.swift; sourceTree = ""; }; + 777FF89E27364B7B00BF69D3 /* GroupEditRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupEditRequest.swift; sourceTree = ""; }; + 77812946275F6EA3004B34F4 /* CardDetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardDetailViewController.swift; sourceTree = ""; }; + 77812949275F6ED7004B34F4 /* CardDetail.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardDetail.storyboard; sourceTree = ""; }; + 77AA68E9273E0EC4009C89B0 /* CardAddInGroupRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardAddInGroupRequest.swift; sourceTree = ""; }; + 77DFB870274F92F9000CD36F /* AddWithIdBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddWithIdBottomSheetViewController.swift; sourceTree = ""; }; + 77F2C0EA27632A91007641E3 /* CardHarmonyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardHarmonyViewController.swift; sourceTree = ""; }; + 77F2C0EC27632AA7007641E3 /* CardHarmony.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardHarmony.storyboard; sourceTree = ""; }; + 77F47D92276C79B600414659 /* Header.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Header.swift; sourceTree = ""; }; 7F4EE1D042EC783FA8528743 /* Pods-NADA-iOS-forRelease.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NADA-iOS-forRelease.debug.xcconfig"; path = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.debug.xcconfig"; sourceTree = ""; }; + F81171FF27383097002742CF /* ChangeGroupRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeGroupRequest.swift; sourceTree = ""; }; + F822E7A82709CEB60020452C /* Notification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notification.swift; sourceTree = ""; }; + F8268DB827730B0100BF114B /* FirstCardAlertBottomSheetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstCardAlertBottomSheetViewController.swift; sourceTree = ""; }; + F82FEB4A27639F3100DA7847 /* MainCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainCardCell.swift; sourceTree = ""; }; + F82FEB4B27639F3100DA7847 /* MainCardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainCardCell.xib; sourceTree = ""; }; + F82FF81C2701EBCE00E57F8B /* CardCreation.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardCreation.storyboard; sourceTree = ""; }; + F82FF8232702000000E57F8B /* RequiredFlavorCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequiredFlavorCollectionViewCell.swift; sourceTree = ""; }; + F82FF8242702000000E57F8B /* RequiredFlavorCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = RequiredFlavorCollectionViewCell.xib; sourceTree = ""; }; + F83206A826F61E3700D61711 /* FrontCardCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrontCardCell.swift; sourceTree = ""; }; + F83206A926F61E3700D61711 /* FrontCardCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FrontCardCell.xib; sourceTree = ""; }; + F84BAF9C26FDB417004CA335 /* CardCreationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardCreationViewController.swift; sourceTree = ""; }; + F84BAFAB26FDB543004CA335 /* FrontCardCreationCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrontCardCreationCollectionViewCell.swift; sourceTree = ""; }; + F84BAFAC26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = FrontCardCreationCollectionViewCell.xib; sourceTree = ""; }; + F84BAFAF26FDB552004CA335 /* BackCardCreationCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackCardCreationCollectionViewCell.swift; sourceTree = ""; }; + F84BAFB026FDB552004CA335 /* BackCardCreationCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BackCardCreationCollectionViewCell.xib; sourceTree = ""; }; + F8518052275D040C006BD5ED /* OnboardingCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingCollectionViewCell.swift; sourceTree = ""; }; + F8518053275D040C006BD5ED /* OnboardingCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OnboardingCollectionViewCell.xib; sourceTree = ""; }; + F8518057275D042B006BD5ED /* Onboarding.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Onboarding.storyboard; sourceTree = ""; }; + F851805A275D047C006BD5ED /* OnboardingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingViewController.swift; sourceTree = ""; }; + F85711A4274A6B2200F59F0B /* CardCreationPreviewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardCreationPreviewViewController.swift; sourceTree = ""; }; + F85711A6274A6B3400F59F0B /* CardCreationPreview.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = CardCreationPreview.storyboard; sourceTree = ""; }; + F858079C2700354E00872484 /* BackgroundCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundCollectionViewCell.swift; sourceTree = ""; }; + F858079D2700354E00872484 /* BackgroundCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = BackgroundCollectionViewCell.xib; sourceTree = ""; }; + F87122752733046300A24E74 /* Card.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Card.swift; sourceTree = ""; }; + F871227727330A3800A24E74 /* CardCreationRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardCreationRequest.swift; sourceTree = ""; }; + F8719DDA274F92E90081AD51 /* UITextField+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UITextField+Extension.swift"; sourceTree = ""; }; + F8915A20275728F20013D609 /* SelectBirthBottomViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectBirthBottomViewController.swift; sourceTree = ""; }; + F8915A21275728F20013D609 /* SelectMBTIBottomViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectMBTIBottomViewController.swift; sourceTree = ""; }; + F8A9FE192743DC6B00BC60CE /* CardListInGroupRequest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CardListInGroupRequest.swift; sourceTree = ""; }; + F8C310BF273A7360008EC5BA /* FrontCardCreationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrontCardCreationDelegate.swift; sourceTree = ""; }; + F8C83FAD272F99940009DF0D /* MoyaLoggerPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoyaLoggerPlugin.swift; sourceTree = ""; }; + F8C83FB5272F9E380009DF0D /* UtilService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilService.swift; sourceTree = ""; }; + F8C83FB7272F9E3F0009DF0D /* UtilAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UtilAPI.swift; sourceTree = ""; }; + F8C83FBA272F9F370009DF0D /* NetworkResult.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkResult.swift; sourceTree = ""; }; + F8C83FBC272F9F430009DF0D /* GenericResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenericResponse.swift; sourceTree = ""; }; + F8C83FBE272FA0670009DF0D /* UserSevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSevice.swift; sourceTree = ""; }; + F8C83FC0272FA06E0009DF0D /* UserAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = ""; }; + F8C83FC2272FA17B0009DF0D /* URL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URL.swift; sourceTree = ""; }; + F8C83FC4272FA2940009DF0D /* CardAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardAPI.swift; sourceTree = ""; }; + F8C83FC6272FA2A20009DF0D /* CardService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CardService.swift; sourceTree = ""; }; + F8C83FC8272FA3190009DF0D /* GroupAPI.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupAPI.swift; sourceTree = ""; }; + F8C83FCA272FA32C0009DF0D /* GroupService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupService.swift; sourceTree = ""; }; + F8D74DD7276C7FB60071E5FC /* UIImageView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImageView+Extension.swift"; sourceTree = ""; }; + F8F5D0A9270800FD00D99D2E /* Xib.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Xib.swift; sourceTree = ""; }; F8FC438226C01CDD0033E151 /* NADA-iOS-forRelease.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "NADA-iOS-forRelease.app"; sourceTree = BUILT_PRODUCTS_DIR; }; F8FC438526C01CDD0033E151 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; F8FC438726C01CDD0033E151 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; - F8FC438926C01CDD0033E151 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; }; - F8FC438C26C01CDD0033E151 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; F8FC438E26C01CDE0033E151 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; F8FC439126C01CDE0033E151 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; F8FC439326C01CDE0033E151 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - F8FC43A626C020780033E151 /* TempExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempExtensions.swift; sourceTree = ""; }; - F8FC43A826C0207F0033E151 /* TempFont.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempFont.swift; sourceTree = ""; }; - F8FC43AA26C020880033E151 /* TempCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempCell.swift; sourceTree = ""; }; - F8FC43AC26C020940033E151 /* TempClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempClass.swift; sourceTree = ""; }; - F8FC43AE26C0209A0033E151 /* TempModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempModel.swift; sourceTree = ""; }; - F8FC43B026C020A70033E151 /* TempNetwork.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempNetwork.swift; sourceTree = ""; }; - F8FC43B226C020B90033E151 /* TempProtocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempProtocols.swift; sourceTree = ""; }; - F8FC43B426C020C10033E151 /* TempViews.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TempViews.swift; sourceTree = ""; }; + F8FC43B226C020B90033E151 /* BackCardCreationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackCardCreationDelegate.swift; sourceTree = ""; }; F8FC43B726C0227D0033E151 /* Const.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Const.swift; sourceTree = ""; }; F8FC43B926C022900033E151 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; F8FC43BB26C022A20033E151 /* Storyboard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Storyboard.swift; sourceTree = ""; }; @@ -75,6 +316,227 @@ path = Pods; sourceTree = ""; }; + 392F7FB1274621CF008CDBF5 /* MoreList */ = { + isa = PBXGroup; + children = ( + 392F7FB2274621F1008CDBF5 /* MoreListTableViewCell.swift */, + 392F7FB3274621F1008CDBF5 /* MoreListTableViewCell.xib */, + ); + path = MoreList; + sourceTree = ""; + }; + 3936993C274A53D300684420 /* GroupEdit */ = { + isa = PBXGroup; + children = ( + 3936993D274A53E000684420 /* GroupEditViewController.swift */, + ); + path = GroupEdit; + sourceTree = ""; + }; + 3936993F274A565E00684420 /* GroupEdit */ = { + isa = PBXGroup; + children = ( + 39369942274A568900684420 /* GroupEditTableViewCell.swift */, + 39369943274A568900684420 /* GroupEditTableViewCell.xib */, + 39C394CE277CCFD400DBA566 /* EmptyGroupEditTableViewCell.swift */, + 39C394CF277CCFD400DBA566 /* EmptyGroupEditTableViewCell.xib */, + ); + path = GroupEdit; + sourceTree = ""; + }; + 393E3343275F69DB00965BBF /* Splash */ = { + isa = PBXGroup; + children = ( + 393E3344275F69EE00965BBF /* SplashViewController.swift */, + ); + path = Splash; + sourceTree = ""; + }; + 393E3348275F6A5D00965BBF /* Splash */ = { + isa = PBXGroup; + children = ( + 393E3349275F6A6600965BBF /* Splash.storyboard */, + ); + path = Splash; + sourceTree = ""; + }; + 394F314A2708157500C83291 /* Main */ = { + isa = PBXGroup; + children = ( + 394F314B27081B3A00C83291 /* FrontViewController.swift */, + ); + path = Main; + sourceTree = ""; + }; + 394F314D27081B4100C83291 /* Main */ = { + isa = PBXGroup; + children = ( + 394F314E27081B4C00C83291 /* Front.storyboard */, + 39523E0A270184B100536900 /* CardList.storyboard */, + ); + path = Main; + sourceTree = ""; + }; + 39523E072701848E00536900 /* CardList */ = { + isa = PBXGroup; + children = ( + 39523E08270184A700536900 /* CardListViewController.swift */, + ); + path = CardList; + sourceTree = ""; + }; + 39523E582701A47400536900 /* CardList */ = { + isa = PBXGroup; + children = ( + 39523E592701A48900536900 /* CardListTableViewCell.swift */, + 39523E5A2701A48900536900 /* CardListTableViewCell.xib */, + 39C394D2277CD33500DBA566 /* EmptyCardListTableViewCell.swift */, + 39C394D3277CD33500DBA566 /* EmptyCardListTableViewCell.xib */, + ); + path = CardList; + sourceTree = ""; + }; + 39523E5D2701AA5700536900 /* CardList */ = { + isa = PBXGroup; + children = ( + 39523E5E2701AA9000536900 /* CardListDataModel.swift */, + ); + path = CardList; + sourceTree = ""; + }; + 3958F237270FFB8700B100B2 /* Group */ = { + isa = PBXGroup; + children = ( + 3958F238270FFBBF00B100B2 /* GroupViewController.swift */, + 7770315A27500C7B002CBD19 /* QRScanViewController.swift */, + ); + path = Group; + sourceTree = ""; + }; + 3958F23A270FFBC800B100B2 /* Group */ = { + isa = PBXGroup; + children = ( + 3958F23B270FFBD500B100B2 /* Group.storyboard */, + 3936993A274A53C600684420 /* GroupEdit.storyboard */, + 7770315827500C49002CBD19 /* QRScan.storyboard */, + ); + path = Group; + sourceTree = ""; + }; + 395FE2E127619B0800A9815E /* Login */ = { + isa = PBXGroup; + children = ( + 3979709726FA0BF0003FB4F5 /* Login.storyboard */, + ); + path = Login; + sourceTree = ""; + }; + 395FE2E227619B0F00A9815E /* TabBar */ = { + isa = PBXGroup; + children = ( + 39D88B632745FDD400A72164 /* TabBar.storyboard */, + ); + path = TabBar; + sourceTree = ""; + }; + 3979709426FA0BD8003FB4F5 /* Login */ = { + isa = PBXGroup; + children = ( + 3979709526FA0BE5003FB4F5 /* LoginViewController.swift */, + ); + path = Login; + sourceTree = ""; + }; + 397B750E2763A5DD004AEB03 /* OpenSource */ = { + isa = PBXGroup; + children = ( + 397B750F2763A5F5004AEB03 /* OpenSourceViewController.swift */, + ); + path = OpenSource; + sourceTree = ""; + }; + 397B75152763A91D004AEB03 /* OpenSource */ = { + isa = PBXGroup; + children = ( + 397B75112763A916004AEB03 /* OpenSourceTableViewCell.swift */, + 397B75122763A916004AEB03 /* OpenSourceTableViewCell.xib */, + ); + path = OpenSource; + sourceTree = ""; + }; + 397B75182763B5DA004AEB03 /* TeamNADA */ = { + isa = PBXGroup; + children = ( + 397B75192763B5F1004AEB03 /* TeamNADAViewController.swift */, + ); + path = TeamNADA; + sourceTree = ""; + }; + 3981148A273BEB7200E28630 /* User */ = { + isa = PBXGroup; + children = ( + 39D13564273FDB9C00B1A148 /* User.swift */, + 39D13567273FDCB800B1A148 /* UserWithTokenRequest.swift */, + 3918F66627719C4B00984648 /* UserTokenReissueRequset.swift */, + ); + path = User; + sourceTree = ""; + }; + 39D88B5D2745FB5E00A72164 /* More */ = { + isa = PBXGroup; + children = ( + 39D88B5E2745FB7E00A72164 /* MoreViewController.swift */, + ); + path = More; + sourceTree = ""; + }; + 39D88B602745FBA100A72164 /* More */ = { + isa = PBXGroup; + children = ( + 39D88B612745FBA900A72164 /* More.storyboard */, + 397B750C2763A5AF004AEB03 /* OpenSource.storyboard */, + 397B75162763B5B7004AEB03 /* TeamNADA.storyboard */, + ); + path = More; + sourceTree = ""; + }; + 39D88B682745FE6C00A72164 /* TabBar */ = { + isa = PBXGroup; + children = ( + 39D88B652745FE5F00A72164 /* TabBarViewController.swift */, + ); + path = TabBar; + sourceTree = ""; + }; + 39D88B692746009B00A72164 /* BottomSheet */ = { + isa = PBXGroup; + children = ( + 39D88B6A274600B100A72164 /* CommonBottomSheetViewController.swift */, + 77DFB870274F92F9000CD36F /* AddWithIdBottomSheetViewController.swift */, + 398413B6274A7A1E005550BC /* AddGroupBottomSheetViewController.swift */, + 39317D2127646F8E00D87166 /* GroupNameEditBottomSheetViewController.swift */, + 77703156275005AA002CBD19 /* CardResultBottomSheetViewController.swift */, + 7713E8472752E2A900724C8B /* SelectGroupBottomSheetViewController.swift */, + F8915A20275728F20013D609 /* SelectBirthBottomViewController.swift */, + F8915A21275728F20013D609 /* SelectMBTIBottomViewController.swift */, + 7734D5A927719520004360E4 /* CardShareBottomSheetViewController.swift */, + F8268DB827730B0100BF114B /* FirstCardAlertBottomSheetViewController.swift */, + ); + path = BottomSheet; + sourceTree = ""; + }; + 39DA4D7B2747D7060082D572 /* Font */ = { + isa = PBXGroup; + children = ( + 39369930274A4FCB00684420 /* NotoSansCJKkr-Bold.otf */, + 39369932274A4FCB00684420 /* NotoSansCJKkr-Medium.otf */, + 39369931274A4FCB00684420 /* NotoSansCJKkr-Regular.otf */, + 39369933274A4FCB00684420 /* Spoqa Han Sans Neo Bold.otf */, + 39369934274A4FCB00684420 /* Spoqa Han Sans Neo Regular.otf */, + ); + path = Font; + sourceTree = ""; + }; 4D28D444572353D68574D2B0 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -83,6 +545,233 @@ name = Frameworks; sourceTree = ""; }; + 7734D5B027778EC8004360E4 /* Util */ = { + isa = PBXGroup; + children = ( + 7734D5B327778EFB004360E4 /* HarmonyResponse.swift */, + ); + path = Util; + sourceTree = ""; + }; + 77607ED7274A689300204CD2 /* GroupCell */ = { + isa = PBXGroup; + children = ( + 77607ED8274A68BD00204CD2 /* GroupCollectionViewCell.swift */, + 77607ED9274A68BD00204CD2 /* GroupCollectionViewCell.xib */, + 7766A40D274FEBE200714912 /* CardInGroupCollectionViewCell.swift */, + 7766A40E274FEBE200714912 /* CardInGroupCollectionViewCell.xib */, + ); + path = GroupCell; + sourceTree = ""; + }; + 777FF89927359B1000BF69D3 /* Group */ = { + isa = PBXGroup; + children = ( + 777FF89A27359B7800BF69D3 /* Groups.swift */, + 777FF89C2735B16B00BF69D3 /* GroupAddRequest.swift */, + 777FF89E27364B7B00BF69D3 /* GroupEditRequest.swift */, + F8A9FE192743DC6B00BC60CE /* CardListInGroupRequest.swift */, + 77AA68E9273E0EC4009C89B0 /* CardAddInGroupRequest.swift */, + 7729171E2743D604001593E0 /* CardsInGroupResponse.swift */, + F81171FF27383097002742CF /* ChangeGroupRequest.swift */, + ); + path = Group; + sourceTree = ""; + }; + 77812945275F6E6A004B34F4 /* CardDetail */ = { + isa = PBXGroup; + children = ( + 77812946275F6EA3004B34F4 /* CardDetailViewController.swift */, + 77F2C0EA27632A91007641E3 /* CardHarmonyViewController.swift */, + ); + path = CardDetail; + sourceTree = ""; + }; + 77812948275F6EB9004B34F4 /* CardDetail */ = { + isa = PBXGroup; + children = ( + 77812949275F6ED7004B34F4 /* CardDetail.storyboard */, + 77F2C0EC27632AA7007641E3 /* CardHarmony.storyboard */, + ); + path = CardDetail; + sourceTree = ""; + }; + F82FF8222701FFE300E57F8B /* RequiredFlavor */ = { + isa = PBXGroup; + children = ( + F82FF8232702000000E57F8B /* RequiredFlavorCollectionViewCell.swift */, + F82FF8242702000000E57F8B /* RequiredFlavorCollectionViewCell.xib */, + ); + path = RequiredFlavor; + sourceTree = ""; + }; + F83206AC26F61E5800D61711 /* CardCell */ = { + isa = PBXGroup; + children = ( + F82FEB4A27639F3100DA7847 /* MainCardCell.swift */, + F82FEB4B27639F3100DA7847 /* MainCardCell.xib */, + F83206A826F61E3700D61711 /* FrontCardCell.swift */, + F83206A926F61E3700D61711 /* FrontCardCell.xib */, + 39F5A3CE271461EA00191F94 /* BackCardCell.swift */, + 39F5A3CF271461EA00191F94 /* BackCardCell.xib */, + 3903CC1E2769F4F40094C458 /* EmptyCardCell.swift */, + 3903CC1F2769F4F40094C458 /* EmptyCardCell.xib */, + ); + path = CardCell; + sourceTree = ""; + }; + F84BAF9E26FDB425004CA335 /* CardCreation */ = { + isa = PBXGroup; + children = ( + F82FF81C2701EBCE00E57F8B /* CardCreation.storyboard */, + F85711A6274A6B3400F59F0B /* CardCreationPreview.storyboard */, + ); + path = CardCreation; + sourceTree = ""; + }; + F84BAFA126FDB4E5004CA335 /* CreationCard */ = { + isa = PBXGroup; + children = ( + F82FF8222701FFE300E57F8B /* RequiredFlavor */, + F858079B2700348000872484 /* Background */, + F84BAFAB26FDB543004CA335 /* FrontCardCreationCollectionViewCell.swift */, + F84BAFAC26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib */, + F84BAFAF26FDB552004CA335 /* BackCardCreationCollectionViewCell.swift */, + F84BAFB026FDB552004CA335 /* BackCardCreationCollectionViewCell.xib */, + ); + path = CreationCard; + sourceTree = ""; + }; + F84BAFB326FDB8AA004CA335 /* CardCreation */ = { + isa = PBXGroup; + children = ( + F84BAF9C26FDB417004CA335 /* CardCreationViewController.swift */, + F85711A4274A6B2200F59F0B /* CardCreationPreviewViewController.swift */, + ); + path = CardCreation; + sourceTree = ""; + }; + F8518051275D039D006BD5ED /* Onboarding */ = { + isa = PBXGroup; + children = ( + F8518052275D040C006BD5ED /* OnboardingCollectionViewCell.swift */, + F8518053275D040C006BD5ED /* OnboardingCollectionViewCell.xib */, + ); + path = Onboarding; + sourceTree = ""; + }; + F8518056275D041F006BD5ED /* Onboarding */ = { + isa = PBXGroup; + children = ( + F8518057275D042B006BD5ED /* Onboarding.storyboard */, + ); + path = Onboarding; + sourceTree = ""; + }; + F8518059275D0468006BD5ED /* Onboarding */ = { + isa = PBXGroup; + children = ( + F851805A275D047C006BD5ED /* OnboardingViewController.swift */, + ); + path = Onboarding; + sourceTree = ""; + }; + F857FC8A26C03A5C00A48D01 /* Assets */ = { + isa = PBXGroup; + children = ( + F8FC438E26C01CDE0033E151 /* Assets.xcassets */, + 390515B72706CEBB00C5F7A5 /* Colors.xcassets */, + ); + path = Assets; + sourceTree = ""; + }; + F858079B2700348000872484 /* Background */ = { + isa = PBXGroup; + children = ( + F858079C2700354E00872484 /* BackgroundCollectionViewCell.swift */, + F858079D2700354E00872484 /* BackgroundCollectionViewCell.xib */, + ); + path = Background; + sourceTree = ""; + }; + F87122722733032300A24E74 /* Card */ = { + isa = PBXGroup; + children = ( + F87122752733046300A24E74 /* Card.swift */, + F871227727330A3800A24E74 /* CardCreationRequest.swift */, + 3981148D273BEBB300E28630 /* CardListEditRequest.swift */, + 3981148F273BEBCE00E28630 /* CardListRequest.swift */, + 39DC06992778BEFB00C8ECCC /* CardListLookUp.swift */, + ); + path = Card; + sourceTree = ""; + }; + F8915A1F275713A10013D609 /* CardCreation */ = { + isa = PBXGroup; + children = ( + F8FC43B226C020B90033E151 /* BackCardCreationDelegate.swift */, + F8C310BF273A7360008EC5BA /* FrontCardCreationDelegate.swift */, + ); + path = CardCreation; + sourceTree = ""; + }; + F8C83FAC272F998A0009DF0D /* Plugin */ = { + isa = PBXGroup; + children = ( + F8C83FAD272F99940009DF0D /* MoyaLoggerPlugin.swift */, + ); + path = Plugin; + sourceTree = ""; + }; + F8C83FAF272F9C790009DF0D /* User */ = { + isa = PBXGroup; + children = ( + F8C83FC0272FA06E0009DF0D /* UserAPI.swift */, + F8C83FBE272FA0670009DF0D /* UserSevice.swift */, + ); + path = User; + sourceTree = ""; + }; + F8C83FB0272F9CB10009DF0D /* Card */ = { + isa = PBXGroup; + children = ( + F8C83FC4272FA2940009DF0D /* CardAPI.swift */, + F8C83FC6272FA2A20009DF0D /* CardService.swift */, + ); + path = Card; + sourceTree = ""; + }; + F8C83FB3272F9CF30009DF0D /* Group */ = { + isa = PBXGroup; + children = ( + F8C83FC8272FA3190009DF0D /* GroupAPI.swift */, + F8C83FCA272FA32C0009DF0D /* GroupService.swift */, + ); + path = Group; + sourceTree = ""; + }; + F8C83FB4272F9E250009DF0D /* Util */ = { + isa = PBXGroup; + children = ( + F8C83FB7272F9E3F0009DF0D /* UtilAPI.swift */, + F8C83FB5272F9E380009DF0D /* UtilService.swift */, + ); + path = Util; + sourceTree = ""; + }; + F8C83FB9272F9F030009DF0D /* NetworkModel */ = { + isa = PBXGroup; + children = ( + F8C83FBA272F9F370009DF0D /* NetworkResult.swift */, + F8C83FBC272F9F430009DF0D /* GenericResponse.swift */, + 3981148A273BEB7200E28630 /* User */, + F87122722733032300A24E74 /* Card */, + 777FF89927359B1000BF69D3 /* Group */, + 7734D5B027778EC8004360E4 /* Util */, + ); + path = NetworkModel; + sourceTree = ""; + }; F8FC437926C01CDD0033E151 = { isa = PBXGroup; children = ( @@ -105,9 +794,8 @@ F8FC438426C01CDD0033E151 /* NADA-iOS-forRelease */ = { isa = PBXGroup; children = ( + 3918F6652771682F00984648 /* NADA-iOS-forRelease.entitlements */, F8FC439326C01CDE0033E151 /* Info.plist */, - F8FC438526C01CDD0033E151 /* AppDelegate.swift */, - F8FC438726C01CDD0033E151 /* SceneDelegate.swift */, F8FC439926C01E2B0033E151 /* Resouces */, F8FC439A26C01EA90033E151 /* Sources */, ); @@ -117,10 +805,10 @@ F8FC439926C01E2B0033E151 /* Resouces */ = { isa = PBXGroup; children = ( - F8FC438E26C01CDE0033E151 /* Assets.xcassets */, + F857FC8A26C03A5C00A48D01 /* Assets */, + 39DA4D7B2747D7060082D572 /* Font */, F8FC43A326C01F420033E151 /* Constants */, F8FC43A426C01F5B0033E151 /* Extensions */, - F8FC43A526C01F630033E151 /* Fonts */, F8FC43A226C01F2B0033E151 /* Storyboards */, ); path = Resouces; @@ -129,12 +817,15 @@ F8FC439A26C01EA90033E151 /* Sources */ = { isa = PBXGroup; children = ( + F8FC438526C01CDD0033E151 /* AppDelegate.swift */, + F8FC438726C01CDD0033E151 /* SceneDelegate.swift */, F8FC439B26C01EC30033E151 /* Cells */, F8FC439C26C01EC90033E151 /* Classes */, - F8FC439D26C01EEC0033E151 /* Models */, - F8FC439E26C01EF70033E151 /* Network */, + F8FC439D26C01EEC0033E151 /* AppModel */, + F8C83FB9272F9F030009DF0D /* NetworkModel */, + F8FC439E26C01EF70033E151 /* NetworkService */, F8FC439F26C01EFC0033E151 /* Protocols */, - F8FC43A026C01F040033E151 /* ViewController */, + F8FC43A026C01F040033E151 /* ViewControllers */, F8FC43A126C01F1F0033E151 /* Views */, ); path = Sources; @@ -143,7 +834,14 @@ F8FC439B26C01EC30033E151 /* Cells */ = { isa = PBXGroup; children = ( - F8FC43AA26C020880033E151 /* TempCell.swift */, + 397B75152763A91D004AEB03 /* OpenSource */, + F8518051275D039D006BD5ED /* Onboarding */, + 3936993F274A565E00684420 /* GroupEdit */, + 77607ED7274A689300204CD2 /* GroupCell */, + 392F7FB1274621CF008CDBF5 /* MoreList */, + F84BAFA126FDB4E5004CA335 /* CreationCard */, + 39523E582701A47400536900 /* CardList */, + F83206AC26F61E5800D61711 /* CardCell */, ); path = Cells; sourceTree = ""; @@ -151,47 +849,65 @@ F8FC439C26C01EC90033E151 /* Classes */ = { isa = PBXGroup; children = ( - F8FC43AC26C020940033E151 /* TempClass.swift */, + 7734D5B527779EF0004360E4 /* QRCodeView.swift */, ); path = Classes; sourceTree = ""; }; - F8FC439D26C01EEC0033E151 /* Models */ = { + F8FC439D26C01EEC0033E151 /* AppModel */ = { isa = PBXGroup; children = ( - F8FC43AE26C0209A0033E151 /* TempModel.swift */, + 39523E5D2701AA5700536900 /* CardList */, ); - path = Models; + path = AppModel; sourceTree = ""; }; - F8FC439E26C01EF70033E151 /* Network */ = { + F8FC439E26C01EF70033E151 /* NetworkService */ = { isa = PBXGroup; children = ( - F8FC43B026C020A70033E151 /* TempNetwork.swift */, + F8C83FAC272F998A0009DF0D /* Plugin */, + F8C83FAF272F9C790009DF0D /* User */, + F8C83FB0272F9CB10009DF0D /* Card */, + F8C83FB3272F9CF30009DF0D /* Group */, + F8C83FB4272F9E250009DF0D /* Util */, ); - path = Network; + path = NetworkService; sourceTree = ""; }; F8FC439F26C01EFC0033E151 /* Protocols */ = { isa = PBXGroup; children = ( - F8FC43B226C020B90033E151 /* TempProtocols.swift */, + F8915A1F275713A10013D609 /* CardCreation */, ); path = Protocols; sourceTree = ""; }; - F8FC43A026C01F040033E151 /* ViewController */ = { + F8FC43A026C01F040033E151 /* ViewControllers */ = { isa = PBXGroup; children = ( - F8FC438926C01CDD0033E151 /* MainViewController.swift */, + 397B750E2763A5DD004AEB03 /* OpenSource */, + 397B75182763B5DA004AEB03 /* TeamNADA */, + 77812945275F6E6A004B34F4 /* CardDetail */, + F8518059275D0468006BD5ED /* Onboarding */, + 393E3343275F69DB00965BBF /* Splash */, + 3936993C274A53D300684420 /* GroupEdit */, + 39D88B692746009B00A72164 /* BottomSheet */, + 39D88B682745FE6C00A72164 /* TabBar */, + 394F314A2708157500C83291 /* Main */, + 3958F237270FFB8700B100B2 /* Group */, + 39D88B5D2745FB5E00A72164 /* More */, + F84BAFB326FDB8AA004CA335 /* CardCreation */, + 39523E072701848E00536900 /* CardList */, + 3979709426FA0BD8003FB4F5 /* Login */, ); - path = ViewController; + path = ViewControllers; sourceTree = ""; }; F8FC43A126C01F1F0033E151 /* Views */ = { isa = PBXGroup; children = ( - F8FC43B426C020C10033E151 /* TempViews.swift */, + 7705CF3D2752C7DB005195DF /* CardView.swift */, + 7705CF3F2752C844005195DF /* CardView.xib */, ); path = Views; sourceTree = ""; @@ -199,8 +915,16 @@ F8FC43A226C01F2B0033E151 /* Storyboards */ = { isa = PBXGroup; children = ( + 393E3348275F6A5D00965BBF /* Splash */, + 395FE2E227619B0F00A9815E /* TabBar */, + 395FE2E127619B0800A9815E /* Login */, + F8518056275D041F006BD5ED /* Onboarding */, + 394F314D27081B4100C83291 /* Main */, + 3958F23A270FFBC800B100B2 /* Group */, + 39D88B602745FBA100A72164 /* More */, + 77812948275F6EB9004B34F4 /* CardDetail */, + F84BAF9E26FDB425004CA335 /* CardCreation */, F8FC439026C01CDE0033E151 /* LaunchScreen.storyboard */, - F8FC438B26C01CDD0033E151 /* Main.storyboard */, ); path = Storyboards; sourceTree = ""; @@ -211,6 +935,12 @@ F8FC43B726C0227D0033E151 /* Const.swift */, F8FC43B926C022900033E151 /* ViewController.swift */, F8FC43BB26C022A20033E151 /* Storyboard.swift */, + F8F5D0A9270800FD00D99D2E /* Xib.swift */, + F822E7A82709CEB60020452C /* Notification.swift */, + F8C83FC2272FA17B0009DF0D /* URL.swift */, + 3927A7D6275F2A9B008BCD2A /* UserDefaults.swift */, + 77F47D92276C79B600414659 /* Header.swift */, + 770E58852778A78900498C2E /* Status.swift */, ); path = Constants; sourceTree = ""; @@ -218,19 +948,19 @@ F8FC43A426C01F5B0033E151 /* Extensions */ = { isa = PBXGroup; children = ( - F8FC43A626C020780033E151 /* TempExtensions.swift */, + 3909242E26FA15E800236C51 /* UIView+Extension.swift */, + 39488E342706E17200BDC917 /* UIAlertController+Extension.swift */, + 39007F2B27080D8200E7143E /* UIViewController+Extension.swift */, + 39D2E12F270B43DA00AD0889 /* UIFont+Extension.swift */, + 39C1E88E270EC762006D2089 /* UIColor+Extension.swift */, + 399C55DE2711949D00845A54 /* CGPoint+Distance.swift */, + F8719DDA274F92E90081AD51 /* UITextField+Extension.swift */, + F8D74DD7276C7FB60071E5FC /* UIImageView+Extension.swift */, + 7734D5B72777A8E8004360E4 /* String+Extension.swift */, ); path = Extensions; sourceTree = ""; }; - F8FC43A526C01F630033E151 /* Fonts */ = { - isa = PBXGroup; - children = ( - F8FC43A826C0207F0033E151 /* TempFont.swift */, - ); - path = Fonts; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -291,10 +1021,49 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + F8518058275D042B006BD5ED /* Onboarding.storyboard in Resources */, F8FC43BF26C025180033E151 /* .swiftlint.yml in Resources */, + 397B75142763A916004AEB03 /* OpenSourceTableViewCell.xib in Resources */, + F85711A7274A6B3400F59F0B /* CardCreationPreview.storyboard in Resources */, + 77607EDB274A68BE00204CD2 /* GroupCollectionViewCell.xib in Resources */, + 39369936274A4FCB00684420 /* NotoSansCJKkr-Regular.otf in Resources */, + 39369935274A4FCB00684420 /* NotoSansCJKkr-Bold.otf in Resources */, + 39D88B622745FBA900A72164 /* More.storyboard in Resources */, + F82FF8262702000000E57F8B /* RequiredFlavorCollectionViewCell.xib in Resources */, + F858079F2700354E00872484 /* BackgroundCollectionViewCell.xib in Resources */, + F84BAFAE26FDB543004CA335 /* FrontCardCreationCollectionViewCell.xib in Resources */, + 3958F23C270FFBD500B100B2 /* Group.storyboard in Resources */, + F83206AB26F61E3700D61711 /* FrontCardCell.xib in Resources */, + 394F314F27081B4C00C83291 /* Front.storyboard in Resources */, + 3979709826FA0BF0003FB4F5 /* Login.storyboard in Resources */, + F82FEB4D27639F3100DA7847 /* MainCardCell.xib in Resources */, + 39369945274A568900684420 /* GroupEditTableViewCell.xib in Resources */, + 77F2C0ED27632AA7007641E3 /* CardHarmony.storyboard in Resources */, + 39C394D5277CD33500DBA566 /* EmptyCardListTableViewCell.xib in Resources */, + F84BAFB226FDB552004CA335 /* BackCardCreationCollectionViewCell.xib in Resources */, + 397B75172763B5B7004AEB03 /* TeamNADA.storyboard in Resources */, + 3936993B274A53C600684420 /* GroupEdit.storyboard in Resources */, + 3903CC212769F4F40094C458 /* EmptyCardCell.xib in Resources */, + 39D88B642745FDD400A72164 /* TabBar.storyboard in Resources */, + 7766A410274FEBE200714912 /* CardInGroupCollectionViewCell.xib in Resources */, + 7705CF402752C844005195DF /* CardView.xib in Resources */, + 397B750D2763A5AF004AEB03 /* OpenSource.storyboard in Resources */, + 393E334A275F6A6600965BBF /* Splash.storyboard in Resources */, + 39523E5C2701A48900536900 /* CardListTableViewCell.xib in Resources */, F8FC439226C01CDE0033E151 /* LaunchScreen.storyboard in Resources */, F8FC438F26C01CDE0033E151 /* Assets.xcassets in Resources */, - F8FC438D26C01CDD0033E151 /* Main.storyboard in Resources */, + F8518055275D040C006BD5ED /* OnboardingCollectionViewCell.xib in Resources */, + 39F5A3D1271461EA00191F94 /* BackCardCell.xib in Resources */, + 39369939274A4FCB00684420 /* Spoqa Han Sans Neo Regular.otf in Resources */, + 39369938274A4FCB00684420 /* Spoqa Han Sans Neo Bold.otf in Resources */, + 7781294A275F6ED7004B34F4 /* CardDetail.storyboard in Resources */, + 39C394D1277CCFD500DBA566 /* EmptyGroupEditTableViewCell.xib in Resources */, + 39523E0B270184B100536900 /* CardList.storyboard in Resources */, + F82FF81D2701EBCE00E57F8B /* CardCreation.storyboard in Resources */, + 39369937274A4FCB00684420 /* NotoSansCJKkr-Medium.otf in Resources */, + 392F7FB5274621F1008CDBF5 /* MoreListTableViewCell.xib in Resources */, + 7770315927500C49002CBD19 /* QRScan.storyboard in Resources */, + 390515B82706CEBB00C5F7A5 /* Colors.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -364,34 +1133,107 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - F8FC43B126C020A70033E151 /* TempNetwork.swift in Sources */, - F8FC438A26C01CDD0033E151 /* MainViewController.swift in Sources */, - F8FC43AF26C0209A0033E151 /* TempModel.swift in Sources */, - F8FC43AB26C020880033E151 /* TempCell.swift in Sources */, - F8FC43A726C020780033E151 /* TempExtensions.swift in Sources */, + F87122762733046300A24E74 /* Card.swift in Sources */, + 39317D2227646F8E00D87166 /* GroupNameEditBottomSheetViewController.swift in Sources */, + F84BAF9D26FDB417004CA335 /* CardCreationViewController.swift in Sources */, + F8C83FCB272FA32C0009DF0D /* GroupService.swift in Sources */, + F858079E2700354E00872484 /* BackgroundCollectionViewCell.swift in Sources */, + F8C83FBD272F9F430009DF0D /* GenericResponse.swift in Sources */, + 398413B7274A7A1E005550BC /* AddGroupBottomSheetViewController.swift in Sources */, + 77DFB871274F92F9000CD36F /* AddWithIdBottomSheetViewController.swift in Sources */, + 7713E8482752E2A900724C8B /* SelectGroupBottomSheetViewController.swift in Sources */, + 39007F2C27080D8200E7143E /* UIViewController+Extension.swift in Sources */, + F8C83FB6272F9E380009DF0D /* UtilService.swift in Sources */, + 3958F239270FFBBF00B100B2 /* GroupViewController.swift in Sources */, + 3909242F26FA15E800236C51 /* UIView+Extension.swift in Sources */, + 39523E09270184A700536900 /* CardListViewController.swift in Sources */, + F85711A5274A6B2200F59F0B /* CardCreationPreviewViewController.swift in Sources */, + 39DC069A2778BEFB00C8ECCC /* CardListLookUp.swift in Sources */, + 777FF89B27359B7800BF69D3 /* Groups.swift in Sources */, + 77F47D93276C79B600414659 /* Header.swift in Sources */, + 397B75102763A5F5004AEB03 /* OpenSourceViewController.swift in Sources */, + 39C394D0277CCFD500DBA566 /* EmptyGroupEditTableViewCell.swift in Sources */, + 777FF89F27364B7B00BF69D3 /* GroupEditRequest.swift in Sources */, + 399C55DF2711949D00845A54 /* CGPoint+Distance.swift in Sources */, + 77F2C0EB27632A91007641E3 /* CardHarmonyViewController.swift in Sources */, + F83206AA26F61E3700D61711 /* FrontCardCell.swift in Sources */, + 3979709626FA0BE5003FB4F5 /* LoginViewController.swift in Sources */, + 39488E352706E17200BDC917 /* UIAlertController+Extension.swift in Sources */, + 3903CC202769F4F40094C458 /* EmptyCardCell.swift in Sources */, + F8C310C0273A7360008EC5BA /* FrontCardCreationDelegate.swift in Sources */, + F8C83FBF272FA0670009DF0D /* UserSevice.swift in Sources */, + 39F5A3D0271461EA00191F94 /* BackCardCell.swift in Sources */, + F8268DB927730B0100BF114B /* FirstCardAlertBottomSheetViewController.swift in Sources */, + 770E58862778A78900498C2E /* Status.swift in Sources */, + F851805B275D047C006BD5ED /* OnboardingViewController.swift in Sources */, + 39C1E88F270EC762006D2089 /* UIColor+Extension.swift in Sources */, + F8C83FC9272FA3190009DF0D /* GroupAPI.swift in Sources */, F8FC43B826C0227D0033E151 /* Const.swift in Sources */, - F8FC43B326C020B90033E151 /* TempProtocols.swift in Sources */, - F8FC43B526C020C10033E151 /* TempViews.swift in Sources */, + 394F314C27081B3A00C83291 /* FrontViewController.swift in Sources */, + 777FF89D2735B16B00BF69D3 /* GroupAddRequest.swift in Sources */, + 7734D5AA27719520004360E4 /* CardShareBottomSheetViewController.swift in Sources */, + F8F5D0AA270800FD00D99D2E /* Xib.swift in Sources */, + F82FF8252702000000E57F8B /* RequiredFlavorCollectionViewCell.swift in Sources */, + F8C83FC7272FA2A20009DF0D /* CardService.swift in Sources */, + 39D88B662745FE5F00A72164 /* TabBarViewController.swift in Sources */, + 77607EDA274A68BE00204CD2 /* GroupCollectionViewCell.swift in Sources */, + F871227827330A3800A24E74 /* CardCreationRequest.swift in Sources */, + 39D88B5F2745FB7E00A72164 /* MoreViewController.swift in Sources */, + F8FC43B326C020B90033E151 /* BackCardCreationDelegate.swift in Sources */, + 39369944274A568900684420 /* GroupEditTableViewCell.swift in Sources */, + F8C83FBB272F9F370009DF0D /* NetworkResult.swift in Sources */, + 39D2E130270B43DA00AD0889 /* UIFont+Extension.swift in Sources */, + F82FEB4C27639F3100DA7847 /* MainCardCell.swift in Sources */, + 7770315B27500C7B002CBD19 /* QRScanViewController.swift in Sources */, + 39523E5B2701A48900536900 /* CardListTableViewCell.swift in Sources */, + F8719DDB274F92E90081AD51 /* UITextField+Extension.swift in Sources */, + F8A9FE1A2743DC6B00BC60CE /* CardListInGroupRequest.swift in Sources */, + 397B751A2763B5F1004AEB03 /* TeamNADAViewController.swift in Sources */, + 3981148E273BEBB300E28630 /* CardListEditRequest.swift in Sources */, + 39D88B6B274600B100A72164 /* CommonBottomSheetViewController.swift in Sources */, + 7734D5B627779EF0004360E4 /* QRCodeView.swift in Sources */, + 3918F66727719C4B00984648 /* UserTokenReissueRequset.swift in Sources */, + 7705CF3E2752C7DB005195DF /* CardView.swift in Sources */, F8FC43BA26C022900033E151 /* ViewController.swift in Sources */, - F8FC43AD26C020940033E151 /* TempClass.swift in Sources */, + 39523E5F2701AA9000536900 /* CardListDataModel.swift in Sources */, + 39D13568273FDCB800B1A148 /* UserWithTokenRequest.swift in Sources */, + F84BAFB126FDB552004CA335 /* BackCardCreationCollectionViewCell.swift in Sources */, + 39811490273BEBCE00E28630 /* CardListRequest.swift in Sources */, F8FC43BC26C022A20033E151 /* Storyboard.swift in Sources */, - F8FC43A926C0207F0033E151 /* TempFont.swift in Sources */, + F8C83FC1272FA06E0009DF0D /* UserAPI.swift in Sources */, + 7766A40F274FEBE200714912 /* CardInGroupCollectionViewCell.swift in Sources */, + 3927A7D7275F2A9B008BCD2A /* UserDefaults.swift in Sources */, + 7734D5B82777A8E8004360E4 /* String+Extension.swift in Sources */, + F8C83FC3272FA17B0009DF0D /* URL.swift in Sources */, + 392F7FB4274621F1008CDBF5 /* MoreListTableViewCell.swift in Sources */, + 77AA68EA273E0EC4009C89B0 /* CardAddInGroupRequest.swift in Sources */, + 3936993E274A53E000684420 /* GroupEditViewController.swift in Sources */, + F8C83FAE272F99940009DF0D /* MoyaLoggerPlugin.swift in Sources */, + F84BAFAD26FDB543004CA335 /* FrontCardCreationCollectionViewCell.swift in Sources */, + F8518054275D040C006BD5ED /* OnboardingCollectionViewCell.swift in Sources */, + 77703157275005AA002CBD19 /* CardResultBottomSheetViewController.swift in Sources */, + F8D74DD8276C7FB60071E5FC /* UIImageView+Extension.swift in Sources */, + 39D13565273FDB9C00B1A148 /* User.swift in Sources */, + 77812947275F6EA3004B34F4 /* CardDetailViewController.swift in Sources */, + F822E7A92709CEB60020452C /* Notification.swift in Sources */, + F8C83FC5272FA2940009DF0D /* CardAPI.swift in Sources */, + 7729171F2743D604001593E0 /* CardsInGroupResponse.swift in Sources */, + F8915A22275728F20013D609 /* SelectBirthBottomViewController.swift in Sources */, F8FC438626C01CDD0033E151 /* AppDelegate.swift in Sources */, + F8915A23275728F20013D609 /* SelectMBTIBottomViewController.swift in Sources */, + 393E3345275F69EE00965BBF /* SplashViewController.swift in Sources */, + F8C83FB8272F9E3F0009DF0D /* UtilAPI.swift in Sources */, F8FC438826C01CDD0033E151 /* SceneDelegate.swift in Sources */, + 39C394D4277CD33500DBA566 /* EmptyCardListTableViewCell.swift in Sources */, + 7734D5B427778EFB004360E4 /* HarmonyResponse.swift in Sources */, + 397B75132763A916004AEB03 /* OpenSourceTableViewCell.swift in Sources */, + F811720027383097002742CF /* ChangeGroupRequest.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - F8FC438B26C01CDD0033E151 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - F8FC438C26C01CDD0033E151 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; F8FC439026C01CDE0033E151 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( @@ -525,17 +1367,20 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "NADA-iOS-forRelease/NADA-iOS-forRelease.entitlements"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = T8C9SSEX5G; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = T3VFJ764ZC; INFOPLIST_FILE = "NADA-iOS-forRelease/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "hyun99999.NADA-iOS-forRelease"; + MARKETING_VERSION = 1.0.1; + PRODUCT_BUNDLE_IDENTIFIER = "YJC.NADA-iOS-forRelease"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -545,17 +1390,20 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "NADA-iOS-forRelease/NADA-iOS-forRelease.entitlements"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = T8C9SSEX5G; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = T3VFJ764ZC; INFOPLIST_FILE = "NADA-iOS-forRelease/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "hyun99999.NADA-iOS-forRelease"; + MARKETING_VERSION = 1.0.1; + PRODUCT_BUNDLE_IDENTIFIER = "YJC.NADA-iOS-forRelease"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; diff --git a/NADA-iOS-forRelease.xcodeproj/xcshareddata/xcschemes/NADA-iOS-forRelease.xcscheme b/NADA-iOS-forRelease.xcodeproj/xcshareddata/xcschemes/NADA-iOS-forRelease.xcscheme new file mode 100644 index 00000000..3b233ed7 --- /dev/null +++ b/NADA-iOS-forRelease.xcodeproj/xcshareddata/xcschemes/NADA-iOS-forRelease.xcscheme @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/AppDelegate.swift b/NADA-iOS-forRelease/AppDelegate.swift deleted file mode 100644 index 9d7cf6bc..00000000 --- a/NADA-iOS-forRelease/AppDelegate.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// AppDelegate.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -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/NADA-iOS-forRelease/Info.plist b/NADA-iOS-forRelease/Info.plist index 2688b32b..fa43581f 100644 --- a/NADA-iOS-forRelease/Info.plist +++ b/NADA-iOS-forRelease/Info.plist @@ -3,7 +3,9 @@ CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) + ko_KR + CFBundleDisplayName + 나다 NADA CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,11 +17,49 @@ CFBundlePackageType $(PRODUCT_BUNDLE_PACKAGE_TYPE) CFBundleShortVersionString - 1.0 + $(MARKETING_VERSION) + CFBundleURLTypes + + + CFBundleTypeRole + Editor + CFBundleURLSchemes + + kakao5b8dd8cc878344bb7532eeca4365a4aa + + + CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) + LSApplicationCategoryType + + LSApplicationQueriesSchemes + + instagram + kakaokompassauth + kakaolink + LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSCameraUsageDescription + QR코드를 인식하여 명함을 추가하기 위해 카메라 권한 허용이 필요해요. + NSPhotoLibraryAddUsageDescription + 명함을 이미지로 저장하기 위해 갤러리 권한 허용이 필요해요. + NSPhotoLibraryUsageDescription + 명함 배경을 설정하기 위해 갤러리 권한 허용이 필요해요. + UIAppFonts + + NotoSansCJKkr-Bold.otf + NotoSansCJKkr-Medium.otf + NotoSansCJKkr-Regular.otf + Spoqa Han Sans Neo Bold.otf + Spoqa Han Sans Neo Regular.otf + UIApplicationSceneManifest UIApplicationSupportsMultipleScenes @@ -48,8 +88,6 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad diff --git a/NADA-iOS-forRelease/NADA-iOS-forRelease.entitlements b/NADA-iOS-forRelease/NADA-iOS-forRelease.entitlements new file mode 100644 index 00000000..a812db50 --- /dev/null +++ b/NADA-iOS-forRelease/NADA-iOS-forRelease.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.developer.applesignin + + Default + + + diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/1024.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/1024.png new file mode 100644 index 00000000..427192a5 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/1024.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/120(2).png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/120(2).png new file mode 100644 index 00000000..5d34ee6a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/120(2).png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/120.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/120.png new file mode 100644 index 00000000..5d34ee6a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/120.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/180.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/180.png new file mode 100644 index 00000000..25290e51 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/180.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/40.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/40.png new file mode 100644 index 00000000..a24f75d2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/40.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/58.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/58.png new file mode 100644 index 00000000..40ecd4dc Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/58.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/60.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/60.png new file mode 100644 index 00000000..1ceac15d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/60.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/80.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/80.png new file mode 100644 index 00000000..19f0f5aa Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/80.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/87.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/87.png new file mode 100644 index 00000000..b77db834 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/87.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets.xcassets/AppIcon.appiconset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 53% rename from NADA-iOS-forRelease/Resouces/Assets.xcassets/AppIcon.appiconset/Contents.json rename to NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json index 9221b9bb..950a35e2 100644 --- a/NADA-iOS-forRelease/Resouces/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,91 +1,55 @@ { "images" : [ { + "filename" : "40.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { + "filename" : "60.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { + "filename" : "58.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { + "filename" : "87.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { + "filename" : "80.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { + "filename" : "120.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { + "filename" : "120(2).png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { + "filename" : "180.png", "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" - }, - { + "filename" : "1024.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1.png new file mode 100644 index 00000000..5d723ad7 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1@2x.png new file mode 100644 index 00000000..57c664d2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1@3x.png new file mode 100644 index 00000000..65287e20 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin-1@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin.png new file mode 100644 index 00000000..77336e32 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin@2x.png new file mode 100644 index 00000000..c2c21d34 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin@3x.png new file mode 100644 index 00000000..bbbf3983 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/AppleLogin@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/Contents.json new file mode 100644 index 00000000..c1a4d884 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/AppleLogin.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "AppleLogin.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "AppleLogin-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "AppleLogin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "AppleLogin-1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "AppleLogin@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "AppleLogin-1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets.xcassets/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/Contents.json similarity index 100% rename from NADA-iOS-forRelease/Resouces/Assets.xcassets/Contents.json rename to NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/Contents.json diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/Contents.json new file mode 100644 index 00000000..d122339b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "addPhoto.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "filename" : "addPhoto@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "addPhoto@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto.png new file mode 100644 index 00000000..e99944f2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto@2x.png new file mode 100644 index 00000000..46e185c4 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto@3x.png new file mode 100644 index 00000000..33748952 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/addPhoto.imageset/addPhoto@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/Contents.json new file mode 100644 index 00000000..756a9f80 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "btnMainAdd.png", + "scale" : "1x" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "btnMainAdd@2x.png" + }, + { + "filename" : "btnMainAdd@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd.png new file mode 100644 index 00000000..7f1d49e9 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd@2x.png new file mode 100644 index 00000000..4c77ee36 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd@3x.png new file mode 100644 index 00000000..94ee7024 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainAdd.imageset/btnMainAdd@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/Contents.json new file mode 100644 index 00000000..46d360f4 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "btnMainCreate.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "btnMainCreate@2x.png" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "btnMainCreate@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate.png new file mode 100644 index 00000000..ab913f27 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate@2x.png new file mode 100644 index 00000000..27f8c816 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate@3x.png new file mode 100644 index 00000000..93b2c463 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainCreate.imageset/btnMainCreate@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/Contents.json new file mode 100644 index 00000000..2c720654 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "btnMainDisable.png" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "btnMainDisable@2x.png" + }, + { + "filename" : "btnMainDisable@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable.png new file mode 100644 index 00000000..55c60ef6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable@2x.png new file mode 100644 index 00000000..c933bf77 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable@3x.png new file mode 100644 index 00000000..f447efa1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDisable.imageset/btnMainDisable@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/Contents.json new file mode 100644 index 00000000..1a107a8c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "btnMainDone.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "btnMainDone@2x.png", + "scale" : "2x" + }, + { + "filename" : "btnMainDone@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone.png new file mode 100644 index 00000000..9064e98f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone@2x.png new file mode 100644 index 00000000..5c4a60e2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone@3x.png new file mode 100644 index 00000000..17a70884 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainDone.imageset/btnMainDone@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/Contents.json new file mode 100644 index 00000000..256674b2 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "btnMainMatch.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "btnMainMatch@2x.png" + }, + { + "idiom" : "universal", + "filename" : "btnMainMatch@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch.png new file mode 100644 index 00000000..54151677 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch@2x.png new file mode 100644 index 00000000..e9e8deaa Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch@3x.png new file mode 100644 index 00000000..90fdfc04 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btnMainMatch.imageset/btnMainMatch@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/Contents.json new file mode 100644 index 00000000..d7c6bdaf --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "btn_kakaologin.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "btn_kakaologin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "btn_kakaologin@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin.png new file mode 100644 index 00000000..7c1a3442 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin@2x.png new file mode 100644 index 00000000..7a63517a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin@3x.png new file mode 100644 index 00000000..8426cf1c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/btn_kakaologin.imageset/btn_kakaologin@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/Contents.json new file mode 100644 index 00000000..5294f3bd --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "buttonShareImg.png" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "buttonShareImg@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "buttonShareImg@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg.png new file mode 100644 index 00000000..8bb5df9e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg@2x.png new file mode 100644 index 00000000..02766e42 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg@3x.png new file mode 100644 index 00000000..d4d260ae Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareImg.imageset/buttonShareImg@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/Contents.json new file mode 100644 index 00000000..722ab1e9 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "buttonShareKkt.png", + "scale" : "1x" + }, + { + "filename" : "buttonShareKkt@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "buttonShareKkt@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt.png new file mode 100644 index 00000000..7ceecd5a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt@2x.png new file mode 100644 index 00000000..59dda54d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt@3x.png new file mode 100644 index 00000000..88f73b8c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonShareKkt.imageset/buttonShareKkt@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/Contents.json new file mode 100644 index 00000000..47aa9cfa --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "buttonStartImg.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "buttonStartImg@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "buttonStartImg@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg.png new file mode 100644 index 00000000..92e4f583 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg@2x.png new file mode 100644 index 00000000..a3d810e2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg@3x.png new file mode 100644 index 00000000..c143fba0 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/buttonStartImg.imageset/buttonStartImg@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/Contents.json new file mode 100644 index 00000000..d559915c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "card.png", + "idiom" : "universal" + }, + { + "filename" : "card@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "card@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card.png new file mode 100644 index 00000000..203a47d8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card@2x.png new file mode 100644 index 00000000..69df8f69 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card@3x.png new file mode 100644 index 00000000..610eb36a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/card.imageset/card@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/Contents.json new file mode 100644 index 00000000..5141eaa9 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "disableButtonBackground.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "disableButtonBackground-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "disableButtonBackground@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "disableButtonBackground@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "disableButtonBackground@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "disableButtonBackground@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground-1.png new file mode 100644 index 00000000..ed6c2f0c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground.png new file mode 100644 index 00000000..3dc16d13 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@2x-1.png new file mode 100644 index 00000000..de5001a1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@2x.png new file mode 100644 index 00000000..fe800508 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@3x-1.png new file mode 100644 index 00000000..a5d64b10 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@3x.png new file mode 100644 index 00000000..63c58f35 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/disableButtonBackground.imageset/disableButtonBackground@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/Contents.json new file mode 100644 index 00000000..2805b69b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "enableButtonBackground.png", + "scale" : "1x" + }, + { + "filename" : "enableButtonBackground@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "enableButtonBackground@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground.png new file mode 100644 index 00000000..c4ce82e6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground@2x.png new file mode 100644 index 00000000..a804a8b1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground@3x.png new file mode 100644 index 00000000..14ebdabe Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/enableButtonBackground.imageset/enableButtonBackground@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/Contents.json new file mode 100644 index 00000000..47fdae58 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "invalidName.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "scale" : "2x", + "filename" : "invalidName@2x.png", + "idiom" : "universal" + }, + { + "filename" : "invalidName@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName.png new file mode 100644 index 00000000..c4aba84e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@2x.png new file mode 100644 index 00000000..dd4ce61b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@3x.png new file mode 100644 index 00000000..b77b96fb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/firsthandIcon.imageset/invalidName@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/Contents.json new file mode 100644 index 00000000..ff65a51b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "frame74.png", + "idiom" : "universal" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "frame74@2x.png" + }, + { + "idiom" : "universal", + "filename" : "frame74@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74.png new file mode 100644 index 00000000..5b63e225 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74@2x.png new file mode 100644 index 00000000..4f77c79a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74@3x.png new file mode 100644 index 00000000..702f9e60 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/frame74.imageset/frame74@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/Contents.json new file mode 100644 index 00000000..7b6a894a --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icnApple.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "filename" : "icnApple@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icnApple@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple.png new file mode 100644 index 00000000..2efeba0d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple@2x.png new file mode 100644 index 00000000..653cce8d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple@3x.png new file mode 100644 index 00000000..dee4a7b6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnApple.imageset/icnApple@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/Contents.json new file mode 100644 index 00000000..6a877f79 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icnHarmonyGreen.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "icnHarmonyGreen@2x.png", + "scale" : "2x" + }, + { + "filename" : "icnHarmonyGreen@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen.png new file mode 100644 index 00000000..39553d61 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen@2x.png new file mode 100644 index 00000000..3ebd3e45 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen@3x.png new file mode 100644 index 00000000..f3f576d2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyGreen.imageset/icnHarmonyGreen@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/Contents.json new file mode 100644 index 00000000..a665d108 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icnHarmonyOrange.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "icnHarmonyOrange@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "icnHarmonyOrange@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange.png new file mode 100644 index 00000000..c40a89d2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange@2x.png new file mode 100644 index 00000000..d6acfafe Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange@3x.png new file mode 100644 index 00000000..355a89d7 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyOrange.imageset/icnHarmonyOrange@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/Contents.json new file mode 100644 index 00000000..6d37a5d9 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icnHarmonyPurple.png", + "scale" : "1x" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "icnHarmonyPurple@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "icnHarmonyPurple@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple.png new file mode 100644 index 00000000..bab700fd Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple@2x.png new file mode 100644 index 00000000..52c6dee6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple@3x.png new file mode 100644 index 00000000..f67fa69d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyPurple.imageset/icnHarmonyPurple@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/Contents.json new file mode 100644 index 00000000..6bdd9695 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icnHarmonyRed.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "icnHarmonyRed@2x.png", + "scale" : "2x" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "icnHarmonyRed@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed.png new file mode 100644 index 00000000..e0d5b9a0 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed@2x.png new file mode 100644 index 00000000..8593021a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed@3x.png new file mode 100644 index 00000000..64ae0874 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyRed.imageset/icnHarmonyRed@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/Contents.json new file mode 100644 index 00000000..b73795d5 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "icnHarmonyYellow.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "icnHarmonyYellow@2x.png" + }, + { + "filename" : "icnHarmonyYellow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow.png new file mode 100644 index 00000000..c6feb3aa Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow@2x.png new file mode 100644 index 00000000..728fbeea Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow@3x.png new file mode 100644 index 00000000..48560d60 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnHarmonyYellow.imageset/icnHarmonyYellow@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/Contents.json new file mode 100644 index 00000000..7d870a8b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icnKakao.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "filename" : "icnKakao@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "icnKakao@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao.png new file mode 100644 index 00000000..dde2eaa7 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao@2x.png new file mode 100644 index 00000000..7ea39bcb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao@3x.png new file mode 100644 index 00000000..9f7de136 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/icnKakao.imageset/icnKakao@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/Contents.json new file mode 100644 index 00000000..7815ca21 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconAdd.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconAdd-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconAdd@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconAdd@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconAdd@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconAdd@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd-1.png new file mode 100644 index 00000000..e21184db Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd.png new file mode 100644 index 00000000..601ad310 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@2x-1.png new file mode 100644 index 00000000..2fa34047 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@2x.png new file mode 100644 index 00000000..f29e85ae Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@3x-1.png new file mode 100644 index 00000000..0bc0f690 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@3x.png new file mode 100644 index 00000000..7fa7fc55 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAdd.imageset/iconAdd@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/Contents.json new file mode 100644 index 00000000..cb88c785 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "iconAddPhoto.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "iconAddPhoto@2x.png", + "scale" : "2x" + }, + { + "filename" : "iconAddPhoto@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto.png new file mode 100644 index 00000000..33be0bb9 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto@2x.png new file mode 100644 index 00000000..6c46f776 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto@3x.png new file mode 100644 index 00000000..309d6455 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconAddPhoto.imageset/iconAddPhoto@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/Contents.json new file mode 100644 index 00000000..69394fb8 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconArrow.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconArrow-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconArrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconArrow@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconArrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconArrow@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow-1.png new file mode 100644 index 00000000..b6363df3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow.png new file mode 100644 index 00000000..7afc0c59 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@2x-1.png new file mode 100644 index 00000000..bba0af03 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@2x.png new file mode 100644 index 00000000..b7b5a240 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@3x-1.png new file mode 100644 index 00000000..53a17b1e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@3x.png new file mode 100644 index 00000000..ca80e69a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconArrow.imageset/iconArrow@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/Contents.json new file mode 100644 index 00000000..b5d346aa --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconCards.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconCards-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconCards@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconCards@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconCards@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconCards@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards-1.png new file mode 100644 index 00000000..9ad1256d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards.png new file mode 100644 index 00000000..4bd0d014 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@2x-1.png new file mode 100644 index 00000000..367f6232 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@2x.png new file mode 100644 index 00000000..ee4155ce Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@3x-1.png new file mode 100644 index 00000000..53561955 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@3x.png new file mode 100644 index 00000000..9237e43e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCards.imageset/iconCards@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/Contents.json new file mode 100644 index 00000000..397045b7 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "iconCardsSelected.png" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "iconCardsSelected@2x.png" + }, + { + "idiom" : "universal", + "filename" : "iconCardsSelected@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected.png new file mode 100644 index 00000000..cfc64b4c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected@2x.png new file mode 100644 index 00000000..14108e65 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected@3x.png new file mode 100644 index 00000000..68168494 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCardsSelected.imageset/iconCardsSelected@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/Contents.json new file mode 100644 index 00000000..370d30dd --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconClear-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconClear.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconClear@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconClear@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconClear@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconClear@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear-1.png new file mode 100644 index 00000000..413ba9bf Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear.png new file mode 100644 index 00000000..26b12e7b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@2x-1.png new file mode 100644 index 00000000..282721a3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@2x.png new file mode 100644 index 00000000..178fa3ca Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@3x-1.png new file mode 100644 index 00000000..2e1bb3cd Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@3x.png new file mode 100644 index 00000000..2a88d187 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconClear.imageset/iconClear@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/Contents.json new file mode 100644 index 00000000..bcee3c44 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconCopy.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconCopy-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconCopy@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconCopy@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconCopy@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconCopy@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy-1.png new file mode 100644 index 00000000..bd79cf44 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy.png new file mode 100644 index 00000000..f5217be3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@2x-1.png new file mode 100644 index 00000000..23c72248 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@2x.png new file mode 100644 index 00000000..f44cc782 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@3x-1.png new file mode 100644 index 00000000..29dd2107 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@3x.png new file mode 100644 index 00000000..84c7cf36 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconCopy.imageset/iconCopy@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/Contents.json new file mode 100644 index 00000000..95d381b9 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "iconDone.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "iconDone@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "iconDone@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone.png new file mode 100644 index 00000000..be049b70 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone@2x.png new file mode 100644 index 00000000..292b9ffc Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone@3x.png new file mode 100644 index 00000000..7da06c7a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconDone.imageset/iconDone@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/Contents.json new file mode 100644 index 00000000..55b45d04 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "iconError.png", + "idiom" : "universal" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "iconError@2x.png" + }, + { + "idiom" : "universal", + "filename" : "iconError@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError.png new file mode 100644 index 00000000..adef3f53 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError@2x.png new file mode 100644 index 00000000..aa30e3ad Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError@3x.png new file mode 100644 index 00000000..1a725c3f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconError.imageset/iconError@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/Contents.json new file mode 100644 index 00000000..6b5aeeed --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconFolder.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconFolder-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconFolder@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconFolder@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconFolder@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconFolder@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder-1.png new file mode 100644 index 00000000..db1bf50c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder.png new file mode 100644 index 00000000..279941c4 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@2x-1.png new file mode 100644 index 00000000..c505bfbd Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@2x.png new file mode 100644 index 00000000..6f190e73 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@3x-1.png new file mode 100644 index 00000000..1ad86728 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@3x.png new file mode 100644 index 00000000..8588c6b7 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconFolder.imageset/iconFolder@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/Contents.json new file mode 100644 index 00000000..06f9a943 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconHome.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconHome-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconHome@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconHome@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconHome@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconHome@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome-1.png new file mode 100644 index 00000000..17847f49 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome.png new file mode 100644 index 00000000..3fe6a4d2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x-1.png new file mode 100644 index 00000000..6cccf545 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x.png new file mode 100644 index 00000000..e8c985e3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x-1.png new file mode 100644 index 00000000..92ace4a6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x.png new file mode 100644 index 00000000..e13f9522 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHome.imageset/iconHome@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/Contents.json new file mode 100644 index 00000000..a482d8be --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "iconHomeSelected.png" + }, + { + "idiom" : "universal", + "filename" : "iconHomeSelected@2x.png", + "scale" : "2x" + }, + { + "filename" : "iconHomeSelected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected.png new file mode 100644 index 00000000..6b2495bb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected@2x.png new file mode 100644 index 00000000..ea4a4204 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected@3x.png new file mode 100644 index 00000000..e32e19bb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconHomeSelected.imageset/iconHomeSelected@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/Contents.json new file mode 100644 index 00000000..8e74c20a --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "iconInstagram.png", + "idiom" : "universal" + }, + { + "filename" : "iconInstagram@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "iconInstagram@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram.png new file mode 100644 index 00000000..e3eda38a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram@2x.png new file mode 100644 index 00000000..95344825 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram@3x.png new file mode 100644 index 00000000..782e81c3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconInstagram.imageset/iconInstagram@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/Contents.json new file mode 100644 index 00000000..571117ab --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconList.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconList-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconList@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconList@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconList@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconList@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList-1.png new file mode 100644 index 00000000..7b4928be Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList.png new file mode 100644 index 00000000..ff324b37 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@2x-1.png new file mode 100644 index 00000000..76a853db Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@2x.png new file mode 100644 index 00000000..a40e5db9 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@3x-1.png new file mode 100644 index 00000000..e0b3a0ae Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@3x.png new file mode 100644 index 00000000..2fb9cac2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconList.imageset/iconList@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/Contents.json new file mode 100644 index 00000000..4a397b7b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconMoreHoriz.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconMoreHoriz-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconMoreHoriz@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconMoreHoriz@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconMoreHoriz@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconMoreHoriz@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz-1.png new file mode 100644 index 00000000..520ed7e1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz.png new file mode 100644 index 00000000..d0f86605 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@2x-1.png new file mode 100644 index 00000000..1e3c631f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@2x.png new file mode 100644 index 00000000..cb534e49 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@3x-1.png new file mode 100644 index 00000000..4774c842 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@3x.png new file mode 100644 index 00000000..78e21402 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHoriz.imageset/iconMoreHoriz@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/Contents.json new file mode 100644 index 00000000..3531fc4c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "iconMoreHorizSelected.png", + "scale" : "1x" + }, + { + "filename" : "iconMoreHorizSelected@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "iconMoreHorizSelected@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected.png new file mode 100644 index 00000000..5bac4085 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected@2x.png new file mode 100644 index 00000000..4c26e271 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected@3x.png new file mode 100644 index 00000000..0ce2d481 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconMoreHorizSelected.imageset/iconMoreHorizSelected@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/Contents.json new file mode 100644 index 00000000..f0b60b51 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconOption.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconOption-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconOption@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconOption@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconOption@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconOption@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption-1.png new file mode 100644 index 00000000..89d8f2e3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption.png new file mode 100644 index 00000000..32b71f10 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@2x-1.png new file mode 100644 index 00000000..80d9d4e4 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@2x.png new file mode 100644 index 00000000..bba4b466 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@3x-1.png new file mode 100644 index 00000000..c40ffe3b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@3x.png new file mode 100644 index 00000000..364e786b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconOption.imageset/iconOption@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/Contents.json new file mode 100644 index 00000000..a8dac528 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconPin.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconPin-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconPin@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconPin@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconPin@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconPin@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin-1.png new file mode 100644 index 00000000..8facfb69 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin.png new file mode 100644 index 00000000..cd727cb7 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@2x-1.png new file mode 100644 index 00000000..6c6fa5d8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@2x.png new file mode 100644 index 00000000..a3446553 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@3x-1.png new file mode 100644 index 00000000..63a7fb8e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@3x.png new file mode 100644 index 00000000..a0ffe361 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPin.imageset/iconPin@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/Contents.json new file mode 100644 index 00000000..68b6404a --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconPinInactive.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconPinInactive-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconPinInactive@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconPinInactive@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconPinInactive@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconPinInactive@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive-1.png new file mode 100644 index 00000000..1e511019 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive.png new file mode 100644 index 00000000..37cc6254 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@2x-1.png new file mode 100644 index 00000000..3504ff07 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@2x.png new file mode 100644 index 00000000..7244baac Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@3x-1.png new file mode 100644 index 00000000..26def8bc Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@3x.png new file mode 100644 index 00000000..21a61859 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconPinInactive.imageset/iconPinInactive@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/Contents.json new file mode 100644 index 00000000..8dc2d194 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iconQRClear.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconQRClear@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconQRClear@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear.png new file mode 100644 index 00000000..26b12e7b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear@2x.png new file mode 100644 index 00000000..178fa3ca Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear@3x.png new file mode 100644 index 00000000..2a88d187 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconQRClear.imageset/iconQRClear@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/Contents.json new file mode 100644 index 00000000..b297e383 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconReorder.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconReorder-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconReorder@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconReorder@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconReorder@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconReorder@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder-1.png new file mode 100644 index 00000000..34d4a16c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder.png new file mode 100644 index 00000000..dcd3de25 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@2x-1.png new file mode 100644 index 00000000..0ddee28d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@2x.png new file mode 100644 index 00000000..825a8eb5 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@3x-1.png new file mode 100644 index 00000000..9dafe9f1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@3x.png new file mode 100644 index 00000000..3773938f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconReorder.imageset/iconReorder@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/Contents.json new file mode 100644 index 00000000..4a143aed --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "iconShare.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconShare@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconShare@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare.png new file mode 100644 index 00000000..2e38620a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare@2x.png new file mode 100644 index 00000000..d17583c9 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare@3x.png new file mode 100644 index 00000000..07d8c340 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconShare.imageset/iconShare@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/Contents.json new file mode 100644 index 00000000..d39714cd --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_banmincho.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_banmincho@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_banmincho@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho.png new file mode 100644 index 00000000..57eb6f12 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho@2x.png new file mode 100644 index 00000000..abb93056 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho@3x.png new file mode 100644 index 00000000..8284c405 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBanmincho.imageset/icon_taste_off_banmincho@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/Contents.json new file mode 100644 index 00000000..576ee5d4 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_beer.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_beer@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_beer@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer.png new file mode 100644 index 00000000..3b6cde59 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer@2x.png new file mode 100644 index 00000000..e1cb1fe7 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer@3x.png new file mode 100644 index 00000000..9b3c8407 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBeer.imageset/icon_taste_off_beer@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/Contents.json new file mode 100644 index 00000000..537c84b2 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_bumeok.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_bumeok@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_bumeok@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok.png new file mode 100644 index 00000000..45992c4c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok@2x.png new file mode 100644 index 00000000..6a5cadf9 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok@3x.png new file mode 100644 index 00000000..6e4df2e2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffBumeok.imageset/icon_taste_off_bumeok@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/Contents.json new file mode 100644 index 00000000..481582db --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_fried.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_fried@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_fried@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried.png new file mode 100644 index 00000000..bfce5a22 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried@2x.png new file mode 100644 index 00000000..1cdd80d8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried@3x.png new file mode 100644 index 00000000..9adebb2a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffFried.imageset/icon_taste_off_fried@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/Contents.json new file mode 100644 index 00000000..cb3d8a4e --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_mincho.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_mincho@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_mincho@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho.png new file mode 100644 index 00000000..6cedae98 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho@2x.png new file mode 100644 index 00000000..9de51d7c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho@3x.png new file mode 100644 index 00000000..ed2b8639 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffMincho.imageset/icon_taste_off_mincho@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/Contents.json new file mode 100644 index 00000000..89206124 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_seasoned.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_seasoned@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_seasoned@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned.png new file mode 100644 index 00000000..4964820f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned@2x.png new file mode 100644 index 00000000..e8a4b02c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned@3x.png new file mode 100644 index 00000000..f199e6b5 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSeasoned.imageset/icon_taste_off_seasoned@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/Contents.json new file mode 100644 index 00000000..ca4c06fa --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_soju.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_soju@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_soju@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju.png new file mode 100644 index 00000000..3f1e3c36 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju@2x.png new file mode 100644 index 00000000..cf912017 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju@3x.png new file mode 100644 index 00000000..b43b7d43 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffSoju.imageset/icon_taste_off_soju@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/Contents.json new file mode 100644 index 00000000..cb491844 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_off_zzik.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_off_zzik@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_off_zzik@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik.png new file mode 100644 index 00000000..baee19dd Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik@2x.png new file mode 100644 index 00000000..92eb22d3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik@3x.png new file mode 100644 index 00000000..dbc977f9 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOffZzik.imageset/icon_taste_off_zzik@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/Contents.json new file mode 100644 index 00000000..2e07a567 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_banmincho.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_banmincho@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_banmincho@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho.png new file mode 100644 index 00000000..0c710fde Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho@2x.png new file mode 100644 index 00000000..a61e34dc Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho@3x.png new file mode 100644 index 00000000..763d6c7a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBanmincho.imageset/icon_taste_on_banmincho@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/Contents.json new file mode 100644 index 00000000..70412279 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_beer.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_beer@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_beer@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer.png new file mode 100644 index 00000000..8f3fdda8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer@2x.png new file mode 100644 index 00000000..4600533f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer@3x.png new file mode 100644 index 00000000..31fd883d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBeer.imageset/icon_taste_on_beer@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/Contents.json new file mode 100644 index 00000000..63fd054e --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_bumeok.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_bumeok@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_bumeok@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok.png new file mode 100644 index 00000000..e1589f9d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok@2x.png new file mode 100644 index 00000000..0d5e2d8f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok@3x.png new file mode 100644 index 00000000..84482979 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnBumeok.imageset/icon_taste_on_bumeok@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/Contents.json new file mode 100644 index 00000000..96821aec --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_fried.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_fried@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_fried@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried.png new file mode 100644 index 00000000..91b417ad Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried@2x.png new file mode 100644 index 00000000..a37ff834 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried@3x.png new file mode 100644 index 00000000..1fde040f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnFried.imageset/icon_taste_on_fried@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/Contents.json new file mode 100644 index 00000000..a7bf2385 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_mincho.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_mincho@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_mincho@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho.png new file mode 100644 index 00000000..0d4103a5 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho@2x.png new file mode 100644 index 00000000..aa8bba0b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho@3x.png new file mode 100644 index 00000000..4e12b181 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnMincho.imageset/icon_taste_on_mincho@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/Contents.json new file mode 100644 index 00000000..5dc4d0fe --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_seasoned.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_seasoned@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_seasoned@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned.png new file mode 100644 index 00000000..5781e1ad Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned@2x.png new file mode 100644 index 00000000..beddb69d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned@3x.png new file mode 100644 index 00000000..baf5569b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSeasoned.imageset/icon_taste_on_seasoned@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/Contents.json new file mode 100644 index 00000000..e487963f --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_soju.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_soju@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_soju@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju.png new file mode 100644 index 00000000..a3e59131 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju@2x.png new file mode 100644 index 00000000..a56e4c87 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju@3x.png new file mode 100644 index 00000000..2bbed16e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnSoju.imageset/icon_taste_on_soju@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/Contents.json new file mode 100644 index 00000000..bbec5943 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "icon_taste_on_zzik.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "icon_taste_on_zzik@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "icon_taste_on_zzik@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik.png new file mode 100644 index 00000000..48f95c70 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik@2x.png new file mode 100644 index 00000000..9ca1dab8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik@3x.png new file mode 100644 index 00000000..558585cb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconTasteOnZzik.imageset/icon_taste_on_zzik@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/Contents.json new file mode 100644 index 00000000..aa19a4eb --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "iconUrl.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "iconUrl@2x.png", + "scale" : "2x" + }, + { + "filename" : "iconUrl@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl.png new file mode 100644 index 00000000..ee278642 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl@2x.png new file mode 100644 index 00000000..b153b452 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl@3x.png new file mode 100644 index 00000000..2c3343f0 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconUrl.imageset/iconUrl@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/Contents.json new file mode 100644 index 00000000..45acbe78 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "iconographyCaesarzkn.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconographyCaesarzkn-1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "iconographyCaesarzkn@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconographyCaesarzkn@2x-1.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "iconographyCaesarzkn@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "iconographyCaesarzkn@3x-1.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn-1.png new file mode 100644 index 00000000..13288544 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn.png new file mode 100644 index 00000000..be25d553 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@2x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@2x-1.png new file mode 100644 index 00000000..6c59eb37 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@2x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@2x.png new file mode 100644 index 00000000..f7542440 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@3x-1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@3x-1.png new file mode 100644 index 00000000..ec71fe9a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@3x-1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@3x.png new file mode 100644 index 00000000..fe0d96e8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/iconographyCaesarzkn.imageset/iconographyCaesarzkn@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/Contents.json new file mode 100644 index 00000000..865145ed --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "image020.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "image020@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "image020@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020.png new file mode 100644 index 00000000..5b96f3ff Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020@2x.png new file mode 100644 index 00000000..28c5013e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020@3x.png new file mode 100644 index 00000000..42387540 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image020.imageset/image020@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/Contents.json new file mode 100644 index 00000000..26efb8c4 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "image2140.png" + }, + { + "filename" : "image2140@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "image2140@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140.png new file mode 100644 index 00000000..33ab6e2c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140@2x.png new file mode 100644 index 00000000..c216eb23 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140@3x.png new file mode 100644 index 00000000..e7f520c1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image2140.imageset/image2140@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/Contents.json new file mode 100644 index 00000000..41e3a554 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "image4160.png" + }, + { + "filename" : "image4160@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "image4160@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160.png new file mode 100644 index 00000000..1a4cb986 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160@2x.png new file mode 100644 index 00000000..af9ecd5a Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160@3x.png new file mode 100644 index 00000000..63ad9dfa Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image4160.imageset/image4160@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/Contents.json new file mode 100644 index 00000000..e4107609 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "image6180.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "image6180@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "image6180@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180.png new file mode 100644 index 00000000..8d7575c8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180@2x.png new file mode 100644 index 00000000..3846416b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180@3x.png new file mode 100644 index 00000000..dadf6bee Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image6180.imageset/image6180@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/Contents.json new file mode 100644 index 00000000..bec6762c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "image81100.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "image81100@2x.png" + }, + { + "idiom" : "universal", + "filename" : "image81100@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100.png new file mode 100644 index 00000000..9432d926 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100@2x.png new file mode 100644 index 00000000..8199b519 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100@3x.png new file mode 100644 index 00000000..5e0284ce Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/image81100.imageset/image81100@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/Contents.json new file mode 100644 index 00000000..da4f7f85 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "imageDefaultBg01.png" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "imageDefaultBg01@2x.png" + }, + { + "filename" : "imageDefaultBg01@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01.png new file mode 100644 index 00000000..3b9b678f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01@2x.png new file mode 100644 index 00000000..bab7f7a3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01@3x.png new file mode 100644 index 00000000..bc11c4a3 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg01.imageset/imageDefaultBg01@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/Contents.json new file mode 100644 index 00000000..1f7ab76e --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "imageDefaultBg02.png", + "idiom" : "universal" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "imageDefaultBg02@2x.png" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "imageDefaultBg02@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02.png new file mode 100644 index 00000000..2663cf35 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02@2x.png new file mode 100644 index 00000000..02670c7f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02@3x.png new file mode 100644 index 00000000..be5319b5 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg02.imageset/imageDefaultBg02@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/Contents.json new file mode 100644 index 00000000..e2221d92 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "imageDefaultBg03.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "imageDefaultBg03@2x.png", + "scale" : "2x" + }, + { + "filename" : "imageDefaultBg03@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03.png new file mode 100644 index 00000000..464a3634 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03@2x.png new file mode 100644 index 00000000..6ec39555 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03@3x.png new file mode 100644 index 00000000..0a90a22f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg03.imageset/imageDefaultBg03@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/Contents.json new file mode 100644 index 00000000..04bb8bbb --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "imageDefaultBg04.png" + }, + { + "filename" : "imageDefaultBg04@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "imageDefaultBg04@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04.png new file mode 100644 index 00000000..c0ea7073 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04@2x.png new file mode 100644 index 00000000..0475f3cb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04@3x.png new file mode 100644 index 00000000..bf13c09f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg04.imageset/imageDefaultBg04@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/Contents.json new file mode 100644 index 00000000..33dc4156 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "imageDefaultBg05.png", + "scale" : "1x" + }, + { + "filename" : "imageDefaultBg05@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "imageDefaultBg05@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05.png new file mode 100644 index 00000000..820a8d49 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05@2x.png new file mode 100644 index 00000000..c344dda8 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05@3x.png new file mode 100644 index 00000000..68362c67 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg05.imageset/imageDefaultBg05@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/Contents.json new file mode 100644 index 00000000..18f23bd7 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "imageDefaultBg06.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "scale" : "2x", + "filename" : "imageDefaultBg06@2x.png", + "idiom" : "universal" + }, + { + "scale" : "3x", + "filename" : "imageDefaultBg06@3x.png", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06.png new file mode 100644 index 00000000..ff5f0fc4 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06@2x.png new file mode 100644 index 00000000..f1b0482e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06@3x.png new file mode 100644 index 00000000..51445643 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg06.imageset/imageDefaultBg06@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/Contents.json new file mode 100644 index 00000000..4050c633 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "imageDefaultBg07.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "imageDefaultBg07@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "imageDefaultBg07@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07.png new file mode 100644 index 00000000..07021e9b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07@2x.png new file mode 100644 index 00000000..7cb8d468 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07@3x.png new file mode 100644 index 00000000..465f41ad Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imageDefaultBg07.imageset/imageDefaultBg07@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/Contents.json new file mode 100644 index 00000000..3926d1ea --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "imgCardBg01.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "imgCardBg01@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "imgCardBg01@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01.png new file mode 100644 index 00000000..30dc3ed4 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01@2x.png new file mode 100644 index 00000000..9ddc6464 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01@3x.png new file mode 100644 index 00000000..74da59a4 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg01.imageset/imgCardBg01@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/Contents.json new file mode 100644 index 00000000..f0e762fa --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "imgCardBg02.png", + "scale" : "1x" + }, + { + "filename" : "imgCardBg02@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "imgCardBg02@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02.png new file mode 100644 index 00000000..4e22cb1b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02@2x.png new file mode 100644 index 00000000..21d33cb1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02@3x.png new file mode 100644 index 00000000..4223d4eb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg02.imageset/imgCardBg02@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/Contents.json new file mode 100644 index 00000000..ff1b7c29 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "imgCardBg03.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "imgCardBg03@2x.png" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "imgCardBg03@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03.png new file mode 100644 index 00000000..abc9f05b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03@2x.png new file mode 100644 index 00000000..c6c6c488 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03@3x.png new file mode 100644 index 00000000..3e45f225 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg03.imageset/imgCardBg03@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/Contents.json new file mode 100644 index 00000000..9b60a0df --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "imgCardBg04.png" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "imgCardBg04@2x.png" + }, + { + "idiom" : "universal", + "filename" : "imgCardBg04@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04.png new file mode 100644 index 00000000..23519197 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04@2x.png new file mode 100644 index 00000000..7cd6564f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04@3x.png new file mode 100644 index 00000000..07709b48 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg04.imageset/imgCardBg04@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/Contents.json new file mode 100644 index 00000000..b44f8e55 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "imgCardBg05.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "imgCardBg05@2x.png", + "scale" : "2x" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "imgCardBg05@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05.png new file mode 100644 index 00000000..c71bfc8f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05@2x.png new file mode 100644 index 00000000..51b32ca1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05@3x.png new file mode 100644 index 00000000..6eaf502d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg05.imageset/imgCardBg05@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/Contents.json new file mode 100644 index 00000000..6d72ad76 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "imgCardBg06.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x", + "filename" : "imgCardBg06@2x.png" + }, + { + "scale" : "3x", + "filename" : "imgCardBg06@3x.png", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06.png new file mode 100644 index 00000000..43b8d8f6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06@2x.png new file mode 100644 index 00000000..c77da0d2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06@3x.png new file mode 100644 index 00000000..8d65e3ba Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg06.imageset/imgCardBg06@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/Contents.json new file mode 100644 index 00000000..95e22c93 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "imgCardBg07.png" + }, + { + "filename" : "imgCardBg07@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "imgCardBg07@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07.png new file mode 100644 index 00000000..0c8c36bb Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07@2x.png new file mode 100644 index 00000000..71366175 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07@3x.png new file mode 100644 index 00000000..1f2f025f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgCardBg07.imageset/imgCardBg07@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/Contents.json new file mode 100644 index 00000000..bcce042e --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "imgChae.png", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "imgChae@2x.png", + "scale" : "2x" + }, + { + "filename" : "imgChae@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae.png new file mode 100644 index 00000000..754e8f8c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae@2x.png new file mode 100644 index 00000000..c8c7a7dd Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae@3x.png new file mode 100644 index 00000000..0cf70cb4 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgChae.imageset/imgChae@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/Contents.json new file mode 100644 index 00000000..c5506b77 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "imgFirstcard.png" + }, + { + "filename" : "imgFirstcard@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "imgFirstcard@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard.png new file mode 100644 index 00000000..01c6c062 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@2x.png new file mode 100644 index 00000000..5ea14846 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@3x.png new file mode 100644 index 00000000..a33af812 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgFirstcard.imageset/imgFirstcard@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/Contents.json new file mode 100644 index 00000000..43e88983 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "imgHyun.png", + "idiom" : "universal" + }, + { + "filename" : "imgHyun@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "imgHyun@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun.png new file mode 100644 index 00000000..53814879 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun@2x.png new file mode 100644 index 00000000..e12e3751 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun@3x.png new file mode 100644 index 00000000..d0fc86cc Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgHyun.imageset/imgHyun@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/Contents.json new file mode 100644 index 00000000..ce2a3a4c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "imgMin.png", + "idiom" : "universal" + }, + { + "filename" : "imgMin@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "imgMin@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin.png new file mode 100644 index 00000000..c4e16e52 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin@2x.png new file mode 100644 index 00000000..63474a4c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin@3x.png new file mode 100644 index 00000000..eba54400 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgMin.imageset/imgMin@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/Contents.json new file mode 100644 index 00000000..b8b73203 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "imgYe.png" + }, + { + "idiom" : "universal", + "filename" : "imgYe@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "imgYe@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe.png new file mode 100644 index 00000000..4d5fe2fe Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe@2x.png new file mode 100644 index 00000000..8b7ec1da Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe@3x.png new file mode 100644 index 00000000..f3bab8c6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYe.imageset/imgYe@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/Contents.json new file mode 100644 index 00000000..a0a66ce4 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "imgYi.png" + }, + { + "filename" : "imgYi@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "imgYi@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi.png new file mode 100644 index 00000000..13f29b84 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi@2x.png new file mode 100644 index 00000000..e3867d2e Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi@3x.png new file mode 100644 index 00000000..db67dffa Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYi.imageset/imgYi@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/Contents.json new file mode 100644 index 00000000..edda54dc --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "imgYun.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "imgYun@2x.png" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "imgYun@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun.png new file mode 100644 index 00000000..cf41bf61 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun@2x.png new file mode 100644 index 00000000..06675476 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun@3x.png new file mode 100644 index 00000000..fb71e99b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/imgYun.imageset/imgYun@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/Contents.json new file mode 100644 index 00000000..cff873cd --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "filename" : "logoNadaTxt2.png", + "idiom" : "universal" + }, + { + "scale" : "2x", + "idiom" : "universal", + "filename" : "logoNadaTxt2@2x.png" + }, + { + "idiom" : "universal", + "filename" : "logoNadaTxt2@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2.png new file mode 100644 index 00000000..6a6642da Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2@2x.png new file mode 100644 index 00000000..3d5d2efd Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2@3x.png new file mode 100644 index 00000000..7307ba0b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/logoNadaTxt2.imageset/logoNadaTxt2@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/Contents.json new file mode 100644 index 00000000..407ea520 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "onboarding01.png" + }, + { + "idiom" : "universal", + "filename" : "onboarding01@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "onboarding01@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01.png new file mode 100644 index 00000000..9add7916 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01@2x.png new file mode 100644 index 00000000..98a94dfa Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01@3x.png new file mode 100644 index 00000000..ecc08874 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding01.imageset/onboarding01@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/Contents.json new file mode 100644 index 00000000..c7a1cc2c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "onboarding02.png", + "scale" : "1x" + }, + { + "filename" : "onboarding02@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "scale" : "3x", + "filename" : "onboarding02@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02.png new file mode 100644 index 00000000..c3f8c9d6 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02@2x.png new file mode 100644 index 00000000..815d7b61 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02@3x.png new file mode 100644 index 00000000..4f285350 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding02.imageset/onboarding02@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/Contents.json new file mode 100644 index 00000000..5d8a7f48 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "onboarding03.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "onboarding03@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "onboarding03@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03.png new file mode 100644 index 00000000..dcca195b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03@2x.png new file mode 100644 index 00000000..8631ab4d Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03@3x.png new file mode 100644 index 00000000..49a539fd Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding03.imageset/onboarding03@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/Contents.json new file mode 100644 index 00000000..b1cd728d --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "onboarding04.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "filename" : "onboarding04@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "onboarding04@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04.png new file mode 100644 index 00000000..a467e59c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04@2x.png new file mode 100644 index 00000000..11d4754c Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04@3x.png new file mode 100644 index 00000000..21b95657 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/onboarding04.imageset/onboarding04@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/Contents.json new file mode 100644 index 00000000..ad593579 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/Contents.json @@ -0,0 +1,56 @@ +{ + "images" : [ + { + "filename" : "personAddAlt1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "idAddIcon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "personAddAlt1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "idAddIcon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "personAddAlt1@3x.png", + "idiom" : "universal", + "scale" : "3x" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "filename" : "idAddIcon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon.png new file mode 100644 index 00000000..d5401cdc Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon@2x.png new file mode 100644 index 00000000..42e0bd85 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon@3x.png new file mode 100644 index 00000000..6c134a42 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/idAddIcon@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1.png new file mode 100644 index 00000000..adb4c092 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1@2x.png new file mode 100644 index 00000000..79fdbeec Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1@3x.png new file mode 100644 index 00000000..d9822483 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/personAddAlt1.imageset/personAddAlt1@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/Contents.json new file mode 100644 index 00000000..a4d1efdc --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "qrCodeImg21.png", + "scale" : "1x", + "idiom" : "universal" + }, + { + "filename" : "qrCodeImg21@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "filename" : "qrCodeImg21@3x.png", + "scale" : "3x", + "idiom" : "universal" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21.png new file mode 100644 index 00000000..6a6a9518 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21@2x.png new file mode 100644 index 00000000..472fc940 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21@3x.png new file mode 100644 index 00000000..c26016b1 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/qrCodeImg21.imageset/qrCodeImg21@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/Contents.json new file mode 100644 index 00000000..3a32abe5 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "scale" : "1x", + "idiom" : "universal", + "filename" : "invalidName.png" + }, + { + "filename" : "invalidName@2x.png", + "scale" : "2x", + "idiom" : "universal" + }, + { + "idiom" : "universal", + "filename" : "invalidName@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName.png new file mode 100644 index 00000000..25693885 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@2x.png new file mode 100644 index 00000000..eedd863b Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@3x.png new file mode 100644 index 00000000..742e3a92 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/secondhandIcon.imageset/invalidName@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/Contents.json new file mode 100644 index 00000000..55fd977f --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "subtract.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "subtract@2x.png", + "scale" : "2x" + }, + { + "scale" : "3x", + "idiom" : "universal", + "filename" : "subtract@3x.png" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract.png new file mode 100644 index 00000000..9c356568 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract@2x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract@2x.png new file mode 100644 index 00000000..ae06e8cf Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract@2x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract@3x.png b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract@3x.png new file mode 100644 index 00000000..4d6a654f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Assets/Assets.xcassets/subtract.imageset/subtract@3x.png differ diff --git a/NADA-iOS-forRelease/Resouces/Assets.xcassets/AccentColor.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/Contents.json similarity index 51% rename from NADA-iOS-forRelease/Resouces/Assets.xcassets/AccentColor.colorset/Contents.json rename to NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/Contents.json index eb878970..73c00596 100644 --- a/NADA-iOS-forRelease/Resouces/Assets.xcassets/AccentColor.colorset/Contents.json +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/Contents.json @@ -1,9 +1,4 @@ { - "colors" : [ - { - "idiom" : "universal" - } - ], "info" : { "author" : "xcode", "version" : 1 diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/background.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/background.colorset/Contents.json new file mode 100644 index 00000000..4c17d79f --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/background.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "255", + "green" : "255", + "red" : "255" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x16", + "green" : "0x14", + "red" : "0x13" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/button.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/button.colorset/Contents.json new file mode 100644 index 00000000..635d23a0 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/button.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "239", + "green" : "236", + "red" : "233" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "61", + "green" : "56", + "red" : "53" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/buttonText.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/buttonText.colorset/Contents.json new file mode 100644 index 00000000..2891c230 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/buttonText.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "143", + "green" : "136", + "red" : "131" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/error.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/error.colorset/Contents.json new file mode 100644 index 00000000..3c4e9e0a --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/error.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "53", + "green" : "66", + "red" : "243" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyGreen.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyGreen.colorset/Contents.json new file mode 100644 index 00000000..5468e8a2 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyGreen.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "166", + "green" : "240", + "red" : "110" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyOrange.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyOrange.colorset/Contents.json new file mode 100644 index 00000000..00456d87 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyOrange.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "43", + "green" : "141", + "red" : "248" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyPurple.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyPurple.colorset/Contents.json new file mode 100644 index 00000000..947723cf --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyPurple.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "249", + "green" : "111", + "red" : "95" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyRed.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyRed.colorset/Contents.json new file mode 100644 index 00000000..82df0a28 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyRed.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "115", + "green" : "115", + "red" : "239" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyYellow.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyYellow.colorset/Contents.json new file mode 100644 index 00000000..56dbad0f --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/harmonyYellow.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0", + "green" : "209", + "red" : "253" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/nadaMain.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/nadaMain.colorset/Contents.json new file mode 100644 index 00000000..6a0255f1 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/nadaMain.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "102", + "green" : "112", + "red" : "246" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/primary.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/primary.colorset/Contents.json new file mode 100644 index 00000000..5991659b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/primary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "22", + "green" : "20", + "red" : "19" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/quaternary.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/quaternary.colorset/Contents.json new file mode 100644 index 00000000..a290db51 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/quaternary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "179", + "green" : "172", + "red" : "168" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "118", + "green" : "108", + "red" : "102" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/secondary.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/secondary.colorset/Contents.json new file mode 100644 index 00000000..0dc1dac8 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/secondary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "49", + "green" : "45", + "red" : "43" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "245", + "green" : "243", + "red" : "241" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/tertiary.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/tertiary.colorset/Contents.json new file mode 100644 index 00000000..0c66d4b6 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/tertiary.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "118", + "green" : "108", + "red" : "102" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xB3", + "green" : "0xAC", + "red" : "0xA8" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/textBox.colorset/Contents.json b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/textBox.colorset/Contents.json new file mode 100644 index 00000000..a52a200b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Assets/Colors.xcassets/textBox.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "245", + "green" : "243", + "red" : "241" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "49", + "green" : "45", + "red" : "43" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NADA-iOS-forRelease/Resouces/Constants/Const.swift b/NADA-iOS-forRelease/Resouces/Constants/Const.swift index c37b3728..1b721fb6 100644 --- a/NADA-iOS-forRelease/Resouces/Constants/Const.swift +++ b/NADA-iOS-forRelease/Resouces/Constants/Const.swift @@ -8,5 +8,5 @@ import Foundation struct Const { - + static let headerToken: String = UserDefaults.standard.string(forKey: Const.UserDefaultsKey.accessToken) ?? "" } diff --git a/NADA-iOS-forRelease/Resouces/Constants/Header.swift b/NADA-iOS-forRelease/Resouces/Constants/Header.swift new file mode 100644 index 00000000..8ff870d3 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Constants/Header.swift @@ -0,0 +1,18 @@ +// +// Header.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/17. +// + +import Foundation + +extension Const { + + struct Header { + static var bearerHeader = ["Authorization": "Bearer " + headerToken] + + static var basicHeader = ["Content-Type": "application/json", + "Authorization": "Bearer " + headerToken] + } +} diff --git a/NADA-iOS-forRelease/Resouces/Constants/Notification.swift b/NADA-iOS-forRelease/Resouces/Constants/Notification.swift new file mode 100644 index 00000000..dfba9c83 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Constants/Notification.swift @@ -0,0 +1,24 @@ +// +// Notification.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/10/03. +// + +import Foundation + +extension Notification.Name { + static let completeFrontCardBirth = Notification.Name("completeFrontCardBirth") + static let completeFrontCardMBTI = Notification.Name("completeFrontCardMBTI") + static let presentingImagePicker = Notification.Name("presentingImagePicker") + static let sendNewImage = Notification.Name("sendNewImage") + static let touchRequiredView = Notification.Name("touchRequiredView") + static let dismissRequiredBottomSheet = Notification.Name("dismissRequiredBottomSheet") + static let cancelImagePicker = Notification.Name("cancelImagePicker") + static let presentCardShare = Notification.Name("presentCardShare") + static let passDataToGroup = Notification.Name("passDataToGroup") + static let passDataToDetail = Notification.Name("passDataToDetail") + static let reloadGroupViewController = Notification.Name("reloadGroupViewController") + static let creationReloadMainCardSwiper = Notification.Name("creationReloadMainCardSwiper") + static let dismissQRCodeCardResult = Notification.Name("dismissQRCodeCardResult") +} diff --git a/NADA-iOS-forRelease/Resouces/Constants/Status.swift b/NADA-iOS-forRelease/Resouces/Constants/Status.swift new file mode 100644 index 00000000..f67c3d87 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Constants/Status.swift @@ -0,0 +1,14 @@ +// +// Status.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/26. +// + +import Foundation +enum Status { + case group + case detail + case add + case addWithQR +} diff --git a/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift b/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift index 3577966c..653d010e 100644 --- a/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift +++ b/NADA-iOS-forRelease/Resouces/Constants/Storyboard.swift @@ -11,7 +11,22 @@ extension Const { struct Storyboard { struct Name { - static let Main = "Main" + static let cardCreation = "CardCreation" + static let login = "Login" + static let cardList = "CardList" + static let front = "Front" + static let group = "Group" + static let groupEdit = "GroupEdit" + static let qrScan = "QRScan" + static let cardDetail = "CardDetail" + static let cardHarmony = "CardHarmony" + static let tabBar = "TabBar" + static let cardCreationPreview = "CardCreationPreview" + static let more = "More" + static let splash = "Splash" + static let onboarding = "Onboarding" + static let openSource = "OpenSource" + static let teamNADA = "TeamNADA" } } diff --git a/NADA-iOS-forRelease/Resouces/Constants/URL.swift b/NADA-iOS-forRelease/Resouces/Constants/URL.swift new file mode 100644 index 00000000..71376cbb --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Constants/URL.swift @@ -0,0 +1,24 @@ +// +// GeneralAPI.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation + +extension Const { + struct URL { + static let baseURL = "https://nada-server.o-r.kr" + static let policyURL = "https://nadaitzme.notion.site/NADA-8385054bc2e44762a62f590534b2a24d" + static let serviceURL = "https://nadaitzme.notion.site/NADA-58544bc9f0a1493c94f223cab3a440d0" + static let moyaURL = "https://github.com/Moya/Moya" + static let skeletonURL = "https://github.com/Juanpe/SkeletonView" + static let swiftLintURL = "https://github.com/realm/SwiftLint" + static let cardSwiperURL = "https://github.com/JoniVR/VerticalCardSwiper" + static let kakaoURL = "https://developers.kakao.com/sdk/reference/ios/release/KakaoSDKCommon/index.html" + static let keyboardURL = "https://github.com/hackiftekhar/IQKeyboardManager" + static let kingfisherURL = "https://github.com/onevcat/Kingfisher" + static let indicatorURL = "https://github.com/ninjaprox/NVActivityIndicatorView" + } +} diff --git a/NADA-iOS-forRelease/Resouces/Constants/UserDefaults.swift b/NADA-iOS-forRelease/Resouces/Constants/UserDefaults.swift new file mode 100644 index 00000000..d83b9442 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Constants/UserDefaults.swift @@ -0,0 +1,22 @@ +// +// UserDefaults.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/07. +// + +import Foundation + +extension Const { + struct UserDefaultsKey { + static let darkModeState = "darkModeState" + static let accessToken = "accessToken" + static let refreshToken = "refreshToken" + static let userID = "userID" + static let isFirstCard = "isFirstCard" + static let isOnboarding = "isOnboarding" + static let firstCardID = "firstCardID" + static let isAppleLogin = "isAppleLogin" + static let isKakaoLogin = "isKakaoLogin" + } +} diff --git a/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift b/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift index efb06d64..80ce777a 100644 --- a/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift +++ b/NADA-iOS-forRelease/Resouces/Constants/ViewController.swift @@ -11,8 +11,29 @@ extension Const { struct ViewController { struct Identifier { - static let MainViewController = "MainViewController" + static let cardCreationViewController = "CardCreationViewController" + static let loginViewController = "LoginViewController" + static let cardListViewController = "CardListViewController" + static let frontViewController = "FrontViewController" + static let groupViewController = "GroupViewController" + static let groupEditViewController = "GroupEditViewController" + static let qrScanViewController = "QRScanViewController" + static let cardDetailViewController = "CardDetailViewController" + static let cardHarmonyViewController = "CardHarmonyViewController" + static let tabBarViewController = "TabBarViewController" + static let commonBottomSheetViewController = "CommonBottomSheetViewController" + static let cardCreationPreviewViewController = "CardCreationPreviewViewController" + static let addGroupBottomSheetViewController = "AddGroupBottomSheetViewController" + static let addWithIdBottomSheetViewController = "AddWithIdBottomSheetViewController" + static let cardResultBottomSheetViewController = "CardResultBottomSheetViewController" + static let selectGroupBottomSheetViewController = "SelectGroupBottomSheetViewController" + static let moreViewController = "MoreViewController" + static let splashViewController = "SplashViewController" + static let onboardingViewController = "OnboardingViewController" + static let openSourceViewController = "OpenSourceViewController" + static let teamNADAViewController = "TeamNADAViewController" + static let groupNameEditBottomSheetViewController = "GroupNameEditBottomSheetViewController" + static let firstCardAlertBottomSheetViewController = "FirstCardAlertBottomSheetViewController" } - } } diff --git a/NADA-iOS-forRelease/Resouces/Constants/Xib.swift b/NADA-iOS-forRelease/Resouces/Constants/Xib.swift new file mode 100644 index 00000000..b8c364f7 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Constants/Xib.swift @@ -0,0 +1,31 @@ +// +// Xib.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/10/02. +// + +import Foundation + +extension Const { + struct Xib { + static let requiredCollectionViewCell = "RequiredFlavorCollectionViewCell" + static let frontCardCreationCollectionViewCell = "FrontCardCreationCollectionViewCell" + static let backCardCreationCollectionViewCell = "BackCardCreationCollectionViewCell" + static let cardListTableViewCell = "CardListTableViewCell" + static let frontCardCell = "FrontCardCell" + static let backCardCell = "BackCardCell" + static let backgroundCollectionViewCell = "BackgroundCollectionViewCell" + static let groupCollectionViewCell = "GroupCollectionViewCell" + static let cardInGroupCollectionViewCell = "CardInGroupCollectionViewCell" + static let groupEditTableViewCell = "GroupEditTableViewCell" + static let moreListTableViewCell = "MoreListTableViewCell" + static let cardView = "CardView" + static let onboardingCollectionViewCell = "OnboardingCollectionViewCell" + static let mainCardCell = "MainCardCell" + static let openSourceTableViewCell = "OpenSourceTableViewCell" + static let emptyCardCell = "EmptyCardCell" + static let EmptyGroupEditTableViewCell = "EmptyGroupEditTableViewCell" + static let EmptyCardListTableViewCell = "EmptyCardListTableViewCell" + } +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/CGPoint+Distance.swift b/NADA-iOS-forRelease/Resouces/Extensions/CGPoint+Distance.swift new file mode 100644 index 00000000..891a5977 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/CGPoint+Distance.swift @@ -0,0 +1,15 @@ +// +// CGPoint+Distance.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/09. +// + +import Foundation +import UIKit + +extension CGPoint { + func distance(to point: CGPoint) -> CGFloat { + return hypot(self.x - point.x, self.y - point.y) + } +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/String+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/String+Extension.swift new file mode 100644 index 00000000..979a4465 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/String+Extension.swift @@ -0,0 +1,14 @@ +// +// UIString+Extension.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/26. +// + +import Foundation +extension String { + func deletingPrefix(_ prefix: String) -> String { + guard self.hasPrefix(prefix) else { return self } + return String(self.dropFirst(prefix.count)) + } +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/TempExtensions.swift b/NADA-iOS-forRelease/Resouces/Extensions/TempExtensions.swift deleted file mode 100644 index 223b91b4..00000000 --- a/NADA-iOS-forRelease/Resouces/Extensions/TempExtensions.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempExtensions.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UIAlertController+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UIAlertController+Extension.swift new file mode 100644 index 00000000..e57db7d7 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/UIAlertController+Extension.swift @@ -0,0 +1,50 @@ +// +// UIAlertController+Extension.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/01. +// + +import Foundation +import UIKit + +extension UIAlertController { + // Set title font and title color + func setTitle(font: UIFont?, color: UIColor?) { + guard let title = self.title else { return } + let attributeString = NSMutableAttributedString(string: title) + + if let titleFont = font { + attributeString.addAttributes([NSAttributedString.Key.font: titleFont], + range: NSRange(location: 0, length: title.count)) + } + if let titleColor = color { + attributeString.addAttributes([NSAttributedString.Key.foregroundColor: titleColor], + range: NSRange(location: 0, length: title.count)) + } + self.setValue(attributeString, forKey: "attributedTitle") + + } + + // Set message font and message color + func setMessage(font: UIFont?, color: UIColor?) { + guard let message = self.message else { return } + let attributeString = NSMutableAttributedString(string: message) + if let messageFont = font { + attributeString.addAttributes([NSAttributedString.Key.font: messageFont], + range: NSRange(location: 0, length: message.count)) + } + + if let messageColorColor = color { + attributeString.addAttributes([NSAttributedString.Key.foregroundColor: messageColorColor], + range: NSRange(location: 0, length: message.count)) + + } + self.setValue(attributeString, forKey: "attributedMessage") + } + + // Set tint color of UIAlertController + func setTint(color: UIColor) { + self.view.tintColor = color + } +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift new file mode 100644 index 00000000..68a79e02 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/UIColor+Extension.swift @@ -0,0 +1,171 @@ +// +// UIColor+Extension.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/07. +// + +import Foundation +import UIKit + +extension UIColor { + + @nonobjc class var mainColorNadaMain: UIColor { + return UIColor(red: 246.0 / 255.0, green: 112.0 / 255.0, blue: 102.0 / 255.0, alpha: 1.0) + } + + @nonobjc class var mainColorButtonText: UIColor { + return UIColor(red: 131.0 / 255.0, green: 136.0 / 255.0, blue: 143.0 / 255.0, alpha: 1.0) + } + + @nonobjc class var primary: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 19.0 / 255.0, green: 20.0 / 255.0, blue: 22.0 / 255.0, alpha: 1.0) + } else { + return UIColor(white: 1.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 19.0 / 255.0, green: 20.0 / 255.0, blue: 22.0 / 255.0, alpha: 1.0) + } + } + + @nonobjc class var textBox: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 241.0 / 255.0, green: 243.0 / 255.0, blue: 245.0 / 255.0, alpha: 1.0) + } else { + return UIColor(red: 43.0 / 255.0, green: 45.0 / 255.0, blue: 49.0 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 241.0 / 255.0, green: 243.0 / 255.0, blue: 245.0 / 255.0, alpha: 1.0) + } + } + + @nonobjc class var quaternary: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 168.0 / 255.0, green: 172.0 / 255.0, blue: 179.0 / 255.0, alpha: 1.0) + } else { + return UIColor(red: 102.0 / 255.0, green: 108.0 / 255.0, blue: 118.0 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 168.0 / 255.0, green: 172.0 / 255.0, blue: 179.0 / 255.0, alpha: 1.0) + } + } + + @nonobjc class var tertiary: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 102.0 / 255.0, green: 108.0 / 255.0, blue: 118.0 / 255.0, alpha: 1.0) + } else { + return UIColor(red: 168.0 / 255.0, green: 172.0 / 255.0, blue: 179.0 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 102.0 / 255.0, green: 108.0 / 255.0, blue: 118.0 / 255.0, alpha: 1.0) + } + } + + @nonobjc class var secondary: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 43.0 / 255.0, green: 45.0 / 255.0, blue: 49.0 / 255.0, alpha: 1.0) + } else { + return UIColor(red: 241.0 / 255.0, green: 243.0 / 255.0, blue: 245.0 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 43.0 / 255.0, green: 45.0 / 255.0, blue: 49.0 / 255.0, alpha: 1.0) + } + } + + @nonobjc class var button: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(red: 233.0 / 255.0, green: 236.0 / 255.0, blue: 239.0 / 255.0, alpha: 1.0) + } else { + return UIColor(red: 53.0 / 255.0, green: 56.0 / 255.0, blue: 61.0 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(red: 233.0 / 255.0, green: 236.0 / 255.0, blue: 239.0 / 255.0, alpha: 1.0) + } + } + + @nonobjc class var stateColorError: UIColor { + return UIColor(red: 243.0 / 255.0, green: 66.0 / 255.0, blue: 53.0 / 255.0, alpha: 1.0) + } + + @nonobjc class var background: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(white: 1.0, alpha: 1.0) + } else { + return UIColor(red: 19.0 / 255.0, green: 20.0 / 255.0, blue: 22.0 / 255.0, alpha: 1.0) + } + } + } else { + return UIColor(white: 1.0, alpha: 1.0) + } + } + + @nonobjc class var bottomDimmedBackground: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(white: 0.0, alpha: 0.4) + } else { + return UIColor(white: 0.0, alpha: 0.8) + } + } + } else { + return UIColor(white: 0.0, alpha: 0.4) + } + } + + @nonobjc class var loadingBackground: UIColor { + if #available(iOS 13, *) { + return UIColor { (traitCollection: UITraitCollection) -> UIColor in + if traitCollection.userInterfaceStyle == .light { + return UIColor(white: 0, alpha: 0.2) + } else { + return UIColor(white: 0, alpha: 0.8) + } + } + } else { + return UIColor(white: 0, alpha: 0.2) + } + } + + @nonobjc class var harmonyRed: UIColor { + return UIColor(red: 239.0 / 255.0, green: 115.0 / 255.0, blue: 115.0 / 255.0, alpha: 1.0) + } + + @nonobjc class var harmonyPurple: UIColor { + return UIColor(red: 95.0 / 255.0, green: 111.0 / 255.0, blue: 249.0 / 255.0, alpha: 1.0) + } + + @nonobjc class var harmonyGreen: UIColor { + return UIColor(red: 110.0 / 255.0, green: 240.0 / 255.0, blue: 166.0 / 255.0, alpha: 1.0) + } + + @nonobjc class var harmonyOrange: UIColor { + return UIColor(red: 248.0 / 255.0, green: 141.0 / 255.0, blue: 43.0 / 255.0, alpha: 1.0) + } + + @nonobjc class var harmonyYellow: UIColor { + return UIColor(red: 253.0 / 255.0, green: 209.0 / 255.0, blue: 0.0, alpha: 1.0) + } + +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UIFont+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UIFont+Extension.swift new file mode 100644 index 00000000..04bc71f9 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/UIFont+Extension.swift @@ -0,0 +1,65 @@ +// +// UIFont+Extension.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/04. +// + +import Foundation +import UIKit + +extension UIFont { + + @nonobjc class var title01: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Bold", size: 20.0)! + } + + @nonobjc class var textRegular01: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Regular", size: 20.0)! + } + + @nonobjc class var title02: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Bold", size: 18.0)! + } + + @nonobjc class var textRegular02: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Regular", size: 18.0)! + } + + @nonobjc class var button01: UIFont { + return UIFont(name: "NotoSansCJKKR-Bold", size: 16.0)! + } + + @nonobjc class var textBold01: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Bold", size: 16.0)! + } + + @nonobjc class var textRegular03: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Regular", size: 16.0)! + } + + @nonobjc class var textBold02: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Bold", size: 14.0)! + } + + @nonobjc class var button02: UIFont { + return UIFont(name: "NotoSansCJKKR-Medium", size: 14.0)! + } + + @nonobjc class var button03: UIFont { + return UIFont(name: "NotoSansCJKKR-Regular", size: 14.0)! + } + + @nonobjc class var textRegular04: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Regular", size: 14.0)! + } + + @nonobjc class var textBold03: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Bold", size: 12.0)! + } + + @nonobjc class var textRegular05: UIFont { + return UIFont(name: "SpoqaHanSansNeo-Regular", size: 12.0)! + } + +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UIImageView+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UIImageView+Extension.swift new file mode 100644 index 00000000..2255d52c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/UIImageView+Extension.swift @@ -0,0 +1,36 @@ +// +// UIImageView+Extension.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/12/17. +// + +import Foundation +import Kingfisher +import UIKit + +extension UIImageView { + @discardableResult + func updateServerImage(_ imagePath: String) -> Bool { + guard let url = URL(string: imagePath) else { + self.image = UIImage() + return false + } + self.kf.indicatorType = .activity + self.kf.setImage( + with: url, + options: [ + .scaleFactor(UIScreen.main.scale), + .transition(.fade(0.25)), + .cacheOriginalImage + ]) { result in + switch result { + case .success: + return + case .failure(let error): + print("kingfisher work failed: \(error.localizedDescription)") + } + } + return true + } +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UITextField+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UITextField+Extension.swift new file mode 100644 index 00000000..86cf8b08 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/UITextField+Extension.swift @@ -0,0 +1,25 @@ +// +// UITextField+Extension.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/24. +// + +import Foundation +import UIKit + +extension UITextField { + // 왼쪽에 여백 주기 + func setLeftPaddingPoints(_ amount: CGFloat) { + let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: amount, height: self.frame.size.height)) + self.leftView = paddingView + self.leftViewMode = .always + } + + // 오른쪽에 여백 주기 + func setRightPaddingPoints(_ amount: CGFloat) { + let paddingView = UIView(frame: CGRect(x: 0, y: 0, width: amount, height: self.frame.size.height)) + self.rightView = paddingView + self.rightViewMode = .always + } +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UIView+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UIView+Extension.swift new file mode 100644 index 00000000..019fff8a --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/UIView+Extension.swift @@ -0,0 +1,131 @@ +// +// UIView+Extension.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/09/21. +// + +import Foundation +import UIKit + +@IBDesignable +extension UIView { + + @IBInspectable + var cornerRadius: CGFloat { + get { + return layer.cornerRadius + } + set { + layer.cornerRadius = newValue + } + } + + @IBInspectable + var borderWidth: CGFloat { + get { + return layer.borderWidth + } + set { + layer.borderWidth = newValue + } + } + + @IBInspectable + var borderColor: UIColor? { + get { + if let color = layer.borderColor { + return UIColor(cgColor: color) + } + return nil + } + set { + if let color = newValue { + layer.borderColor = color.cgColor + } else { + layer.borderColor = nil + } + } + } +} + +extension UIView { + func pinToSafeArea(top: CGFloat? = 0, left: CGFloat? = 0, bottom: CGFloat? = 0, right: CGFloat? = 0) { + guard let superview = self.superview else { return } + + prepareForAutoLayout() + + var guide: UILayoutGuide + if #available(iOS 11.0, *) { + guide = superview.safeAreaLayoutGuide + } else { + guide = superview.layoutMarginsGuide + } + + if let top = top { + self.topAnchor.constraint(equalTo: guide.topAnchor, constant: top).isActive = true + } + + if let bottom = bottom { + self.bottomAnchor.constraint(equalTo: guide.bottomAnchor, constant: bottom).isActive = true + } + + if let left = left { + self.leadingAnchor.constraint(equalTo: guide.leadingAnchor, constant: left).isActive = true + } + + if let right = right { + self.trailingAnchor.constraint(equalTo: guide.trailingAnchor, constant: right).isActive = true + } + } + + func pinToSuperView(top: CGFloat? = 0, left: CGFloat? = 0, bottom: CGFloat? = 0, right: CGFloat? = 0) { + guard let superview = self.superview else { return } + + prepareForAutoLayout() + + if let top = top { + self.topAnchor.constraint(equalTo: superview.topAnchor, constant: top).isActive = true + } + + if let bottom = bottom { + self.bottomAnchor.constraint(equalTo: superview.bottomAnchor, constant: bottom).isActive = true + } + + if let left = left { + self.leadingAnchor.constraint(equalTo: superview.leadingAnchor, constant: left).isActive = true + } + + if let right = right { + self.trailingAnchor.constraint(equalTo: superview.trailingAnchor, constant: right).isActive = true + } + } + + func centerInSuperView() { + guard let superview = self.superview else { return } + + prepareForAutoLayout() + + self.centerXAnchor.constraint(equalTo: superview.centerXAnchor).isActive = true + self.centerYAnchor.constraint(equalTo: superview.centerYAnchor).isActive = true + } + + func constraint(width: CGFloat) { + prepareForAutoLayout() + self.widthAnchor.constraint(equalToConstant: width).isActive = true + } + + func constraint(height: CGFloat) { + prepareForAutoLayout() + self.heightAnchor.constraint(equalToConstant: height).isActive = true + } + + func makeWidthEqualHeight() { + prepareForAutoLayout() + self.widthAnchor.constraint(equalTo: self.heightAnchor).isActive = true + } + + func prepareForAutoLayout() { + translatesAutoresizingMaskIntoConstraints = false + } +} diff --git a/NADA-iOS-forRelease/Resouces/Extensions/UIViewController+Extension.swift b/NADA-iOS-forRelease/Resouces/Extensions/UIViewController+Extension.swift new file mode 100644 index 00000000..c0412039 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Extensions/UIViewController+Extension.swift @@ -0,0 +1,118 @@ +// +// UIViewController+Extension.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/02. +// + +import Foundation +import UIKit + +extension UIViewController { + /// 취소+삭제 UIAlertController + func makeCancelDeleteAlert(title: String, + message: String, + cancelAction: ((UIAlertAction) -> Void)? = nil, + deleteAction: ((UIAlertAction) -> Void)?, + completion: (() -> Void)? = nil) { + let alertViewController = UIAlertController(title: title, + message: message, + preferredStyle: .alert) + + let cancelAction = UIAlertAction(title: "취소", style: .cancel, handler: cancelAction) + alertViewController.addAction(cancelAction) + + let deleteAction = UIAlertAction(title: "삭제", style: .destructive, handler: deleteAction) + alertViewController.addAction(deleteAction) + + self.present(alertViewController, animated: true, completion: completion) + } + + /// 확인+취소 UIAlertController + func makeOKCancelAlert(title: String, + message: String, + okAction: ((UIAlertAction) -> Void)?, + cancelAction: ((UIAlertAction) -> Void)? = nil, + completion: (() -> Void)? = nil) { + let alertViewController = UIAlertController(title: title, + message: message, + preferredStyle: .alert) + + let okAction = UIAlertAction(title: "확인", style: .default, handler: okAction) + alertViewController.addAction(okAction) + + let cancelAction = UIAlertAction(title: "취소", style: .cancel, handler: cancelAction) + alertViewController.addAction(cancelAction) + + self.present(alertViewController, animated: true, completion: completion) + } + + /// 확인 UIAlertController + func makeOKAlert(title: String, + message: String, + okAction: ((UIAlertAction) -> Void)? = nil, + completion: (() -> Void)? = nil) { + let alertViewController = UIAlertController(title: title, + message: message, + preferredStyle: .alert) + + let okAction = UIAlertAction(title: "확인", style: .default, handler: okAction) + alertViewController.addAction(okAction) + + self.present(alertViewController, animated: true, completion: completion) + } + + func showToast(message: String, + font: UIFont, + view: String) { + var toastLabel = UILabel() + + switch view { + case "QRScan": + toastLabel = UILabel(frame: CGRect(x: self.view.frame.size.width/2 - 85, + y: self.view.frame.size.height - 230, + width: 170, height: 35)) + case "copyID": + toastLabel = UILabel(frame: CGRect(x: self.view.frame.size.width/2 - 100, + y: self.view.frame.size.height/2, + width: 200, height: 35)) + case "saveImage": + toastLabel = UILabel(frame: CGRect(x: self.view.frame.size.width/2 - 85, + y: self.view.frame.size.height/2, + width: 170, height: 35)) + case "wrongCard": + toastLabel = UILabel(frame: CGRect(x: self.view.frame.size.width/2 - 120, + y: self.view.frame.size.height/2, + width: 240, height: 35)) + default: + toastLabel = UILabel(frame: CGRect(x: self.view.frame.size.width/2 - 85, + y: self.view.frame.size.height - 230, + width: 170, height: 35)) + } + + toastLabel.backgroundColor = UIColor.black.withAlphaComponent(0.6) + toastLabel.textColor = UIColor.white + toastLabel.font = font + toastLabel.textAlignment = .center + toastLabel.text = message + toastLabel.alpha = 0.9 + toastLabel.layer.cornerRadius = 10 + toastLabel.clipsToBounds = true + self.view.addSubview(toastLabel) + UIView.animate(withDuration: 3.0, delay: 0.1, + options: .curveEaseOut, animations: { toastLabel.alpha = 0.0 }, + completion: {_ in toastLabel.removeFromSuperview() }) + } + + // MARK: UIWindow의 rootViewController를 변경하여 화면전환 + func changeRootViewController(_ viewControllerToPresent: UIViewController) { + if let window = UIApplication.shared.windows.first { + window.rootViewController = viewControllerToPresent + UIView.transition(with: window, duration: 0.5, options: .transitionCrossDissolve, animations: nil) + } else { + viewControllerToPresent.modalPresentationStyle = .overFullScreen + self.present(viewControllerToPresent, animated: true, completion: nil) + } + } + +} diff --git a/Pods/SwiftLint/swiftlint b/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Bold.otf old mode 100755 new mode 100644 similarity index 50% rename from Pods/SwiftLint/swiftlint rename to NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Bold.otf index 6837f762..6a2664f4 Binary files a/Pods/SwiftLint/swiftlint and b/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Bold.otf differ diff --git a/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Medium.otf b/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Medium.otf new file mode 100644 index 00000000..095dbdb2 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Medium.otf differ diff --git a/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Regular.otf b/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Regular.otf new file mode 100644 index 00000000..2b6e1d45 Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Font/NotoSansCJKkr-Regular.otf differ diff --git a/NADA-iOS-forRelease/Resouces/Font/Spoqa Han Sans Neo Bold.otf b/NADA-iOS-forRelease/Resouces/Font/Spoqa Han Sans Neo Bold.otf new file mode 100644 index 00000000..418d2fbe Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Font/Spoqa Han Sans Neo Bold.otf differ diff --git a/NADA-iOS-forRelease/Resouces/Font/Spoqa Han Sans Neo Regular.otf b/NADA-iOS-forRelease/Resouces/Font/Spoqa Han Sans Neo Regular.otf new file mode 100644 index 00000000..6ce9c27f Binary files /dev/null and b/NADA-iOS-forRelease/Resouces/Font/Spoqa Han Sans Neo Regular.otf differ diff --git a/NADA-iOS-forRelease/Resouces/Fonts/TempFont.swift b/NADA-iOS-forRelease/Resouces/Fonts/TempFont.swift deleted file mode 100644 index 4c016878..00000000 --- a/NADA-iOS-forRelease/Resouces/Fonts/TempFont.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempFont.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Base.lproj/Main.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Base.lproj/Main.storyboard deleted file mode 100644 index 23892d5c..00000000 --- a/NADA-iOS-forRelease/Resouces/Storyboards/Base.lproj/Main.storyboard +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreation.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreation.storyboard new file mode 100644 index 00000000..9264a9b3 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreation.storyboard @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreationPreview.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreationPreview.storyboard new file mode 100644 index 00000000..8adca36a --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/CardCreation/CardCreationPreview.storyboard @@ -0,0 +1,123 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/CardDetail/CardDetail.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/CardDetail/CardDetail.storyboard new file mode 100644 index 00000000..514d9dca --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/CardDetail/CardDetail.storyboard @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/CardDetail/CardHarmony.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/CardDetail/CardHarmony.storyboard new file mode 100644 index 00000000..c794db40 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/CardDetail/CardHarmony.storyboard @@ -0,0 +1,122 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Group/Group.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Group/Group.storyboard new file mode 100644 index 00000000..f57a006b --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Group/Group.storyboard @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Group/GroupEdit.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Group/GroupEdit.storyboard new file mode 100644 index 00000000..cd2136d4 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Group/GroupEdit.storyboard @@ -0,0 +1,109 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Group/QRScan.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Group/QRScan.storyboard new file mode 100644 index 00000000..a7f54a7a --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Group/QRScan.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Login/Login.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Login/Login.storyboard new file mode 100644 index 00000000..ec44500d --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Login/Login.storyboard @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Main/CardList.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Main/CardList.storyboard new file mode 100644 index 00000000..1c3b335c --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Main/CardList.storyboard @@ -0,0 +1,88 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Main/Front.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Main/Front.storyboard new file mode 100644 index 00000000..e0db3e03 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Main/Front.storyboard @@ -0,0 +1,141 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/More/More.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/More/More.storyboard new file mode 100644 index 00000000..cd5781f3 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/More/More.storyboard @@ -0,0 +1,148 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/More/OpenSource.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/More/OpenSource.storyboard new file mode 100644 index 00000000..971ab6b4 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/More/OpenSource.storyboard @@ -0,0 +1,91 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/More/TeamNADA.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/More/TeamNADA.storyboard new file mode 100644 index 00000000..3134fcaf --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/More/TeamNADA.storyboard @@ -0,0 +1,105 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Onboarding/Onboarding.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Onboarding/Onboarding.storyboard new file mode 100644 index 00000000..d7b76b96 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Onboarding/Onboarding.storyboard @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Root.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Root.storyboard new file mode 100644 index 00000000..00c62d14 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Root.storyboard @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/Splash/Splash.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/Splash/Splash.storyboard new file mode 100644 index 00000000..fb8309a6 --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/Splash/Splash.storyboard @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Resouces/Storyboards/TabBar/TabBar.storyboard b/NADA-iOS-forRelease/Resouces/Storyboards/TabBar/TabBar.storyboard new file mode 100644 index 00000000..f238d7db --- /dev/null +++ b/NADA-iOS-forRelease/Resouces/Storyboards/TabBar/TabBar.storyboard @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/AppDelegate.swift b/NADA-iOS-forRelease/Sources/AppDelegate.swift new file mode 100644 index 00000000..249b5af9 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/AppDelegate.swift @@ -0,0 +1,87 @@ +// +// AppDelegate.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/08/08. +// + +import UIKit +import KakaoSDKCommon +import KakaoSDKAuth +import KakaoSDKUser +import AuthenticationServices + +@main +class AppDelegate: UIResponder, UIApplicationDelegate { + + var isLogin = false + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + + KakaoSDKCommon.initSDK(appKey: "5b8dd8cc878344bb7532eeca4365a4aa") + let acToken = UserDefaults.standard.string(forKey: Const.UserDefaultsKey.accessToken) + + if acToken != nil { + if UserDefaults.standard.bool(forKey: Const.UserDefaultsKey.isAppleLogin) { + // 애플 로그인으로 연동되어 있을 때, -> 애플 ID와의 연동상태 확인 로직 + let appleIDProvider = ASAuthorizationAppleIDProvider() + appleIDProvider.getCredentialState(forUserID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "") { (credentialState, error) in + switch credentialState { + case .authorized: + print("해당 ID는 연동되어있습니다.") + self.isLogin = true + case .revoked: + print("해당 ID는 연동되어있지않습니다.") + self.isLogin = false + case .notFound: + print("해당 ID를 찾을 수 없습니다.") + self.isLogin = false + default: + break + } + } + } else { + if AuthApi.hasToken() { // 유효한 토큰 존재 + UserApi.shared.accessTokenInfo { (_, error) in + if let error = error { + if let sdkError = error as? SdkError, sdkError.isInvalidTokenError() == true { + self.isLogin = false + } + } else { + // 토큰 유효성 체크 성공(필요 시 토큰 갱신됨) + self.isLogin = true + } + } + } else { + // 카카오 토큰 없음 -> 로그인 필요 + self.isLogin = false + } + } + } else { + self.isLogin = false // acToken 값이 nil일 때 -> 로그인 뷰로 + } + + // 앱 실행 중 애플 ID 강제로 연결 취소 시 + NotificationCenter.default.addObserver(forName: ASAuthorizationAppleIDProvider.credentialRevokedNotification, object: nil, queue: nil) { (Notification) in + print("Revoked Notification") + self.isLogin = false + } + + 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/NADA-iOS-forRelease/Sources/AppModel/CardList/CardListDataModel.swift b/NADA-iOS-forRelease/Sources/AppModel/CardList/CardListDataModel.swift new file mode 100644 index 00000000..068011fe --- /dev/null +++ b/NADA-iOS-forRelease/Sources/AppModel/CardList/CardListDataModel.swift @@ -0,0 +1,12 @@ +// +// CardListDataModel.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/09/27. +// + +import Foundation + +struct CardListDataModel { + var title: String +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift new file mode 100644 index 00000000..b419eb58 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.swift @@ -0,0 +1,169 @@ +// +// BackCardCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/11. +// + +import UIKit +import VerticalCardSwiper +import Kingfisher + +class BackCardCell: CardCell { + + // MARK: - Properties + + private var cardData: Card? + + // MARK: - @IBOutlet Properties + @IBOutlet weak var backgroundImageView: UIImageView! + @IBOutlet weak var tasteTitleLabel: UILabel! + @IBOutlet weak var mintImageView: UIImageView! + @IBOutlet weak var noMintImageView: UIImageView! + @IBOutlet weak var sojuImageView: UIImageView! + @IBOutlet weak var beerImageView: UIImageView! + @IBOutlet weak var pourEatImageView: UIImageView! + @IBOutlet weak var putSauceEatImageView: UIImageView! + @IBOutlet weak var sauceChickenImageView: UIImageView! + @IBOutlet weak var friedChickenImageView: UIImageView! + @IBOutlet weak var tmiTitleLabel: UILabel! + @IBOutlet weak var firstTmiLabel: UILabel! + @IBOutlet weak var secondTmiLabel: UILabel! + @IBOutlet weak var thirdTmiLabel: UILabel! + @IBOutlet weak var shareButton: UIButton! + + // MARK: - View Life Cycle + override func awakeFromNib() { + super.awakeFromNib() + setUI() + } + @IBAction func touchShareButton(_ sender: Any) { + NotificationCenter.default.post(name: Notification.Name.presentCardShare, object: cardData, userInfo: nil) + } + + // MARK: - Functions + static func nib() -> UINib { + return UINib(nibName: Const.Xib.backCardCell, bundle: Bundle(for: BackCardCell.self)) + } +} + +// MARK: - Extensions +extension BackCardCell { + private func setUI() { + tasteTitleLabel.font = .title02 + tasteTitleLabel.textColor = .white + tmiTitleLabel.font = .title02 + tmiTitleLabel.textColor = .white + firstTmiLabel.font = .textRegular04 + firstTmiLabel.textColor = .white + secondTmiLabel.font = .textRegular04 + secondTmiLabel.textColor = .white + thirdTmiLabel.font = .textRegular04 + thirdTmiLabel.textColor = .white + } + + /// 서버에서 image 를 URL 로 가져올 경우 사용. + func initCellFromServer(cardData: Card, isShareable: Bool) { + self.cardData = cardData + + if cardData.background.hasPrefix("https://") { + self.backgroundImageView.updateServerImage(cardData.background) + } else { + if let bgImage = UIImage(named: cardData.background) { + self.backgroundImageView.image = bgImage + } + } + + mintImageView.image = cardData.isMincho == true ? + UIImage(named: "iconTasteOnMincho") : UIImage(named: "iconTasteOffMincho") + noMintImageView.image = cardData.isMincho == false ? + UIImage(named: "iconTasteOnBanmincho") : UIImage(named: "iconTasteOffBanmincho") + + sojuImageView.image = cardData.isSoju == true ? + UIImage(named: "iconTasteOnSoju") : UIImage(named: "iconTasteOffSoju") + beerImageView.image = cardData.isSoju == false ? + UIImage(named: "iconTasteOnBeer") : UIImage(named: "iconTasteOffBeer") + + pourEatImageView.image = cardData.isBoomuk == true ? + UIImage(named: "iconTasteOnBumeok") : UIImage(named: "iconTasteOffBumeok") + putSauceEatImageView.image = cardData.isBoomuk == false ? + UIImage(named: "iconTasteOnZzik") : UIImage(named: "iconTasteOffZzik") + + sauceChickenImageView.image = cardData.isSauced == true ? + UIImage(named: "iconTasteOnSeasoned") : UIImage(named: "iconTasteOffSeasoned") + friedChickenImageView.image = cardData.isSauced == false ? + UIImage(named: "iconTasteOnFried") : UIImage(named: "iconTasteOffFried") + + if let oneTmi = cardData.oneTmi, !oneTmi.isEmpty { + firstTmiLabel.text = "• " + oneTmi + } else { + firstTmiLabel.text = cardData.oneTmi + } + + if let twoTmi = cardData.twoTmi, !twoTmi.isEmpty { + secondTmiLabel.text = "• " + twoTmi + } else { + secondTmiLabel.text = cardData.twoTmi + } + + if let threeTmi = cardData.threeTmi, !threeTmi.isEmpty { + thirdTmiLabel.text = "• " + threeTmi + } else { + thirdTmiLabel.text = cardData.threeTmi + } + + shareButton.isHidden = !isShareable + } + + /// 명함생성할 때 image 를 UIImage 로 가져올 경우 사용 + func initCell(_ backgroundImage: UIImage?, + _ isMint: Bool, + _ isSoju: Bool, + _ isBoomuk: Bool, + _ isSauced: Bool, + _ firstTMI: String, + _ secondTMI: String, + _ thirdTMI: String, + isShareable: Bool) { + backgroundImageView.image = backgroundImage ?? UIImage() + mintImageView.image = isMint == true ? + UIImage(named: "iconTasteOnMincho") : UIImage(named: "iconTasteOffMincho") + noMintImageView.image = isMint == false ? + UIImage(named: "iconTasteOnBanmincho") : UIImage(named: "iconTasteOffBanmincho") + + sojuImageView.image = isSoju == true ? + UIImage(named: "iconTasteOnSoju") : UIImage(named: "iconTasteOffSoju") + beerImageView.image = isSoju == false ? + UIImage(named: "iconTasteOnBeer") : UIImage(named: "iconTasteOffBeer") + + pourEatImageView.image = isBoomuk == true ? + UIImage(named: "iconTasteOnBumeok") : UIImage(named: "iconTasteOffBumeok") + putSauceEatImageView.image = isBoomuk == false ? + UIImage(named: "iconTasteOnZzik") : UIImage(named: "iconTasteOffZzik") + + sauceChickenImageView.image = isSauced == true ? + UIImage(named: "iconTasteOnSeasoned") : UIImage(named: "iconTasteOffSeasoned") + friedChickenImageView.image = isSauced == false ? + UIImage(named: "iconTasteOnFried") : UIImage(named: "iconTasteOffFried") + + if !firstTMI.isEmpty { + firstTmiLabel.text = "• " + firstTMI + } else { + firstTmiLabel.text = firstTMI + } + + if !secondTMI.isEmpty { + secondTmiLabel.text = "• " + secondTMI + } else { + secondTmiLabel.text = secondTMI + } + + if !thirdTMI.isEmpty { + thirdTmiLabel.text = "• " + thirdTMI + } else { + thirdTmiLabel.text = thirdTMI + } + + shareButton.isHidden = !isShareable + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.xib new file mode 100644 index 00000000..28760ed2 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/BackCardCell.xib @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/EmptyCardCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardCell/EmptyCardCell.swift new file mode 100644 index 00000000..84dcbeef --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/EmptyCardCell.swift @@ -0,0 +1,24 @@ +// +// EmptyCardCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/15. +// + +import UIKit +import VerticalCardSwiper + +class EmptyCardCell: CardCell { + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + // MARK: - Methods + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.emptyCardCell, bundle: Bundle(for: EmptyCardCell.self)) + } + +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/EmptyCardCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardCell/EmptyCardCell.xib new file mode 100644 index 00000000..00384ce3 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/EmptyCardCell.xib @@ -0,0 +1,72 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.swift new file mode 100644 index 00000000..6d4e942a --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.swift @@ -0,0 +1,169 @@ +// +// FrontCardCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/18. +// + +import UIKit +import VerticalCardSwiper +import Kingfisher + +class FrontCardCell: CardCell { + + // MARK: - Properties + + private var cardData: Card? + + // MARK: - @IBOutlet Properties + @IBOutlet weak var backgroundImageView: UIImageView! + @IBOutlet weak var titleLabel: UILabel! + @IBOutlet weak var descriptionLabel: UILabel! + @IBOutlet weak var userNameLabel: UILabel! + @IBOutlet weak var birthLabel: UILabel! + @IBOutlet weak var mbtiLabel: UILabel! + @IBOutlet weak var instagramIDLabel: UILabel! + @IBOutlet weak var linkURLLabel: UILabel! + @IBOutlet weak var shareButton: UIButton! + + @IBOutlet weak var instagramImageView: UIImageView! + @IBOutlet weak var linkURLImageView: UIImageView! + + // MARK: - Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + + setUI() + setTapGesture() + } + @IBAction func touchShareButton(_ sender: Any) { + NotificationCenter.default.post(name: Notification.Name.presentCardShare, object: cardData, userInfo: nil) + } + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.frontCardCell, bundle: Bundle(for: FrontCardCell.self)) + } +} + +// MARK: - Extensions + +extension FrontCardCell { + private func setUI() { + titleLabel.font = .title02 + titleLabel.textColor = .white + descriptionLabel.font = .textRegular03 + descriptionLabel.textColor = .white + userNameLabel.font = .title01 + userNameLabel.textColor = .white + birthLabel.font = .textRegular02 + birthLabel.textColor = .white + mbtiLabel.font = .textRegular02 + mbtiLabel.textColor = .white + instagramIDLabel.font = .textRegular03 + instagramIDLabel.textColor = .white + instagramIDLabel.lineBreakMode = .byTruncatingTail + linkURLLabel.font = .textRegular04 + linkURLLabel.textColor = .white + linkURLLabel.numberOfLines = 1 + linkURLLabel.lineBreakMode = .byTruncatingTail + } + private func setTapGesture() { + instagramIDLabel.isUserInteractionEnabled = true + let instagramTapGesture = UITapGestureRecognizer(target: self, action: #selector(tapInstagramLabel)) + instagramIDLabel.addGestureRecognizer(instagramTapGesture) + + linkURLLabel.isUserInteractionEnabled = true + let linkURLTapGesture = UITapGestureRecognizer(target: self, action: #selector(tapLinkURLLabel)) + linkURLLabel.addGestureRecognizer(linkURLTapGesture) + } + + // MARK: - @objc Methods + + @objc + private func tapInstagramLabel() { + let instagramID = instagramIDLabel.text ?? "" + let appURL = URL(string: "instagram://user?username=\(instagramID)")! + let webURL = URL(string: "https://instagram.com/\(instagramID)")! + + if UIApplication.shared.canOpenURL(appURL) { + UIApplication.shared.open(appURL, options: [:], completionHandler: nil) + } else { + UIApplication.shared.open(webURL, options: [:], completionHandler: nil) + } + } + @objc + private func tapLinkURLLabel() { + let linkURL = linkURLLabel.text ?? "" + let webURL: URL + + if linkURL.hasPrefix("https://") { + webURL = URL(string: linkURL)! + } else { + webURL = URL(string: "https://" + linkURL)! + } + + if UIApplication.shared.canOpenURL(webURL) { + UIApplication.shared.open(webURL, options: [:], completionHandler: nil) + } + } + + /// 서버에서 image 를 URL 로 가져올 경우 사용. + func initCellFromServer(cardData: Card, isShareable: Bool) { + self.cardData = cardData + + if cardData.background.hasPrefix("https://") { + self.backgroundImageView.updateServerImage(cardData.background) + } else { + if let bgImage = UIImage(named: cardData.background) { + self.backgroundImageView.image = bgImage + } + } + + titleLabel.text = cardData.title + descriptionLabel.text = cardData.cardDescription + userNameLabel.text = cardData.name + birthLabel.text = cardData.birthDate + mbtiLabel.text = cardData.mbti + instagramIDLabel.text = cardData.instagram + linkURLLabel.text = cardData.link + + if let instagram = cardData.instagram, instagram.isEmpty { + instagramImageView.isHidden = true + } + if let link = cardData.link, link.isEmpty { + linkURLImageView.isHidden = true + } + + shareButton.isHidden = !isShareable + } + + /// 명함생성할 때 image 를 UIImage 로 가져올 경우 사용 + func initCell(_ backgroundImage: UIImage?, + _ cardTitle: String, + _ cardDescription: String, + _ userName: String, + _ birth: String, + _ mbti: String, + _ instagramID: String, + _ linkURL: String, + isShareable: Bool) { + backgroundImageView.image = backgroundImage ?? UIImage() + titleLabel.text = cardTitle + descriptionLabel.text = cardDescription + userNameLabel.text = userName + birthLabel.text = birth + mbtiLabel.text = mbti + instagramIDLabel.text = instagramID + linkURLLabel.text = linkURL + + if instagramID.isEmpty { + instagramImageView.isHidden = true + } + if linkURL.isEmpty { + linkURLImageView.isHidden = true + } + + shareButton.isHidden = !isShareable + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib new file mode 100644 index 00000000..34d475e9 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/FrontCardCell.xib @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/MainCardCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardCell/MainCardCell.swift new file mode 100644 index 00000000..96eadc6b --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/MainCardCell.swift @@ -0,0 +1,103 @@ +// +// MainCardCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/12/10. +// + +import UIKit +import VerticalCardSwiper +import KakaoSDKCommon + +class MainCardCell: CardCell { + + // MARK: - Properties + + private var isFront = true + private enum Size { + static let cellHeight: CGFloat = 540 + static let cellWidth: CGFloat = 327 + } + + public var isShareable: Bool? + public var cardDataModel: Card? + + // MARK: - View Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + + setGestureRecognizer() + } + + override func prepareForReuse() { + super.prepareForReuse() + + contentView.subviews.forEach { $0.removeFromSuperview() } + contentView.frame = CGRect(x: 0, y: 0, width: Size.cellWidth, height: Size.cellHeight) + } + + // MARK: - Methods + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.mainCardCell, bundle: Bundle(for: MainCardCell.self)) + } +} + +// MARK: - Extensions + +extension MainCardCell { + public func setFrontCard() { + guard let frontCard = FrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FrontCardCell else { return } + + frontCard.frame = CGRect(x: 0, y: 0, width: contentView.frame.width, height: contentView.frame.height) + guard let cardDataModel = cardDataModel else { return } + frontCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable ?? false) + + contentView.addSubview(frontCard) + } + private func setGestureRecognizer() { + let swipeLeftGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(transitionCardWithAnimation(_:))) + swipeLeftGestureRecognizer.direction = .left + self.contentView.addGestureRecognizer(swipeLeftGestureRecognizer) + + let swipeRightGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(transitionCardWithAnimation(_:))) + swipeRightGestureRecognizer.direction = .right + self.contentView.addGestureRecognizer(swipeRightGestureRecognizer) + } + public func initCell(cardDataModel: Card) { + self.cardDataModel = cardDataModel + } + // MARK: - @objc Methods + + @objc + private func transitionCardWithAnimation(_ swipeGesture: UISwipeGestureRecognizer) { + if isFront { + guard let backCard = BackCardCell.nib().instantiate(withOwner: self, options: nil).first as? BackCardCell else { return } + backCard.frame = CGRect(x: 0, y: 0, width: contentView.frame.width, height: contentView.frame.height) + guard let cardDataModel = cardDataModel else { return } + backCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable ?? false) + + contentView.addSubview(backCard) + isFront = false + } else { + guard let frontCard = FrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FrontCardCell else { return } + + frontCard.frame = CGRect(x: 0, y: 0, width: contentView.frame.width, height: contentView.frame.height) + guard let cardDataModel = cardDataModel else { return } + frontCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable ?? false) + + contentView.addSubview(frontCard) + isFront = true + } + if swipeGesture.direction == .right { + UIView.transition(with: contentView, duration: 0.5, options: .transitionFlipFromLeft, animations: nil) { _ in + self.contentView.subviews[0].removeFromSuperview() + } + } else { + UIView.transition(with: contentView, duration: 0.5, options: .transitionFlipFromRight, animations: nil) { _ in + self.contentView.subviews[0].removeFromSuperview() + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CardCell/MainCardCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardCell/MainCardCell.xib new file mode 100644 index 00000000..cd66fadd --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardCell/MainCardCell.xib @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.swift new file mode 100644 index 00000000..a7d45f68 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.swift @@ -0,0 +1,34 @@ +// +// CardListTableViewCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/09/27. +// + +import UIKit + +class CardListTableViewCell: UITableViewCell { + + @IBOutlet weak var pinButton: UIButton! + @IBOutlet weak var titleLabel: UILabel! + @IBOutlet weak var reorderButton: UIButton! + + override func awakeFromNib() { + super.awakeFromNib() + + } + + static func nib() -> UINib { + return UINib(nibName: "CardListTableViewCell", bundle: nil) + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + func initData(title: String) { + titleLabel.text = title + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.xib new file mode 100644 index 00000000..75598ad7 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardList/CardListTableViewCell.xib @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CardList/EmptyCardListTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/CardList/EmptyCardListTableViewCell.swift new file mode 100644 index 00000000..975592da --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardList/EmptyCardListTableViewCell.swift @@ -0,0 +1,26 @@ +// +// EmptyCardListTableViewCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/30. +// + +import UIKit + +class EmptyCardListTableViewCell: UITableViewCell { + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.EmptyCardListTableViewCell, bundle: Bundle(for: EmptyCardListTableViewCell.self)) + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CardList/EmptyCardListTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/CardList/EmptyCardListTableViewCell.xib new file mode 100644 index 00000000..2653d203 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CardList/EmptyCardListTableViewCell.xib @@ -0,0 +1,64 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/BackCardCreationCollectionViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/CreationCard/BackCardCreationCollectionViewCell.swift new file mode 100644 index 00000000..edd20abb --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/BackCardCreationCollectionViewCell.swift @@ -0,0 +1,258 @@ +// +// BackCardCreationCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/24. +// + +import UIKit + +import IQKeyboardManagerSwift + +class BackCardCreationCollectionViewCell: UICollectionViewCell { + + // MARK: - Properties + + static let identifier = "BackCardCreationCollectionViewCell" + + private let flavorList = ["민초", "반민초", "소주", "맥주", "부먹", "찍먹", "양념", "후라이드"] + private let maxLength: Int = 20 + private var textFieldList = [UITextField]() + private var requiredCollectionViewList = [UICollectionView]() + + public weak var backCardCreationDelegate: BackCardCreationDelegate? + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var bgView: UIView! + @IBOutlet weak var scrollView: UIScrollView! + + @IBOutlet weak var requiredInfoTextLabel: UILabel! + @IBOutlet weak var optionalInfoTextLabel: UILabel! + + @IBOutlet weak var firstTMITextField: UITextField! + @IBOutlet weak var secondTMITextField: UITextField! + @IBOutlet weak var thirdTMITextField: UITextField! + + @IBOutlet weak var isMinchoCollectionView: UICollectionView! + @IBOutlet weak var isSojuCollectionView: UICollectionView! + @IBOutlet weak var isBoomukCollectionView: UICollectionView! + @IBOutlet weak var isSaucedCollectionView: UICollectionView! + + // MARK: - Cell Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + + setUI() + registerCell() + textFieldDelegate() + setNotification() + } +} + +// MARK: - Extensions + +extension BackCardCreationCollectionViewCell { + private func setUI() { + IQKeyboardManager.shared.shouldResignOnTouchOutside = true + + initUITextFieldList() + initCollectionViewList() + + scrollView.indicatorStyle = .default + scrollView.backgroundColor = .background + bgView.backgroundColor = .background + + _ = requiredCollectionViewList.map { $0.backgroundColor = .background } + + let requiredAttributeString = NSMutableAttributedString(string: "*나의 취향을 골라보세요.") + requiredAttributeString.addAttribute(.foregroundColor, value: UIColor.mainColorNadaMain, range: NSRange(location: 0, length: 1)) + requiredAttributeString.addAttribute(.foregroundColor, value: UIColor.secondary, range: NSRange(location: 1, length: requiredAttributeString.length - 1)) + requiredInfoTextLabel.attributedText = requiredAttributeString + requiredInfoTextLabel.font = .textBold01 + + let optionalAttributeString = NSMutableAttributedString(string: "나의 재밌는 TMI를 알려주세요. (20자)") + optionalAttributeString.addAttribute(.foregroundColor, value: UIColor.secondary, range: NSRange(location: 0, length: 18)) + optionalAttributeString.addAttribute(.font, value: UIFont.textBold01, range: NSRange(location: 0, length: 18)) + optionalAttributeString.addAttribute(.foregroundColor, value: UIColor.quaternary, range: NSRange(location: 19, length: 5)) + optionalAttributeString.addAttribute(.font, value: UIFont.textRegular03, range: NSRange(location: 19, length: 5)) + optionalInfoTextLabel.attributedText = optionalAttributeString + + firstTMITextField.attributedPlaceholder = NSAttributedString(string: "TMI 1", attributes: [NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + secondTMITextField.attributedPlaceholder = NSAttributedString(string: "TMI 2", attributes: [NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + thirdTMITextField.attributedPlaceholder = NSAttributedString(string: "TMI 3", attributes: [NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + + _ = textFieldList.map { + $0.font = .textRegular04 + $0.backgroundColor = .textBox + $0.textColor = .primary + $0.layer.cornerRadius = 10 + $0.borderStyle = .none + $0.setLeftPaddingPoints(12) + } + } + private func initUITextFieldList() { + textFieldList.append(contentsOf: [ + firstTMITextField, + secondTMITextField, + thirdTMITextField + ]) + } + private func initCollectionViewList() { + requiredCollectionViewList.append(contentsOf: [ + isMinchoCollectionView, + isSojuCollectionView, + isBoomukCollectionView, + isSaucedCollectionView + ]) + } + private func registerCell() { + _ = requiredCollectionViewList.map { + $0.delegate = self + $0.dataSource = self + $0.register(RequiredFlavorCollectionViewCell.nib(), forCellWithReuseIdentifier: Const.Xib.requiredCollectionViewCell) + } + } + private func textFieldDelegate() { + _ = textFieldList.map { $0.delegate = self } + } + private func setNotification() { + NotificationCenter.default.addObserver(self, selector: #selector(textFieldDidChange(_:)), name: UITextField.textDidChangeNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(dismissKeyboard), name: .touchRequiredView, object: nil) + } + private func checkBackCardStatus() { + backCardCreationDelegate?.backCardCreation(withRequired: [ + "isMincho": isMinchoCollectionView.indexPathsForSelectedItems == [[0, 0]] ? true: false, + "isSoju": isSojuCollectionView.indexPathsForSelectedItems == [[0, 0]] ? true: false, + "isBoomuk": isBoomukCollectionView.indexPathsForSelectedItems == [[0, 0]] ? true: false, + "isSauced": isSaucedCollectionView.indexPathsForSelectedItems == [[0, 0]] ? true: false + ], withOptional: [ + "firstTMI": firstTMITextField.text ?? "", + "secondTMI": secondTMITextField.text ?? "", + "thirdTMI": thirdTMITextField.text ?? "" + ]) + } + static func nib() -> UINib { + return UINib(nibName: Const.Xib.backCardCreationCollectionViewCell, bundle: Bundle(for: BackCardCreationCollectionViewCell.self)) + } + + // MARK: - @objc Methods + + @objc + private func textFieldDidChange(_ notification: NSNotification) { + if let textField = notification.object as? UITextField { + switch textField { + case firstTMITextField: + if let text = firstTMITextField.text { + if text.count > maxLength { + let maxIndex = text.index(text.startIndex, offsetBy: maxLength) + let newString = String(text[text.startIndex.. maxLength { + let maxIndex = text.index(text.startIndex, offsetBy: maxLength) + let newString = String(text[text.startIndex.. maxLength { + let maxIndex = text.index(text.startIndex, offsetBy: maxLength) + let newString = String(text[text.startIndex.. Int { + return 2 + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.requiredCollectionViewCell, for: indexPath) as? RequiredFlavorCollectionViewCell else { + return UICollectionViewCell() + } + switch collectionView { + case isMinchoCollectionView: + cell.initCell(flavor: flavorList[indexPath.item]) + case isSojuCollectionView: + cell.initCell(flavor: flavorList[indexPath.item + 2]) + case isBoomukCollectionView: + cell.initCell(flavor: flavorList[indexPath.item + 4]) + case isSaucedCollectionView: + cell.initCell(flavor: flavorList[indexPath.item + 6]) + default: + return UICollectionViewCell() + } + return cell + } +} + +// MARK: - UICollectionViewDelegateFlowLayout +extension BackCardCreationCollectionViewCell: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + return 0 + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + return 7 + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return .zero + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + let cellWidth = (collectionView.frame.width - 7) / 2 + let cellHeight = collectionView.frame.height + + return CGSize(width: cellWidth, height: cellHeight) + } +} + +// MARK: - UITextFieldDelegate +extension BackCardCreationCollectionViewCell: UITextFieldDelegate { + func textFieldDidBeginEditing(_ textField: UITextField) { + textField.becomeFirstResponder() + textField.borderWidth = 1 + textField.borderColor = .tertiary + } + func textFieldDidEndEditing(_ textField: UITextField) { + backCardCreationDelegate?.backCardCreation(endEditing: true) + checkBackCardStatus() + textField.borderWidth = 0 + } + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + return textField.resignFirstResponder() + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/BackCardCreationCollectionViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/CreationCard/BackCardCreationCollectionViewCell.xib new file mode 100644 index 00000000..d6c08cfa --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/BackCardCreationCollectionViewCell.xib @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell 2.swift b/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell 2.swift new file mode 100644 index 00000000..d118ec31 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell 2.swift @@ -0,0 +1,49 @@ +// +// CardBackgroundSettingCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/26. +// + +import UIKit + +class BackgroundCollectionViewCell: UICollectionViewCell { + + // MARK: - @IBOutlet Properties + @IBOutlet weak var bgView: UIView! + @IBOutlet weak var imageView: UIImageView! + + // MARK: - Cell Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + setUI() + } +} + +// MARK: - Extensions + +extension BackgroundCollectionViewCell { + private func setUI() { + bgView.backgroundColor = .white +// bgView.isHidden = true + bgView.layer.cornerRadius = bgView.frame.height / 2 + bgView.layer.cornerRadius = 30 +// imageView.layer.cornerRadius = imageView.frame.height / 2 + imageView.layer.cornerRadius = 28 + } + func initCell(image: String) { + if let image = UIImage(named: image) { + imageView.image = image + } + } + func cellSelected() { + bgView.isHidden = false + } + func cellUnselected() { + bgView.isHidden = true + } + static func nib() -> UINib { + return UINib(nibName: "BackgroundCollectionViewCell", bundle: nil) + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell.swift new file mode 100644 index 00000000..58c9b51b --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell.swift @@ -0,0 +1,62 @@ +// +// CardBackgroundSettingCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/26. +// + +import UIKit + +class BackgroundCollectionViewCell: UICollectionViewCell { + + // MARK: - Properties + + private let bgViewCornerRadius: CGFloat = 30 + private let imageviewCornerRadius: CGFloat = 28 + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var bgView: UIView! + @IBOutlet weak var opacityView: UIView! + @IBOutlet weak var imageView: UIImageView! + @IBOutlet weak var addPhotoImageView: UIImageView! + + // MARK: - View Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + + setUI() + } +} + +// MARK: - Extensions + +extension BackgroundCollectionViewCell { + private func setUI() { + bgView.backgroundColor = .mainColorNadaMain + bgView.isHidden = true + bgView.layer.cornerRadius = bgViewCornerRadius + + opacityView.layer.cornerRadius = imageviewCornerRadius + imageView.layer.cornerRadius = imageviewCornerRadius + imageView.contentMode = .scaleAspectFill + } + func initCell(image: UIImage, isFirst: Bool) { + imageView.image = image + addPhotoImageView.isHidden = isFirst == true ? false : true + opacityView.isHidden = isFirst == true ? false : true + } + override var isSelected: Bool { + didSet { + if isSelected { + bgView.isHidden = false + } else { + bgView.isHidden = true + } + } + } + static func nib() -> UINib { + return UINib(nibName: Const.Xib.backgroundCollectionViewCell, bundle: nil) + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell.xib new file mode 100644 index 00000000..d833bdc7 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/Background/BackgroundCollectionViewCell.xib @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/FrontCardCreationCollectionViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/CreationCard/FrontCardCreationCollectionViewCell.swift new file mode 100644 index 00000000..ec1f676b --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/FrontCardCreationCollectionViewCell.swift @@ -0,0 +1,403 @@ +// +// FrontCardCreationCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/24. +// + +import UIKit + +import IQKeyboardManagerSwift + +class FrontCardCreationCollectionViewCell: UICollectionViewCell { + + // MARK: - Protocols + + public weak var frontCardCreationDelegate: FrontCardCreationDelegate? + + // MARK: - Properties + + private let backgroundList = ["", "imageDefaultBg01", "imageDefaultBg02", "imageDefaultBg03", "imageDefaultBg04", "imageDefaultBg05", "imageDefaultBg06", "imageDefaultBg07"] + private var requiredTextFieldList = [UITextField]() + private var optionalTextFieldList = [UITextField]() + private var cardBackgroundImage: UIImage? + private var defaultImageIndex: Int? + private let maxLength: Int = 15 + + public var presentingBirthBottomVCClosure: (() -> Void)? + public var presentingMBTIBottomVCClosure: (() -> Void)? + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var scrollView: UIScrollView! + + @IBOutlet weak var setBackgroundTextLabel: UILabel! + @IBOutlet weak var cardTitleInfoTextLabel: UILabel! + @IBOutlet weak var requiredInfoTextLabel: UILabel! + @IBOutlet weak var optionalInfoTextLabel: UILabel! + + @IBOutlet weak var backgroundSettingCollectionView: UICollectionView! + @IBOutlet weak var cardTitleTextField: UITextField! + @IBOutlet weak var userNameTextField: UITextField! + + @IBOutlet weak var birthLabel: UILabel! + @IBOutlet weak var birthView: UIView! + @IBOutlet weak var mbtiLabel: UILabel! + @IBOutlet weak var mbtiView: UIView! + + @IBOutlet weak var instagramIDTextField: UITextField! + @IBOutlet weak var linkURLTextField: UITextField! + @IBOutlet weak var descriptionTextField: UITextField! + + @IBOutlet weak var bgView: UIView! + + // MARK: - Cell Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + + setUI() + setTapAction() + registerCell() + textFieldDelegate() + setNotification() + } +} + +// MARK: - Extensions + +extension FrontCardCreationCollectionViewCell { + private func setUI() { + IQKeyboardManager.shared.shouldResignOnTouchOutside = true + + initUITextFieldList() + backgroundSettingCollectionView.showsHorizontalScrollIndicator = false + scrollView.indicatorStyle = .default + scrollView.backgroundColor = .background + bgView.backgroundColor = .background + backgroundSettingCollectionView.backgroundColor = .background + + let collectionViewLayout = backgroundSettingCollectionView.collectionViewLayout as? UICollectionViewFlowLayout + collectionViewLayout?.estimatedItemSize = .zero + collectionViewLayout?.scrollDirection = .horizontal + + let backgroundAttributeString = NSMutableAttributedString(string: "*명함의 배경을 선택해 주세요.") + backgroundAttributeString.addAttribute(.foregroundColor, value: UIColor.mainColorNadaMain, range: NSRange(location: 0, length: 1)) + backgroundAttributeString.addAttribute(.foregroundColor, value: UIColor.secondary, range: NSRange(location: 1, length: backgroundAttributeString.length - 1)) + setBackgroundTextLabel.attributedText = backgroundAttributeString + setBackgroundTextLabel.font = .textBold01 + + let cardTitleAttributeString = NSMutableAttributedString(string: "*명함에 이름을 붙여 주세요.") + cardTitleAttributeString.addAttribute(.foregroundColor, value: UIColor.mainColorNadaMain, range: NSRange(location: 0, length: 1)) + cardTitleAttributeString.addAttribute(.foregroundColor, value: UIColor.secondary, range: NSRange(location: 1, length: cardTitleAttributeString.length - 1)) + cardTitleInfoTextLabel.attributedText = cardTitleAttributeString + cardTitleInfoTextLabel.font = .textBold01 + + let requiredAttributeString = NSMutableAttributedString(string: "*나에 대한 기본정보를 입력해 주세요.") + requiredAttributeString.addAttribute(.foregroundColor, value: UIColor.mainColorNadaMain, range: NSRange(location: 0, length: 1)) + requiredAttributeString.addAttribute(.foregroundColor, value: UIColor.secondary, range: NSRange(location: 1, length: requiredAttributeString.length - 1)) + requiredInfoTextLabel.attributedText = requiredAttributeString + requiredInfoTextLabel.font = .textBold01 + + optionalInfoTextLabel.text = "나를 더 표현할 수 있는 정보가 있나요?" + optionalInfoTextLabel.font = .textBold01 + optionalInfoTextLabel.textColor = .secondary + + cardTitleTextField.attributedPlaceholder = NSAttributedString(string: "명함 이름 (15자)", attributes: [ + NSAttributedString.Key.foregroundColor: UIColor.quaternary + ]) + userNameTextField.attributedPlaceholder = NSAttributedString(string: "본인 이름 (15자)", attributes: [ + NSAttributedString.Key.foregroundColor: UIColor.quaternary + ]) + + birthView.layer.cornerRadius = 10 + birthView.backgroundColor = .textBox + birthLabel.font = .textRegular04 + birthLabel.textColor = .quaternary + birthLabel.text = "생년월일" + + mbtiView.layer.cornerRadius = 10 + mbtiView.backgroundColor = .textBox + mbtiLabel.font = .textRegular04 + mbtiLabel.textColor = .quaternary + mbtiLabel.text = "MBTI" + + instagramIDTextField.attributedPlaceholder = NSAttributedString(string: "Instagram (@ 제외)", attributes: [ + NSAttributedString.Key.foregroundColor: UIColor.quaternary + ]) + linkURLTextField.attributedPlaceholder = NSAttributedString(string: "URL (Github, Blog 등)", attributes: [ + NSAttributedString.Key.foregroundColor: UIColor.quaternary + ]) + descriptionTextField.attributedPlaceholder = NSAttributedString(string: "동아리 기수 / 파트 (15자)", attributes: [ + NSAttributedString.Key.foregroundColor: UIColor.quaternary + ]) + + _ = requiredTextFieldList.map { + $0.font = .textRegular04 + $0.backgroundColor = .textBox + $0.textColor = .primary + $0.layer.cornerRadius = 10 + $0.borderStyle = .none + $0.setLeftPaddingPoints(12) + } + _ = optionalTextFieldList.map { + $0.font = .textRegular04 + $0.backgroundColor = .textBox + $0.textColor = .primary + $0.layer.cornerRadius = 10 + $0.borderStyle = .none + $0.setLeftPaddingPoints(12) + } + } + private func setTapAction() { + let birthViewTapGesture = UITapGestureRecognizer(target: self, action: #selector(touchBirthView)) + birthView.addGestureRecognizer(birthViewTapGesture) + + let mbtiViewTapGesture = UITapGestureRecognizer(target: self, action: #selector(touchMBTIView)) + mbtiView.addGestureRecognizer(mbtiViewTapGesture) + } + private func initUITextFieldList() { + requiredTextFieldList.append(contentsOf: [ + cardTitleTextField, + userNameTextField + ]) + optionalTextFieldList.append(contentsOf: [ + instagramIDTextField, + linkURLTextField, + descriptionTextField + ]) + } + private func registerCell() { + backgroundSettingCollectionView.delegate = self + backgroundSettingCollectionView.dataSource = self + + backgroundSettingCollectionView.register(BackgroundCollectionViewCell.nib(), forCellWithReuseIdentifier: Const.Xib.backgroundCollectionViewCell) + } + private func textFieldDelegate() { + _ = requiredTextFieldList.map { $0.delegate = self } + _ = optionalTextFieldList.map { $0.delegate = self } + } + private func setNotification() { + NotificationCenter.default.addObserver(self, selector: #selector(setBirthText(notification:)), name: .completeFrontCardBirth, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(setMBTIText(notification:)), name: .completeFrontCardMBTI, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(setCardBackgroundImage(notifiation:)), name: .sendNewImage, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(textFieldDidChange(_:)), name: UITextField.textDidChangeNotification, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(dismissBorderLine), name: .dismissRequiredBottomSheet, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(cancelImagePicker), name: .cancelImagePicker, object: nil) + } + + /// front card 가 편집되었는지. 필수 항목이 다 입력되었는지 체크. + private func checkFrontCradStatus() { + frontCardCreationDelegate?.frontCardCreation(endEditing: true) + if cardTitleTextField.hasText && + userNameTextField.hasText && + birthLabel.text != "생년월일" && + mbtiLabel.text != "MBTI" && + defaultImageIndex != nil { + frontCardCreationDelegate?.frontCardCreation(requiredInfo: true) + } else { + frontCardCreationDelegate?.frontCardCreation(requiredInfo: false) + } + if let defaultImageIndex = defaultImageIndex { + frontCardCreationDelegate?.frontCardCreation(withRequired: [ + "defaultImageIndex": String(defaultImageIndex), + "title": cardTitleTextField.text ?? "", + "name": userNameTextField.text ?? "", + "birthDate": birthLabel.text ?? "", + "mbti": mbtiLabel.text ?? "" + ], withOptional: [ + "instagram": instagramIDTextField.text ?? "", + "linkURL": linkURLTextField.text ?? "", + "description": descriptionTextField.text ?? "" + ]) + } + } + static func nib() -> UINib { + return UINib(nibName: Const.Xib.frontCardCreationCollectionViewCell, bundle: Bundle(for: FrontCardCreationCollectionViewCell.self)) + } + + // MARK: - @objc Methods + + @objc + private func setBirthText(notification: NSNotification) { + birthLabel.text = notification.object as? String + birthLabel.textColor = .primary + + birthView.borderWidth = 0 + + checkFrontCradStatus() + } + @objc + private func setMBTIText(notification: NSNotification) { + mbtiLabel.text = notification.object as? String + mbtiLabel.textColor = .primary + mbtiView.borderWidth = 0 + + checkFrontCradStatus() + } + @objc + private func setCardBackgroundImage(notifiation: NSNotification) { + cardBackgroundImage = notifiation.object as? UIImage + defaultImageIndex = 0 + backgroundSettingCollectionView.reloadData() + + checkFrontCradStatus() + } + @objc + private func textFieldDidChange(_ notification: Notification) { + if let textField = notification.object as? UITextField { + switch textField { + case cardTitleTextField: + if let text = cardTitleTextField.text { + if text.count > maxLength { + let maxIndex = text.index(text.startIndex, offsetBy: maxLength) + let newString = String(text[text.startIndex.. maxLength { + let maxIndex = text.index(text.startIndex, offsetBy: maxLength) + let newString = String(text[text.startIndex.. maxLength { + let maxIndex = text.index(text.startIndex, offsetBy: maxLength) + let newString = String(text[text.startIndex.. Int { + return backgroundList.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.backgroundCollectionViewCell, for: indexPath) as? BackgroundCollectionViewCell else { + return UICollectionViewCell() + } + switch indexPath.item { + case 0: + cell.initCell(image: cardBackgroundImage ?? UIImage(), isFirst: true) + default: + guard let image = UIImage(named: backgroundList[indexPath.item]) else { return UICollectionViewCell() } + cell.initCell(image: image, isFirst: false) + } + + if defaultImageIndex == 0 && + indexPath.item == 0 { + collectionView.selectItem(at: indexPath, animated: true, scrollPosition: .init()) + } + return cell + } +} + +// MARK: - UICollectionViewDelegateFlowLayout +extension FrontCardCreationCollectionViewCell: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return UIEdgeInsets(top: 0, left: 26, bottom: 0, right: 26) + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + return 0 + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + return 12 + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: CGFloat(60), height: CGFloat(60)) + } +} + +// MARK: - UITextFieldDelegate +extension FrontCardCreationCollectionViewCell: UITextFieldDelegate { + func textFieldDidBeginEditing(_ textField: UITextField) { + textField.borderWidth = 1 + textField.borderColor = .tertiary + } + func textFieldDidEndEditing(_ textField: UITextField) { + checkFrontCradStatus() + textField.resignFirstResponder() + textField.borderWidth = 0 + } + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + return textField.resignFirstResponder() + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/FrontCardCreationCollectionViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/CreationCard/FrontCardCreationCollectionViewCell.xib new file mode 100644 index 00000000..53e536b5 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/FrontCardCreationCollectionViewCell.xib @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell 2.swift b/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell 2.swift new file mode 100644 index 00000000..382cdc20 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell 2.swift @@ -0,0 +1,39 @@ +// +// RequiredFlavorCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/27. +// + +import UIKit + +class RequiredFlavorCollectionViewCell: UICollectionViewCell { + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var bgView: UIView! + @IBOutlet weak var flavorLabel: UILabel! + + // MARK: - Cell Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + setUI() + } +} + +extension RequiredFlavorCollectionViewCell { + private func setUI() { + bgView.backgroundColor = .systemGray2 + bgView.cornerRadius = 10 + + flavorLabel.font = UIFont(name: "AppleSDGothicNeo-Medium", size: 16) + flavorLabel.textColor = .systemGray5 + } + func initCell(flavor: String) { + flavorLabel.text = flavor + } + static func nib() -> UINib { + return UINib(nibName: "RequiredFlavorCollectionViewCell", bundle: nil) + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell.swift new file mode 100644 index 00000000..b8182c89 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell.swift @@ -0,0 +1,54 @@ +// +// RequiredFlavorCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/27. +// + +import UIKit + +class RequiredFlavorCollectionViewCell: UICollectionViewCell { + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var bgView: UIView! + @IBOutlet weak var flavorLabel: UILabel! + + // MARK: - Cell Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + + setUI() + } +} + +// MARK: - Extensions + +extension RequiredFlavorCollectionViewCell { + private func setUI() { + bgView.backgroundColor = .textBox + bgView.cornerRadius = 10 + + flavorLabel.font = .button02 + flavorLabel.textColor = .quaternary + flavorLabel.textAlignment = .center + } + func initCell(flavor: String) { + flavorLabel.text = flavor + } + static func nib() -> UINib { + return UINib(nibName: Const.Xib.requiredCollectionViewCell, bundle: nil) + } + override var isSelected: Bool { + didSet { + if isSelected { + bgView.backgroundColor = .secondary + flavorLabel.textColor = .background + } else { + bgView.backgroundColor = .textBox + flavorLabel.textColor = .quaternary + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell.xib new file mode 100644 index 00000000..d3383f92 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/CreationCard/RequiredFlavor/RequiredFlavorCollectionViewCell.xib @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupCell/CardInGroupCollectionViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/GroupCell/CardInGroupCollectionViewCell.swift new file mode 100644 index 00000000..588c9696 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupCell/CardInGroupCollectionViewCell.swift @@ -0,0 +1,50 @@ +// +// CardInGroupCollectionViewCell.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/26. +// + +import UIKit + +class CardInGroupCollectionViewCell: UICollectionViewCell { + + @IBOutlet weak var backgroundImageView: UIImageView! + @IBOutlet weak var titleLabel: UILabel! + @IBOutlet weak var descriptionLabel: UILabel! + @IBOutlet weak var userNameLabel: UILabel! + @IBOutlet weak var birthLabel: UILabel! + @IBOutlet weak var mbtiLabel: UILabel! + + @IBOutlet weak var instagramIDLabel: UILabel! + @IBOutlet weak var lineURLLabel: UILabel! + + @IBOutlet weak var instagramIcon: UIImageView! + @IBOutlet weak var urlIcon: UIImageView! + var groupId: Int? + var cardId: String? + + override func awakeFromNib() { + super.awakeFromNib() + } + + override func prepareForReuse() { + super.prepareForReuse() + + backgroundImageView.image = UIImage() + titleLabel.text = "" + descriptionLabel.text = "" + userNameLabel.text = "" + birthLabel.text = "" + mbtiLabel.text = "" + instagramIDLabel.text = "" + mbtiLabel.text = "" + instagramIcon.isHidden = false + urlIcon.isHidden = false + } + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.cardInGroupCollectionViewCell, bundle: Bundle(for: CardInGroupCollectionViewCell.self)) + } + +} diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupCell/CardInGroupCollectionViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/GroupCell/CardInGroupCollectionViewCell.xib new file mode 100644 index 00000000..b03e2b1c --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupCell/CardInGroupCollectionViewCell.xib @@ -0,0 +1,173 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupCell/GroupCollectionViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/GroupCell/GroupCollectionViewCell.swift new file mode 100644 index 00000000..955c9595 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupCell/GroupCollectionViewCell.swift @@ -0,0 +1,41 @@ +// +// GroupCollectionViewCell.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/21. +// + +import UIKit + +class GroupCollectionViewCell: UICollectionViewCell { + + // MARK: - @IBOutlet Properties + @IBOutlet weak var groupBackground: UIView! + @IBOutlet weak var groupName: UILabel! + + // MARK: - View Life Cycle + override func awakeFromNib() { + super.awakeFromNib() + setUI() + } + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.groupCollectionViewCell, bundle: Bundle(for: GroupCollectionViewCell.self)) + } +} + +// MARK: - Extensions +extension GroupCollectionViewCell { + private func setUI() { + groupBackground.layer.cornerRadius = 15 + groupBackground.backgroundColor = .button + groupName.textColor = .mainColorButtonText + } + + override var isSelected: Bool { + didSet { + groupBackground.backgroundColor = isSelected ? .primary : .button + groupName.textColor = isSelected ? .background : .mainColorButtonText + } + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupCell/GroupCollectionViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/GroupCell/GroupCollectionViewCell.xib new file mode 100644 index 00000000..1986c186 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupCell/GroupCollectionViewCell.xib @@ -0,0 +1,64 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupEdit/EmptyGroupEditTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/EmptyGroupEditTableViewCell.swift new file mode 100644 index 00000000..67129986 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/EmptyGroupEditTableViewCell.swift @@ -0,0 +1,26 @@ +// +// EmptyGroupEditTableViewCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/30. +// + +import UIKit + +class EmptyGroupEditTableViewCell: UITableViewCell { + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.EmptyGroupEditTableViewCell, bundle: Bundle(for: EmptyGroupEditTableViewCell.self)) + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupEdit/EmptyGroupEditTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/EmptyGroupEditTableViewCell.xib new file mode 100644 index 00000000..cda3d8c6 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/EmptyGroupEditTableViewCell.xib @@ -0,0 +1,64 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupEdit/GroupEditTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/GroupEditTableViewCell.swift new file mode 100644 index 00000000..23efa9a3 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/GroupEditTableViewCell.swift @@ -0,0 +1,35 @@ +// +// GroupEditTableViewCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/21. +// + +import UIKit + +class GroupEditTableViewCell: UITableViewCell { + + // MARK: - @IBOutlet Properties + @IBOutlet weak var titleLabel: UILabel! + + // MARK: - View Life Cycle + override func awakeFromNib() { + super.awakeFromNib() + + } + + // MARK: - Functions + static func nib() -> UINib { + return UINib(nibName: "GroupEditTableViewCell", bundle: nil) + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + + func initData(title: String) { + titleLabel.text = title + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/GroupEdit/GroupEditTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/GroupEditTableViewCell.xib new file mode 100644 index 00000000..259723df --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/GroupEdit/GroupEditTableViewCell.xib @@ -0,0 +1,69 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.swift new file mode 100644 index 00000000..6eacf75e --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.swift @@ -0,0 +1,28 @@ +// +// MoreListTableViewCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit + +class MoreListTableViewCell: UITableViewCell { + + @IBOutlet weak var titleLabel: UILabel! + @IBOutlet weak var separatorView: UIView! + + override func awakeFromNib() { + super.awakeFromNib() + + } + + static func nib() -> UINib { + return UINib(nibName: "MoreListTableViewCell", bundle: nil) + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.xib new file mode 100644 index 00000000..0f87d056 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/MoreList/MoreListTableViewCell.xib @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/Onboarding/OnboardingCollectionViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/Onboarding/OnboardingCollectionViewCell.swift new file mode 100644 index 00000000..a52db44e --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/Onboarding/OnboardingCollectionViewCell.swift @@ -0,0 +1,61 @@ +// +// OnboardingCollectionViewCell.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/12/05. +// + +import UIKit + +class OnboardingCollectionViewCell: UICollectionViewCell { + + // MARK: - Properties + + var presentToLoginViewController: (() -> Void)? + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var imageView: UIImageView! + @IBOutlet weak var startButton: UIButton! + + // MARK: - View Life Cycle + + override func awakeFromNib() { + super.awakeFromNib() + + setUI() + } + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.onboardingCollectionViewCell, bundle: nil) + } + + // MARK: - @IBAction Properties + + @IBAction func touchStartButton(_ sender: Any) { + presentToLoginViewController?() + } +} + +// MARK: - Methods + +extension OnboardingCollectionViewCell { + private func setUI() { + layer.masksToBounds = false + layer.shadowColor = UIColor.black.cgColor + layer.shadowOpacity = 0.1 + layer.shadowOffset = CGSize(width: 0, height: 0) + layer.shadowRadius = 10 + + contentView.layer.cornerRadius = 20 + contentView.layer.masksToBounds = false + + imageView.contentMode = .scaleAspectFill + } + func initCell(image: String, isLast: Bool) { + if let image = UIImage(named: image) { + imageView.image = image + } + startButton.isHidden = !isLast + } +} diff --git a/NADA-iOS-forRelease/Sources/Cells/Onboarding/OnboardingCollectionViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/Onboarding/OnboardingCollectionViewCell.xib new file mode 100644 index 00000000..fae7bb5c --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/Onboarding/OnboardingCollectionViewCell.xib @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/OpenSource/OpenSourceTableViewCell.swift b/NADA-iOS-forRelease/Sources/Cells/OpenSource/OpenSourceTableViewCell.swift new file mode 100644 index 00000000..36cf7a38 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/OpenSource/OpenSourceTableViewCell.swift @@ -0,0 +1,29 @@ +// +// OpenSourceTableViewCell.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/11. +// + +import UIKit + +class OpenSourceTableViewCell: UITableViewCell { + + @IBOutlet weak var titleLabel: UILabel! + + override func awakeFromNib() { + super.awakeFromNib() + // Initialization code + } + + static func nib() -> UINib { + return UINib(nibName: Const.Xib.openSourceTableViewCell, bundle: nil) + } + + override func setSelected(_ selected: Bool, animated: Bool) { + super.setSelected(selected, animated: animated) + + // Configure the view for the selected state + } + +} diff --git a/NADA-iOS-forRelease/Sources/Cells/OpenSource/OpenSourceTableViewCell.xib b/NADA-iOS-forRelease/Sources/Cells/OpenSource/OpenSourceTableViewCell.xib new file mode 100644 index 00000000..363849f7 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Cells/OpenSource/OpenSourceTableViewCell.xib @@ -0,0 +1,68 @@ + + + + + + + + + + + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Cells/TempCell.swift b/NADA-iOS-forRelease/Sources/Cells/TempCell.swift deleted file mode 100644 index 7aa39863..00000000 --- a/NADA-iOS-forRelease/Sources/Cells/TempCell.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempCell.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/NADA-iOS-forRelease/Sources/Classes/BottomStackItem.swift b/NADA-iOS-forRelease/Sources/Classes/BottomStackItem.swift new file mode 100644 index 00000000..36f97536 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Classes/BottomStackItem.swift @@ -0,0 +1,20 @@ +// +// BottomStackItem.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/08. +// + +import Foundation + +class BottomStackItem { + + var tabImage: String + var isSelected: Bool + + init(tabImage: String, + isSelected: Bool = false) { + self.tabImage = tabImage + self.isSelected = isSelected + } +} diff --git a/NADA-iOS-forRelease/Sources/Classes/QRCodeView.swift b/NADA-iOS-forRelease/Sources/Classes/QRCodeView.swift new file mode 100644 index 00000000..13d91d06 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Classes/QRCodeView.swift @@ -0,0 +1,77 @@ +// +// QRCodeView.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/26. +// + +import Foundation +import UIKit + +class QRCodeView: UIView { + + // ✅ CIQRCodeGenerator : QR code 생성 필터를 식별하기 위한 속성. + var filter = CIFilter(name: "CIQRCodeGenerator") + + // ✅ QRCode CIImage 를 만들어서 추가할 UIImageView. + var imageView = UIImageView() + + override init(frame: CGRect) { + super.init(frame: frame) + addSubview(imageView) + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + override func layoutSubviews() { + super.layoutSubviews() + imageView.frame = bounds + } + + // ✅ QRCode 이미지를 만들 때 다양한 색으로 만들 수 있도록 parameter 를 받았다. + func generateCode(_ string: String, foregroundColor: UIColor = .black, backgroundColor: UIColor = .white) { + + // ✅ 주어진 인코딩을(=using) 사용해서 NSData 개체를 반환한다. + guard let filter = filter, let data = string.data(using: .isoLatin1, allowLossyConversion: false) else { + return + } + + // ✅ 두가지 파라미터 설정. + filter.setValue(data, forKey: "inputMessage") + filter.setValue("M", forKey: "inputCorrectionLevel") + + // ✅ .outputImage : 필터에 구성된 작업을 캡슐화하는 CIImage 개체이다. 즉, 결과물 + guard let ciImage = filter.outputImage else { + return + } + + // ❗️ 이렇게 끝내면 qr code 가 선명하지 않게 나온다. + // imageView.image = UIImage(ciImage: ciImage, scale: 2.0, orientation: .up) + + // ✅ 다음은 이미지 선명하게 변환하는 과정이다. + // ✅ 원래 이미지에 affine transform(by 파라미터를 의미.) 을 적용한 새 이미지를 반환. 이미지의 넓이와 높이를 10배 증가시킴. + let transformed = ciImage.transformed(by: CGAffineTransform.init(scaleX: 10, y: 10)) + + // ✅ 다음은 QR code 색 커스텀 설정하는 과정이다. 필터 생성하고 이미지 적용. + // ✅ CIColorInvert : 색상을 반전시키기 위한 필터이다. + let invertFilter = CIFilter(name: "CIColorInvert") + invertFilter?.setValue(transformed, forKey: kCIInputImageKey) + + // ✅ CIMaskToAlpha : grayscale 로 변환된 이미지를 alpha 로 마스킹된 흰색이미지로 변환. + let alphaFilter = CIFilter(name: "CIMaskToAlpha") + alphaFilter?.setValue(invertFilter?.outputImage, forKey: kCIInputImageKey) + + // ✅ 받은 파라미터로 imageView 의 속성을 설정. + if let ouputImage = alphaFilter?.outputImage { + imageView.tintColor = foregroundColor + imageView.backgroundColor = backgroundColor + + // ✅ withRenderingMode(.alwaysTemplate) : 원본 이미지의 컬러정보가 사라지고 불투명한 부분을 tintColor 로 설정. + imageView.image = UIImage(ciImage: ouputImage, scale: 2.0, orientation: .up).withRenderingMode(.alwaysTemplate) + } else { + return + } + } +} diff --git a/NADA-iOS-forRelease/Sources/Classes/TempClass.swift b/NADA-iOS-forRelease/Sources/Classes/TempClass.swift deleted file mode 100644 index 7f2424d8..00000000 --- a/NADA-iOS-forRelease/Sources/Classes/TempClass.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempClass.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/NADA-iOS-forRelease/Sources/Models/TempModel.swift b/NADA-iOS-forRelease/Sources/Models/TempModel.swift deleted file mode 100644 index e2be5f33..00000000 --- a/NADA-iOS-forRelease/Sources/Models/TempModel.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempModel.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/NADA-iOS-forRelease/Sources/Network/TempNetwork.swift b/NADA-iOS-forRelease/Sources/Network/TempNetwork.swift deleted file mode 100644 index c5b22346..00000000 --- a/NADA-iOS-forRelease/Sources/Network/TempNetwork.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempNetwork.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Card/Card.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Card/Card.swift new file mode 100644 index 00000000..05322ebd --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Card/Card.swift @@ -0,0 +1,50 @@ +// +// Card.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/04. +// + +import Foundation + +// MARK: - CardClass +struct CardClass: Codable { + let card: Card +} + +// MARK: - Card +struct Card: Codable { + let cardID: String + let author: String? = "" + let background, title, name, birthDate, mbti: String + let instagram, link, cardDescription: String? + let isMincho, isSoju, isBoomuk, isSauced: Bool + let oneTmi, twoTmi, threeTmi: String? + + enum CodingKeys: String, CodingKey { + case cardID = "cardId" + case author, background, title, name, birthDate, mbti, instagram, link + case cardDescription = "description" + case isMincho, isSoju, isBoomuk, isSauced, oneTmi, twoTmi, threeTmi + } + // TODO: - 쓰게 될줄 알았는데 안써서 일단 보류 +// init(from decoder: Decoder) throws { +// let values = try decoder.container(keyedBy: CodingKeys.self) +// cardID = (try? values.decode(String.self, forKey: .cardID)) ?? "" +// background = (try? values.decode(String.self, forKey: .background)) ?? "" +// title = (try? values.decode(String.self, forKey: .title)) ?? "" +// name = (try? values.decode(String.self, forKey: .name)) ?? "" +// birthDate = (try? values.decode(String.self, forKey: .birthDate)) ?? "" +// mbti = (try? values.decode(String.self, forKey: .mbti)) ?? "" +// instagram = (try? values.decode(String.self, forKey: .instagram)) +// link = (try? values.decode(String.self, forKey: .link)) +// cardDescription = (try? values.decode(String.self, forKey: .cardDescription)) +// isMincho = (try? values.decode(Bool.self, forKey: .isMincho)) ?? false +// isSoju = (try? values.decode(Bool.self, forKey: .isSoju)) ?? false +// isBoomuk = (try? values.decode(Bool.self, forKey: .isBoomuk)) ?? false +// isSauced = (try? values.decode(Bool.self, forKey: .isSauced)) ?? false +// oneTmi = (try? values.decode(String.self, forKey: .oneTmi)) +// twoTmi = (try? values.decode(String.self, forKey: .twoTmi)) +// threeTmi = (try? values.decode(String.self, forKey: .threeTmi)) +// } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardCreationRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardCreationRequest.swift new file mode 100644 index 00000000..0a8204ac --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardCreationRequest.swift @@ -0,0 +1,30 @@ +// +// CardCreation.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/04. +// + +import Foundation + +// MARK: - CardCreation +struct CardCreationRequest: Codable { + let userID: String + let frontCard: FrontCardDataModel + let backCard: BackCardDataModel +} + +// MARK: - FrontCard + +struct FrontCardDataModel: Codable { + let defaultImage: Int + let title, name, birthDate, mbti: String + let instagramID, linkURL, description: String +} + +// MARK: - BackCard + +struct BackCardDataModel: Codable { + let isMincho, isSoju, isBoomuk, isSauced: Bool + let oneTMI, twoTMI, threeTMI: String +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListEditRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListEditRequest.swift new file mode 100644 index 00000000..07ab80ef --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListEditRequest.swift @@ -0,0 +1,24 @@ +// +// CardListEditRequest.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/08. +// + +import Foundation + +// MARK: - CardListEdit +struct CardListEditRequest: Codable { + let ordered: [Ordered] +} + +// MARK: - Ordered +struct Ordered: Codable { + let cardID: String + let priority: Int + + enum CodingKeys: String, CodingKey { + case cardID = "cardId" + case priority + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListLookUp.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListLookUp.swift new file mode 100644 index 00000000..4c01eb98 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListLookUp.swift @@ -0,0 +1,14 @@ +// +// CardListLookUp.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/27. +// + +import Foundation + +// MARK: - CardListLookUp +struct CardListLookUp: Codable { + let offset: Int + let cards: [Card] +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListRequest.swift new file mode 100644 index 00000000..cffb2778 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Card/CardListRequest.swift @@ -0,0 +1,23 @@ +// +// CardListRequest.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/08. +// + +import Foundation + +// MARK: - CardListRequest +struct CardListRequest: Codable { + let cardDates: [CardList] +} + +// MARK: - CardList +struct CardList: Codable { + let cardID, title: String + + enum CodingKeys: String, CodingKey { + case cardID = "cardId" + case title + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/GenericResponse.swift b/NADA-iOS-forRelease/Sources/NetworkModel/GenericResponse.swift new file mode 100644 index 00000000..9c7ce12f --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/GenericResponse.swift @@ -0,0 +1,27 @@ +// +// GenericResult.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation + +struct GenericResponse: Codable { + let msg: String + let timestamp: String + let data: T? + + enum CodingKeys: String, CodingKey { + case msg + case timestamp + case data + } + + init(from decoder: Decoder) throws { + let values = try decoder.container(keyedBy: CodingKeys.self) + msg = (try? values.decode(String.self, forKey: .msg)) ?? "" + timestamp = (try? values.decode(String.self, forKey: .timestamp)) ?? "" + data = (try? values.decode(T.self, forKey: .data)) ?? nil + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardAddInGroupRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardAddInGroupRequest.swift new file mode 100644 index 00000000..c9791598 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardAddInGroupRequest.swift @@ -0,0 +1,14 @@ +// +// CardAddInGroupRequest.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/12. +// + +import Foundation + +struct CardAddInGroupRequest: Codable { + var cardId: String + var userId: String + var groupId: Int +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardListInGroupRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardListInGroupRequest.swift new file mode 100644 index 00000000..1252e3a1 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardListInGroupRequest.swift @@ -0,0 +1,14 @@ +// +// CardListRequest.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/12. +// + +import Foundation + +struct CardListInGroupRequest: Codable { + var userId: String + var groupId: Int + var offset: Int +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardsInGroupResponse.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardsInGroupResponse.swift new file mode 100644 index 00000000..36348f98 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Group/CardsInGroupResponse.swift @@ -0,0 +1,53 @@ +// +// CardsInGroupResponse.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/16. +// + +import Foundation + +struct CardsInGroupResponse: Codable { + let offset: Int + let cards: [FrontCard] + + enum CodingKeys: String, CodingKey { + case offset + case cards + } + + // TODO: - 쓰게 될줄 알았는데 안써서 일단 보류 +// init(from decoder: Decoder) throws { +// let values = try decoder.container(keyedBy: CodingKeys.self) +// offset = (try? values.decode(Int.self, forKey: .offset)) ?? -1 +// cards = (try? values.decode([FrontCard].self, forKey: .cards)) ?? [FrontCard]() +// } +} + +// MARK: - Cards +struct FrontCard: Codable { + let cardID, background, title, name, birthDate, mbti: String + let instagram, link, cardDescription: String? + + enum CodingKeys: String, CodingKey { + case cardID = "cardId" + case background, title, name, birthDate, mbti, instagram, link + case cardDescription = "description" + } + + // TODO: - 쓰게 될줄 알았는데 안써서 일단 보류 +// init(from decoder: Decoder) throws { +// let values = try decoder.container(keyedBy: CodingKeys.self) +// cardID = (try? values.decode(String.self, forKey: .cardID)) ?? "" +// background = (try? values.decode(String.self, forKey: .background)) ?? "" +// title = (try? values.decode(String.self, forKey: .title)) ?? "" +// name = (try? values.decode(String.self, forKey: .name)) ?? "" +// birthDate = (try? values.decode(String.self, forKey: .birthDate)) ?? "" +// age = (try? values.decode(String.self, forKey: .age)) ?? "" +// mbti = (try? values.decode(String.self, forKey: .mbti)) ?? "" +// instagram = (try? values.decode(String.self, forKey: .instagram)) +// linkName = (try? values.decode(String.self, forKey: .linkName)) +// link = (try? values.decode(String.self, forKey: .link)) +// cardDescription = (try? values.decode(String.self, forKey: .cardDescription)) +// } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Group/ChangeGroupRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Group/ChangeGroupRequest.swift new file mode 100644 index 00000000..d5137302 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Group/ChangeGroupRequest.swift @@ -0,0 +1,21 @@ +// +// ChangeGroupRequest.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/08. +// + +import Foundation + +// MARK: - ChangeGroupRequest +struct ChangeGroupRequest: Codable { + let cardID, userID: String + let groupID, newGroupID: Int + + enum CodingKeys: String, CodingKey { + case cardID = "cardId" + case userID = "userId" + case groupID = "groupId" + case newGroupID = "newGroupId" + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Group/GroupAddRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Group/GroupAddRequest.swift new file mode 100644 index 00000000..5c15460b --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Group/GroupAddRequest.swift @@ -0,0 +1,13 @@ +// +// GroupAddRequest.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/06. +// + +import Foundation + +struct GroupAddRequest: Codable { + var userId: String + var groupName: String +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Group/GroupEditRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Group/GroupEditRequest.swift new file mode 100644 index 00000000..b6a7acb1 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Group/GroupEditRequest.swift @@ -0,0 +1,13 @@ +// +// GroupEditRequest.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/06. +// + +import Foundation + +struct GroupEditRequest: Codable { + var groupId: Int + var groupName: String +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Group/Groups.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Group/Groups.swift new file mode 100644 index 00000000..f71483ac --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Group/Groups.swift @@ -0,0 +1,42 @@ +// +// GroupListResponse.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/06. +// + +import Foundation + +// MARK: - Groups + +struct Groups: Codable { + var groups: [Group] + + enum CondingKeys: String, CodingKey { + case groups + } + + // TODO: - 쓰게 될줄 알았는데 안써서 일단 보류 +// init(from decoder: Decoder) throws { +// let values = try decoder.container(keyedBy: CodingKeys.self) +// groups = (try? values.decode([Group].self, forKey: .groups)) ?? [Group]() +// } +} + +// MARK: - Group + +struct Group: Codable { + var groupID: Int + var groupName: String + + enum CodingKeys: String, CodingKey { + case groupID = "groupId" + case groupName + } + // TODO: - 쓰게 될줄 알았는데 안써서 일단 보류 +// init(from decoder: Decoder) throws { +// let values = try decoder.container(keyedBy: CodingKeys.self) +// groupID = (try? values.decode(Int.self, forKey: .groupID)) ?? -1 +// groupName = (try? values.decode(String.self, forKey: .groupName)) ?? "" +// } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/NetworkResult.swift b/NADA-iOS-forRelease/Sources/NetworkModel/NetworkResult.swift new file mode 100644 index 00000000..9c3a7a6d --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/NetworkResult.swift @@ -0,0 +1,16 @@ +// +// NetworkResult.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation + +enum NetworkResult { + case success(T) // 서버 통신 성공 + case requestErr(T) // 요청 에러 발생 + case pathErr // 경로 에러 + case serverErr // 서버의 내부적 에러 + case networkFail // 네트워크 연결 실패 +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/User/User.swift b/NADA-iOS-forRelease/Sources/NetworkModel/User/User.swift new file mode 100644 index 00000000..b2840abe --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/User/User.swift @@ -0,0 +1,23 @@ +// +// Users.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/13. +// + +import Foundation + +// MARK: - User + +struct User: Codable { + let userID: String + + enum CodingKeys: String, CodingKey { + case userID = "userId" + } + // TODO: - 쓰게 될줄 알았는데 안써서 일단 보류 +// init(from decoder: Decoder) throws { +// let values = try decoder.container(keyedBy: CodingKeys.self) +// userID = (try? values.decode(String.self, forKey: .userID)) ?? "" +// } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/User/UserTokenReissueRequset.swift b/NADA-iOS-forRelease/Sources/NetworkModel/User/UserTokenReissueRequset.swift new file mode 100644 index 00000000..09c2de85 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/User/UserTokenReissueRequset.swift @@ -0,0 +1,13 @@ +// +// UserTokenReissueRequset.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/21. +// + +import Foundation + +struct UserTokenReissueRequset: Codable { + var accessToken: String + var refreshToken: String +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/User/UserWithTokenRequest 2.swift b/NADA-iOS-forRelease/Sources/NetworkModel/User/UserWithTokenRequest 2.swift new file mode 100644 index 00000000..e33482ce --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/User/UserWithTokenRequest 2.swift @@ -0,0 +1,30 @@ +// +// UserWithTokenRequest.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/13. +// + +import Foundation + +// MARK: - UserWithTokenRequest +struct UserWithTokenRequest: Codable { + let user: UserData +} + +// MARK: - User +struct UserData: Codable { + let userID: String + let token: Token + + enum CodingKeys: String, CodingKey { + case userID = "userId" + case token + } +} + +// MARK: - Token +struct Token: Codable { + let grantType, accessToken, refreshToken: String + let accessTokenExpiresIn: Int +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/User/UserWithTokenRequest.swift b/NADA-iOS-forRelease/Sources/NetworkModel/User/UserWithTokenRequest.swift new file mode 100644 index 00000000..e33482ce --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/User/UserWithTokenRequest.swift @@ -0,0 +1,30 @@ +// +// UserWithTokenRequest.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/13. +// + +import Foundation + +// MARK: - UserWithTokenRequest +struct UserWithTokenRequest: Codable { + let user: UserData +} + +// MARK: - User +struct UserData: Codable { + let userID: String + let token: Token + + enum CodingKeys: String, CodingKey { + case userID = "userId" + case token + } +} + +// MARK: - Token +struct Token: Codable { + let grantType, accessToken, refreshToken: String + let accessTokenExpiresIn: Int +} diff --git a/NADA-iOS-forRelease/Sources/NetworkModel/Util/HarmonyResponse.swift b/NADA-iOS-forRelease/Sources/NetworkModel/Util/HarmonyResponse.swift new file mode 100644 index 00000000..f9faf125 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkModel/Util/HarmonyResponse.swift @@ -0,0 +1,25 @@ +// +// HarmonyResponse.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/26. +// + +import Foundation +import UIKit + +// MARK: - HarmonyResponse +struct HarmonyResponse: Codable { + let harmony: Int + + enum CodingKeys: String, CodingKey { + case harmony + } +} + +struct HarmonyData { + let icon: String + let percentage: String + let color: UIColor + let description: String +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Card/CardAPI.swift b/NADA-iOS-forRelease/Sources/NetworkService/Card/CardAPI.swift new file mode 100644 index 00000000..a312aec5 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/Card/CardAPI.swift @@ -0,0 +1,208 @@ +// +// CardAPI.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +public class CardAPI { + static let shared = CardAPI() + var cardProvider = MoyaProvider(plugins: [MoyaLoggerPlugin()]) + + public init() { } + + func cardDetailFetch(cardID: String, completion: @escaping (NetworkResult) -> Void) { + cardProvider.request(.cardDetailFetch(cardID: cardID)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeCardDetailFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func cardCreation(request: CardCreationRequest, image: UIImage, completion: @escaping (NetworkResult) -> Void) { + cardProvider.request(.cardCreation(request: request, image: image)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeCardCreationStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + completion(.networkFail) + } + } + } + + func cardListFetch(userID: String, isList: Bool, offset: Int?, completion: @escaping (NetworkResult) -> Void) { + cardProvider.request(.cardListFetch(userID: userID, isList: isList, offset: offset)) { (result) in + if isList == true { + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeCardListFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } else { + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeMainListFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + } + + func cardListEdit(request: CardListEditRequest, completion: @escaping (NetworkResult) -> Void) { + cardProvider.request(.cardListEdit(request: request)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func cardDelete(cardID: String, completion: @escaping (NetworkResult) -> Void) { + cardProvider.request(.cardDelete(cardID: cardID)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + private func judgeCardDetailFetchStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeMainListFetchStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeCardListFetchStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeCardCreationStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 201: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { return .pathErr } + + switch statusCode { + case 200: + return .success(decodedData.msg) + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Card/CardService.swift b/NADA-iOS-forRelease/Sources/NetworkService/Card/CardService.swift new file mode 100644 index 00000000..afc5d8a9 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/Card/CardService.swift @@ -0,0 +1,120 @@ +// +// CardService.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +enum CardService { + case cardDetailFetch(cardID: String) + case cardCreation(request: CardCreationRequest, image: UIImage) + case cardListFetch(userID: String, isList: Bool, offset: Int?) + case cardListEdit(request: CardListEditRequest) + case cardDelete(cardID: String) +} + +extension CardService: TargetType { + + var baseURL: URL { + return URL(string: Const.URL.baseURL)! + } + + var path: String { + switch self { + case .cardDetailFetch(let cardID): + return "/card/\(cardID)" + case .cardCreation: + return "/card" + case .cardListFetch: + return "/cards" + case .cardListEdit: + return "/cards" + case .cardDelete(let cardID): + return "/card/\(cardID)" + } + } + + var method: Moya.Method { + switch self { + case .cardDetailFetch, .cardListFetch: + return .get + case .cardCreation: + return .post + case .cardListEdit: + return .put + case .cardDelete: + return .delete + } + } + + var sampleData: Data { + return Data() + } + + var task: Task { + switch self { + case .cardDetailFetch, .cardDelete: + return .requestPlain + case .cardCreation(let request, let image): + + var multiPartData: [Moya.MultipartFormData] = [] + + let userIDData = request.userID.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(userIDData), name: "card.userId")) + let defaultImageData = Int(request.frontCard.defaultImage).description.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(defaultImageData), name: "card.defaultImage")) + let titleData = request.frontCard.title.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(titleData), name: "card.title")) + let nameData = request.frontCard.name.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(nameData), name: "card.name")) + let birthDateData = request.frontCard.birthDate.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(birthDateData), name: "card.birthDate")) + let mbtiData = request.frontCard.mbti.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(mbtiData), name: "card.mbti")) + let instagramIDData = request.frontCard.instagramID.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(instagramIDData), name: "card.instagram")) + let linkURLData = request.frontCard.linkURL.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(linkURLData), name: "card.link")) + let descriptionData = request.frontCard.description.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(descriptionData), name: "card.description")) + let isMinchoData = Bool(request.backCard.isMincho).description.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(isMinchoData), name: "card.isMincho")) + let isSojuData = Bool(request.backCard.isSoju).description.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(isSojuData), name: "card.isSoju")) + let isBoomukData = Bool(request.backCard.isBoomuk).description.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(isBoomukData), name: "card.isBoomuk")) + let isSaucedData = Bool(request.backCard.isSauced).description.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(isSaucedData), name: "card.isSauced")) + let oneTMI = request.backCard.oneTMI.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(oneTMI), name: "card.oneTmi")) + let twoTMI = request.backCard.twoTMI.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(twoTMI), name: "card.twoTmi")) + let threeTMI = request.backCard.threeTMI.data(using: .utf8) ?? Data() + multiPartData.append(MultipartFormData(provider: .data(threeTMI), name: "card.threeTmi")) + + let imageData = MultipartFormData(provider: .data(image.pngData() ?? Data()), name: "image", fileName: "image", mimeType: "image/png") + multiPartData.append(imageData) + + return .uploadMultipart(multiPartData) + case .cardListFetch(let userID, let isList, let offset): + return .requestParameters(parameters: ["userId": userID, + "list": isList, + "offset": offset ?? ""], + encoding: URLEncoding.queryString) + case .cardListEdit(let requestModel): + return .requestJSONEncodable(requestModel) + } + } + + var headers: [String: String]? { + switch self { + case .cardDetailFetch, .cardListFetch, .cardDelete, .cardListEdit: + return Const.Header.basicHeader + case .cardCreation: + return Const.Header.basicHeader + } + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Group/GroupAPI.swift b/NADA-iOS-forRelease/Sources/NetworkService/Group/GroupAPI.swift new file mode 100644 index 00000000..0a51b19f --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/Group/GroupAPI.swift @@ -0,0 +1,219 @@ +// +// GroupAPI.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +public class GroupAPI { + + static let shared = GroupAPI() + var groupProvider = MoyaProvider(plugins: [MoyaLoggerPlugin()]) + + public init() { } + + func changeCardGroup(request: ChangeGroupRequest, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.changeCardGroup(request: request)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func cardDeleteInGroup(groupID: Int, cardID: String, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.cardDeleteInGroup(groupID: groupID, cardID: cardID)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func groupListFetch(userID: String, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.groupListFetch(userID: userID)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeGroupListFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func groupDelete(groupID: Int, defaultGroupId: Int, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.groupDelete(groupID: groupID, defaultGroupId: defaultGroupId)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func groupAdd(groupRequest: GroupAddRequest, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.groupAdd(groupRequest: groupRequest)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func groupEdit(groupRequest: GroupEditRequest, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.groupEdit(groupRequest: groupRequest)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func cardAddInGroup(cardRequest: CardAddInGroupRequest, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.cardAddInGroup(cardRequest: cardRequest)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func cardListFetchInGroup(cardListInGroupRequest: CardListInGroupRequest, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.cardListFetchInGroup(cardListInGroupRequest: cardListInGroupRequest)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeCardListFetchInGroupStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func groupReset(token: String, completion: @escaping (NetworkResult) -> Void) { + groupProvider.request(.groupReset(token: token)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + private func judgeGroupListFetchStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeCardListFetchInGroupStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { return .pathErr } + + switch statusCode { + case 200: + return .success(decodedData.msg) + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Group/GroupService.swift b/NADA-iOS-forRelease/Sources/NetworkService/Group/GroupService.swift new file mode 100644 index 00000000..af923dbe --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/Group/GroupService.swift @@ -0,0 +1,106 @@ +// +// GroupService.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +enum GroupService { + case groupListFetch(userID: String) + case groupDelete(groupID: Int, defaultGroupId: Int) + case groupAdd(groupRequest: GroupAddRequest) + case groupEdit(groupRequest: GroupEditRequest) + case cardAddInGroup(cardRequest: CardAddInGroupRequest) + case cardListFetchInGroup(cardListInGroupRequest: CardListInGroupRequest) + case changeCardGroup(request: ChangeGroupRequest) + case cardDeleteInGroup(groupID: Int, cardID: String) + case groupReset(token: String) +} + +extension GroupService: TargetType { + var baseURL: URL { + return URL(string: Const.URL.baseURL)! + } + + var authorizationType: AuthorizationType? { + switch self { + case .groupListFetch, .cardListFetchInGroup, .groupDelete, .cardDeleteInGroup: + return .bearer + case .groupAdd, .groupEdit, .cardAddInGroup, .changeCardGroup, .groupReset: + return .bearer + } + } + + var path: String { + switch self { + case .groupListFetch, .groupReset: + return "/groups" + case .groupDelete(let groupID, _): + return "/group/\(groupID)" + case .groupAdd, .groupEdit: + return "/group" + case .cardAddInGroup, .changeCardGroup: + return "/groups/card" + case .cardListFetchInGroup: + return "/groups/cards" + case .cardDeleteInGroup(let groupID, let cardID): + return "/group/\(groupID)/\(cardID)" + } + } + + var method: Moya.Method { + switch self { + case .groupListFetch, .cardListFetchInGroup: + return .get + case .groupDelete, .cardDeleteInGroup, .groupReset: + return .delete + case .groupAdd, .cardAddInGroup: + return .post + case .groupEdit, .changeCardGroup: + return .put + } + } + + var sampleData: Data { + return Data() + } + + var task: Task { + switch self { + case .groupListFetch(let userID): + return .requestParameters(parameters: ["userId": userID], + encoding: URLEncoding.queryString) + case .cardDeleteInGroup, .groupReset: + return .requestPlain + case .groupDelete(_, let defaultGroupId): + return .requestParameters(parameters: ["defaultGroupId": defaultGroupId], + encoding: URLEncoding.queryString) + case .groupAdd(let groupRequest): + return .requestJSONEncodable(groupRequest) + case .groupEdit(let groupRequest): + return .requestJSONEncodable(groupRequest) + case .cardAddInGroup(let cardRequest): + return .requestJSONEncodable(cardRequest) + case .cardListFetchInGroup(let cardListInGroupRequest): + return .requestParameters(parameters: ["userId": cardListInGroupRequest.userId, + "groupId": cardListInGroupRequest.groupId, + "offset": cardListInGroupRequest.offset], encoding: URLEncoding.queryString) + case .changeCardGroup(let requestModel): + return .requestJSONEncodable(requestModel) + } + } + + var headers: [String: String]? { + switch self { + case .groupListFetch, .cardListFetchInGroup, .groupDelete, .cardDeleteInGroup: + return Const.Header.bearerHeader + case .groupAdd, .groupEdit, .cardAddInGroup, .changeCardGroup: + return Const.Header.bearerHeader + case .groupReset: + return Const.Header.basicHeader + } + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Plugin/MoyaLoggerPlugin.swift b/NADA-iOS-forRelease/Sources/NetworkService/Plugin/MoyaLoggerPlugin.swift new file mode 100644 index 00000000..6db06b94 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/Plugin/MoyaLoggerPlugin.swift @@ -0,0 +1,71 @@ +// +// File.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +final class MoyaLoggerPlugin: PluginType { + + // Request를 보낼 때 호출 + func willSend(_ request: RequestType, target: TargetType) { + guard let httpRequest = request.request else { + print("--> 유효하지 않은 요청") + return + } + let url = httpRequest.description + let method = httpRequest.httpMethod ?? "unknown method" + var log = "----------------------------------------------------\n[\(method)] \(url)\n----------------------------------------------------\n" + log.append("API: \(target)\n") + if let headers = httpRequest.allHTTPHeaderFields, !headers.isEmpty { + log.append("header: \(headers)\n") + } + if let body = httpRequest.httpBody, let bodyString = String(bytes: body, encoding: String.Encoding.utf8) { + log.append("\(bodyString)\n") + } + log.append("------------------- END \(method) --------------------------") + print(log) + } + + // Response가 왔을 때 + func didReceive(_ result: Result, target: TargetType) { + switch result { + case let .success(response): + onSuceed(response, target: target, isFromError: false) + case let .failure(error): + onFail(error, target: target) + } + } + + func onSuceed(_ response: Response, target: TargetType, isFromError: Bool) { + let request = response.request + let url = request?.url?.absoluteString ?? "nil" + let statusCode = response.statusCode + var log = "------------------- 네트워크 통신 성공(isFromError: \(isFromError)) -------------------" + log.append("\n[\(statusCode)] \(url)\n----------------------------------------------------\n") + log.append("API: \(target)\n") + response.response?.allHeaderFields.forEach { + log.append("\($0): \($1)\n") + } + if let reString = String(bytes: response.data, encoding: String.Encoding.utf8) { + log.append("\(reString)\n") + } + log.append("------------------- END HTTP (\(response.data.count)-byte body) -------------------") + print(log) + } + + func onFail(_ error: MoyaError, target: TargetType) { + if let response = error.response { + onSuceed(response, target: target, isFromError: true) + return + } + var log = "네트워크 오류" + log.append("<-- \(error.errorCode) \(target)\n") + log.append("\(error.failureReason ?? error.errorDescription ?? "unknown error")\n") + log.append("<-- END HTTP") + print(log) + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/User/UserAPI.swift b/NADA-iOS-forRelease/Sources/NetworkService/User/UserAPI.swift new file mode 100644 index 00000000..f8bc04e6 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/User/UserAPI.swift @@ -0,0 +1,205 @@ +// +// UserAPI.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +public class UserAPI { + + static let shared = UserAPI() + var userProvider = MoyaProvider(plugins: [MoyaLoggerPlugin()]) + + public init() { } + + func userIDFetch(userID: String, completion: @escaping (NetworkResult) -> Void) { + userProvider.request(.userIDFetch(userID: userID)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeUserIDFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func userTokenFetch(userID: String, completion: @escaping (NetworkResult) -> Void) { + userProvider.request(.userTokenFetch(userID: userID)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeUserTokenFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func userSignUp(request: User, completion: @escaping (NetworkResult) -> Void) { + userProvider.request(.userSignUp(request: request)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeUserIDFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func userDelete(token: String, completion: @escaping (NetworkResult) -> Void) { + userProvider.request(.userDelete(token: token)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func userSocialSignUp(request: String, completion: @escaping (NetworkResult) -> Void) { + userProvider.request(.userSocialSignUp(userID: request)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + let networkResult = self.judgeUserTokenFetchStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func userLogout(token: String, completion: @escaping (NetworkResult) -> Void) { + userProvider.request(.userLogout(token: token)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + func userTokenReissue(request: UserTokenReissueRequset, completion: @escaping (NetworkResult) -> Void) { + userProvider.request(.userTokenReissue(request: request)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeUserTokenReissueStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + private func judgeUserIDFetchStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeUserTokenFetchStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeUserTokenReissueStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { + return .pathErr + } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } + + private func judgeStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { return .pathErr } + + switch statusCode { + case 200: + return .success(decodedData.msg) + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/User/UserSevice.swift b/NADA-iOS-forRelease/Sources/NetworkService/User/UserSevice.swift new file mode 100644 index 00000000..1f025ec8 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/User/UserSevice.swift @@ -0,0 +1,84 @@ +// +// UserSevice.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +enum UserSevice { + case userIDFetch(userID: String) + case userTokenFetch(userID: String) + case userSignUp(request: User) + case userDelete(token: String) + case userSocialSignUp(userID: String) + case userLogout(token: String) + case userTokenReissue(request: UserTokenReissueRequset) +} + +extension UserSevice: TargetType { + + var baseURL: URL { + return URL(string: Const.URL.baseURL)! + } + + var path: String { + switch self { + case .userIDFetch(let userID): + return "/\(userID)/login" + case .userTokenFetch(let userID): + return "/auth/\(userID)/login" + case .userSignUp: + return "/register" + case .userDelete: + return "/user" + case .userSocialSignUp: + return "auth/login" + case .userLogout: + return "auth/logout" + case .userTokenReissue: + return "auth/reissue" + } + } + + var method: Moya.Method { + switch self { + case .userIDFetch, .userTokenFetch: + return .get + case .userSignUp, .userSocialSignUp, .userTokenReissue: + return .post + case .userDelete, .userLogout: + return .delete + } + } + + var sampleData: Data { + return Data() + } + + var task: Task { + switch self { + case .userIDFetch, .userTokenFetch, .userDelete, .userLogout: + return .requestPlain + case .userSignUp(let request): + return .requestJSONEncodable(request) + case .userSocialSignUp(let userID): + return .requestParameters(parameters: ["userId": userID], encoding: JSONEncoding.default) + case .userTokenReissue(let request): + return .requestJSONEncodable(request) + } + } + + var headers: [String: String]? { + switch self { + case .userIDFetch, .userTokenFetch: + return Const.Header.bearerHeader + case .userSignUp, .userSocialSignUp, .userTokenReissue: + return ["Content-Type": "application/json"] + case .userDelete, .userLogout: + return Const.Header.basicHeader + } + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Util/UtilAPI.swift b/NADA-iOS-forRelease/Sources/NetworkService/Util/UtilAPI.swift new file mode 100644 index 00000000..91fc4e9a --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/Util/UtilAPI.swift @@ -0,0 +1,51 @@ +// +// UtilAPI.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +public class UtilAPI { + + static let shared = UtilAPI() + var utilProvider = MoyaProvider(plugins: [MoyaLoggerPlugin()]) + + public init() { } + + func cardHarmonyFetch(myCard: String, yourCard: String, completion: @escaping (NetworkResult) -> Void) { + utilProvider.request(.cardHarmonyFetch(myCard: myCard, yourCard: yourCard)) { (result) in + switch result { + case .success(let response): + let statusCode = response.statusCode + let data = response.data + + let networkResult = self.judgeStatus(by: statusCode, data) + completion(networkResult) + + case .failure(let err): + print(err) + } + } + } + + private func judgeStatus(by statusCode: Int, _ data: Data) -> NetworkResult { + + let decoder = JSONDecoder() + guard let decodedData = try? decoder.decode(GenericResponse.self, from: data) + else { return .pathErr } + + switch statusCode { + case 200: + return .success(decodedData.data ?? "None-Data") + case 400..<500: + return .requestErr(decodedData.msg) + case 500: + return .serverErr + default: + return .networkFail + } + } +} diff --git a/NADA-iOS-forRelease/Sources/NetworkService/Util/UtilService.swift b/NADA-iOS-forRelease/Sources/NetworkService/Util/UtilService.swift new file mode 100644 index 00000000..3ffa55b0 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/NetworkService/Util/UtilService.swift @@ -0,0 +1,60 @@ +// +// UtilService.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/01. +// + +import Foundation +import Moya + +enum UtilService { + case cardHarmonyFetch(myCard: String, yourCard: String) +} + +extension UtilService: TargetType { + var baseURL: URL { + return URL(string: Const.URL.baseURL)! + } + + var authorizationType: AuthorizationType? { + switch self { + case .cardHarmonyFetch: + return .bearer + } + } + + var path: String { + switch self { + case .cardHarmonyFetch: + return "/card/util" + } + } + + var method: Moya.Method { + switch self { + case .cardHarmonyFetch: + return .get + } + } + + var sampleData: Data { + return Data() + } + + var task: Task { + switch self { + case .cardHarmonyFetch(let myCard, let yourCard): + return .requestParameters(parameters: ["myCard": myCard, + "yourCard": yourCard], + encoding: URLEncoding.queryString) + } + } + + var headers: [String: String]? { + switch self { + case .cardHarmonyFetch: + return Const.Header.bearerHeader + } + } +} diff --git a/NADA-iOS-forRelease/Sources/Protocols/CardCreation/BackCardCreationDelegate.swift b/NADA-iOS-forRelease/Sources/Protocols/CardCreation/BackCardCreationDelegate.swift new file mode 100644 index 00000000..7527982f --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Protocols/CardCreation/BackCardCreationDelegate.swift @@ -0,0 +1,14 @@ +// +// BackCardCreationDelegate.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/08/08. +// + +import Foundation + +protocol BackCardCreationDelegate: AnyObject { + func backCardCreation(requiredInfo valid: Bool) + func backCardCreation(endEditing valid: Bool) + func backCardCreation(withRequired requiredInfo: [String: Bool], withOptional optionalInfo: [String: String] ) +} diff --git a/NADA-iOS-forRelease/Sources/Protocols/CardCreation/FrontCardCreationDelegate.swift b/NADA-iOS-forRelease/Sources/Protocols/CardCreation/FrontCardCreationDelegate.swift new file mode 100644 index 00000000..7302786b --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Protocols/CardCreation/FrontCardCreationDelegate.swift @@ -0,0 +1,14 @@ +// +// FrontCardDelegate.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/09. +// + +import Foundation + +protocol FrontCardCreationDelegate: AnyObject { + func frontCardCreation(requiredInfo valid: Bool) + func frontCardCreation(endEditing valid: Bool) + func frontCardCreation(withRequired requiredInfo: [String: String], withOptional optionalInfo: [String: String] ) +} diff --git a/NADA-iOS-forRelease/Sources/Protocols/TempProtocols.swift b/NADA-iOS-forRelease/Sources/Protocols/TempProtocols.swift deleted file mode 100644 index 518f1df9..00000000 --- a/NADA-iOS-forRelease/Sources/Protocols/TempProtocols.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempProtocols.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/NADA-iOS-forRelease/SceneDelegate.swift b/NADA-iOS-forRelease/Sources/SceneDelegate.swift similarity index 60% rename from NADA-iOS-forRelease/SceneDelegate.swift rename to NADA-iOS-forRelease/Sources/SceneDelegate.swift index 4fae9433..15d9ca21 100644 --- a/NADA-iOS-forRelease/SceneDelegate.swift +++ b/NADA-iOS-forRelease/Sources/SceneDelegate.swift @@ -6,52 +6,77 @@ // import UIKit +import IQKeyboardManagerSwift +import KakaoSDKAuth class SceneDelegate: UIResponder, UIWindowSceneDelegate { - + var window: UIWindow? - - + let defaults = UserDefaults.standard + 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 windowScene = (scene as? UIWindowScene) else { return } window = UIWindow(frame: windowScene.coordinateSpace.bounds) - window?.windowScene = windowScene - window?.rootViewController = UIStoryboard(name: Const.Storyboard.Name.Main, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.MainViewController) - window?.makeKeyAndVisible() - } + window?.windowScene = windowScene + window?.rootViewController = UIStoryboard(name: Const.Storyboard.Name.splash, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.splashViewController) + window?.makeKeyAndVisible() + + IQKeyboardManager.shared.enable = true + IQKeyboardManager.shared.enableAutoToolbar = false + IQKeyboardManager.shared.shouldResignOnTouchOutside = true + + let isDark = defaults.bool(forKey: Const.UserDefaultsKey.darkModeState) + + // 시스템 무시하고 UserDefault 상태에 따라 화면 전체에 다크/라이트 모드를 결정 + if let window = UIApplication.shared.windows.first { + if #available(iOS 13.0, *) { + window.overrideUserInterfaceStyle = isDark == true ? .dark : .light + } else { + window.overrideUserInterfaceStyle = .light + } + } + } + + func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { + if let url = URLContexts.first?.url { + if (AuthApi.isKakaoTalkLoginUrl(url)) { + _ = AuthController.handleOpenUrl(url: url) + } + } + } + + // MARK: - Methods + 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/NADA-iOS-forRelease/Sources/ViewController/MainViewController.swift b/NADA-iOS-forRelease/Sources/ViewController/MainViewController.swift deleted file mode 100644 index bc9f152e..00000000 --- a/NADA-iOS-forRelease/Sources/ViewController/MainViewController.swift +++ /dev/null @@ -1,17 +0,0 @@ -// -// ViewController.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import UIKit - -class MainViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - } - -} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/AddGroupBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/AddGroupBottomSheetViewController.swift new file mode 100644 index 00000000..8b05e5f9 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/AddGroupBottomSheetViewController.swift @@ -0,0 +1,145 @@ +// +// AddGroupBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/21. +// + +import UIKit +import IQKeyboardManagerSwift + +class AddGroupBottomSheetViewController: CommonBottomSheetViewController, UITextFieldDelegate { + + // MARK: - Properties + var returnToGroupEditViewController: (() -> Void)? + private var bottomSheetViewTopConstraint: NSLayoutConstraint? + + // 그룹 추가 텍스트 필드 + private let addGroupTextField: UITextField = { + let textField = UITextField() + textField.borderStyle = .none + textField.cornerRadius = 10 + textField.backgroundColor = .textBox + textField.attributedPlaceholder = NSAttributedString(string: "추가할 그룹명을 입력하세요.", attributes: [.foregroundColor: UIColor.quaternary, .font: UIFont.textRegular04]) + textField.returnKeyType = .done + textField.setLeftPaddingPoints(12) + textField.setRightPaddingPoints(12) + + return textField + }() + + private let checkImageView: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage(named: "iconDone") + + return imageView + }() + + private let explainLabel: UILabel = { + let label = UILabel() + label.text = "새로운 그룹은 최대 4개까지만 등록 가능합니다." + label.textColor = .mainColorButtonText + label.font = .textRegular05 + + return label + }() + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + addGroupTextField.delegate = self + IQKeyboardManager.shared.shouldResignOnTouchOutside = false + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + self.addGroupTextField.becomeFirstResponder() + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + view.addSubview(addGroupTextField) + view.addSubview(checkImageView) + view.addSubview(explainLabel) + + setupLayout() + } + + // 레이아웃 세팅 + private func setupLayout() { + addGroupTextField.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + addGroupTextField.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 20), + addGroupTextField.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 24), + addGroupTextField.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -24), + addGroupTextField.heightAnchor.constraint(equalToConstant: 45) + ]) + + checkImageView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + checkImageView.topAnchor.constraint(equalTo: addGroupTextField.bottomAnchor, constant: 7), + checkImageView.leadingAnchor.constraint(equalTo: addGroupTextField.leadingAnchor, constant: 4), + checkImageView.widthAnchor.constraint(equalToConstant: 16), + checkImageView.heightAnchor.constraint(equalToConstant: 16) + ]) + + explainLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + explainLabel.topAnchor.constraint(equalTo: addGroupTextField.bottomAnchor, constant: 8), + explainLabel.leadingAnchor.constraint(equalTo: checkImageView.trailingAnchor, constant: 5) + ]) + } + + private func nowHideBottomSheetAndGoBack() { + let safeAreaHeight = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding = view.safeAreaInsets.bottom + bottomSheetViewTopConstraint?.constant = safeAreaHeight + bottomPadding + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.0 + self.view.layoutIfNeeded() + self.bottomSheetCoverView.isHidden = false + }, completion: { _ in + if self.presentingViewController != nil { + self.dismiss(animated: false) { + self.returnToGroupEditViewController?() + } + } + }) + } +} + +// MARK: - Extensions +extension AddGroupBottomSheetViewController { + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + groupAddWithAPI(groupRequest: GroupAddRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", groupName: addGroupTextField.text ?? "")) + + return true + } +} + +// MARK: - Network +extension AddGroupBottomSheetViewController { + func groupAddWithAPI(groupRequest: GroupAddRequest) { + GroupAPI.shared.groupAdd(groupRequest: groupRequest) { response in + switch response { + case .success: + print("groupAddWithAPI - success") + self.addGroupTextField.becomeFirstResponder() + self.nowHideBottomSheetAndGoBack() + case .requestErr(let message): + print("groupAddWithAPI - requestErr: \(message)") + self.makeOKAlert(title: "", message: "이미 존재하는 그룹명입니다.") + case .pathErr: + print("groupAddWithAPI - pathErr") + case .serverErr: + print("groupAddWithAPI - serverErr") + case .networkFail: + print("groupAddWithAPI - networkFail") + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/AddWithIdBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/AddWithIdBottomSheetViewController.swift new file mode 100644 index 00000000..0b949b46 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/AddWithIdBottomSheetViewController.swift @@ -0,0 +1,133 @@ +// +// AddWithIdBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/25. +// + +import UIKit +import IQKeyboardManagerSwift + +class AddWithIdBottomSheetViewController: CommonBottomSheetViewController, UITextFieldDelegate { + + // MARK: - Properties + // ID 추가 텍스트 필드 + private let addWithIdTextField: UITextField = { + let textField = UITextField() + textField.borderStyle = .none + textField.cornerRadius = 10 + textField.backgroundColor = .textBox + textField.attributedPlaceholder = NSAttributedString(string: "친구의 명함 ID를 입력해보세요.", attributes: [.foregroundColor: UIColor.quaternary, .font: UIFont.textRegular04]) + textField.returnKeyType = .done + textField.setLeftPaddingPoints(12) + textField.setRightPaddingPoints(12) + + return textField + }() + + private let errorImageView: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage(named: "iconError") + + return imageView + }() + + private let explainLabel: UILabel = { + let label = UILabel() + label.textColor = .stateColorError + label.font = .textRegular05 + + return label + }() + + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + addWithIdTextField.delegate = self + IQKeyboardManager.shared.shouldResignOnTouchOutside = false + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + self.addWithIdTextField.becomeFirstResponder() + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + view.addSubview(addWithIdTextField) + view.addSubview(errorImageView) + view.addSubview(explainLabel) + + setupLayout() + errorImageView.isHidden = true + explainLabel.isHidden = true + } + + // 레이아웃 세팅 + private func setupLayout() { + addWithIdTextField.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + addWithIdTextField.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 20), + addWithIdTextField.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 24), + addWithIdTextField.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -24), + addWithIdTextField.heightAnchor.constraint(equalToConstant: 45) + ]) + + errorImageView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + errorImageView.topAnchor.constraint(equalTo: addWithIdTextField.bottomAnchor, constant: 7), + errorImageView.leadingAnchor.constraint(equalTo: addWithIdTextField.leadingAnchor, constant: 4), + errorImageView.widthAnchor.constraint(equalToConstant: 16), + errorImageView.heightAnchor.constraint(equalToConstant: 16) + ]) + + explainLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + explainLabel.topAnchor.constraint(equalTo: addWithIdTextField.bottomAnchor, constant: 8), + explainLabel.leadingAnchor.constraint(equalTo: errorImageView.trailingAnchor, constant: 5) + ]) + } +} + +extension AddWithIdBottomSheetViewController { + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + cardDetailFetchWithAPI(cardID: textField.text ?? "") + return true + } +} + +extension AddWithIdBottomSheetViewController { + func cardDetailFetchWithAPI(cardID: String) { + CardAPI.shared.cardDetailFetch(cardID: cardID) { response in + switch response { + case .success(let data): + if let card = data as? CardClass { + if UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) == card.card.author { + self.errorImageView.isHidden = false + self.explainLabel.isHidden = false + self.explainLabel.text = "자신의 명함은 추가할 수 없습니다." + } else { + self.addWithIdTextField.resignFirstResponder() + let nextVC = CardResultBottomSheetViewController() + nextVC.cardDataModel = card.card + self.hideBottomSheetAndPresent(nextBottomSheet: nextVC, title: card.card.name, height: 574) + } + } + case .requestErr(let message): + print("cardDetailFetchWithAPI - requestErr: \(message)") + self.errorImageView.isHidden = false + self.explainLabel.isHidden = false + self.explainLabel.text = "검색한 ID가 존재하지 않습니다." + case .pathErr: + print("cardDetailFetchWithAPI - pathErr") + case .serverErr: + print("cardDetailFetchWithAPI - serverErr") + case .networkFail: + print("cardDetailFetchWithAPI - networkFail") + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CardResultBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CardResultBottomSheetViewController.swift new file mode 100644 index 00000000..ae0ea661 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CardResultBottomSheetViewController.swift @@ -0,0 +1,135 @@ +// +// CardResultBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/26. +// + +import UIKit +import IQKeyboardManagerSwift + +class CardResultBottomSheetViewController: CommonBottomSheetViewController { + + // MARK: - Properties + var cardDataModel: Card? + + var status: Status = .add + + private let groupLabel: UILabel = { + let label = UILabel() + label.textColor = .secondary + label.font = .textRegular03 + + return label + }() + + private let cardView: CardView = { + let view = CardView() + return view + }() + + private let addButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(named: "btnMainAdd"), for: .normal) + button.addTarget(self, action: #selector(presentGroupSelectBottomSheet), for: .touchUpInside) + + return button + }() + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + override func hideBottomSheetAndGoBack() { + super.hideBottomSheetAndGoBack() + + NotificationCenter.default.post(name: .dismissQRCodeCardResult, object: nil) + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + view.addSubview(groupLabel) + view.addSubview(cardView) + view.addSubview(addButton) + setupLayout() + + groupLabel.text = cardDataModel?.cardDescription + setCardView() + } + + private func setCardView() { + cardView.backgroundImageView.updateServerImage(cardDataModel?.background ?? "") + cardView.titleLabel.text = cardDataModel?.title ?? "" + cardView.descriptionLabel.text = cardDataModel?.cardDescription ?? "" + cardView.userNameLabel.text = cardDataModel?.name ?? "" + cardView.birthLabel.text = cardDataModel?.birthDate ?? "" + cardView.mbtiLabel.text = cardDataModel?.mbti ?? "" + cardView.instagramIDLabel.text = cardDataModel?.instagram ?? "" + cardView.lineURLLabel.text = cardDataModel?.link ?? "" + + if cardDataModel?.instagram == ""{ + cardView.instagramIcon.isHidden = true + } + if cardDataModel?.link == ""{ + cardView.urlIcon.isHidden = true + } + } + + // 레이아웃 세팅 + private func setupLayout() { + groupLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + groupLabel.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 14), + groupLabel.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + + cardView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + cardView.topAnchor.constraint(equalTo: groupLabel.bottomAnchor, constant: 20), + cardView.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + cardView.widthAnchor.constraint(equalToConstant: 201), + cardView.heightAnchor.constraint(equalToConstant: 332) + ]) + + addButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + addButton.topAnchor.constraint(equalTo: cardView.bottomAnchor, constant: 30), + addButton.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + addButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 24), + addButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -24) + ]) + } + + @objc func presentGroupSelectBottomSheet() { + groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "") + } + +} + +extension CardResultBottomSheetViewController { + func groupListFetchWithAPI(userID: String) { + GroupAPI.shared.groupListFetch(userID: userID) { response in + switch response { + case .success(let data): + if let group = data as? Groups { + let nextVC = SelectGroupBottomSheetViewController() + nextVC.status = self.status + nextVC.cardDataModel = self.cardDataModel + nextVC.serverGroups = group + self.hideBottomSheetAndPresent(nextBottomSheet: nextVC, title: "그룹선택", height: 386) + } + case .requestErr(let message): + print("groupListFetchWithAPI - requestErr: \(message)") + case .pathErr: + print("groupListFetchWithAPI - pathErr") + case .serverErr: + print("groupListFetchWithAPI - serverErr") + case .networkFail: + print("groupListFetchWithAPI - networkFail") + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CardShareBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CardShareBottomSheetViewController.swift new file mode 100644 index 00000000..3b7872e7 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CardShareBottomSheetViewController.swift @@ -0,0 +1,207 @@ +// +// CardShareBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/21. +// + +import UIKit +import Photos + +class CardShareBottomSheetViewController: CommonBottomSheetViewController { + + // MARK: - Properties + + var isShareable = false + var cardDataModel: Card? + + private let qrImage: UIImageView = { + let imageView = UIImageView() + imageView.frame = CGRect(x: 0, y: 0, width: 160, height: 160) + return imageView + }() + + private let idTitleLabel: UILabel = { + let label = UILabel() + label.text = "ID" + label.textColor = .secondary + label.font = .title01 + + return label + }() + + private let idLabel: UILabel = { + let label = UILabel() + label.textColor = .secondary + label.font = .textRegular01 + + return label + }() + + private let copyButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(named: "iconCopy"), for: .normal) + button.addTarget(self, action: #selector(copyId), for: .touchUpInside) + + return button + }() + + private let idStackView: UIStackView = { + let stackView = UIStackView() + stackView.axis = .horizontal + stackView.spacing = 10 + stackView.distribution = .fill + return stackView + }() + + private let saveAsImageButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(named: "buttonShareImg"), for: .normal) + button.addTarget(self, action: #selector(saveAsImage), for: .touchUpInside) + + return button + }() + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + idStackView.addArrangedSubview(idTitleLabel) + idStackView.addArrangedSubview(idLabel) + idStackView.addArrangedSubview(copyButton) + + view.addSubview(qrImage) + view.addSubview(idStackView) + view.addSubview(saveAsImageButton) + + idLabel.text = cardDataModel?.cardID ?? "" + + setupLayout() + setQRImage() + } + + // 레이아웃 세팅 + private func setupLayout() { + qrImage.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + qrImage.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 8), + qrImage.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + qrImage.widthAnchor.constraint(equalToConstant: 160), + qrImage.heightAnchor.constraint(equalToConstant: 160) + ]) + + idStackView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + idStackView.topAnchor.constraint(equalTo: qrImage.bottomAnchor, constant: 9), + idStackView.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + + saveAsImageButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + saveAsImageButton.topAnchor.constraint(equalTo: idStackView.bottomAnchor, constant: 32), + saveAsImageButton.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + saveAsImageButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 107) + ]) + } + + private func setQRImage() { + let frame = CGRect(origin: .zero, size: qrImage.frame.size) + print("TeamNADA\(cardDataModel?.cardID ?? "")") + let qrcode = QRCodeView(frame: frame) + qrcode.generateCode("ThisIsTeamNADAQrCode\(cardDataModel?.cardID ?? "")", + foregroundColor: .primary, + backgroundColor: .background) + qrImage.addSubview(qrcode) + } + + private func setImageWriteToSavedPhotosAlbum() { + let frontCardImage = setFrontCardImage() + let backCardImage = setBackCardImage() + + switch PHPhotoLibrary.authorizationStatus() { + case .authorized: + UIImageWriteToSavedPhotosAlbum(frontCardImage, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil) + UIImageWriteToSavedPhotosAlbum(backCardImage, self, #selector(image(_:didFinishSavingWithError:contextInfo:)), nil) + case .denied: + makeOKCancelAlert(title: "갤러리 권한이 허용되어 있지 않아요.", + message: "명함 이미지 저장을 위해 갤러리 권한이 필요합니다. 앱 설정으로 이동해 허용해 주세요.", + okAction: { _ in UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)}, + cancelAction: nil, + completion: nil) + case .notDetermined: + PHPhotoLibrary.requestAuthorization({state in + if state == .authorized { + UIImageWriteToSavedPhotosAlbum(frontCardImage, self, #selector(self.image(_:didFinishSavingWithError:contextInfo:)), nil) + UIImageWriteToSavedPhotosAlbum(backCardImage, self, #selector(self.image(_:didFinishSavingWithError:contextInfo:)), nil) + } else { + DispatchQueue.main.async { + self.hideBottomSheetAndGoBack() + } + } + }) + default: + break + } + + } + + // FIXME: - 명함 저장시에도 테두리 둥글게 가능한가 찾기 + private func setFrontCardImage() -> UIImage { + guard let frontCard = FrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FrontCardCell else { return UIImage() } + + frontCard.frame = CGRect(x: 0, y: 0, width: 327, height: 540) + guard let cardDataModel = cardDataModel else { return UIImage() } + frontCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable) + + let frontCardView = UIView(frame: CGRect(x: 0, y: 0, width: 327, height: 540)) + frontCardView.addSubview(frontCard) + + let renderer = UIGraphicsImageRenderer(size: frontCardView.bounds.size) + let frontImage = renderer.image { _ in + frontCardView.drawHierarchy(in: frontCardView.bounds, afterScreenUpdates: true) + } + + return frontImage + } + private func setBackCardImage() -> UIImage { + guard let backCard = BackCardCell.nib().instantiate(withOwner: self, options: nil).first as? BackCardCell else { return UIImage() } + backCard.frame = CGRect(x: 0, y: 0, width: 327, height: 540) + guard let cardDataModel = cardDataModel else { return UIImage() } + backCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable) + + let backCardView = UIView(frame: CGRect(x: 0, y: 0, width: 327, height: 540)) + backCardView.addSubview(backCard) + + let renderer = UIGraphicsImageRenderer(size: backCardView.bounds.size) + let backImage = renderer.image { _ in + backCardView.drawHierarchy(in: backCardView.bounds, afterScreenUpdates: true) + } + + return backImage + } + + // MARK: - @objc Methods + + @objc func copyId() { + UIPasteboard.general.string = cardDataModel?.cardID ?? "" + showToast(message: "명함 아이디가 복사되었습니다.", font: UIFont.button02, view: "copyID") + } + + @objc func saveAsImage() { + setImageWriteToSavedPhotosAlbum() + } + + @objc + private func image(_ image: UIImage, didFinishSavingWithError error: NSError?, contextInfo: UnsafeMutableRawPointer) { + if let error = error { + print(error.localizedDescription) + } else { + showToast(message: "갤러리에 저장되었습니다.", font: UIFont.button02, view: "saveImage") + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CommonBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CommonBottomSheetViewController.swift new file mode 100644 index 00000000..c66871d8 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/CommonBottomSheetViewController.swift @@ -0,0 +1,268 @@ +// +// CommonBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit + +/** + 공통으로 사용할 수 있도록 만들어둔 바텀 시트입니다. + + 1) CommonBottomSheetViewController에는 공통으로 필요한 요소들만 구현해둔 상태 + 2) CommonBottomSheetViewController를 상속받은 뷰컨 생성 (예시: InheritanceViewController) + 3) InheritanceViewController에 텍스트 필드, 피커 뷰, 버튼 등 각 화면에 맞는 추가 기능 구현 + 4) .setHeight 메서드 파라미터로 높이값을 조정 (default값은 475) + 5) .setTitle 메서드 파라미터로 가장 상단 타이틀 라벨에 들어갈 내용 입력 (String) + 6) present 방식으로 화면에 표출 (주의!! 이때 present animated는 false로 둬야 지연없이 바텀시트가 올라옵니다 ^_^) +*/ + +class CommonBottomSheetViewController: UIViewController { + + // MARK: - Properties + // 바텀 시트 높이 + var bottomHeight: CGFloat = 475 + + // bottomSheet가 view의 상단에서 떨어진 거리 + private var bottomSheetViewTopConstraint: NSLayoutConstraint! + + // 기존 화면을 흐려지게 만들기 위한 뷰 + let dimmedBackView: UIView = { + let view = UIView() + view.backgroundColor = .bottomDimmedBackground + return view + }() + + // 바텀 시트 뷰 + let bottomSheetView: UIView = { + let view = UIView() + view.backgroundColor = .background + + view.layer.cornerRadius = 27 + view.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] + view.clipsToBounds = true + + return view + }() + + // 자연스러운 애니메이션을 위한..커버.. + let bottomSheetCoverView: UIView = { + let view = UIView() + view.backgroundColor = .background + + view.layer.cornerRadius = 27 + view.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner] + view.clipsToBounds = true + + return view + }() + + // dismiss Indicator View UI 구성 부분 + private let dismissIndicatorView: UIView = { + let view = UIView() + view.backgroundColor = .textBox + view.layer.cornerRadius = 3 + + return view + }() + + // 바텀 시트 메인 라벨 + public let titleLabel: UILabel = { + let label = UILabel() + label.font = .title01 + label.textColor = .primary + label.textAlignment = .center + label.sizeToFit() + + return label + }() + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + setupGestureRecognizer() + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + showBottomSheet() + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + view.addSubview(dimmedBackView) + view.addSubview(bottomSheetView) + view.addSubview(dismissIndicatorView) + view.addSubview(titleLabel) + view.addSubview(bottomSheetCoverView) + + dimmedBackView.alpha = 0.0 + setupLayout() + } + + // GestureRecognizer 세팅 작업 + private func setupGestureRecognizer() { + // 흐린 부분 탭할 때, 바텀시트를 내리는 TapGesture + let dimmedTap = UITapGestureRecognizer(target: self, action: #selector(dimmedViewTapped(_:))) + dimmedBackView.addGestureRecognizer(dimmedTap) + dimmedBackView.isUserInteractionEnabled = true + + // 스와이프 했을 때, 바텀시트를 내리는 swipeGesture + let swipeGesture = UISwipeGestureRecognizer(target: self, action: #selector(panGesture)) + swipeGesture.direction = .down + view.addGestureRecognizer(swipeGesture) + } + + // 레이아웃 세팅 + private func setupLayout() { + dimmedBackView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + dimmedBackView.topAnchor.constraint(equalTo: view.topAnchor), + dimmedBackView.leadingAnchor.constraint(equalTo: view.leadingAnchor), + dimmedBackView.trailingAnchor.constraint(equalTo: view.trailingAnchor), + dimmedBackView.bottomAnchor.constraint(equalTo: view.bottomAnchor) + ]) + + bottomSheetView.translatesAutoresizingMaskIntoConstraints = false + let topConstant = view.safeAreaInsets.bottom + view.safeAreaLayoutGuide.layoutFrame.height + bottomSheetViewTopConstraint = bottomSheetView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: topConstant) + NSLayoutConstraint.activate([ + bottomSheetView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor), + bottomSheetView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor), + bottomSheetView.bottomAnchor.constraint(equalTo: view.bottomAnchor), + bottomSheetViewTopConstraint + ]) + + bottomSheetCoverView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + bottomSheetCoverView.topAnchor.constraint(equalTo: bottomSheetView.topAnchor), + bottomSheetCoverView.leadingAnchor.constraint(equalTo: bottomSheetView.leadingAnchor), + bottomSheetCoverView.trailingAnchor.constraint(equalTo: bottomSheetView.trailingAnchor), + bottomSheetCoverView.bottomAnchor.constraint(equalTo: bottomSheetView.bottomAnchor) + ]) + + dismissIndicatorView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + dismissIndicatorView.widthAnchor.constraint(equalToConstant: 102), + dismissIndicatorView.heightAnchor.constraint(equalToConstant: 7), + dismissIndicatorView.topAnchor.constraint(equalTo: bottomSheetView.topAnchor, constant: 12), + dismissIndicatorView.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + + titleLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + titleLabel.topAnchor.constraint(equalTo: dismissIndicatorView.bottomAnchor, constant: 28), + titleLabel.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + } + + // 바텀 시트 표출 애니메이션 + private func showBottomSheet() { + let safeAreaHeight: CGFloat = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding: CGFloat = view.safeAreaInsets.bottom + + bottomSheetViewTopConstraint.constant = (safeAreaHeight + bottomPadding) - bottomHeight + + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 1.0 + self.view.layoutIfNeeded() + }, completion: { _ in + self.bottomSheetCoverView.isHidden = true + }) + } + + // 바텀 시트 사라지는 애니메이션 + func hideBottomSheetAndGoBack() { + let safeAreaHeight = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding = view.safeAreaInsets.bottom + bottomSheetViewTopConstraint.constant = safeAreaHeight + bottomPadding + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.0 + self.view.layoutIfNeeded() + self.bottomSheetCoverView.isHidden = false + }, completion: { _ in + if self.presentingViewController != nil { + self.dismiss(animated: false, completion: nil) + } + }) + } + + // 바텀 시트 사라지고 바로 다시 다음 바텀 시트 올라오는 애니메이션 + func hideBottomSheetAndPresent(nextBottomSheet: CommonBottomSheetViewController, title: String, height: CGFloat) { + let safeAreaHeight = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding = view.safeAreaInsets.bottom + bottomSheetViewTopConstraint.constant = safeAreaHeight + bottomPadding + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.0 + self.view.layoutIfNeeded() + self.bottomSheetCoverView.isHidden = false + }, completion: { _ in + if self.presentingViewController != nil { + guard let presentingVC = self.presentingViewController else { return } + self.dismiss(animated: false) { + let nextVC = nextBottomSheet.setTitle(title).setHeight(height) + nextVC.modalPresentationStyle = .overFullScreen + presentingVC.present(nextVC, animated: false, completion: nil) + } + } + }) + } + + func hideBottomSheetAndPresentVC(nextViewController: UIViewController) { + let safeAreaHeight = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding = view.safeAreaInsets.bottom + bottomSheetViewTopConstraint.constant = safeAreaHeight + bottomPadding + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.0 + self.view.layoutIfNeeded() + self.bottomSheetCoverView.isHidden = false + }, completion: { _ in + if self.presentingViewController != nil { + guard let presentingVC = self.presentingViewController else { return } + self.dismiss(animated: false) { + let nextVC = nextViewController + nextVC.modalPresentationStyle = .overFullScreen + presentingVC.present(nextVC, animated: true, completion: nil) + } + } + }) + } + + // UITapGestureRecognizer 연결 함수 부분 + @objc private func dimmedViewTapped(_ tapRecognizer: UITapGestureRecognizer) { + hideBottomSheetAndGoBack() + } + + // UISwipeGestureRecognizer 연결 함수 부분 + @objc func panGesture(_ recognizer: UISwipeGestureRecognizer) { + if recognizer.state == .ended { + switch recognizer.direction { + case .down: + hideBottomSheetAndGoBack() + default: + break + } + } + } +} + +// MARK: - Extensions +// 재사용을 위한 함수는 extension에 구현 +extension CommonBottomSheetViewController { + // 바텀 시트 높이 설정 + func setHeight(_ height: CGFloat) -> Self { + bottomHeight = height + return self + } + + // 타이틀 라벨 내용 추가 + func setTitle(_ text: String) -> Self { + titleLabel.text = text + return self + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/FirstCardAlertBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/FirstCardAlertBottomSheetViewController.swift new file mode 100644 index 00000000..89471935 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/FirstCardAlertBottomSheetViewController.swift @@ -0,0 +1,134 @@ +// +// FirstCardAlertBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/12/22. +// + +import UIKit + +class FirstCardAlertBottomSheetViewController: CommonBottomSheetViewController { + + // MARK: - Properties + + private let cardImageView: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage(named: "imgFirstcard") + + return imageView + }() + + private let bgView: UIView = { + let view = UIView() + view.layer.cornerRadius = 20 + view.backgroundColor = .textBox + + return view + }() + + private let firstHandIcon: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage(named: "firsthandIcon") + + return imageView + }() + + private let secondHandIcon: UIImageView = { + let imageView = UIImageView() + imageView.image = UIImage(named: "secondhandIcon") + + return imageView + }() + + private let firstSubtitleLabel: UILabel = { + let label = UILabel() + label.textAlignment = .center + label.numberOfLines = 2 + let attributedString = NSMutableAttributedString(string: "명함을 좌우로 스와이프하여\n 앞/뒷면을 확인할 수 있어요.") + attributedString.addAttributes([.foregroundColor: UIColor.primary, .font: UIFont.textRegular03], range: NSRange(location: 0, length: 3)) + attributedString.addAttributes([.foregroundColor: UIColor.mainColorNadaMain, .font: UIFont.textBold01], range: NSRange(location: 4, length: 8)) + attributedString.addAttributes([.foregroundColor: UIColor.primary, .font: UIFont.textRegular03], range: NSRange(location: 14, length: 16)) + label.attributedText = attributedString + + return label + }() + + private let secondSubtitleLabel: UILabel = { + let label = UILabel() + label.textAlignment = .center + label.numberOfLines = 2 + let attributedString = NSMutableAttributedString(string: "우측 상단의 공유 버튼을 통해\n 친구에게 공유해 보세요.") + attributedString.addAttributes([.foregroundColor: UIColor.mainColorNadaMain, .font: UIFont.textBold01], range: NSRange(location: 0, length: 12)) + attributedString.addAttributes([.foregroundColor: UIColor.primary, .font: UIFont.textRegular03], range: NSRange(location: 13, length: 17)) + label.attributedText = attributedString + + return label + }() + + // MARK: - View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + } + + // MARK: - Methods + + // UI 세팅 작업 + private func setupUI() { + titleLabel.numberOfLines = 2 + + view.addSubview(cardImageView) + view.addSubview(bgView) + bgView.addSubview(firstHandIcon) + bgView.addSubview(secondHandIcon) + bgView.addSubview(firstSubtitleLabel) + bgView.addSubview(secondSubtitleLabel) + + setupLayout() + } + + // 레이아웃 세팅 + private func setupLayout() { + cardImageView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + cardImageView.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 16), + cardImageView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 70), + cardImageView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -70) + ]) + + bgView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + bgView.topAnchor.constraint(equalTo: cardImageView.bottomAnchor, constant: 16), + bgView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16), + bgView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16), + bgView.heightAnchor.constraint(equalToConstant: 194) + + ]) + + firstHandIcon.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + firstHandIcon.topAnchor.constraint(equalTo: bgView.topAnchor, constant: 16), + firstHandIcon.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) + ]) + + secondHandIcon.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + secondHandIcon.topAnchor.constraint(equalTo: firstSubtitleLabel.bottomAnchor, constant: 16), + secondHandIcon.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) + ]) + + firstSubtitleLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + firstSubtitleLabel.topAnchor.constraint(equalTo: firstHandIcon.bottomAnchor, constant: 2), + firstSubtitleLabel.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) + ]) + + secondSubtitleLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + secondSubtitleLabel.topAnchor.constraint(equalTo: secondHandIcon.bottomAnchor, constant: 2), + secondSubtitleLabel.centerXAnchor.constraint(equalTo: bgView.centerXAnchor) + ]) + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/GroupNameEditBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/GroupNameEditBottomSheetViewController.swift new file mode 100644 index 00000000..7207362c --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/GroupNameEditBottomSheetViewController.swift @@ -0,0 +1,117 @@ +// +// GroupNameEditBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/11. +// + +import UIKit +import IQKeyboardManagerSwift + +class GroupNameEditBottomSheetViewController: CommonBottomSheetViewController, UITextFieldDelegate { + + // MARK: - Properties + + // 넘어온 그룹 이름 데이터를 받는 변수 선언 + var text: String = "" + var returnToGroupEditViewController: (() -> Void)? + var nowGroup: Group? + private var bottomSheetViewTopConstraint: NSLayoutConstraint? + + // 그룹 추가 텍스트 필드 + private let addGroupTextField: UITextField = { + let textField = UITextField() + textField.borderStyle = .none + textField.cornerRadius = 10 + textField.backgroundColor = .textBox + textField.attributedPlaceholder = NSAttributedString(string: "변경할 그룹명을 입력하세요.", attributes: [.foregroundColor: UIColor.quaternary, .font: UIFont.textRegular04]) + textField.returnKeyType = .done + textField.setLeftPaddingPoints(12) + textField.setRightPaddingPoints(12) + + return textField + }() + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + addGroupTextField.delegate = self + IQKeyboardManager.shared.shouldResignOnTouchOutside = false + } + + override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) + + self.addGroupTextField.becomeFirstResponder() + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + view.addSubview(addGroupTextField) + + setupLayout() + addGroupTextField.text = text + } + + // 레이아웃 세팅 + private func setupLayout() { + addGroupTextField.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + addGroupTextField.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: 20), + addGroupTextField.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 24), + addGroupTextField.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -24), + addGroupTextField.heightAnchor.constraint(equalToConstant: 45) + ]) + } + + private func nowHideBottomSheetAndGoBack() { + let safeAreaHeight = view.safeAreaLayoutGuide.layoutFrame.height + let bottomPadding = view.safeAreaInsets.bottom + bottomSheetViewTopConstraint?.constant = safeAreaHeight + bottomPadding + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.0 + self.view.layoutIfNeeded() + self.bottomSheetCoverView.isHidden = false + }, completion: { _ in + if self.presentingViewController != nil { + self.dismiss(animated: false) { + self.returnToGroupEditViewController?() + } + } + }) + } +} + +// MARK: - Extensions +extension GroupNameEditBottomSheetViewController { + func textFieldShouldReturn(_ textField: UITextField) -> Bool { + textField.resignFirstResponder() + groupEditWithAPI(groupRequest: GroupEditRequest(groupId: nowGroup?.groupID ?? 0, groupName: addGroupTextField.text ?? "")) + nowHideBottomSheetAndGoBack() + + return true + } +} + +// MARK: - Network +extension GroupNameEditBottomSheetViewController { + func groupEditWithAPI(groupRequest: GroupEditRequest) { + GroupAPI.shared.groupEdit(groupRequest: groupRequest) { response in + switch response { + case .success: + print("groupEditWithAPI - success") + case .requestErr(let message): + print("groupEditWithAPI - requestErr: \(message)") + case .pathErr: + print("groupEditWithAPI - pathErr") + case .serverErr: + print("groupEditWithAPI - serverErr") + case .networkFail: + print("groupEditWithAPI - networkFail") + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectBirthBottomViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectBirthBottomViewController.swift new file mode 100644 index 00000000..608187c9 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectBirthBottomViewController.swift @@ -0,0 +1,162 @@ +// +// SelectBirthBottomViewController.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/30. +// + +import UIKit + +class SelectBirthBottomSheetViewController: CommonBottomSheetViewController { + + // MARK: - Properties + + private let yearList: [String] = [Int](1950...2022).map { String($0) }.reversed() + private let monthList: [String] = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"] + private let dayList: [String] = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"] + private var year = String() + private var month = String() + private var day = String() + private var selectedBirth = String() + + // MARK: - Components + + private let birthPicker: UIPickerView = { + let pickerView = UIPickerView() + + return pickerView + }() + + private let doneButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(named: "btnMainDone"), for: .normal) + button.addTarget(self, action: #selector(dismissToCardCreationViewController), for: .touchUpInside) + + return button + }() + + // MARK: - View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + } + + // MARK: - override Methods + + override func hideBottomSheetAndGoBack() { + super.hideBottomSheetAndGoBack() + + NotificationCenter.default.post(name: .dismissRequiredBottomSheet, object: nil) + } +} + +// MARK: - Extensions + +extension SelectBirthBottomSheetViewController { + private func setupUI() { + view.addSubview(birthPicker) + view.addSubview(doneButton) + + selectedBirth = yearList[0] + "." + monthList[0] + "." + dayList[0] + + birthPicker.delegate = self + birthPicker.dataSource = self + + setupLayout() + } + private func setupLayout() { + birthPicker.selectedRow(inComponent: 0) + birthPicker.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + birthPicker.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: -20), + birthPicker.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + birthPicker.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16), + birthPicker.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16) + ]) + + doneButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + doneButton.topAnchor.constraint(equalTo: birthPicker.bottomAnchor, constant: 0), + doneButton.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + doneButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 24), + doneButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -24) + ]) + } + + // MARK: - @objc Methods + + @objc func dismissToCardCreationViewController() { + NotificationCenter.default.post(name: .completeFrontCardBirth, object: selectedBirth) + hideBottomSheetAndGoBack() + } + +} + +extension SelectBirthBottomSheetViewController: UIPickerViewDelegate, UIPickerViewDataSource { + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return 3 + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + if component == 0 { + return yearList.count + } else if component == 1 { + return monthList.count + } else { + return dayList.count + } + } + + func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { + let label = (view as? UILabel) ?? UILabel() + + label.textAlignment = .center + + if component == 0 { + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: yearList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + + } else { + label.attributedText = NSAttributedString(string: yearList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + } else if component == 1 { + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: monthList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + + } else { + label.attributedText = NSAttributedString(string: monthList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + } else if component == 2 { + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: dayList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + + } else { + label.attributedText = NSAttributedString(string: dayList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + } + + return label + } + + func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { + pickerView.reloadAllComponents() + + if component == 0 { + year = yearList[row] + } else if component == 1 { + month = monthList[row] + } else if component == 2 { + day = dayList[row] + } + year = year.isEmpty ? yearList[0] : year + month = month.isEmpty ? monthList[0] : month + day = day.isEmpty ? dayList[0] : day + selectedBirth = year + "." + month + "." + day + } + + func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat { + return 44 + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectGroupBottomSheetViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectGroupBottomSheetViewController.swift new file mode 100644 index 00000000..5b463ef8 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectGroupBottomSheetViewController.swift @@ -0,0 +1,184 @@ +// +// SelectGroupBottomSheetViewController.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/28. +// + +import UIKit + +class SelectGroupBottomSheetViewController: CommonBottomSheetViewController { + + // MARK: - Properties + var cardDataModel: Card? + var serverGroups: Groups? + var selectedGroup = 0 + var selectedGroupIndex = 0 + var groupId: Int? + + var status: Status = .add + + private let groupPicker: UIPickerView = { + let pickerView = UIPickerView() + pickerView.autoresizingMask = .flexibleWidth + + return pickerView + }() + + private let doneButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(named: "btnMainDone"), for: .normal) + button.addTarget(self, action: #selector(presentCardInfoViewController), for: .touchUpInside) + + return button + }() + + override func viewDidLoad() { + super.viewDidLoad() + setupUI() + } + + override func hideBottomSheetAndGoBack() { + super.hideBottomSheetAndGoBack() + + switch status { + case .addWithQR: + NotificationCenter.default.post(name: .dismissQRCodeCardResult, object: nil) + default: + return + } + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + view.addSubview(groupPicker) + view.addSubview(doneButton) + selectedGroup = serverGroups?.groups[0].groupID ?? 0 + groupPicker.delegate = self + groupPicker.dataSource = self + setupLayout() + } + + // 레이아웃 세팅 + private func setupLayout() { + groupPicker.selectedRow(inComponent: 0) + groupPicker.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + groupPicker.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: -20), + groupPicker.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + groupPicker.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 16), + groupPicker.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -16) + ]) + + doneButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + doneButton.topAnchor.constraint(equalTo: groupPicker.bottomAnchor, constant: 0), + doneButton.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor), + doneButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 24), + doneButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -24) + ]) + } + + @objc func presentCardInfoViewController() { + switch status { + case .detail: + changeGroupWithAPI(request: ChangeGroupRequest(cardID: cardDataModel?.cardID ?? "", + userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", + groupID: groupId ?? 0, + newGroupID: selectedGroup)) + case .add, .addWithQR: + cardAddInGroupWithAPI(cardRequest: CardAddInGroupRequest(cardId: cardDataModel?.cardID ?? "", + userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", + groupId: selectedGroup)) + case .group: + return + } + } + +} + +extension SelectGroupBottomSheetViewController: UIPickerViewDelegate, UIPickerViewDataSource { + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return 1 + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + return serverGroups?.groups.count ?? 1 + } + + func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { + let label = (view as? UILabel) ?? UILabel() + + label.textAlignment = .center + + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: serverGroups?.groups[row].groupName ?? "", attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + } else { + label.attributedText = NSAttributedString(string: serverGroups?.groups[row].groupName ?? "", attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + + return label + } + + func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { + selectedGroup = serverGroups?.groups[row].groupID ?? 0 + selectedGroupIndex = row + pickerView.reloadAllComponents() + } + + func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat { + return 44 + } + + func pickerView(_ pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat { + return 200 + } +} + +extension SelectGroupBottomSheetViewController { + func cardAddInGroupWithAPI(cardRequest: CardAddInGroupRequest) { + GroupAPI.shared.cardAddInGroup(cardRequest: cardRequest) { response in + switch response { + case .success: + guard let nextVC = UIStoryboard.init(name: Const.Storyboard.Name.cardDetail, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.cardDetailViewController) as? CardDetailViewController else { return } + nextVC.status = self.status + nextVC.cardDataModel = self.cardDataModel + nextVC.groupId = self.selectedGroup + nextVC.serverGroups = self.serverGroups + NotificationCenter.default.post(name: Notification.Name.passDataToGroup, object: self.selectedGroupIndex, userInfo: nil) + self.hideBottomSheetAndPresentVC(nextViewController: nextVC) + case .requestErr(let message): + print("postCardAddInGroupWithAPI - requestErr", message) + self.showToast(message: message as? String ?? "", font: UIFont.button03, view: "wrongCard") + case .pathErr: + print("postCardAddInGroupWithAPI - pathErr") + case .serverErr: + print("postCardAddInGroupWithAPI - serverErr") + case .networkFail: + print("postCardAddInGroupWithAPI - networkFail") + } + } + } + + func changeGroupWithAPI(request: ChangeGroupRequest) { + GroupAPI.shared.changeCardGroup(request: request) { response in + switch response { + case .success: + NotificationCenter.default.post(name: Notification.Name.passDataToGroup, object: self.selectedGroupIndex, userInfo: nil) + NotificationCenter.default.post(name: Notification.Name.passDataToDetail, object: self.selectedGroup, userInfo: nil) + self.makeOKAlert(title: "", message: "그룹이 변경되었습니다.") { _ in + self.hideBottomSheetAndGoBack() + } + case .requestErr(let message): + print("changeGroupWithAPI - requestErr: \(message)") + case .pathErr: + print("changeGroupWithAPI - pathErr") + case .serverErr: + print("changeGroupWithAPI - serverErr") + case .networkFail: + print("changeGroupWithAPI - networkFail") + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectMBTIBottomViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectMBTIBottomViewController.swift new file mode 100644 index 00000000..ad366890 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/BottomSheet/SelectMBTIBottomViewController.swift @@ -0,0 +1,175 @@ +// +// SelectMBTIBottomViewController.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/12/01. +// + +import UIKit + +class SelectMBTIBottmViewController: CommonBottomSheetViewController { + + // MARK: - Properties + + private let firstList: [String] = ["E", "I"] + private let secondList: [String] = ["N", "S"] + private let thirdList: [String] = ["T", "F"] + private let fourthList: [String] = ["J", "P"] + private var first = String() + private var second = String() + private var third = String() + private var fourth = String() + private var selectedMBTI = String() + + // MARK: - Components + + private let mbtiPicker: UIPickerView = { + let pickerView = UIPickerView() + + return pickerView + }() + + private let doneButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(named: "btnMainDone"), for: .normal) + button.addTarget(self, action: #selector(dismissToCardCreationViewController), for: .touchUpInside) + + return button + }() + + // MARK: - View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + } + + // MARK: - override Methods + + override func hideBottomSheetAndGoBack() { + super.hideBottomSheetAndGoBack() + + NotificationCenter.default.post(name: .dismissRequiredBottomSheet, object: nil) + } + + // MARK: - Methods + + // UI 세팅 작업 + private func setupUI() { + view.addSubview(mbtiPicker) + view.addSubview(doneButton) + + selectedMBTI = firstList[0] + secondList[0] + thirdList[0] + fourthList[0] + + mbtiPicker.delegate = self + mbtiPicker.dataSource = self + + setupLayout() + } + + // 레이아웃 세팅 + private func setupLayout() { + mbtiPicker.selectedRow(inComponent: 0) + mbtiPicker.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + mbtiPicker.topAnchor.constraint(equalTo: titleLabel.bottomAnchor, constant: -20), + mbtiPicker.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + + doneButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + doneButton.topAnchor.constraint(equalTo: mbtiPicker.bottomAnchor, constant: 0), + doneButton.centerXAnchor.constraint(equalTo: bottomSheetView.centerXAnchor) + ]) + } + + @objc func dismissToCardCreationViewController() { + NotificationCenter.default.post(name: .completeFrontCardMBTI, object: selectedMBTI) + hideBottomSheetAndGoBack() + } + +} + +extension SelectMBTIBottmViewController: UIPickerViewDelegate, UIPickerViewDataSource { + func numberOfComponents(in pickerView: UIPickerView) -> Int { + return 4 + } + + func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int { + if component == 0 { + return firstList.count + } else if component == 1 { + return secondList.count + } else if component == 2 { + return thirdList.count + } else { + return fourthList.count + } + } + + func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { + let label = (view as? UILabel) ?? UILabel() + + label.textAlignment = .center + + if component == 0 { + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: firstList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + + } else { + label.attributedText = NSAttributedString(string: firstList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + } else if component == 1 { + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: secondList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + + } else { + label.attributedText = NSAttributedString(string: secondList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + } else if component == 2 { + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: thirdList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + + } else { + label.attributedText = NSAttributedString(string: thirdList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + } else { + if pickerView.selectedRow(inComponent: component) == row { + label.attributedText = NSAttributedString(string: fourthList[row], attributes: [NSAttributedString.Key.font: UIFont.textBold01, NSAttributedString.Key.foregroundColor: UIColor.mainColorNadaMain]) + + } else { + label.attributedText = NSAttributedString(string: fourthList[row], attributes: [NSAttributedString.Key.font: UIFont.textRegular03, NSAttributedString.Key.foregroundColor: UIColor.quaternary]) + } + } + return label + } + + func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { + if component == 0 { + first = firstList[row] + } else if component == 1 { + second = secondList[row] + } else if component == 2 { + third = thirdList[row] + } else if component == 3 { + fourth = fourthList[row] + } + + first = first.isEmpty ? firstList[0] : first + second = second.isEmpty ? secondList[0] : second + third = third.isEmpty ? thirdList[0] : third + fourth = fourth.isEmpty ? fourthList[0] : fourth + + selectedMBTI = first + second + third + fourth + pickerView.reloadAllComponents() + } + + func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat { + return 44 + } +// + func pickerView(_ pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat { + return CGFloat(pickerView.frame.size.width / 4) + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift new file mode 100644 index 00000000..5fd7163d --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationPreviewViewController.swift @@ -0,0 +1,267 @@ +// +// CardCreationPreviewViewController.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/11/21. +// + +import UIKit + +import NVActivityIndicatorView + +class CardCreationPreviewViewController: UIViewController { + + public var frontCardDataModel: FrontCardDataModel? + public var backCardDataModel: BackCardDataModel? + public var cardBackgroundImage: UIImage? + public var defaultImageIndex: Int? + + private var isFront = true + private var cardCreationRequest: CardCreationRequest? + private var isShareable = false + + lazy var loadingBgView: UIView = { + let bgView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)) + bgView.backgroundColor = .loadingBackground + + return bgView + }() + + lazy var activityIndicator: NVActivityIndicatorView = { + let activityIndicator = NVActivityIndicatorView(frame: CGRect(x: 0, y: 0, width: 40, height: 40), + type: .ballBeat, + color: .mainColorNadaMain, + padding: .zero) + activityIndicator.translatesAutoresizingMaskIntoConstraints = false + + return activityIndicator + }() + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var cardView: UIView! + @IBOutlet weak var noticeLabel: UILabel! + @IBOutlet weak var completeButton: UIButton! + + // MARK: - View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + + setUI() + setBackgroundImage() + setFrontCard() + setGestureRecognizer() + } + @IBAction func touchCompleteButton(_ sender: Any) { + guard let frontCardDataModel = frontCardDataModel, let backCardDataModel = backCardDataModel else { return } + + guard let userID = UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) else { return } + + cardCreationRequest = CardCreationRequest(userID: userID, frontCard: frontCardDataModel, backCard: backCardDataModel) + guard let cardCreationRequest = cardCreationRequest, + let cardBackgroundImage = cardBackgroundImage else { return } + + DispatchQueue.main.async { + self.setActivityIndicator() + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + self.cardCreationWithAPI(request: cardCreationRequest, image: cardBackgroundImage) + } + } + @IBAction func touchBackButton(_ sender: Any) { + navigationController?.popViewController(animated: true) + } +} + +// MARK: - Extensions + +extension CardCreationPreviewViewController { + private func setUI() { + navigationController?.navigationBar.isHidden = true + + noticeLabel.font = .textRegular04 + noticeLabel.textColor = .primary + + let paragraphStyle = NSMutableParagraphStyle() + paragraphStyle.lineSpacing = 3 + paragraphStyle.alignment = .center + let attributeString = NSMutableAttributedString(string: noticeLabel?.text ?? "") + attributeString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: attributeString.length)) + noticeLabel.attributedText = attributeString + + completeButton.titleLabel?.font = .button01 + // MARK: - #available(iOS 15.0, *) + if #available(iOS 15.0, *) { + var config = UIButton.Configuration.filled() + config.background.cornerRadius = 15 + config.baseBackgroundColor = .mainColorNadaMain + config.baseForegroundColor = .white + completeButton.configuration = config + + let configHandler: UIButton.ConfigurationUpdateHandler = { button in + switch button.state { + default: + button.configuration?.title = "생성" + } + } + completeButton.configurationUpdateHandler = configHandler + } else { + // TODO: - QA/iOS 13 테스트. selected 설정. + completeButton.setTitle("생성", for: .normal) + completeButton.layer.cornerRadius = 15 + completeButton.setBackgroundImage(UIImage(named: "enableButtonBackground"), for: .normal) + completeButton.setTitleColor(.white, for: .normal) + } + } + private func setFrontCard() { + guard let frontCard = FrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FrontCardCell else { return } + + frontCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height) + guard let frontCardDataModel = frontCardDataModel else { return } + frontCard.initCell(cardBackgroundImage, + frontCardDataModel.title, + frontCardDataModel.description, + frontCardDataModel.name, + frontCardDataModel.birthDate, + frontCardDataModel.mbti, + frontCardDataModel.instagramID, + frontCardDataModel.linkURL, + isShareable: isShareable) + + cardView.addSubview(frontCard) + } + private func setGestureRecognizer() { + let swipeLeftGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(transitionCardWithAnimation(_:))) + swipeLeftGestureRecognizer.direction = .left + self.cardView.addGestureRecognizer(swipeLeftGestureRecognizer) + + let swipeRightGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(transitionCardWithAnimation(_:))) + swipeRightGestureRecognizer.direction = .right + self.cardView.addGestureRecognizer(swipeRightGestureRecognizer) + } + private func setBackgroundImage() { + if frontCardDataModel?.defaultImage == 0 { + return + } else if frontCardDataModel?.defaultImage == 1 { + cardBackgroundImage = UIImage(named: "imgCardBg01") + } else if frontCardDataModel?.defaultImage == 2 { + cardBackgroundImage = UIImage(named: "imgCardBg02") + } else if frontCardDataModel?.defaultImage == 3 { + cardBackgroundImage = UIImage(named: "imgCardBg03") + } else if frontCardDataModel?.defaultImage == 4 { + cardBackgroundImage = UIImage(named: "imgCardBg04") + } else if frontCardDataModel?.defaultImage == 5 { + cardBackgroundImage = UIImage(named: "imgCardBg05") + } else if frontCardDataModel?.defaultImage == 6 { + cardBackgroundImage = UIImage(named: "imgCardBg06") + } else { + cardBackgroundImage = UIImage(named: "imgCardBg07") + } + } + private func setActivityIndicator() { + view.addSubview(loadingBgView) + loadingBgView.addSubview(activityIndicator) + + NSLayoutConstraint.activate([ + activityIndicator.centerXAnchor.constraint(equalTo: view.centerXAnchor), + activityIndicator.centerYAnchor.constraint(equalTo: view.centerYAnchor) + ]) + + activityIndicator.startAnimating() + } + + // MARK: - @objc Methods + + @objc + private func transitionCardWithAnimation(_ swipeGesture: UISwipeGestureRecognizer) { + if isFront { + guard let backCard = BackCardCell.nib().instantiate(withOwner: self, options: nil).first as? BackCardCell else { return } + guard let backCardDataModel = backCardDataModel else { return } + backCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height) + backCard.initCell(cardBackgroundImage, + backCardDataModel.isMincho, + backCardDataModel.isSoju, + backCardDataModel.isBoomuk, + backCardDataModel.isSauced, + backCardDataModel.oneTMI, + backCardDataModel.twoTMI, + backCardDataModel.threeTMI, + isShareable: isShareable) + + cardView.addSubview(backCard) + isFront = false + } else { + guard let frontCard = FrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FrontCardCell else { return } + + frontCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height) + guard let frontCardDataModel = frontCardDataModel else { return } + frontCard.initCell(cardBackgroundImage, + frontCardDataModel.title, + frontCardDataModel.description, + frontCardDataModel.name, + frontCardDataModel.birthDate, + frontCardDataModel.mbti, + frontCardDataModel.instagramID, + frontCardDataModel.linkURL, + isShareable: isShareable) + + cardView.addSubview(frontCard) + isFront = true + } + if swipeGesture.direction == .right { + UIView.transition(with: cardView, duration: 0.5, options: .transitionFlipFromLeft, animations: nil) { _ in + self.cardView.subviews[0].removeFromSuperview() + } + } else { + UIView.transition(with: cardView, duration: 0.5, options: .transitionFlipFromRight, animations: nil) { _ in + self.cardView.subviews[0].removeFromSuperview() + } + } + + } + + // MARK: - Network + + func cardCreationWithAPI(request: CardCreationRequest, image: UIImage) { + CardAPI.shared.cardCreation(request: request, image: image) { response in + switch response { + case .success: + print("cardCreationWithAPI - success") + + guard let presentingVC = self.presentingViewController else { return } + + NotificationCenter.default.post(name: .creationReloadMainCardSwiper, object: nil) + + self.dismiss(animated: true) { + self.activityIndicator.stopAnimating() + self.loadingBgView.removeFromSuperview() + + if UserDefaults.standard.object(forKey: Const.UserDefaultsKey.isFirstCard) == nil { + let nextVC = FirstCardAlertBottomSheetViewController() + .setTitle(""" + 🎉 + 첫 명함이 생성되었어요! + """) + .setHeight(587) + nextVC.modalPresentationStyle = .overFullScreen + + presentingVC.present(nextVC, animated: true) { + UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isFirstCard) + } + } + } + case .requestErr(let message): + print("cardCreationWithAPI - requestErr: \(message)") + case .pathErr: + print("cardCreationWithAPI - pathErr") + case .serverErr: + print("cardCreationWithAPI - serverErr") + case .networkFail: + print("cardCreationWithAPI - networkFail") + } + } + } + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationViewController.swift new file mode 100644 index 00000000..442c4064 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardCreation/CardCreationViewController.swift @@ -0,0 +1,373 @@ +// +// CardCreationViewController.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/09/24. +// + +import UIKit + +class CardCreationViewController: UIViewController { + + // MARK: - Properties + + enum ButtonState { + case enable + case disable + } + + var completeButtonIsEnabled: ButtonState = .disable { + didSet { + if completeButtonIsEnabled == .disable { + completeButton.isEnabled = false + if #available(iOS 15.0, *) { + completeButton.setNeedsUpdateConfiguration() + } + } else { + completeButton.isEnabled = true + if #available(iOS 15.0, *) { + completeButton.setNeedsUpdateConfiguration() + } + } + } + } + + private var frontCardRequiredIsEmpty = true + private var backCardRequiredIsEmpty = true + private var isEditingMode = false + private var currentIndex = 0 + private var frontCard: FrontCardDataModel? + private var backCard: BackCardDataModel? + private var mbtiText: String? + private var birthText: String? + private var newImage: UIImage? + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var creationTextLabel: UILabel! + @IBOutlet weak var frontTextLabel: UILabel! + @IBOutlet weak var backTextLabel: UILabel! + + @IBOutlet weak var statusMovedView: UIView! + @IBOutlet weak var cardCreationCollectionView: UICollectionView! + @IBOutlet weak var closeButton: UIButton! + @IBOutlet weak var completeButton: UIButton! + + // MARK: - View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + setUI() + registerCell() + setTextLabelGesture() + setNotification() + + // FIXME: 서버통신 테스트 중. 추후 호출 위치 변경. +// cardDetailFetchWithAPI(cardID: "cardA") + + // FIXME: group.서버통신 테스트 중. 추후 호출 위치 변경. +// let changeGroupRequest = ChangeGroupRequest(cardID: "cardA", +// userID: "nada2", +// groupID: 3, +// newGroupID: 2) +// changeGroupWithAPI(request: changeGroupRequest) + + // FIXME: group.서버통신 테스트 중. 추후 호출 위치 변경. +// cardDeleteInGroupWithAPI(groupID: 3, cardID: "cardA") + } + + // MARK: - @IBAction Properties + + @IBAction func dismissToPreviousView(_ sender: Any) { + if isEditingMode { + makeOKCancelAlert(title: "입력 취소", message: "입력한 내용이 모두 삭제됩니다. 돌아가시겠습니까?", okAction: { _ in + self.dismiss(animated: true, completion: nil) + }) + } else { + self.dismiss(animated: true, completion: nil) + } + } + @IBAction func pushToCardCompletionView(_ sender: Any) { + guard let nextVC = UIStoryboard.init(name: Const.Storyboard.Name.cardCreationPreview, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.cardCreationPreviewViewController) as? CardCreationPreviewViewController else { return } + + nextVC.frontCardDataModel = frontCard + nextVC.backCardDataModel = backCard + nextVC.cardBackgroundImage = newImage + navigationController?.pushViewController(nextVC, animated: true) + } +} + +// MARK: - Extensions +extension CardCreationViewController { + private func setUI() { + navigationController?.navigationBar.isHidden = true + + view.backgroundColor = .background + statusMovedView.backgroundColor = .secondary + cardCreationCollectionView.backgroundColor = .background + cardCreationCollectionView.isPagingEnabled = true + + creationTextLabel.text = "명함 생성" + creationTextLabel.font = .title02 + creationTextLabel.textColor = .primary + + frontTextLabel.text = "앞면" + frontTextLabel.font = .title01 + frontTextLabel.textColor = .primary + + backTextLabel.text = "뒷면" + backTextLabel.font = .title01 + backTextLabel.textColor = .quaternary + + closeButton.setImage(UIImage(named: "iconClear"), for: .normal) + closeButton.setTitle("", for: .normal) + + completeButton.titleLabel?.font = .button01 + completeButton.isEnabled = false + + // MARK: - #available(iOS 15.0, *) + if #available(iOS 15.0, *) { + var config = UIButton.Configuration.filled() + config.background.cornerRadius = 15 + completeButton.configuration = config + + let configHandler: UIButton.ConfigurationUpdateHandler = { button in + switch button.state { + case .disabled: + button.configuration?.title = "완료" + button.configuration?.baseBackgroundColor = .textBox + button.configuration?.baseForegroundColor = .white + default: + button.configuration?.title = "완료" + button.configuration?.baseBackgroundColor = .mainColorNadaMain + button.configuration?.baseForegroundColor = .white + } + } + completeButton.configurationUpdateHandler = configHandler + } else { + // TODO: - QA/iOS 13 테스트. selected 설정. + completeButton.layer.cornerRadius = 15 + + completeButton.setTitle("완료", for: .normal) + completeButton.setTitleColor(.white, for: .normal) + completeButton.setBackgroundImage(UIImage(named: "enableButtonBackground"), for: .normal) + + completeButton.setTitle("완료", for: .disabled) + completeButton.setTitleColor(.white, for: .disabled) + completeButton.setBackgroundImage(UIImage(named: "disableButtonBackground"), for: .disabled) + } + + let cardCreationCollectionViewlayout = cardCreationCollectionView.collectionViewLayout as? UICollectionViewFlowLayout + cardCreationCollectionViewlayout?.scrollDirection = .horizontal + cardCreationCollectionViewlayout?.estimatedItemSize = .zero + cardCreationCollectionView.showsHorizontalScrollIndicator = false + cardCreationCollectionView.showsVerticalScrollIndicator = false + } + private func registerCell() { + cardCreationCollectionView.delegate = self + cardCreationCollectionView.dataSource = self + + cardCreationCollectionView.register(FrontCardCreationCollectionViewCell.nib(), forCellWithReuseIdentifier: Const.Xib.frontCardCreationCollectionViewCell) + cardCreationCollectionView.register(BackCardCreationCollectionViewCell.nib(), forCellWithReuseIdentifier: Const.Xib.backCardCreationCollectionViewCell) + } + private func setTextLabelGesture() { + let tapFrontTextLabelGesture = UITapGestureRecognizer(target: self, action: #selector(dragToFront)) + frontTextLabel.addGestureRecognizer(tapFrontTextLabelGesture) + frontTextLabel.isUserInteractionEnabled = true + let tapBackTextLabelGesture = UITapGestureRecognizer(target: self, action: #selector(dragToBack)) + backTextLabel.addGestureRecognizer(tapBackTextLabelGesture) + backTextLabel.isUserInteractionEnabled = true + } + private func setNotification() { + NotificationCenter.default.addObserver(self, selector: #selector(presentToImagePicker), name: .presentingImagePicker, object: nil) + } + + // MARK: - @objc Methods + + @objc + private func dragToBack() { + let indexPath = IndexPath(item: 1, section: 0) + cardCreationCollectionView.scrollToItem(at: indexPath, at: .right, animated: true) + if currentIndex == 0 { + UIView.animate(withDuration: 0.3) { + self.statusMovedView.transform = CGAffineTransform(translationX: self.backTextLabel.frame.origin.x - self.statusMovedView.frame.origin.x - 5, y: 0) + } + currentIndex = 1 + self.frontTextLabel.textColor = .quaternary + self.backTextLabel.textColor = .secondary + } + } + @objc + private func dragToFront() { + if currentIndex == 1 { + let indexPath = IndexPath(item: 0, section: 0) + cardCreationCollectionView.scrollToItem(at: indexPath, at: .left, animated: true) + UIView.animate(withDuration: 0.3) { + self.statusMovedView.transform = .identity + } + currentIndex = 0 + self.frontTextLabel.textColor = .secondary + self.backTextLabel.textColor = .quaternary + } + } + @objc + private func presentToImagePicker() { + let imagePicker = UIImagePickerController() + imagePicker.sourceType = .photoLibrary + imagePicker.allowsEditing = true + imagePicker.delegate = self + imagePicker.modalPresentationStyle = .overFullScreen + + present(imagePicker, animated: true, completion: nil) + } +} + +// MARK: - UICollectionViewDelegate +extension CardCreationViewController: UICollectionViewDelegate { + func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { + let targetIndex = targetContentOffset.pointee.x / scrollView.frame.size.width + if targetIndex == 1 && currentIndex == 0 { + UIView.animate(withDuration: 0.3) { + self.statusMovedView.transform = CGAffineTransform(translationX: self.backTextLabel.frame.origin.x - self.statusMovedView.frame.origin.x - 5, y: 0) + } + currentIndex = 1 + self.frontTextLabel.textColor = .quaternary + self.backTextLabel.textColor = .primary + } else if targetIndex == 0 && currentIndex == 1 { + UIView.animate(withDuration: 0.2) { + self.statusMovedView.transform = .identity + } + currentIndex = 0 + self.frontTextLabel.textColor = .primary + self.backTextLabel.textColor = .quaternary + } + } +} + +// MARK: - UICollectionViewDataSource +extension CardCreationViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return 2 + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + if collectionView == cardCreationCollectionView { + if indexPath.item == 0 { + guard let frontCreationCell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.frontCardCreationCollectionViewCell, for: indexPath) as? FrontCardCreationCollectionViewCell else { + return UICollectionViewCell() + } + frontCreationCell.frontCardCreationDelegate = self + frontCreationCell.presentingBirthBottomVCClosure = { + let nextVC = SelectBirthBottomSheetViewController() + .setTitle("생년월일") + .setHeight(355) + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: false, completion: nil) + } + frontCreationCell.presentingMBTIBottomVCClosure = { + let nextVC = SelectMBTIBottmViewController() + .setTitle("MBTI") + .setHeight(355) + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: false, completion: nil) + } + + return frontCreationCell + } else if indexPath.item == 1 { + guard let backCreationCell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.backCardCreationCollectionViewCell, for: indexPath) as? BackCardCreationCollectionViewCell else { + return UICollectionViewCell() + } + backCreationCell.backCardCreationDelegate = self + + return backCreationCell + } + } + return UICollectionViewCell() + } +} + +// MARK: - UICollectionViewDelegateFlowLayout +extension CardCreationViewController: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + let height = collectionView.frame.height + let width = collectionView.frame.width + + return CGSize(width: width, height: height) + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return .zero + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + return 0 + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + return 0 + } +} + +// MARK: - FrontCardCreationDelegate + +extension CardCreationViewController: FrontCardCreationDelegate { + func frontCardCreation(requiredInfo valid: Bool) { + frontCardRequiredIsEmpty = !valid + if frontCardRequiredIsEmpty == false && backCardRequiredIsEmpty == false { + completeButtonIsEnabled = .enable + } else { + completeButtonIsEnabled = .disable + } + } + func frontCardCreation(endEditing valid: Bool) { + isEditingMode = valid + } + func frontCardCreation(withRequired requiredInfo: [String: String], withOptional optionalInfo: [String: String]) { + frontCard = FrontCardDataModel(defaultImage: Int(requiredInfo["defaultImageIndex"] ?? "-1") ?? -1, + title: requiredInfo["title"] ?? "", + name: requiredInfo["name"] ?? "", + birthDate: requiredInfo["birthDate"] ?? "", + mbti: requiredInfo["mbti"] ?? "", + instagramID: optionalInfo["instagram"] ?? "", + linkURL: optionalInfo["linkURL"] ?? "", + description: optionalInfo["description"] ?? "") + } +} + +// MARK: - BackCardCreationDelegate + +extension CardCreationViewController: BackCardCreationDelegate { + func backCardCreation(requiredInfo valid: Bool) { + backCardRequiredIsEmpty = !valid + if frontCardRequiredIsEmpty == false && backCardRequiredIsEmpty == false { + completeButtonIsEnabled = .enable + } else { + completeButtonIsEnabled = .disable + } + } + func backCardCreation(endEditing valid: Bool) { + isEditingMode = valid + } + func backCardCreation(withRequired requiredInfo: [String: Bool], withOptional optionalInfo: [String: String]) { + backCard = BackCardDataModel(isMincho: requiredInfo["isMincho"] ?? false, + isSoju: requiredInfo["isSoju"] ?? false, + isBoomuk: requiredInfo["isBoomuk"] ?? false, + isSauced: requiredInfo["isSauced"] ?? false, + oneTMI: optionalInfo["firstTMI"] ?? "", + twoTMI: optionalInfo["secondTMI"] ?? "", + threeTMI: optionalInfo["thirdTMI"] ?? "") + } +} + +extension CardCreationViewController: UIImagePickerControllerDelegate, UINavigationControllerDelegate { + func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) { + if let editedImage = info[UIImagePickerController.InfoKey.editedImage] as? UIImage { + newImage = editedImage + } + NotificationCenter.default.post(name: .sendNewImage, object: newImage) + + picker.dismiss(animated: true, completion: nil) + } + func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { + NotificationCenter.default.post(name: .cancelImagePicker, object: nil) + + dismiss(animated: true, completion: nil) + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardDetail/CardDetailViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardDetail/CardDetailViewController.swift new file mode 100644 index 00000000..3e329177 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardDetail/CardDetailViewController.swift @@ -0,0 +1,226 @@ +// +// CardDetailViewController.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/07. +// + +import UIKit + +class CardDetailViewController: UIViewController { + + // MARK: - Properties + // 네비게이션 바 + @IBAction func touchBackButton(_ sender: Any) { + switch status { + case .group: + self.navigationController?.popViewController(animated: true) + case .add: + NotificationCenter.default.post(name: .reloadGroupViewController, object: nil) + self.dismiss(animated: true, completion: nil) + case .addWithQR: + NotificationCenter.default.post(name: .reloadGroupViewController, object: nil) + self.presentingViewController?.presentingViewController?.dismiss(animated: true, completion: nil) + + case .detail: + return + } + } + + @IBAction func presentHarmonyViewController(_ sender: Any) { + cardHarmonyFetchWithAPI(myCard: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.firstCardID) ?? "", + yourCard: cardDataModel?.cardID ?? "") + } + + @IBOutlet weak var optionButton: UIButton! + @IBOutlet weak var cardView: UIView! + @IBOutlet weak var backButton: UIButton! + @IBOutlet weak var idStackView: UIStackView! + @IBOutlet weak var idLabel: UILabel! + + public var cardDataModel: Card? + private var isShareable: Bool = false + + private var isFront = true + var status: Status = .group + var serverGroups: Groups? + var groupId: Int? + + override func viewDidLoad() { + super.viewDidLoad() + setUI() + setMenu() + setFrontCard() + setGestureRecognizer() + } + + override func viewWillAppear(_ animated: Bool) { + NotificationCenter.default.addObserver(self, selector: #selector(didRecieveDataNotification(_:)), name: Notification.Name.passDataToDetail, object: nil) + } +} + +extension CardDetailViewController { + func cardDeleteInGroupWithAPI(groupID: Int, cardID: String) { + GroupAPI.shared.cardDeleteInGroup(groupID: groupID, cardID: cardID) { response in + switch response { + case .success: + print("cardDeleteInGroupWithAPI - success") + self.navigationController?.popViewController(animated: true) + case .requestErr(let message): + print("cardDeleteInGroupWithAPI - requestErr: \(message)") + case .pathErr: + print("cardDeleteInGroupWithAPI - pathErr") + case .serverErr: + print("cardDeleteInGroupWithAPI - serverErr") + case .networkFail: + print("cardDeleteInGroupWithAPI - networkFail") + } + + } + } + + func cardHarmonyFetchWithAPI(myCard: String, yourCard: String) { + UtilAPI.shared.cardHarmonyFetch(myCard: myCard, yourCard: yourCard) { response in + switch response { + case .success(let data): + if let harmony = data as? HarmonyResponse { + guard let nextVC = UIStoryboard.init(name: Const.Storyboard.Name.cardHarmony, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.cardHarmonyViewController) as? CardHarmonyViewController else { return } + nextVC.harmonyData = self.updateHarmony(percentage: harmony.harmony) + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: false, completion: nil) + } + case .requestErr(let message): + print("cardHarmonyFetchWithAPI - requestErr: \(message)") + case .pathErr: + print("cardHarmonyFetchWithAPI - pathErr") + case .serverErr: + print("cardHarmonyFetchWithAPI - serverErr") + case .networkFail: + print("cardHarmonyFetchWithAPI - networkFail") + } + } + } +} + +extension CardDetailViewController { + private func setUI() { + switch status { + case .group: + backButton.setImage(UIImage(named: "iconArrow"), for: .normal) + case .add, .addWithQR: + backButton.setImage(UIImage(named: "iconClear"), for: .normal) + case .detail: + return + } + idStackView.isHidden = true + idLabel.text = cardDataModel?.cardID + } + private func setMenu() { + let changeGroup = UIAction(title: "그룹 변경", + handler: { _ in + let nextVC = SelectGroupBottomSheetViewController() + .setTitle("그룹선택") + .setHeight(386) + nextVC.status = .detail + nextVC.groupId = self.groupId + nextVC.serverGroups = self.serverGroups + nextVC.cardDataModel = self.cardDataModel + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: false, completion: nil) + }) + let deleteCard = UIAction(title: "명함 삭제", + handler: { _ in + self.makeCancelDeleteAlert(title: "명함 삭제", + message: "명함을 정말 삭제하시겠습니까?", + deleteAction: { _ in + // 명함 삭제 서버통신 + self.cardDeleteInGroupWithAPI(groupID: self.groupId ?? 0, cardID: self.cardDataModel?.cardID ?? "") + }) }) + let options = UIMenu(title: "options", options: .displayInline, children: [changeGroup, deleteCard]) + + let cancel = UIAction(title: "취소", attributes: .destructive, handler: { _ in print("취소") }) + + optionButton.menu = UIMenu(identifier: nil, + options: .displayInline, + children: [options, cancel]) + optionButton.showsMenuAsPrimaryAction = true + } + private func setFrontCard() { + guard let frontCard = FrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FrontCardCell else { return } + + frontCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height) + guard let cardDataModel = cardDataModel else { return } + frontCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable) + + cardView.addSubview(frontCard) + } + private func setGestureRecognizer() { + let swipeLeftGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(transitionCardWithAnimation(_:))) + swipeLeftGestureRecognizer.direction = .left + self.cardView.addGestureRecognizer(swipeLeftGestureRecognizer) + + let swipeRightGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(transitionCardWithAnimation(_:))) + swipeRightGestureRecognizer.direction = .right + self.cardView.addGestureRecognizer(swipeRightGestureRecognizer) + } + private func updateHarmony(percentage: Int) -> HarmonyData { + switch percentage { + case 0 ... 20: + return HarmonyData(icon: "icnHarmonyRed", percentage: "\(String(percentage))%", + color: .harmonyRed, description: "좀 더 친해지길 바라..😅") + case 21 ... 40: + return HarmonyData(icon: "icnHarmonyOrange", percentage: "\(String(percentage))%", + color: .harmonyOrange, description: "마음만은 찰떡궁합!🙃") + case 41 ... 60: + return HarmonyData(icon: "icnHarmonyGreen", percentage: "\(String(percentage))%", + color: .harmonyGreen, description: "이 정도면 제법 친한 사이😛") + case 61 ... 80: + return HarmonyData(icon: "icnHarmonyYellow", percentage: "\(String(percentage))%", + color: .harmonyYellow, description: "우리 사이 척하면 척!😝") + case 81 ... 100: + return HarmonyData(icon: "icnHarmonyPurple", percentage: "\(String(percentage))%", + color: .harmonyPurple, description: "더할 나위 없이 완벽한 사이!😍") + default: + return HarmonyData(icon: "icnHarmonyRed", percentage: "\(String(percentage))%", + color: .harmonyRed, description: "") + } + + } + + // MARK: - @objc Methods + + @objc func didRecieveDataNotification(_ notification: Notification) { + groupId = notification.object as? Int ?? 0 + } + + @objc + private func transitionCardWithAnimation(_ swipeGesture: UISwipeGestureRecognizer) { + if isFront { + guard let backCard = BackCardCell.nib().instantiate(withOwner: self, options: nil).first as? BackCardCell else { return } + backCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height) + guard let cardDataModel = cardDataModel else { return } + backCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable) + + cardView.addSubview(backCard) + isFront = false + } else { + guard let frontCard = FrontCardCell.nib().instantiate(withOwner: self, options: nil).first as? FrontCardCell else { return } + + frontCard.frame = CGRect(x: 0, y: 0, width: cardView.frame.width, height: cardView.frame.height) + guard let cardDataModel = cardDataModel else { return } + frontCard.initCellFromServer(cardData: cardDataModel, isShareable: isShareable) + + cardView.addSubview(frontCard) + isFront = true + } + if swipeGesture.direction == .right { + UIView.transition(with: cardView, duration: 0.5, options: .transitionFlipFromLeft, animations: nil) { _ in + self.cardView.subviews[0].removeFromSuperview() + } + } else { + UIView.transition(with: cardView, duration: 0.5, options: .transitionFlipFromRight, animations: nil) { _ in + self.cardView.subviews[0].removeFromSuperview() + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardDetail/CardHarmonyViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardDetail/CardHarmonyViewController.swift new file mode 100644 index 00000000..3dabca76 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardDetail/CardHarmonyViewController.swift @@ -0,0 +1,47 @@ +// +// CardHarmonyViewController.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/12/10. +// + +import UIKit + +class CardHarmonyViewController: UIViewController { + + // MARK: - Properties + @IBOutlet weak var dimmedBackView: UIView! + @IBOutlet weak var popUpView: UIView! + @IBOutlet weak var harmonyImageView: UIImageView! + @IBOutlet weak var harmonyPercentLabel: UILabel! + @IBOutlet weak var harmonyDescriptionLabel: UILabel! + + @IBAction func touchDismissButton(_ sender: Any) { + UIView.animate(withDuration: 0.2, delay: 0, options: .curveEaseOut, animations: { + self.dimmedBackView.alpha = 0.0 + self.view.layoutIfNeeded() + self.popUpView.isHidden = true + }, completion: { _ in + if self.presentingViewController != nil { + self.dismiss(animated: false, completion: nil) + } + }) + } + + var harmonyData: HarmonyData? + + override func viewDidLoad() { + super.viewDidLoad() + setUI() + } + +} + +extension CardHarmonyViewController { + private func setUI() { + harmonyImageView.image = UIImage(named: harmonyData?.icon ?? "icnHarmonyRed") + harmonyPercentLabel.text = harmonyData?.percentage ?? "" + harmonyPercentLabel.textColor = harmonyData?.color ?? .harmonyRed + harmonyDescriptionLabel.text = harmonyData?.description ?? "" + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/CardList/CardListViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/CardList/CardListViewController.swift new file mode 100644 index 00000000..697528df --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/CardList/CardListViewController.swift @@ -0,0 +1,334 @@ +// +// CardListViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/09/27. +// + +import UIKit +import Moya +import KakaoSDKCommon + +class CardListViewController: UIViewController { + + // MARK: - Properties + var cardItems: [CardList] = [] + var newCardItems: [Ordered] = [] + + // MARK: - IBOutlet Properties + @IBOutlet weak var cardListTableView: UITableView! + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + navigationBackSwipeMotion() + setLongPressGesture() + + cardListTableView.register(CardListTableViewCell.nib(), forCellReuseIdentifier: "CardListTableViewCell") + cardListTableView.register(EmptyCardListTableViewCell.nib(), forCellReuseIdentifier: "EmptyCardListTableViewCell") + + cardListTableView.delegate = self + cardListTableView.dataSource = self + + cardListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", isList: true) + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + cardListTableView.reloadData() + } + + // MARK: - IBAction Properties + @IBAction func dismissToPreviousView(_ sender: UIButton) { + self.navigationController?.popViewController(animated: true) + } + + // MARK: - Functions + func setLongPressGesture() { + self.cardListTableView.allowsSelection = false + + let longPressGesture = UILongPressGestureRecognizer(target: self, action: #selector(longPressCalled(gestureRecognizer:))) + cardListTableView.addGestureRecognizer(longPressGesture) + } + + func navigationBackSwipeMotion() { + self.navigationController?.interactivePopGestureRecognizer?.delegate = nil + } + + func snapShotOfCall(_ inputView: UIView) -> UIView { + UIGraphicsBeginImageContextWithOptions(inputView.bounds.size, false, 0.0) + inputView.layer.render(in: UIGraphicsGetCurrentContext()!) + let image = UIGraphicsGetImageFromCurrentImageContext()! + UIGraphicsEndImageContext() + + let cellSnapshot: UIView = UIImageView(image: image) + cellSnapshot.layer.masksToBounds = false + cellSnapshot.layer.cornerRadius = 0.0 + cellSnapshot.layer.shadowOffset = CGSize(width: -5.0, height: 0.0) + cellSnapshot.layer.shadowRadius = 5.0 + cellSnapshot.layer.shadowOpacity = 0.4 + + return cellSnapshot + } + + @objc func pinButtonClicked(_ sender: UIButton) { + let contentView = sender.superview + guard let cell = contentView?.superview as? UITableViewCell else { return } + let index = cardListTableView.indexPath(for: cell) + + if index!.row > 0 { + self.cardItems.insert(self.cardItems.remove(at: index!.row), at: 0) + cardListTableView.reloadData() + cardListTableView.moveRow(at: index!, to: IndexPath(row: 0, section: 0)) + + var count = 0 + while cardItems.count > count { + newCardItems.append(Ordered(cardID: cardItems[count].cardID, priority: count)) + count += 1 + } + cardListEditWithAPI(request: CardListEditRequest(ordered: newCardItems)) + } + } +} + +// MARK: - UITableViewDelegate +extension CardListViewController: UITableViewDelegate { + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + if cardItems.isEmpty { + return 670 + } else { + return 58 + } + } + + // Swipe Action + func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { + if indexPath.row == 0 { + return nil + } else { + let deleteAction = UIContextualAction(style: .normal, title: "삭제", handler: { (_ action, _ view, _ success) in + self.makeCancelDeleteAlert(title: "명함 삭제", message: "명함을 정말 삭제하시겠습니까?\n공유된 명함일 경우, 친구의 명함 모음에서도 해당 명함이 삭제됩니다.", cancelAction: { _ in + // 취소 눌렀을 때 액션이 들어갈 부분 + }, deleteAction: { _ in + self.deleteCardWithAPI(cardID: self.cardItems[indexPath.row].cardID) + self.cardListTableView.reloadData() + }) + }) + deleteAction.backgroundColor = .red + + let swipeActions = UISwipeActionsConfiguration(actions: [deleteAction]) + swipeActions.performsFirstActionWithFullSwipe = false + + return swipeActions + } + } +} + +// MARK: - UITableViewDataSource +extension CardListViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + let count = cardItems.count + if count == 0 { + return 1 + } else { + return count + } + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if cardItems.isEmpty { + guard let serviceCell = tableView.dequeueReusableCell(withIdentifier: Const.Xib.EmptyCardListTableViewCell, for: indexPath) as? EmptyCardListTableViewCell else { return UITableViewCell() } + + return serviceCell + } else { + guard let serviceCell = tableView.dequeueReusableCell(withIdentifier: Const.Xib.cardListTableViewCell, for: indexPath) as? CardListTableViewCell else { return UITableViewCell() } + + serviceCell.initData(title: cardItems[indexPath.row].title) + serviceCell.pinButton.addTarget(self, action: #selector(pinButtonClicked(_:)), for: .touchUpInside) + + if indexPath.row == 0 { + serviceCell.pinButton.imageView?.image = UIImage(named: "iconPin") + serviceCell.pinButton.isEnabled = false + serviceCell.reorderButton.isHidden = true + } else { + serviceCell.pinButton.imageView?.image = UIImage(named: "iconPinInactive") + serviceCell.pinButton.isEnabled = true + serviceCell.reorderButton.isHidden = false + } + + return serviceCell + } + } +} + +// MARK: - Network +extension CardListViewController { + func cardListFetchWithAPI(userID: String, isList: Bool) { + CardAPI.shared.cardListFetch(userID: userID, isList: isList, offset: nil) { response in + switch response { + case .success(let data): + if let card = data as? CardListRequest { + self.cardItems = card.cardDates + self.cardListTableView.reloadData() + } + case .requestErr(let message): + print("getCardListFetchWithAPI - requestErr", message) + case .pathErr: + print("getCardListFetchWithAPI - pathErr") + case .serverErr: + print("getCardListFetchWithAPI - serverErr") + case .networkFail: + print("getCardListFetchWithAPI - networkFail") + } + } + } + + func cardListEditWithAPI(request: CardListEditRequest) { + CardAPI.shared.cardListEdit(request: request) { response in + switch response { + case .success(let data): + print(data) + case .requestErr(let message): + print("putCardListEditWithAPI - requestErr", message) + case .pathErr: + print("putCardListEditWithAPI - pathErr") + case .serverErr: + print("putCardListEditWithAPI - serverErr") + case .networkFail: + print("putCardListEditWithAPI - networkFail") + } + } + } + + func deleteCardWithAPI(cardID: String) { + CardAPI.shared.cardDelete(cardID: cardID) { response in + switch response { + case .success(let data): + print(data) + self.cardListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", isList: true) + self.cardListTableView.reloadData() + case .requestErr(let message): + print("deleteGroupWithAPI - requestErr", message) + case .pathErr: + print("deleteGroupWithAPI - pathErr") + case .serverErr: + print("deleteGroupWithAPI - serverErr") + case .networkFail: + print("deleteGroupWithAPI - networkFail") + } + } + } + +} + +// MARK: - Extension: 테이블 뷰 Drag & Drop 기능 +extension CardListViewController { + @objc func longPressCalled(gestureRecognizer: UIGestureRecognizer) { + guard let longPress = gestureRecognizer as? UILongPressGestureRecognizer else { return } + let state = longPress.state + let locationInView = longPress.location(in: cardListTableView) + let indexPath = cardListTableView.indexPathForRow(at: locationInView) + + // 최초 indexPath 변수 + struct Initial { + static var initialIndexPath: IndexPath? + static var tabIndex: IndexPath? + } + + // 스냅샷 + struct MyCell { + static var cellSnapshot: UIView? + static var cellIsAnimating: Bool = false + static var cellNeedToShow: Bool = false + } + + // UIGestureRecognizer 상태에 따른 case 분기처리 + switch state { + + // longPress 제스처가 시작할 때 case + case UIGestureRecognizer.State.began: + if indexPath!.row != 0 { + Initial.initialIndexPath = indexPath + Initial.tabIndex = indexPath + var cell: UITableViewCell? = UITableViewCell() + cell = cardListTableView.cellForRow(at: indexPath!) + + MyCell.cellSnapshot = snapShotOfCall(cell!) + + var center = cell?.center + MyCell.cellSnapshot!.center = center! + MyCell.cellSnapshot!.alpha = 0.0 + cardListTableView.addSubview(MyCell.cellSnapshot!) + + UIView.animate(withDuration: 0.25, animations: { () -> Void in + center?.y = locationInView.y + MyCell.cellIsAnimating = true + MyCell.cellSnapshot!.center = center! + MyCell.cellSnapshot!.transform = CGAffineTransform(scaleX: 1.05, y: 1.05) + MyCell.cellSnapshot!.alpha = 0.98 + cell?.alpha = 0.0 + }, completion: { (finished) -> Void in + if finished { + MyCell.cellIsAnimating = false + if MyCell.cellNeedToShow { + MyCell.cellNeedToShow = false + UIView.animate(withDuration: 0.25, animations: { () -> Void in + cell?.alpha = 1 + }) + } else { + cell?.isHidden = true + } + } + }) + } + // longPress 제스처가 변경될 때 case + case UIGestureRecognizer.State.changed: + if MyCell.cellSnapshot != nil { + var center = MyCell.cellSnapshot!.center + center.y = locationInView.y + MyCell.cellSnapshot!.center = center + + if ((indexPath?.row != 0) && (indexPath != Initial.initialIndexPath)) && (Initial.initialIndexPath != nil) && (indexPath != nil) { + // this line change row index + self.cardItems.insert(self.cardItems.remove(at: Initial.initialIndexPath!.row), at: indexPath!.row) + cardListTableView.moveRow(at: Initial.initialIndexPath!, to: indexPath!) + Initial.initialIndexPath = indexPath + } + } + // longPress 제스처가 끝났을 때 case + default: + if Initial.initialIndexPath != nil { + let cell = cardListTableView.cellForRow(at: Initial.initialIndexPath!) + if MyCell.cellIsAnimating { + MyCell.cellNeedToShow = true + } else { + cell?.isHidden = false + cell?.alpha = 0.0 + } + + UIView.animate(withDuration: 0.2, animations: { () -> Void in + MyCell.cellSnapshot!.center = (cell?.center)! + MyCell.cellSnapshot!.transform = CGAffineTransform.identity + MyCell.cellSnapshot!.alpha = 0.0 + cell?.alpha = 1.0 + + }, completion: { (finished) -> Void in + if finished { + var count = 0 + while self.cardItems.count > count { + self.newCardItems.append(Ordered(cardID: self.cardItems[count].cardID, priority: count)) + count += 1 + } + self.cardListEditWithAPI(request: CardListEditRequest(ordered: self.newCardItems)) + + Initial.initialIndexPath = nil + MyCell.cellSnapshot!.removeFromSuperview() + MyCell.cellSnapshot = nil + } + }) + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/Group/GroupViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/Group/GroupViewController.swift new file mode 100644 index 00000000..300f11a3 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/Group/GroupViewController.swift @@ -0,0 +1,408 @@ +// +// GroupViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/08. +// + +import Photos +import UIKit + +import Kingfisher +import NVActivityIndicatorView + +class GroupViewController: UIViewController { + + // MARK: - Properties + // 네비게이션 바 + @IBAction func presentToAddWithIdView(_ sender: Any) { + let nextVC = AddWithIdBottomSheetViewController() + .setTitle("ID로 명함 추가") + .setHeight(184) + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: false, completion: nil) + } + + @IBAction func presentToAddWithQrView(_ sender: Any) { + switch AVCaptureDevice.authorizationStatus(for: .video) { + case .denied: + makeOKCancelAlert(title: "카메라 권한이 허용되어 있지 않아요.", + message: "QR코드 인식을 위해 카메라 권한이 필요합니다. 앱 설정으로 이동해 허용해 주세요.", + okAction: { _ in UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!)}, + cancelAction: nil, + completion: nil) + case .authorized: + guard let nextVC = UIStoryboard.init(name: Const.Storyboard.Name.qrScan, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.qrScanViewController) as? QRScanViewController else { return } + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: true, completion: nil) + case .notDetermined: + AVCaptureDevice.requestAccess(for: .video) { granted in + if granted { + DispatchQueue.main.async { + guard let nextVC = UIStoryboard.init(name: Const.Storyboard.Name.qrScan, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.qrScanViewController) as? QRScanViewController else { return } + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: true, completion: nil) + } + } + } + default: + break + } + } + + // 중간 그룹 이름들 나열된 뷰 + @IBAction func pushToGroupEdit(_ sender: Any) { + guard let nextVC = UIStoryboard.init(name: Const.Storyboard.Name.groupEdit, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.groupEditViewController) as? GroupEditViewController else { return } + nextVC.serverGroups = self.serverGroups + + navigationController?.pushViewController(nextVC, animated: true) + } + + // MARK: - Components + + lazy var loadingBgView: UIView = { + let bgView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)) + bgView.backgroundColor = .loadingBackground + + return bgView + }() + + lazy var activityIndicator: NVActivityIndicatorView = { + let activityIndicator = NVActivityIndicatorView(frame: CGRect(x: 0, y: 0, width: 40, height: 40), + type: .ballBeat, + color: .mainColorNadaMain, + padding: .zero) + activityIndicator.translatesAutoresizingMaskIntoConstraints = false + + return activityIndicator + }() + + // collectionview + @IBOutlet weak var groupCollectionView: UICollectionView! + @IBOutlet weak var cardsCollectionView: UICollectionView! + @IBOutlet weak var emptyView: UIView! + + // 그룹 이름들을 담을 변수 생성 + var serverGroups: Groups? + var frontCards: [FrontCard]? = [] + var serverCardsWithBack: Card? + var groupId: Int? + + var selectedRow = 0 + private var offset = 0 + private var isInfiniteScroll = true + + override func viewDidLoad() { + super.viewDidLoad() + + registerCell() + setNotification() + setUI() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + DispatchQueue.main.async { + self.setActivityIndicator() + + self.offset = 0 + self.frontCards?.removeAll() + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + self.groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "") + } + } +} + +// MARK: - Extensions + +extension GroupViewController { + private func registerCell() { + groupCollectionView.delegate = self + groupCollectionView.dataSource = self + cardsCollectionView.delegate = self + cardsCollectionView.dataSource = self + + groupCollectionView.register(GroupCollectionViewCell.nib(), forCellWithReuseIdentifier: Const.Xib.groupCollectionViewCell) + cardsCollectionView.register(CardInGroupCollectionViewCell.nib(), forCellWithReuseIdentifier: Const.Xib.cardInGroupCollectionViewCell) + } + + private func setUI() { + emptyView.isHidden = true + navigationController?.navigationBar.isHidden = true + } + + private func setNotification() { + NotificationCenter.default.addObserver(self, selector: #selector(didRecieveDataNotification(_:)), name: Notification.Name.passDataToGroup, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(relaodCardCollection), name: .reloadGroupViewController, object: nil) + } + + private func setActivityIndicator() { + view.addSubview(loadingBgView) + loadingBgView.addSubview(activityIndicator) + + NSLayoutConstraint.activate([ + activityIndicator.centerXAnchor.constraint(equalTo: view.centerXAnchor), + activityIndicator.centerYAnchor.constraint(equalTo: view.centerYAnchor) + ]) + + activityIndicator.startAnimating() + } + + // MARK: - @objc Methods + + @objc func didRecieveDataNotification(_ notification: Notification) { + selectedRow = notification.object as? Int ?? 0 + } + + @objc + private func relaodCardCollection() { + offset = 0 + frontCards?.removeAll() + + groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "") + } +} + +// MARK: - Network + +extension GroupViewController { + func groupListFetchWithAPI(userID: String) { + GroupAPI.shared.groupListFetch(userID: userID) { response in + switch response { + case .success(let data): + if let group = data as? Groups { + self.serverGroups = group + self.groupCollectionView.reloadData() + self.groupId = group.groups[self.selectedRow].groupID + self.cardListInGroupWithAPI(cardListInGroupRequest: CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", groupId: group.groups[self.selectedRow].groupID, offset: 0)) { + if self.frontCards?.count != 0 { + self.cardsCollectionView.scrollToItem(at: IndexPath(item: 0, section: 0), at: .top, animated: false) + } + self.isInfiniteScroll = true + } + } + case .requestErr(let message): + print("groupListFetchWithAPI - requestErr: \(message)") + case .pathErr: + print("groupListFetchWithAPI - pathErr") + case .serverErr: + print("groupListFetchWithAPI - serverErr") + case .networkFail: + print("groupListFetchWithAPI - networkFail") + } + } + } + + func cardListInGroupWithAPI(cardListInGroupRequest: CardListInGroupRequest, completion: @escaping () -> Void = { }) { + GroupAPI.shared.cardListFetchInGroup(cardListInGroupRequest: cardListInGroupRequest) { response in + switch response { + case .success(let data): + self.activityIndicator.stopAnimating() + self.loadingBgView.removeFromSuperview() + + if let cards = data as? CardsInGroupResponse { + self.frontCards?.append(contentsOf: cards.cards) + if self.frontCards?.count == 0 { + self.emptyView.isHidden = false + } else { + self.emptyView.isHidden = true + } + self.cardsCollectionView.reloadData() + } + completion() + case .requestErr(let message): + print("cardListInGroupWithAPI - requestErr: \(message)") + case .pathErr: + print("cardListInGroupWithAPI - pathErr") + case .serverErr: + print("cardListInGroupWithAPI - serverErr") + case .networkFail: + print("cardListInGroupWithAPI - networkFail") + } + } + } + + func cardDetailFetchWithAPI(cardID: String) { + CardAPI.shared.cardDetailFetch(cardID: cardID) { response in + switch response { + case .success(let data): + if let card = data as? CardClass { + guard let nextVC = UIStoryboard.init(name: Const.Storyboard.Name.cardDetail, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.cardDetailViewController) as? CardDetailViewController else { return } + + nextVC.cardDataModel = card.card + nextVC.groupId = self.groupId + nextVC.serverGroups = self.serverGroups + self.navigationController?.pushViewController(nextVC, animated: true) + } + case .requestErr(let message): + print("cardDetailFetchWithAPI - requestErr: \(message)") + case .pathErr: + print("cardDetailFetchWithAPI - pathErr") + case .serverErr: + print("cardDetailFetchWithAPI - serverErr") + case .networkFail: + print("cardDetailFetchWithAPI - networkFail") + } + } + } +} + +// MARK: - UICollectionViewDelegate +extension GroupViewController: UICollectionViewDelegate { + func scrollViewDidScroll(_ scrollView: UIScrollView) { + if scrollView == cardsCollectionView { + if cardsCollectionView.contentOffset.y > cardsCollectionView.contentSize.height - cardsCollectionView.bounds.height { + if isInfiniteScroll { + isInfiniteScroll = false + offset += 1 + + cardListInGroupWithAPI(cardListInGroupRequest: CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", groupId: serverGroups?.groups[self.selectedRow].groupID ?? -1, offset: offset)) { + self.isInfiniteScroll = true + } + } + } + } + } +} + +// MARK: - UICollectionViewDataSource +extension GroupViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + switch collectionView { + case groupCollectionView: + return serverGroups?.groups.count ?? 0 + case cardsCollectionView: + return frontCards?.count ?? 0 + default: + return 0 + } + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + switch collectionView { + case groupCollectionView: + guard let groupCell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.groupCollectionViewCell, for: indexPath) as? GroupCollectionViewCell else { + return UICollectionViewCell() + } + + groupCell.groupName.text = serverGroups?.groups[indexPath.row].groupName + + if indexPath.row == selectedRow { + collectionView.selectItem(at: indexPath, animated: true, scrollPosition: .init()) + } + return groupCell + case cardsCollectionView: + guard let cardCell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.cardInGroupCollectionViewCell, for: indexPath) as? CardInGroupCollectionViewCell else { + return UICollectionViewCell() + } + guard let frontCards = frontCards else { return UICollectionViewCell() } + cardCell.backgroundImageView.updateServerImage(frontCards[indexPath.row].background) + cardCell.cardId = frontCards[indexPath.row].cardID + cardCell.titleLabel.text = frontCards[indexPath.row].title + cardCell.descriptionLabel.text = frontCards[indexPath.row].cardDescription + cardCell.userNameLabel.text = frontCards[indexPath.row].name + cardCell.birthLabel.text = frontCards[indexPath.row].birthDate + cardCell.mbtiLabel.text = frontCards[indexPath.row].mbti + cardCell.instagramIDLabel.text = frontCards[indexPath.row].instagram + cardCell.lineURLLabel.text = frontCards[indexPath.row].link + + if frontCards[indexPath.row].instagram == "" { + cardCell.instagramIcon.isHidden = true + } + if frontCards[indexPath.row].link == "" { + cardCell.urlIcon.isHidden = true + } + + return cardCell + default: + return UICollectionViewCell() + } + } + + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { + switch collectionView { + case groupCollectionView: + selectedRow = indexPath.row + groupId = serverGroups?.groups[indexPath.row].groupID + offset = 0 + frontCards?.removeAll() + + DispatchQueue.main.async { + self.setActivityIndicator() + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + self.cardListInGroupWithAPI(cardListInGroupRequest: + CardListInGroupRequest(userId: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "", + groupId: self.serverGroups?.groups[indexPath.row].groupID ?? 0, + offset: 0)) { + self.isInfiniteScroll = true + } + } + case cardsCollectionView: + cardDetailFetchWithAPI(cardID: frontCards?[indexPath.row].cardID ?? "") + default: + return + } + } +} + +// MARK: - UICollectionViewDelegateFlowLayout +extension GroupViewController: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + + var width: CGFloat + var height: CGFloat + + switch collectionView { + case groupCollectionView: + guard let cell = groupCollectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.groupCollectionViewCell, for: indexPath) as? GroupCollectionViewCell else { + return .zero + } + cell.groupName.text = serverGroups?.groups[indexPath.row].groupName + cell.groupName.sizeToFit() + width = cell.groupName.frame.width + 30 + height = collectionView.frame.size.height + case cardsCollectionView: + width = collectionView.frame.size.width/2 - collectionView.frame.size.width * 8/327 + height = collectionView.frame.size.height * 258/558 + default: + width = 0 + height = 0 + } + return CGSize(width: width, height: height) + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + switch collectionView { + case groupCollectionView: + return .init(top: 0, left: 0, bottom: 0, right: 10) + case cardsCollectionView: + return .init(top: 0, left: 0, bottom: 28, right: 0) + default: + return .zero + } + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + switch collectionView { + case groupCollectionView: + return 5 + case cardsCollectionView: + return collectionView.frame.size.width * 15/327 + default: + return 0 + } + } + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + switch collectionView { + case groupCollectionView: + return 5 + case cardsCollectionView: + return collectionView.frame.size.width * 15/327 + default: + return 0 + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/Group/QRScanViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/Group/QRScanViewController.swift new file mode 100644 index 00000000..8b2aff65 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/Group/QRScanViewController.swift @@ -0,0 +1,174 @@ +// +// QRScanViewController.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/26. +// + +import UIKit +import AVFoundation + +class QRScanViewController: UIViewController { + + // MARK: - Properties + private let captureSession = AVCaptureSession() + + // 네비게이션 바 + private let titleLabel: UILabel = { + let label = UILabel() + label.text = "QR스캔" + label.textColor = .white + label.font = UIFont.title01 + return label + }() + + private let dismissButton: UIButton = { + let button = UIButton() + button.setImage(UIImage(named: "iconQRClear"), for: .normal) + button.addTarget(self, action: #selector(dismissQRScanViewController), for: .touchUpInside) + return button + }() + + override func viewDidLoad() { + super.viewDidLoad() + + basicSetting() + setNotification() + } +} + +extension QRScanViewController { + @objc func dismissQRScanViewController() { + self.dismiss(animated: true, completion: nil) + } +} + +extension QRScanViewController { + + private func basicSetting() { + guard let captureDevice = AVCaptureDevice.default(for: AVMediaType.video) else { + fatalError("No video device found") + } + do { + let rectOfInterest = CGRect(x: 24, y: (UIScreen.main.bounds.height - 200) / 2, width: 327, height: 327) + + let input = try AVCaptureDeviceInput(device: captureDevice) + captureSession.addInput(input) + + let output = AVCaptureMetadataOutput() + captureSession.addOutput(output) + + output.setMetadataObjectsDelegate(self, queue: DispatchQueue.main) + output.metadataObjectTypes = [AVMetadataObject.ObjectType.qr] + + let rectConverted = setVideoLayer(rectOfInterest: rectOfInterest) + output.rectOfInterest = rectConverted + + setGuideLineView(rectOfInterest: rectOfInterest) + captureSession.startRunning() + } catch { + print("QRScanViewController - AVCaptureDevice error") + } + } + + private func setVideoLayer(rectOfInterest: CGRect) -> CGRect { + let videoLayer = AVCaptureVideoPreviewLayer(session: captureSession) + videoLayer.frame = view.layer.bounds + videoLayer.videoGravity = AVLayerVideoGravity.resizeAspectFill + view.layer.addSublayer(videoLayer) + + return videoLayer.metadataOutputRectConverted(fromLayerRect: rectOfInterest) + } + + private func setGuideLineView(rectOfInterest: CGRect) { + let guideImage = UIImageView() + guideImage.image = UIImage(named: "subtract") + guideImage.translatesAutoresizingMaskIntoConstraints = false + view.addSubview(titleLabel) + view.addSubview(dismissButton) + view.addSubview(guideImage) + titleLabel.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + titleLabel.topAnchor.constraint(equalTo: view.topAnchor, constant: 68), + titleLabel.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 24) + ]) + + dismissButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + dismissButton.topAnchor.constraint(equalTo: view.topAnchor, constant: 68), + dismissButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -24) + ]) + + NSLayoutConstraint.activate([ + guideImage.centerXAnchor.constraint(equalTo: view.centerXAnchor), + guideImage.centerYAnchor.constraint(equalTo: view.centerYAnchor), + guideImage.widthAnchor.constraint(equalToConstant: 327), + guideImage.heightAnchor.constraint(equalToConstant: 327) + ]) + } + + private func setNotification() { + NotificationCenter.default.addObserver(self, selector: #selector(captureSessionStartRunning), name: .dismissQRCodeCardResult, object: nil) + } + + @objc + private func captureSessionStartRunning() { + captureSession.startRunning() + } +} + +extension QRScanViewController: AVCaptureMetadataOutputObjectsDelegate { + + func metadataOutput(_ captureOutput: AVCaptureMetadataOutput, + didOutput metadataObjects: [AVMetadataObject], + from connection: AVCaptureConnection) { + + if let metadataObject = metadataObjects.first { + + guard let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject, let stringValue = readableObject.stringValue else { + return + } + + // ✅ qr코드가 가진 문자열이 URL 형태를 띈다면 출력.(아무런 qr코드나 찍는다고 출력시키면 안되니까 여기서 분기처리 가능. ) + if stringValue.hasPrefix("ThisIsTeamNADAQrCode") { + self.captureSession.stopRunning() + // TODO: 여기서 QR에 있는 ID값으로 명함검색 API통신 + cardDetailFetchWithAPI(cardID: stringValue.deletingPrefix("ThisIsTeamNADAQrCode")) + + } else { + showToast(message: "유효하지 않은 QR입니다.", font: UIFont.button02, view: "QRScan") + } + } + } +} + +extension QRScanViewController { + func cardDetailFetchWithAPI(cardID: String) { + CardAPI.shared.cardDetailFetch(cardID: cardID) { response in + switch response { + case .success(let data): + if let card = data as? CardClass { + if UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) == card.card.author { + self.showToast(message: "자신의 명함은 추가할 수 없습니다.", font: UIFont.button02, view: "wrongCard") + } else { + let nextVC = CardResultBottomSheetViewController() + .setTitle(card.card.name) + .setHeight(574) + nextVC.cardDataModel = card.card + nextVC.modalPresentationStyle = .overFullScreen + nextVC.status = .addWithQR + self.present(nextVC, animated: false, completion: nil) + } + } + case .requestErr(let message): + print("cardDetailFetchWithAPI - requestErr: \(message)") + case .pathErr: + print("cardDetailFetchWithAPI - pathErr") + case .serverErr: + print("cardDetailFetchWithAPI - serverErr") + case .networkFail: + print("cardDetailFetchWithAPI - networkFail") + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/GroupEdit/GroupEditViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/GroupEdit/GroupEditViewController.swift new file mode 100644 index 00000000..55558bb0 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/GroupEdit/GroupEditViewController.swift @@ -0,0 +1,181 @@ +// +// GroupEditViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/21. +// + +import UIKit + +class GroupEditViewController: UIViewController { + + // MARK: - Properties + var serverGroups: Groups? + var unClass: Int? + + // MARK: - @IBOutlet Properties + @IBOutlet weak var groupEditTableView: UITableView! + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + groupEditTableView.register(GroupEditTableViewCell.nib(), forCellReuseIdentifier: Const.Xib.groupEditTableViewCell) + groupEditTableView.register(EmptyGroupEditTableViewCell.nib(), forCellReuseIdentifier: Const.Xib.EmptyGroupEditTableViewCell) + + groupEditTableView.delegate = self + groupEditTableView.dataSource = self + serverGroupList() + } + + // MARK: - @IBAction Properties + @IBAction func dismissToPreviousView(_ sender: UIButton) { + self.navigationController?.popViewController(animated: true) + } + + @IBAction func presentToAddGroupBottom(_ sender: UIButton) { + if serverGroups?.groups.count == 4 { + makeOKAlert(title: "", message: "새로운 그룹은 최대 4개까지만 등록 가능합니다.") + } else { + let nextVC = AddGroupBottomSheetViewController() + .setTitle("그룹 추가") + .setHeight(184) + nextVC.returnToGroupEditViewController = { + self.makeOKAlert(title: "", message: "그룹이 추가되었습니다.", okAction: {_ in + self.groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "") + }, completion: nil) + } + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: false, completion: nil) + } + } + +} + +// MARK: - TableView Delegate +extension GroupEditViewController: UITableViewDelegate { + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + if serverGroups?.groups.isEmpty == true { + return 674 + } else { + return 59 + } + } + + // Swipe Action + func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { + if serverGroups?.groups.isEmpty == true { + return nil + } else { + let deleteAction = UIContextualAction(style: .normal, title: "삭제", handler: { (_ action, _ view, _ success) in + self.makeCancelDeleteAlert(title: "그룹 삭제", message: "해당 그룹에 있던 명함은\n미분류 그룹으로 이동합니다.", cancelAction: { _ in + // 취소 눌렀을 때 액션이 들어갈 부분 + }, deleteAction: { _ in + self.groupDeleteWithAPI( + groupID: self.serverGroups?.groups[indexPath.row].groupID ?? 0, + defaultGroupId: self.unClass ?? 0) + self.groupEditTableView.reloadData() + NotificationCenter.default.post(name: Notification.Name.passDataToGroup, object: 0, userInfo: nil) + }) + }) + deleteAction.backgroundColor = .red + + let swipeActions = UISwipeActionsConfiguration(actions: [deleteAction]) + swipeActions.performsFirstActionWithFullSwipe = false + + return swipeActions + } + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + if serverGroups?.groups.isEmpty == false { + let nextVC = GroupNameEditBottomSheetViewController() + .setTitle("그룹명 변경") + .setHeight(184) + nextVC.modalPresentationStyle = .overFullScreen + nextVC.text = serverGroups?.groups[indexPath.row].groupName ?? "" + nextVC.returnToGroupEditViewController = { + self.groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "") + } + nextVC.nowGroup = serverGroups?.groups[indexPath.row] + self.present(nextVC, animated: false, completion: nil) + } + } +} + +// MARK: - TableView DataSource +extension GroupEditViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + let count = serverGroups?.groups.count + if count == 0 { + return 1 + } else { + return count ?? 1 + } + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if serverGroups?.groups.isEmpty == true { + guard let serviceCell = tableView.dequeueReusableCell(withIdentifier: Const.Xib.EmptyGroupEditTableViewCell, for: indexPath) as? EmptyGroupEditTableViewCell else { return UITableViewCell() } + return serviceCell + } else { + guard let serviceCell = tableView.dequeueReusableCell(withIdentifier: Const.Xib.groupEditTableViewCell, for: indexPath) as? GroupEditTableViewCell else { return UITableViewCell() } + + serviceCell.initData(title: serverGroups?.groups[indexPath.row].groupName ?? "") + return serviceCell + } + } +} + +// MARK: - Extensions +extension GroupEditViewController { + func serverGroupList() { + self.unClass = serverGroups?.groups[0].groupID + serverGroups?.groups.remove(at: 0) + } +} + +// MARK: - Network +extension GroupEditViewController { + func groupListFetchWithAPI(userID: String) { + GroupAPI.shared.groupListFetch(userID: userID) { response in + switch response { + case .success(let data): + if let group = data as? Groups { + self.serverGroups = group + self.unClass = self.serverGroups?.groups[0].groupID + self.serverGroups?.groups.remove(at: 0) + self.groupEditTableView.reloadData() + } + case .requestErr(let message): + print("groupListFetchWithAPI - requestErr: \(message)") + case .pathErr: + print("groupListFetchWithAPI - pathErr") + case .serverErr: + print("groupListFetchWithAPI - serverErr") + case .networkFail: + print("groupListFetchWithAPI - networkFail") + } + } + } + + func groupDeleteWithAPI(groupID: Int, defaultGroupId: Int) { + GroupAPI.shared.groupDelete(groupID: groupID, defaultGroupId: defaultGroupId) { response in + switch response { + case .success: + print("groupDeleteWithAPI - success") + self.groupListFetchWithAPI(userID: UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) ?? "") + self.groupEditTableView.reloadData() + case .requestErr(let message): + print("groupDeleteWithAPI - requestErr: \(message)") + case .pathErr: + print("groupDeleteWithAPI - pathErr") + case .serverErr: + print("groupDeleteWithAPI - serverErr") + case .networkFail: + print("groupDeleteWithAPI - networkFail") + } + } + } + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/Login/LoginViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/Login/LoginViewController.swift new file mode 100644 index 00000000..2204f689 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/Login/LoginViewController.swift @@ -0,0 +1,215 @@ +// +// LoginViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/09/21. +// + +import UIKit +import KakaoSDKCommon +import KakaoSDKAuth +import KakaoSDKUser +import AuthenticationServices + +class LoginViewController: UIViewController { + + // MARK: - IBOutlet Properties + @IBOutlet weak var nadaImageView: UIImageView! + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setUI() + } + + // MARK: - Functions + func setUI() { + let kakaoButton = UIButton() + kakaoButton.setImage(UIImage(named: "btn_kakaologin"), for: .normal) + kakaoButton.cornerRadius = 15 + kakaoButton.addTarget(self, action: #selector(kakaoSignInButtonPress), for: .touchUpInside) + view.addSubview(kakaoButton) + + kakaoButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + kakaoButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), + kakaoButton.topAnchor.constraint(equalTo: nadaImageView.bottomAnchor, constant: 122), + kakaoButton.widthAnchor.constraint(equalToConstant: 327), + kakaoButton.heightAnchor.constraint(equalToConstant: 48) + ]) + + let authorizationButton = ASAuthorizationAppleIDButton(type: .signIn, style: .black) + authorizationButton.addTarget(self, action: #selector(appleSignInButtonPress), for: .touchUpInside) + view.addSubview(authorizationButton) + + authorizationButton.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + authorizationButton.topAnchor.constraint(equalTo: kakaoButton.bottomAnchor, constant: 14), + authorizationButton.centerXAnchor.constraint(equalTo: view.centerXAnchor), + authorizationButton.widthAnchor.constraint(equalToConstant: 327), + authorizationButton.heightAnchor.constraint(equalToConstant: 48) + ]) + + let isDark = UserDefaults.standard.bool(forKey: Const.UserDefaultsKey.darkModeState) + + if let window = UIApplication.shared.windows.first { + if #available(iOS 13.0, *) { + window.overrideUserInterfaceStyle = isDark == true ? .dark : .light + } else { + window.overrideUserInterfaceStyle = .light + } + } + } + + // 메인 화면으로 전환 함수 + func presentToMain() { + let nextVC = UIStoryboard(name: Const.Storyboard.Name.tabBar, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.tabBarViewController) + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: true) { + UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isOnboarding) + } + } + + // 카카오 로그인 버튼 클릭 시 + @objc + func kakaoSignInButtonPress() { + // 카카오톡 설치 여부 확인 + if UserApi.isKakaoTalkLoginAvailable() { + // 카카오톡 로그인. api 호출 결과를 클로저로 전달. + loginWithApp() + } else { + // 만약, 카카오톡이 깔려있지 않을 경우에는 웹 브라우저로 카카오 로그인함. + loginWithWeb() + } + } + + // 애플 로그인 버튼 클릭 시 + @objc + func appleSignInButtonPress() { + let appleIDProvider = ASAuthorizationAppleIDProvider() + let request = appleIDProvider.createRequest() + request.requestedScopes = [.fullName, .email] + + let authorizationController = ASAuthorizationController(authorizationRequests: [request]) + authorizationController.delegate = self + authorizationController.presentationContextProvider = self + authorizationController.performRequests() + } + +} + +// MARK: - KakaoSignIn +extension LoginViewController { + func loginWithApp() { + UserApi.shared.loginWithKakaoTalk {(_, error) in + if let error = error { + print(error) + } else { + print("loginWithKakaoTalk() success.") + + UserApi.shared.me {(user, error) in + if let error = error { + print(error) + } else { + if let userID = user?.kakaoAccount?.email { + self.postUserSignUpWithAPI(request: userID) + UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isAppleLogin) + UserDefaults.standard.set(true, forKey: Const.UserDefaultsKey.isKakaoLogin) + } + } + } + } + } + + } + + func loginWithWeb() { + UserApi.shared.loginWithKakaoAccount {(_, error) in + if let error = error { + print(error) + } else { + print("loginWithKakaoAccount() success.") + + UserApi.shared.me {(user, error) in + if let error = error { + print(error) + } else { + if let userID = user?.kakaoAccount?.email { + self.postUserSignUpWithAPI(request: userID) + UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isAppleLogin) + UserDefaults.standard.set(true, forKey: Const.UserDefaultsKey.isKakaoLogin) + } + } + } + } + } + } + + // 카카오 로그인 표출 함수 + func signUp() { + // 카카오톡 설치 여부 확인 + if UserApi.isKakaoTalkLoginAvailable() { + // 카카오톡 로그인. api 호출 결과를 클로저로 전달. + loginWithApp() + } else { + // 만약, 카카오톡이 깔려있지 않을 경우에는 웹 브라우저로 카카오 로그인함. + loginWithWeb() + } + } +} + +// MARK: - AppleSignIn +extension LoginViewController: ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding { + func presentationAnchor(for controller: ASAuthorizationController) -> ASPresentationAnchor { + return self.view.window! + } + + // Apple ID 연동 성공 시 + func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { + switch authorization.credential { + // Apple ID + case let appleIDCredential as ASAuthorizationAppleIDCredential: + + let userIdentifier = appleIDCredential.user + postUserSignUpWithAPI(request: userIdentifier) + UserDefaults.standard.set(true, forKey: Const.UserDefaultsKey.isAppleLogin) + UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isKakaoLogin) + + default: + break + } + } + + // Apple ID 연동 실패 시 + func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) { + // Handle error. + } +} + +// MARK: - Network +extension LoginViewController { + func postUserSignUpWithAPI(request: String) { + UserAPI.shared.userSocialSignUp(request: request) { response in + switch response { + case .success(let loginData): + print("postUserSignUpWithAPI - success") + if let userData = loginData as? UserWithTokenRequest { + UserDefaults.standard.set(userData.user.userID, forKey: Const.UserDefaultsKey.userID) + UserDefaults.standard.set(userData.user.token.accessToken, forKey: Const.UserDefaultsKey.accessToken) + UserDefaults.standard.set(userData.user.token.refreshToken, forKey: Const.UserDefaultsKey.refreshToken) + self.presentToMain() + } + case .requestErr(let message): + print("postUserSignUpWithAPI - requestErr: \(message)") + case .pathErr: + print("postUserSignUpWithAPI - pathErr") + case .serverErr: + print("postUserSignUpWithAPI - serverErr") + case .networkFail: + print("postUserSignUpWithAPI - networkFail") + } + } + } + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift new file mode 100644 index 00000000..8b6c9409 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/Main/FrontViewController.swift @@ -0,0 +1,230 @@ +// +// FrontViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/02. +// + +import UIKit + +import KakaoSDKCommon +import NVActivityIndicatorView +import VerticalCardSwiper + +class FrontViewController: UIViewController { + + // MARK: - Properteis + + private var offset = 0 + private var isInfiniteScroll = true + private var cardDataList: [Card]? = [] + private var userID: String? + + var isAfterCreation = false + + // MARK: - Components + + lazy var loadingBgView: UIView = { + let bgView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)) + bgView.backgroundColor = .loadingBackground + + return bgView + }() + + lazy var activityIndicator: NVActivityIndicatorView = { + let activityIndicator = NVActivityIndicatorView(frame: CGRect(x: 0, y: 0, width: 40, height: 40), + type: .ballBeat, + color: .mainColorNadaMain, + padding: .zero) + activityIndicator.translatesAutoresizingMaskIntoConstraints = false + + return activityIndicator + }() + + // MARK: - @IBOutlet Properties + @IBOutlet weak var cardSwiper: VerticalCardSwiper! + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setUserID() + setDelegate() + setNotification() + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + if !self.isAfterCreation { + DispatchQueue.main.async { + + self.setActivityIndicator() + + self.offset = 0 + self.cardDataList?.removeAll() + } + + DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { + self.cardListFetchWithAPI(userID: self.userID, isList: false, offset: self.offset) { + _ = self.cardSwiper.scrollToCard(at: 0, animated: false) + self.activityIndicator.stopAnimating() + self.loadingBgView.removeFromSuperview() + } + } + } + } + + // MARK: - @IBAction Properties + // 명함 생성 뷰로 화면 전환 + @IBAction func presentToCardCreationView(_ sender: Any) { + let nextVC = UIStoryboard(name: Const.Storyboard.Name.cardCreation, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.cardCreationViewController) + let navigationController = UINavigationController(rootViewController: nextVC) + navigationController.modalPresentationStyle = .fullScreen + + self.present(navigationController, animated: true, completion: nil) + } + + // 명함 리스트 뷰로 화면 전환 + @IBAction func pushToCardListView(_ sender: Any) { + let nextVC = UIStoryboard(name: Const.Storyboard.Name.cardList, bundle: nil).instantiateViewController(identifier: Const.ViewController.Identifier.cardListViewController) + + NotificationCenter.default.post(name: NSNotification.Name("deleteTabBar"), object: nil) + + self.navigationController?.pushViewController(nextVC, animated: true) + } +} + +// MARK: - Extensions +extension FrontViewController { + private func setDelegate() { + cardSwiper.delegate = self + cardSwiper.datasource = self + + cardSwiper.isSideSwipingEnabled = false + + cardSwiper.register(nib: MainCardCell.nib(), forCellWithReuseIdentifier: Const.Xib.mainCardCell) + cardSwiper.register(nib: EmptyCardCell.nib(), forCellWithReuseIdentifier: Const.Xib.emptyCardCell) + } + + private func setNotification() { + NotificationCenter.default.addObserver(self, selector: #selector(didRecievePresentCardShare(_:)), name: .presentCardShare, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(setCreationReloadMainCardSwiper), name: .creationReloadMainCardSwiper, object: nil) + } + + private func setUserID() { + userID = UserDefaults.standard.string(forKey: Const.UserDefaultsKey.userID) + } + + private func setActivityIndicator() { + view.addSubview(loadingBgView) + loadingBgView.addSubview(activityIndicator) + + NSLayoutConstraint.activate([ + activityIndicator.centerXAnchor.constraint(equalTo: view.centerXAnchor), + activityIndicator.centerYAnchor.constraint(equalTo: view.centerYAnchor) + ]) + + activityIndicator.startAnimating() + } + + // MARK: - @objc Methods + + @objc + private func didRecievePresentCardShare(_ notification: Notification) { + let nextVC = CardShareBottomSheetViewController() + .setTitle("명함공유") + .setHeight(404) + + if let cardData = notification.object as? Card { + nextVC.cardDataModel = cardData + } + + nextVC.modalPresentationStyle = .overFullScreen + self.present(nextVC, animated: false, completion: nil) + } + + @objc + private func setCreationReloadMainCardSwiper() { + isAfterCreation = true + + cardDataList?.removeAll() + offset = 0 + + cardListFetchWithAPI(userID: userID, isList: false, offset: offset) { + _ = self.cardSwiper.scrollToCard(at: 1, animated: false) + self.isAfterCreation = false + } + } +} + +// MARK: - VerticalCardSwiperDelegate +extension FrontViewController: VerticalCardSwiperDelegate { + func sizeForItem(verticalCardSwiperView: VerticalCardSwiperView, index: Int) -> CGSize { + return CGSize(width: 375, height: 630) + } + + func didScroll(verticalCardSwiperView: VerticalCardSwiperView) { + if verticalCardSwiperView.contentOffset.y > verticalCardSwiperView.contentSize.height - verticalCardSwiperView.bounds.height { + if isInfiniteScroll { + isInfiniteScroll = false + offset += 1 + guard let userID = userID else { return } + cardListFetchWithAPI(userID: userID, isList: false, offset: offset) { + self.isInfiniteScroll = true + } + } + } + } +} + +// MARK: - VerticalCardSwiperDatasource +extension FrontViewController: VerticalCardSwiperDatasource { + func numberOfCards(verticalCardSwiperView: VerticalCardSwiperView) -> Int { + guard let cardDataList = cardDataList else { return 0 } + let count = cardDataList.count + return count == 0 ? 1 : count + } + + func cardForItemAt(verticalCardSwiperView: VerticalCardSwiperView, cardForItemAt index: Int) -> CardCell { + if cardDataList?.count != 0 { + guard let cell = verticalCardSwiperView.dequeueReusableCell(withReuseIdentifier: Const.Xib.mainCardCell, for: index) as? MainCardCell else { return CardCell() } + guard let cardDataList = cardDataList else { return CardCell() } + UserDefaults.standard.set(cardDataList[0].cardID, forKey: Const.UserDefaultsKey.firstCardID) + cell.initCell(cardDataModel: cardDataList[index]) + cell.isShareable = true + cell.setFrontCard() + + return cell + } else { + guard let cell = verticalCardSwiperView.dequeueReusableCell(withReuseIdentifier: Const.Xib.emptyCardCell, for: index) as? EmptyCardCell else { return CardCell() } + return cell + } + } + +} + +// MARK: - Network +extension FrontViewController { + func cardListFetchWithAPI(userID: String?, isList: Bool, offset: Int, completion: @escaping () -> Void = { }) { + guard let userID = userID else { return } + CardAPI.shared.cardListFetch(userID: userID, isList: isList, offset: offset) { response in + switch response { + case .success(let data): + if let cardListLookUp = data as? CardListLookUp { + self.cardDataList?.append(contentsOf: cardListLookUp.cards) + self.cardSwiper.reloadData() + } + completion() + case .requestErr(let message): + print("cardListFetchWithAPI - requestErr: \(message)") + case .pathErr: + print("cardListFetchWithAPI - pathErr") + case .serverErr: + print("cardListFetchWithAPI - serverErr") + case .networkFail: + print("cardListFetchWithAPI - networkFail") + } + } + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/More/MoreViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/More/MoreViewController.swift new file mode 100644 index 00000000..e54720fc --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/More/MoreViewController.swift @@ -0,0 +1,253 @@ +// +// MoreViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit +import KakaoSDKUser + +class MoreViewController: UIViewController { + + // MARK: - Properteis + let defaults = UserDefaults.standard + + var firstItems = ["개인정보 처리방침", "서비스 이용약관", "Team NADA", "오픈소스 라이브러리"] + var secondItems = ["로그아웃", "받은 명함 초기화", "모든 명함 삭제하기"] + + // MARK: - @IBOutlet Properties + @IBOutlet weak var moreListTableView: UITableView! + @IBOutlet weak var darkModeHeaderView: UIView! + @IBOutlet weak var modeSwitch: UISwitch! + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setUI() + setModeSwitch() + } + + // MARK: - @IBAction Properties + @IBAction func darkModeChangeSwitch(_ sender: UISwitch) { + changeInterfaceStyle() + } +} + +// MARK: - Extensions +extension MoreViewController { + private func setUI() { + moreListTableView.register(MoreListTableViewCell.nib(), forCellReuseIdentifier: "MoreListTableViewCell") + + moreListTableView.delegate = self + moreListTableView.dataSource = self + moreListTableView.tableHeaderView = darkModeHeaderView + } + + private func setModeSwitch() { + modeSwitch.isOn = defaults.bool(forKey: Const.UserDefaultsKey.darkModeState) + changeInterfaceStyle() + } + + private func changeInterfaceStyle() { + if let window = UIApplication.shared.windows.first { + if #available(iOS 13.0, *) { + window.overrideUserInterfaceStyle = modeSwitch.isOn == true ? .dark : .light + defaults.set(modeSwitch.isOn, forKey: Const.UserDefaultsKey.darkModeState) + } else { + window.overrideUserInterfaceStyle = .light + } + } + } +} + +// MARK: - TableView Delegate +extension MoreViewController: UITableViewDelegate { + + func numberOfSections(in tableView: UITableView) -> Int { + return 2 + } + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + if indexPath.section == 0 { + switch indexPath.row { + case 0: openURL(link: URL(string: Const.URL.policyURL)!) + case 1: openURL(link: URL(string: Const.URL.serviceURL)!) + case 2: pushView(nextSB: Const.Storyboard.Name.teamNADA, + nextVC: Const.ViewController.Identifier.teamNADAViewController) + case 3: pushView(nextSB: Const.Storyboard.Name.openSource, + nextVC: Const.ViewController.Identifier.openSourceViewController) + default: print("default!") + } + } else if indexPath.section == 1 { + switch indexPath.row { + case 0: setLogoutClicked() + case 1: setResetClicked() + case 2: setDeleteCicked() + default: print("default!") + } + } + } +} + +// MARK: - 셀 클릭에 따른 작업 분리 +extension MoreViewController { + + func openURL(link: URL) { + if UIApplication.shared.canOpenURL(link) { + UIApplication.shared.open(link, options: [:], completionHandler: nil) + } + } + + func pushView(nextSB: String, nextVC: String) { + let nextVC = UIStoryboard(name: nextSB, bundle: nil).instantiateViewController(identifier: nextVC) + + self.navigationController?.pushViewController(nextVC, animated: true) + } + + func setLogoutClicked() { + makeOKCancelAlert(title: "", message: "로그아웃 하시겠습니까?", okAction: { _ in + self.makeOKAlert(title: "", message: "로그아웃이 완료 되었습니다.") { _ in + if let acToken = UserDefaults.standard.string(forKey: Const.UserDefaultsKey.accessToken) { + self.logoutUserWithAPI(token: acToken) + self.defaults.removeObject(forKey: Const.UserDefaultsKey.accessToken) + self.defaults.removeObject(forKey: Const.UserDefaultsKey.refreshToken) + self.defaults.removeObject(forKey: Const.UserDefaultsKey.darkModeState) + let nextVC = UIStoryboard(name: Const.Storyboard.Name.login, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.loginViewController) + nextVC.modalPresentationStyle = .overFullScreen + self.navigationController?.changeRootViewController(nextVC) + } + } + }) + } + + func setResetClicked() { + makeOKCancelAlert(title: "", message: "받은 명함과 그룹이 모두 초기화됩니다. 정말 초기화하시겠습니까?", okAction: { _ in + UserApi.shared.logout { (error) in + if let error = error { + print(error) + } else { + self.makeOKAlert(title: "", message: "받은 명함이 초기화 되었습니다.") + if let acToken = UserDefaults.standard.string(forKey: Const.UserDefaultsKey.accessToken) { + self.groupResetWithAPI(token: acToken) + } + } + } + }) + } + + func setDeleteCicked() { + makeOKCancelAlert(title: "", message: "내 명함과 받은 명함이 모두 삭제됩니다. 삭제 하시겠습니까?", okAction: { _ in + UserApi.shared.logout { (error) in + if let error = error { + print(error) + } else { + self.makeOKAlert(title: "", message: "모든 명함이 삭제되었습니다.") { _ in + if let acToken = UserDefaults.standard.string(forKey: Const.UserDefaultsKey.accessToken) { + self.deleteUserWithAPI(token: acToken) + self.defaults.removeObject(forKey: Const.UserDefaultsKey.accessToken) + self.defaults.removeObject(forKey: Const.UserDefaultsKey.refreshToken) + self.defaults.removeObject(forKey: Const.UserDefaultsKey.darkModeState) + let nextVC = UIStoryboard(name: Const.Storyboard.Name.login, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.loginViewController) + nextVC.modalPresentationStyle = .overFullScreen + self.navigationController?.changeRootViewController(nextVC) + } + } + } + } + }) + } +} + +// MARK: - TableView DataSource +extension MoreViewController: UITableViewDataSource { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + if section == 0 { + return firstItems.count + } else if section == 1 { + return secondItems.count + } else { + return 0 + } + } + + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { + if section == 0 { + return 5 + } else { + return 0 + } + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let serviceCell = tableView.dequeueReusableCell(withIdentifier: Const.Xib.moreListTableViewCell, for: indexPath) as? MoreListTableViewCell else { return UITableViewCell() } + + if indexPath.section == 0 { + serviceCell.titleLabel.text = firstItems[indexPath.row] + if indexPath.row == firstItems.count - 1 { + serviceCell.separatorView.isHidden = true + } + } else if indexPath.section == 1 { + serviceCell.titleLabel.text = secondItems[indexPath.row] + } + + return serviceCell + } +} + +// MARK: - Network +extension MoreViewController { + func deleteUserWithAPI(token: String) { + UserAPI.shared.userDelete(token: token) { response in + switch response { + case .success: + print("deleteUserWithAPI - success") + case .requestErr(let message): + print("deleteUserWithAPI - requestErr: \(message)") + case .pathErr: + print("deleteUserWithAPI - pathErr") + case .serverErr: + print("deleteUserWithAPI - serverErr") + case .networkFail: + print("deleteUserWithAPI - networkFail") + } + } + } + + func groupResetWithAPI(token: String) { + GroupAPI.shared.groupReset(token: token) { response in + switch response { + case .success: + print("groupResetWithAPI - success") + case .requestErr(let message): + print("groupResetWithAPI - requestErr: \(message)") + case .pathErr: + print("groupResetWithAPI - pathErr") + case .serverErr: + print("groupResetWithAPI - serverErr") + case .networkFail: + print("groupResetWithAPI - networkFail") + } + } + } + + func logoutUserWithAPI(token: String) { + UserAPI.shared.userLogout(token: token) { response in + switch response { + case .success: + print("logoutUserWithAPI - success") + case .requestErr(let message): + print("logoutUserWithAPI - requestErr: \(message)") + case .pathErr: + print("logoutUserWithAPI - pathErr") + case .serverErr: + print("logoutUserWithAPI - serverErr") + case .networkFail: + print("logoutUserWithAPI - networkFail") + } + } + } + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/Onboarding/OnboardingViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/Onboarding/OnboardingViewController.swift new file mode 100644 index 00000000..a7359af0 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/Onboarding/OnboardingViewController.swift @@ -0,0 +1,126 @@ +// +// OnboardingViewController.swift +// NADA-iOS-forRelease +// +// Created by kimhyungyu on 2021/12/05. +// + +import UIKit + +class OnboardingViewController: UIViewController { + + // MARK: - Properties + + private var currentIndex: CGFloat = 0 + private let onboardingList = ["onboarding01", "onboarding02", "onboarding03", "onboarding04"] + private enum Size { + static let cellWidth: CGFloat = 327 + static let cellHeigth: CGFloat = 327 + static let cellTopInset: CGFloat = 198 + static let cellBottomInset: CGFloat = 208 + static let cellLineSpacing: CGFloat = 85 + static let topSafeArea: CGFloat = 44 + } + + // MARK: - @IBOutlet Properties + + @IBOutlet weak var onboardingCollectionView: UICollectionView! + + // MARK: - View Life Cycle + + override func viewDidLoad() { + super.viewDidLoad() + + setUI() + collectionViewDelegate() + } +} + +// MARK: - Extensions + +extension OnboardingViewController { + private func setUI() { + let collectionViewLayout = onboardingCollectionView.collectionViewLayout as? UICollectionViewFlowLayout + collectionViewLayout?.estimatedItemSize = .zero + collectionViewLayout?.scrollDirection = .vertical + onboardingCollectionView.showsVerticalScrollIndicator = false + } + private func collectionViewDelegate() { + onboardingCollectionView.delegate = self + onboardingCollectionView.dataSource = self + + onboardingCollectionView.register(OnboardingCollectionViewCell.nib(), forCellWithReuseIdentifier: Const.Xib.onboardingCollectionViewCell) + } +} + +// MARK: - UICollectionViewDelegate + +extension OnboardingViewController: UICollectionViewDelegate { + func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer) { + var offset = targetContentOffset.pointee + let index = round(offset.y / Size.cellHeigth) + + if index > currentIndex { + currentIndex += 1 + } else if index < currentIndex { + if currentIndex != 0 { + currentIndex -= 1 + } + } + + if currentIndex == 0 { + offset = CGPoint(x: CGFloat.zero, y: -Size.topSafeArea) + } else { + offset = CGPoint(x: CGFloat.zero, y: currentIndex * (Size.cellHeigth + Size.cellLineSpacing) - Size.topSafeArea) + } + + targetContentOffset.pointee = offset + } +} + +// MARK: - UICollectionViewDataSource + +extension OnboardingViewController: UICollectionViewDataSource { + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return onboardingList.count + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: Const.Xib.onboardingCollectionViewCell, for: indexPath) as? OnboardingCollectionViewCell else { return UICollectionViewCell() } + let isLast = indexPath.item == 3 ? true : false + cell.initCell(image: onboardingList[indexPath.item], isLast: isLast) + + if isLast { + cell.presentToLoginViewController = { + guard let nextVC = UIStoryboard(name: Const.Storyboard.Name.login, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.loginViewController) as? LoginViewController else { return } + nextVC.modalTransitionStyle = .crossDissolve + nextVC.modalPresentationStyle = .fullScreen + + self.present(nextVC, animated: true, completion: nil) + } + } + + return cell + } +} + +// MARK: - UICollectionViewDelegateFlowLayout + +extension OnboardingViewController: UICollectionViewDelegateFlowLayout { + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { + return Size.cellLineSpacing + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { + return 0 + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { + return UIEdgeInsets(top: Size.cellTopInset, left: 0, bottom: Size.cellBottomInset, right: 0) + } + + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { + return CGSize(width: Size.cellWidth, height: Size.cellHeigth) + } + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/OpenSource/OpenSourceViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/OpenSource/OpenSourceViewController.swift new file mode 100644 index 00000000..46fbb30b --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/OpenSource/OpenSourceViewController.swift @@ -0,0 +1,93 @@ +// +// OpenSourceViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/11. +// + +import UIKit + +class OpenSourceViewController: UIViewController { + + // MARK: - Properteis + var openSourceList = ["Moya", "SkeletonView", "SwiftLint", "VerticalCardSwiper", "KakaoSDK", "IQKeyboardManagerSwift", "Kingfisher", "NVActivityIndicatorView"] + + // MARK: - @IBOutlet Properties + @IBOutlet weak var openSourceTableView: UITableView! + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setUI() + navigationBackSwipeMotion() + } + + // MARK: - @IBAction Properties + @IBAction func dismissToPreviousView(_ sender: Any) { + self.navigationController?.popViewController(animated: true) + } + +} + +// MARK: - Extensions +extension OpenSourceViewController { + + func setUI() { + openSourceTableView.register(OpenSourceTableViewCell.nib(), forCellReuseIdentifier: Const.Xib.openSourceTableViewCell) + + openSourceTableView.delegate = self + openSourceTableView.dataSource = self + } + + func navigationBackSwipeMotion() { + self.navigationController?.interactivePopGestureRecognizer?.delegate = nil + } + + func openURL(link: URL) { + if UIApplication.shared.canOpenURL(link) { + UIApplication.shared.open(link, options: [:], completionHandler: nil) + } + } + +} + +// MARK: - TableView Delegate +extension OpenSourceViewController: UITableViewDelegate { + + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + + let cell = tableView.cellForRow(at: indexPath) + cell!.contentView.backgroundColor = .background + + switch indexPath.row { + case 0: openURL(link: URL(string: Const.URL.moyaURL)!) + case 1: openURL(link: URL(string: Const.URL.skeletonURL)!) + case 2: openURL(link: URL(string: Const.URL.swiftLintURL)!) + case 3: openURL(link: URL(string: Const.URL.cardSwiperURL)!) + case 4: openURL(link: URL(string: Const.URL.kakaoURL)!) + case 5: openURL(link: URL(string: Const.URL.keyboardURL)!) + case 6: openURL(link: URL(string: Const.URL.kingfisherURL)!) + case 7: openURL(link: URL(string: Const.URL.indicatorURL)!) + default: print("default!") + + } + } + +} + +// MARK: - TableView DataSource +extension OpenSourceViewController: UITableViewDataSource { + + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return openSourceList.count + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + guard let serviceCell = tableView.dequeueReusableCell(withIdentifier: Const.Xib.openSourceTableViewCell, for: indexPath) as? OpenSourceTableViewCell else { return UITableViewCell() } + + serviceCell.titleLabel.text = openSourceList[indexPath.row] + + return serviceCell + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/RootStackTabViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/RootStackTabViewController.swift new file mode 100644 index 00000000..1c57a109 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/RootStackTabViewController.swift @@ -0,0 +1,55 @@ +// +// RootStackTabViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/10/08. +// + +import UIKit + +class RootStackTabViewController: UIViewController { + + @IBOutlet weak var bottomStack: UIStackView! + + var currentIndex = 0 + + lazy var tabs: [StackItemView] = { + var items = [StackItemView]() + for _ in 0..<2 { + items.append(StackItemView.newInstance) + } + return items + }() + + lazy var tabModels: [BottomStackItem] = { + return [ + BottomStackItem(tabImage: "homeBtnOnClick"), + BottomStackItem(tabImage: "myCardBtn") + ] + }() + + override func viewDidLoad() { + super.viewDidLoad() + self.setupTabs() + } + + // MARK: - Functions + func setupTabs() { + for (index, model) in self.tabModels.enumerated() { + let tabView = self.tabs[index] + model.isSelected = index == 0 + tabView.item = model + tabView.delegate = self + self.bottomStack.addArrangedSubview(tabView) + } + } + +} + +extension RootStackTabViewController: StackItemViewDelegate { + func handleTap(_ view: StackItemView) { + self.tabs[self.currentIndex].isSelected = false + view.isSelected = true + self.currentIndex = self.tabs.firstIndex(where: { $0 === view }) ?? 0 + } +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/Splash/SplashViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/Splash/SplashViewController.swift new file mode 100644 index 00000000..7e7b5c61 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/Splash/SplashViewController.swift @@ -0,0 +1,60 @@ +// +// SplashViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/07. +// + +import UIKit + +class SplashViewController: UIViewController { + + // MARK: - Properties + private weak var appDelegate = UIApplication.shared.delegate as? AppDelegate + let defaults = UserDefaults.standard + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + } + + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1) { + if self.appDelegate?.isLogin == true { + self.presentToMain() + } else { + if UserDefaults.standard.object(forKey: Const.UserDefaultsKey.isOnboarding) != nil { + self.presentToLogin() + } else { + self.presentToOnboarding() + } + } + } + } + + // MARK: - Functions + private func presentToMain() { + guard let mainVC = UIStoryboard(name: Const.Storyboard.Name.tabBar, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.tabBarViewController) as? TabBarViewController else { return } + mainVC.modalPresentationStyle = .fullScreen + mainVC.modalTransitionStyle = .crossDissolve + self.present(mainVC, animated: true, completion: nil) + } + + private func presentToLogin() { + guard let loginVC = UIStoryboard(name: Const.Storyboard.Name.login, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.loginViewController) as? LoginViewController else { return } + loginVC.modalPresentationStyle = .fullScreen + loginVC.modalTransitionStyle = .crossDissolve + self.present(loginVC, animated: true, completion: nil) + } + + private func presentToOnboarding() { + guard let onboardingVC = UIStoryboard(name: Const.Storyboard.Name.onboarding, bundle: nil).instantiateViewController(withIdentifier: Const.ViewController.Identifier.onboardingViewController) as? OnboardingViewController else { return } + onboardingVC.modalPresentationStyle = .fullScreen + onboardingVC.modalTransitionStyle = .crossDissolve + self.present(onboardingVC, animated: true, completion: nil) + } + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/TabBar/TabBarViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/TabBar/TabBarViewController.swift new file mode 100644 index 00000000..3af79a29 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/TabBar/TabBarViewController.swift @@ -0,0 +1,47 @@ +// +// TabBarViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/11/18. +// + +import UIKit + +class TabBarViewController: UITabBarController { + + // MARK: - Properties + + private let borderLineView: UIView = { + let view = UIView() + view.backgroundColor = .textBox + + return view + }() + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + setupUI() + } + + // MARK: - @Functions + // UI 세팅 작업 + private func setupUI() { + tabBar.addSubview(borderLineView) + + setupLayout() + } + + // 레이아웃 세팅 + private func setupLayout() { + borderLineView.translatesAutoresizingMaskIntoConstraints = false + NSLayoutConstraint.activate([ + borderLineView.topAnchor.constraint(equalTo: tabBar.topAnchor), + borderLineView.leadingAnchor.constraint(equalTo: tabBar.leadingAnchor), + borderLineView.trailingAnchor.constraint(equalTo: tabBar.trailingAnchor), + borderLineView.heightAnchor.constraint(equalToConstant: 1) + ]) + } + +} diff --git a/NADA-iOS-forRelease/Sources/ViewControllers/TeamNADA/TeamNADAViewController.swift b/NADA-iOS-forRelease/Sources/ViewControllers/TeamNADA/TeamNADAViewController.swift new file mode 100644 index 00000000..bc32a33a --- /dev/null +++ b/NADA-iOS-forRelease/Sources/ViewControllers/TeamNADA/TeamNADAViewController.swift @@ -0,0 +1,167 @@ +// +// TeamNADAViewController.swift +// NADA-iOS-forRelease +// +// Created by 민 on 2021/12/11. +// + +import UIKit +import VerticalCardSwiper + +class TeamNADAViewController: UIViewController { + + // MARK: - Properteis + var cardDataList: [Card]? = [Card(cardID: "card", + background: "imgYun", + title: "NADA", + name: "박윤정", + birthDate: "1998.06.07 (24)", + mbti: "ENTJ", + instagram: "plright", + link: "https://parkyunjung.tistory.com", + cardDescription: "Project Manager", + isMincho: true, + isSoju: false, + isBoomuk: false, + isSauced: true, + oneTmi: "먹는거 잠자는거 좋아해요", + twoTmi: "일벌리기도 좋아하는데 체력이..", + threeTmi: "내가 바로 나다 기획자😎"), + Card(cardID: "card", + background: "imgChae", + title: "NADA", + name: "이채연", + birthDate: "1998.01.09 (24)", + mbti: "ENFP", + instagram: "chaens_", + link: "https://chaens.tistory.com", + cardDescription: "Designer", + isMincho: true, + isSoju: true, + isBoomuk: false, + isSauced: false, + oneTmi: "카톡 임티 62개 + 이모티콘 플러스 구독", + twoTmi: "빵, 디저트 좋아해요 🥞🍞🍰🍦🍩🍪", + threeTmi: "ENFP와 ENFJ 그 사이!"), + Card(cardID: "card", + background: "imgHyun", + title: "NADA", + name: "김현규", + birthDate: "1997/05/02 (25)", + mbti: "ENTJ", + instagram: "hyungggyu", + link: "https://github.com/hyun99999", + cardDescription: "iOS Developer", + isMincho: false, + isSoju: false, + isBoomuk: true, + isSauced: false, + oneTmi: "악으로 깡으로 악깡규", + twoTmi: "후드티 주세요 후드티", + threeTmi: "스트로베리 문 한스쿱"), + Card(cardID: "card", + background: "imgYi", + title: "NADA", + name: "최이준", + birthDate: "1999.04.06 (23)", + mbti: "ISFJ", + instagram: "dlwns_33", + link: "https://github.com/dlwns33", + cardDescription: "iOS Developer", + isMincho: false, + isSoju: true, + isBoomuk: false, + isSauced: false, + oneTmi: "노는게제일좋아 친구들 모..이면 낯가려요", + twoTmi: "축구야구가좋아요 스포츠좋아", + threeTmi: "난 슬플때 컵을 쌓아..."), + Card(cardID: "card", + background: "imgMin", + title: "NADA", + name: "이민재", + birthDate: "2000.03.28 (22)", + mbti: "ESFJ", + instagram: "minimin.0_0", + link: "https://github.com/mini-min", + cardDescription: "iOS Developer", + isMincho: false, + isSoju: false, + isBoomuk: false, + isSauced: false, + oneTmi: "나다 만들고 국방의 의무", + twoTmi: "믿기지 않겠지만, 전 야구선수 출신", + threeTmi: "천안-서울 쉽지않네;;"), + Card(cardID: "card", + background: "imgYe", + title: "NADA", + name: "오예원", + birthDate: "1999.05.12 (23)", + mbti: "ENFP", + instagram: "yae0ni", + link: "https://github.com/yaeoni", + cardDescription: "Server Developer", + isMincho: false, + isSoju: true, + isBoomuk: false, + isSauced: true, + oneTmi: "예옹. 에옹. 야옹. 에원. 에엉. 맘가는 대로..", + twoTmi: "제법 귀엽다.", + threeTmi: "")] + + // MARK: - @IBOutlet Properties + @IBOutlet weak var cardSwiper: VerticalCardSwiper! + + // MARK: - View Life Cycle + override func viewDidLoad() { + super.viewDidLoad() + + navigationBackSwipeMotion() + setDelegate() + } + + // MARK: - @IBAction Properties + @IBAction func dismissToPreviousView(_ sender: Any) { + self.navigationController?.popViewController(animated: true) + } + +} + +// MARK: - Extensions +extension TeamNADAViewController { + func navigationBackSwipeMotion() { + self.navigationController?.interactivePopGestureRecognizer?.delegate = nil + } + + private func setDelegate() { + cardSwiper.delegate = self + cardSwiper.datasource = self + + cardSwiper.isSideSwipingEnabled = false + + cardSwiper.register(nib: MainCardCell.nib(), forCellWithReuseIdentifier: Const.Xib.mainCardCell) + } +} + +// MARK: - VerticalCardSwiperDelegate +extension TeamNADAViewController: VerticalCardSwiperDelegate { + func sizeForItem(verticalCardSwiperView: VerticalCardSwiperView, index: Int) -> CGSize { + return CGSize(width: 375, height: 630) + } +} + +// MARK: - VerticalCardSwiperDatasource +extension TeamNADAViewController: VerticalCardSwiperDatasource { + func numberOfCards(verticalCardSwiperView: VerticalCardSwiperView) -> Int { + return cardDataList?.count ?? 0 + } + + func cardForItemAt(verticalCardSwiperView: VerticalCardSwiperView, cardForItemAt index: Int) -> CardCell { + guard let cell = verticalCardSwiperView.dequeueReusableCell(withReuseIdentifier: Const.Xib.mainCardCell, for: index) as? MainCardCell else { return CardCell() } + guard let cardDataList = cardDataList else { return CardCell() } + cell.initCell(cardDataModel: cardDataList[index]) + cell.isShareable = false + cell.setFrontCard() + + return cell + } +} diff --git a/NADA-iOS-forRelease/Sources/Views/CardView.swift b/NADA-iOS-forRelease/Sources/Views/CardView.swift new file mode 100644 index 00000000..35ff0732 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Views/CardView.swift @@ -0,0 +1,54 @@ +// +// CardView.swift +// NADA-iOS-forRelease +// +// Created by Yi Joon Choi on 2021/11/28. +// + +import UIKit + +class CardView: UIView { + + @IBOutlet weak var backgroundImageView: UIImageView! + @IBOutlet weak var titleLabel: UILabel! + @IBOutlet weak var descriptionLabel: UILabel! + @IBOutlet weak var userNameLabel: UILabel! + @IBOutlet weak var birthLabel: UILabel! + @IBOutlet weak var mbtiLabel: UILabel! + + @IBOutlet weak var instagramIDLabel: UILabel! + @IBOutlet weak var lineURLLabel: UILabel! + + @IBOutlet weak var instagramIcon: UIImageView! + @IBOutlet weak var urlIcon: UIImageView! + + override init(frame: CGRect) { + super.init(frame: frame) + xibSetup() + } + + override func prepareForInterfaceBuilder() { + super.prepareForInterfaceBuilder() + } + + required init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + xibSetup() + } + + func xibSetup() { + guard let view = loadViewFromNib(nib: Const.Xib.cardView) else { + return + } + view.frame = bounds + view.layer.cornerRadius = 15 + view.autoresizingMask = [.flexibleWidth, .flexibleHeight] + addSubview(view) + } + + func loadViewFromNib(nib: String) -> UIView? { + let bundle = Bundle(for: type(of: self)) + let nib = UINib(nibName: nib, bundle: bundle) + return nib.instantiate(withOwner: self, options: nil).first as? UIView + } +} diff --git a/NADA-iOS-forRelease/Sources/Views/CardView.xib b/NADA-iOS-forRelease/Sources/Views/CardView.xib new file mode 100644 index 00000000..18714d41 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Views/CardView.xib @@ -0,0 +1,135 @@ + + + + + + + + + + + SpoqaHanSansNeo-Bold + + + SpoqaHanSansNeo-Regular + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Views/StackItemView.xib b/NADA-iOS-forRelease/Sources/Views/StackItemView.xib new file mode 100644 index 00000000..538f5d21 --- /dev/null +++ b/NADA-iOS-forRelease/Sources/Views/StackItemView.xib @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/NADA-iOS-forRelease/Sources/Views/TempViews.swift b/NADA-iOS-forRelease/Sources/Views/TempViews.swift deleted file mode 100644 index a8fa63c4..00000000 --- a/NADA-iOS-forRelease/Sources/Views/TempViews.swift +++ /dev/null @@ -1,8 +0,0 @@ -// -// TempViews.swift -// NADA-iOS-forRelease -// -// Created by kimhyungyu on 2021/08/08. -// - -import Foundation diff --git a/Podfile b/Podfile index 77780c23..cbea6cff 100644 --- a/Podfile +++ b/Podfile @@ -9,4 +9,11 @@ target 'NADA-iOS-forRelease' do pod 'Moya', '~> 14.0' pod 'SkeletonView' pod 'SwiftLint' +pod 'VerticalCardSwiper' +pod 'KakaoSDKCommon' +pod 'KakaoSDKUser' +pod 'KakaoSDKAuth' +pod 'IQKeyboardManagerSwift' +pod 'Kingfisher', '~> 7.0' +pod 'NVActivityIndicatorView' end diff --git a/Podfile.lock b/Podfile.lock index 7291d212..800fdbe2 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,30 +1,68 @@ PODS: - Alamofire (5.4.3) + - IQKeyboardManagerSwift (6.5.6) + - KakaoSDKAuth (2.5.6): + - KakaoSDKCommon (= 2.5.6) + - KakaoSDKCommon (2.5.6): + - KakaoSDKCommon/Common (= 2.5.6) + - KakaoSDKCommon/Network (= 2.5.6) + - KakaoSDKCommon/Common (2.5.6) + - KakaoSDKCommon/Network (2.5.6): + - Alamofire (~> 5.1) + - KakaoSDKCommon/Common (= 2.5.6) + - KakaoSDKUser (2.5.6): + - KakaoSDKAuth (= 2.5.6) + - Kingfisher (7.1.1) - Moya (14.0.0): - Moya/Core (= 14.0.0) - Moya/Core (14.0.0): - Alamofire (~> 5.0) + - NVActivityIndicatorView (5.1.1): + - NVActivityIndicatorView/Base (= 5.1.1) + - NVActivityIndicatorView/Base (5.1.1) - SkeletonView (1.21.2) - SwiftLint (0.43.1) + - VerticalCardSwiper (2.3.1) DEPENDENCIES: + - IQKeyboardManagerSwift + - KakaoSDKAuth + - KakaoSDKCommon + - KakaoSDKUser + - Kingfisher (~> 7.0) - Moya (~> 14.0) + - NVActivityIndicatorView - SkeletonView - SwiftLint + - VerticalCardSwiper SPEC REPOS: trunk: - Alamofire + - IQKeyboardManagerSwift + - KakaoSDKAuth + - KakaoSDKCommon + - KakaoSDKUser + - Kingfisher - Moya + - NVActivityIndicatorView - SkeletonView - SwiftLint + - VerticalCardSwiper SPEC CHECKSUMS: Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9 + IQKeyboardManagerSwift: c7df9d2deb356c04522f5c4b7b6e4ce4d8ed94fe + KakaoSDKAuth: 1e1fa737e78eed3f301ab5c164526781a37a42f9 + KakaoSDKCommon: cdf340a8f671eef75f4ca012003cb350af3c4b6d + KakaoSDKUser: f488aa4699b3fd3a836ab5c7e25e2cb4cea190c1 + Kingfisher: f738f9c4a3415823b8e2985d10aa2d6a9f37bc4d Moya: 5b45dacb75adb009f97fde91c204c1e565d31916 + NVActivityIndicatorView: 1f6c5687f1171810aa27a3296814dc2d7dec3667 SkeletonView: a085533443fed0198309f1979780afb6e80eaedd SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52 + VerticalCardSwiper: 68df635b354500f86934ea044ade37a264c044c6 -PODFILE CHECKSUM: b1e689d6b19d4b6aa66498bfb1b6700c63197564 +PODFILE CHECKSUM: ee00f6411308bc32732ea2efc98ad9cb9bd27f5d -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/Pods/Alamofire/LICENSE b/Pods/Alamofire/LICENSE deleted file mode 100644 index 6b4d719a..00000000 --- a/Pods/Alamofire/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-2021 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Pods/Alamofire/README.md b/Pods/Alamofire/README.md deleted file mode 100644 index 9a5a8063..00000000 --- a/Pods/Alamofire/README.md +++ /dev/null @@ -1,206 +0,0 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png) - -[![Build Status](https://github.com/Alamofire/Alamofire/workflows/Alamofire%20CI/badge.svg?branch=master)](https://github.com/Alamofire/Alamofire/actions) -[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) -[![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](https://twitter.com/AlamofireSF) -[![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -[![Open Source Helpers](https://www.codetriage.com/alamofire/alamofire/badges/users.svg)](https://www.codetriage.com/alamofire/alamofire) - -Alamofire is an HTTP networking library written in Swift. - -- [Features](#features) -- [Component Libraries](#component-libraries) -- [Requirements](#requirements) -- [Migration Guides](#migration-guides) -- [Communication](#communication) -- [Installation](#installation) -- [Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#using-alamofire) - - [**Introduction -**](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#introduction) [Making Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#making-requests), [Response Handling](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-handling), [Response Validation](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-validation), [Response Caching](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#response-caching) - - **HTTP -** [HTTP Methods](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-methods), [Parameters and Parameter Encoder](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md##request-parameters-and-parameter-encoders), [HTTP Headers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#http-headers), [Authentication](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#authentication) - - **Large Data -** [Downloading Data to a File](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#downloading-data-to-a-file), [Uploading Data to a Server](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#uploading-data-to-a-server) - - **Tools -** [Statistical Metrics](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#statistical-metrics), [cURL Command Output](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Usage.md#curl-command-output) -- [Advanced Usage](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md) - - **URL Session -** [Session Manager](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#session), [Session Delegate](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#sessiondelegate), [Request](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#request) - - **Routing -** [Routing Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#routing-requests), [Adapting and Retrying Requests](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#adapting-and-retrying-requests-with-requestinterceptor) - - **Model Objects -** [Custom Response Handlers](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#customizing-response-handlers) - - **Connection -** [Security](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#security), [Network Reachability](https://github.com/Alamofire/Alamofire/blob/master/Documentation/AdvancedUsage.md#network-reachability) -- [Open Radars](#open-radars) -- [FAQ](#faq) -- [Credits](#credits) -- [Donations](#donations) -- [License](#license) - -## Features - -- [x] Chainable Request / Response Methods -- [x] Combine Support -- [x] URL / JSON Parameter Encoding -- [x] Upload File / Data / Stream / MultipartFormData -- [x] Download File using Request or Resume Data -- [x] Authentication with `URLCredential` -- [x] HTTP Response Validation -- [x] Upload and Download Progress Closures with Progress -- [x] cURL Command Output -- [x] Dynamically Adapt and Retry Requests -- [x] TLS Certificate and Public Key Pinning -- [x] Network Reachability -- [x] Comprehensive Unit and Integration Test Coverage -- [x] [Complete Documentation](https://alamofire.github.io/Alamofire) - -## Component Libraries - -In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the [Alamofire Software Foundation](https://github.com/Alamofire/Foundation) to bring additional functionality to the Alamofire ecosystem. - -- [AlamofireImage](https://github.com/Alamofire/AlamofireImage) - An image library including image response serializers, `UIImage` and `UIImageView` extensions, custom image filters, an auto-purging in-memory cache, and a priority-based image downloading system. -- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator) - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support `URLSession` instances not managed by Alamofire. - -## Requirements - -- iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+ -- Xcode 11+ -- Swift 5.1+ - -## Migration Guides - -- [Alamofire 5.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%205.0%20Migration%20Guide.md) -- [Alamofire 4.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%204.0%20Migration%20Guide.md) -- [Alamofire 3.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%203.0%20Migration%20Guide.md) -- [Alamofire 2.0 Migration Guide](https://github.com/Alamofire/Alamofire/blob/master/Documentation/Alamofire%202.0%20Migration%20Guide.md) - -## Communication -- If you **need help with making network requests** using Alamofire, use [Stack Overflow](https://stackoverflow.com/questions/tagged/alamofire) and tag `alamofire`. -- If you need to **find or understand an API**, check [our documentation](http://alamofire.github.io/Alamofire/) or [Apple's documentation for `URLSession`](https://developer.apple.com/documentation/foundation/url_loading_system), on top of which Alamofire is built. -- If you need **help with an Alamofire feature**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss Alamofire best practices**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you'd like to **discuss a feature request**, use [our forum on swift.org](https://forums.swift.org/c/related-projects/alamofire). -- If you **found a bug**, open an issue here on GitHub and follow the guide. The more detail the better! -- If you **want to contribute**, submit a pull request! - -## Installation - -### CocoaPods - -[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: - -```ruby -pod 'Alamofire', '~> 5.2' -``` - -### Carthage - -[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: - -```ogdl -github "Alamofire/Alamofire" ~> 5.2 -``` - -### Swift Package Manager - -The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. - -Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. - -```swift -dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.2.0")) -] -``` - -### Manually - -If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually. - -#### Embedded Framework - -- Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: - - ```bash - $ git init - ``` - -- Add Alamofire as a git [submodule](https://git-scm.com/docs/git-submodule) by running the following command: - - ```bash - $ git submodule add https://github.com/Alamofire/Alamofire.git - ``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. - - > It should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Select the `Alamofire.xcodeproj` in the Project Navigator and verify the deployment target matches that of your application target. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - - > It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for macOS. - - > You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS`, or `Alamofire watchOS`. - -- And that's it! - - > The `Alamofire.framework` is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - -## Open Radars - -The following radars have some effect on the current implementation of Alamofire. - -- [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in the test case -- `rdar://26870455` - Background URL Session Configurations do not work in the simulator -- `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` -- `FB7624529` - `urlSession(_:task:didFinishCollecting:)` never called on watchOS - -## Resolved Radars - -The following radars have been resolved over time after being filed against the Alamofire project. - -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage. - - (Resolved): 9/1/17 in Xcode 9 beta 6. -- [`rdar://36082113`](http://openradar.appspot.com/radar?id=4942308441063424) - `URLSessionTaskMetrics` failing to link on watchOS 3.0+ - - (Resolved): Just add `CFNetwork` to your linked frameworks. - -## Workarounds - -- Collection of `URLSessionTaskMetrics` is currently disabled on watchOS due to `FB7624529`. - -## FAQ - -### What's the origin of the name Alamofire? - -Alamofire is named after the [Alamo Fire flower](https://aggie-horticulture.tamu.edu/wildseed/alamofire.html), a hybrid variant of the Bluebonnet, the official state flower of Texas. - -## Credits - -Alamofire is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). You can follow them on Twitter at [@AlamofireSF](https://twitter.com/AlamofireSF) for project updates and releases. - -### Security Disclosure - -If you believe you have identified a security vulnerability with Alamofire, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. - -## Donations - -The [ASF](https://github.com/Alamofire/Foundation#members) is looking to raise money to officially stay registered as a federal non-profit organization. -Registering will allow Foundation members to gain some legal protections and also allow us to put donations to use, tax-free. -Donating to the ASF will enable us to: - -- Pay our yearly legal fees to keep the non-profit in good status -- Pay for our mail servers to help us stay on top of all questions and security issues -- Potentially fund test servers to make it easier for us to test the edge cases -- Potentially fund developers to work on one of our projects full-time - -The community adoption of the ASF libraries has been amazing. -We are greatly humbled by your enthusiasm around the projects and want to continue to do everything we can to move the needle forward. -With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. -If you use any of our libraries for work, see if your employers would be interested in donating. -Any amount you can donate today to help us reach our goal would be greatly appreciated. - -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W34WPEE74APJQ) - -## License - -Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/Pods/Alamofire/Source/AFError.swift b/Pods/Alamofire/Source/AFError.swift deleted file mode 100644 index e8e4fe83..00000000 --- a/Pods/Alamofire/Source/AFError.swift +++ /dev/null @@ -1,854 +0,0 @@ -// -// AFError.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// `AFError` is the error type returned by Alamofire. It encompasses a few different types of errors, each with -/// their own associated reasons. -public enum AFError: Error { - /// The underlying reason the `.multipartEncodingFailed` error occurred. - public enum MultipartEncodingFailureReason { - /// The `fileURL` provided for reading an encodable body part isn't a file `URL`. - case bodyPartURLInvalid(url: URL) - /// The filename of the `fileURL` provided has either an empty `lastPathComponent` or `pathExtension. - case bodyPartFilenameInvalid(in: URL) - /// The file at the `fileURL` provided was not reachable. - case bodyPartFileNotReachable(at: URL) - /// Attempting to check the reachability of the `fileURL` provided threw an error. - case bodyPartFileNotReachableWithError(atURL: URL, error: Error) - /// The file at the `fileURL` provided is actually a directory. - case bodyPartFileIsDirectory(at: URL) - /// The size of the file at the `fileURL` provided was not returned by the system. - case bodyPartFileSizeNotAvailable(at: URL) - /// The attempt to find the size of the file at the `fileURL` provided threw an error. - case bodyPartFileSizeQueryFailedWithError(forURL: URL, error: Error) - /// An `InputStream` could not be created for the provided `fileURL`. - case bodyPartInputStreamCreationFailed(for: URL) - /// An `OutputStream` could not be created when attempting to write the encoded data to disk. - case outputStreamCreationFailed(for: URL) - /// The encoded body data could not be written to disk because a file already exists at the provided `fileURL`. - case outputStreamFileAlreadyExists(at: URL) - /// The `fileURL` provided for writing the encoded body data to disk is not a file `URL`. - case outputStreamURLInvalid(url: URL) - /// The attempt to write the encoded body data to disk failed with an underlying error. - case outputStreamWriteFailed(error: Error) - /// The attempt to read an encoded body part `InputStream` failed with underlying system error. - case inputStreamReadFailed(error: Error) - } - - /// Represents unexpected input stream length that occur when encoding the `MultipartFormData`. Instances will be - /// embedded within an `AFError.multipartEncodingFailed` `.inputStreamReadFailed` case. - public struct UnexpectedInputStreamLength: Error { - /// The expected byte count to read. - public var bytesExpected: UInt64 - /// The actual byte count read. - public var bytesRead: UInt64 - } - - /// The underlying reason the `.parameterEncodingFailed` error occurred. - public enum ParameterEncodingFailureReason { - /// The `URLRequest` did not have a `URL` to encode. - case missingURL - /// JSON serialization failed with an underlying system error during the encoding process. - case jsonEncodingFailed(error: Error) - /// Custom parameter encoding failed due to the associated `Error`. - case customEncodingFailed(error: Error) - } - - /// The underlying reason the `.parameterEncoderFailed` error occurred. - public enum ParameterEncoderFailureReason { - /// Possible missing components. - public enum RequiredComponent { - /// The `URL` was missing or unable to be extracted from the passed `URLRequest` or during encoding. - case url - /// The `HTTPMethod` could not be extracted from the passed `URLRequest`. - case httpMethod(rawValue: String) - } - - /// A `RequiredComponent` was missing during encoding. - case missingRequiredComponent(RequiredComponent) - /// The underlying encoder failed with the associated error. - case encoderFailed(error: Error) - } - - /// The underlying reason the `.responseValidationFailed` error occurred. - public enum ResponseValidationFailureReason { - /// The data file containing the server response did not exist. - case dataFileNil - /// The data file containing the server response at the associated `URL` could not be read. - case dataFileReadFailed(at: URL) - /// The response did not contain a `Content-Type` and the `acceptableContentTypes` provided did not contain a - /// wildcard type. - case missingContentType(acceptableContentTypes: [String]) - /// The response `Content-Type` did not match any type in the provided `acceptableContentTypes`. - case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String) - /// The response status code was not acceptable. - case unacceptableStatusCode(code: Int) - /// Custom response validation failed due to the associated `Error`. - case customValidationFailed(error: Error) - } - - /// The underlying reason the response serialization error occurred. - public enum ResponseSerializationFailureReason { - /// The server response contained no data or the data was zero length. - case inputDataNilOrZeroLength - /// The file containing the server response did not exist. - case inputFileNil - /// The file containing the server response could not be read from the associated `URL`. - case inputFileReadFailed(at: URL) - /// String serialization failed using the provided `String.Encoding`. - case stringSerializationFailed(encoding: String.Encoding) - /// JSON serialization failed with an underlying system error. - case jsonSerializationFailed(error: Error) - /// A `DataDecoder` failed to decode the response due to the associated `Error`. - case decodingFailed(error: Error) - /// A custom response serializer failed due to the associated `Error`. - case customSerializationFailed(error: Error) - /// Generic serialization failed for an empty response that wasn't type `Empty` but instead the associated type. - case invalidEmptyResponse(type: String) - } - - /// Underlying reason a server trust evaluation error occurred. - public enum ServerTrustFailureReason { - /// The output of a server trust evaluation. - public struct Output { - /// The host for which the evaluation was performed. - public let host: String - /// The `SecTrust` value which was evaluated. - public let trust: SecTrust - /// The `OSStatus` of evaluation operation. - public let status: OSStatus - /// The result of the evaluation operation. - public let result: SecTrustResultType - - /// Creates an `Output` value from the provided values. - init(_ host: String, _ trust: SecTrust, _ status: OSStatus, _ result: SecTrustResultType) { - self.host = host - self.trust = trust - self.status = status - self.result = result - } - } - - /// No `ServerTrustEvaluator` was found for the associated host. - case noRequiredEvaluator(host: String) - /// No certificates were found with which to perform the trust evaluation. - case noCertificatesFound - /// No public keys were found with which to perform the trust evaluation. - case noPublicKeysFound - /// During evaluation, application of the associated `SecPolicy` failed. - case policyApplicationFailed(trust: SecTrust, policy: SecPolicy, status: OSStatus) - /// During evaluation, setting the associated anchor certificates failed. - case settingAnchorCertificatesFailed(status: OSStatus, certificates: [SecCertificate]) - /// During evaluation, creation of the revocation policy failed. - case revocationPolicyCreationFailed - /// `SecTrust` evaluation failed with the associated `Error`, if one was produced. - case trustEvaluationFailed(error: Error?) - /// Default evaluation failed with the associated `Output`. - case defaultEvaluationFailed(output: Output) - /// Host validation failed with the associated `Output`. - case hostValidationFailed(output: Output) - /// Revocation check failed with the associated `Output` and options. - case revocationCheckFailed(output: Output, options: RevocationTrustEvaluator.Options) - /// Certificate pinning failed. - case certificatePinningFailed(host: String, trust: SecTrust, pinnedCertificates: [SecCertificate], serverCertificates: [SecCertificate]) - /// Public key pinning failed. - case publicKeyPinningFailed(host: String, trust: SecTrust, pinnedKeys: [SecKey], serverKeys: [SecKey]) - /// Custom server trust evaluation failed due to the associated `Error`. - case customEvaluationFailed(error: Error) - } - - /// The underlying reason the `.urlRequestValidationFailed` - public enum URLRequestValidationFailureReason { - /// URLRequest with GET method had body data. - case bodyDataInGETRequest(Data) - } - - /// `UploadableConvertible` threw an error in `createUploadable()`. - case createUploadableFailed(error: Error) - /// `URLRequestConvertible` threw an error in `asURLRequest()`. - case createURLRequestFailed(error: Error) - /// `SessionDelegate` threw an error while attempting to move downloaded file to destination URL. - case downloadedFileMoveFailed(error: Error, source: URL, destination: URL) - /// `Request` was explicitly cancelled. - case explicitlyCancelled - /// `URLConvertible` type failed to create a valid `URL`. - case invalidURL(url: URLConvertible) - /// Multipart form encoding failed. - case multipartEncodingFailed(reason: MultipartEncodingFailureReason) - /// `ParameterEncoding` threw an error during the encoding process. - case parameterEncodingFailed(reason: ParameterEncodingFailureReason) - /// `ParameterEncoder` threw an error while running the encoder. - case parameterEncoderFailed(reason: ParameterEncoderFailureReason) - /// `RequestAdapter` threw an error during adaptation. - case requestAdaptationFailed(error: Error) - /// `RequestRetrier` threw an error during the request retry process. - case requestRetryFailed(retryError: Error, originalError: Error) - /// Response validation failed. - case responseValidationFailed(reason: ResponseValidationFailureReason) - /// Response serialization failed. - case responseSerializationFailed(reason: ResponseSerializationFailureReason) - /// `ServerTrustEvaluating` instance threw an error during trust evaluation. - case serverTrustEvaluationFailed(reason: ServerTrustFailureReason) - /// `Session` which issued the `Request` was deinitialized, most likely because its reference went out of scope. - case sessionDeinitialized - /// `Session` was explicitly invalidated, possibly with the `Error` produced by the underlying `URLSession`. - case sessionInvalidated(error: Error?) - /// `URLSessionTask` completed with error. - case sessionTaskFailed(error: Error) - /// `URLRequest` failed validation. - case urlRequestValidationFailed(reason: URLRequestValidationFailureReason) -} - -extension Error { - /// Returns the instance cast as an `AFError`. - public var asAFError: AFError? { - self as? AFError - } - - /// Returns the instance cast as an `AFError`. If casting fails, a `fatalError` with the specified `message` is thrown. - public func asAFError(orFailWith message: @autoclosure () -> String, file: StaticString = #file, line: UInt = #line) -> AFError { - guard let afError = self as? AFError else { - fatalError(message(), file: file, line: line) - } - return afError - } - - /// Casts the instance as `AFError` or returns `defaultAFError` - func asAFError(or defaultAFError: @autoclosure () -> AFError) -> AFError { - self as? AFError ?? defaultAFError() - } -} - -// MARK: - Error Booleans - -extension AFError { - /// Returns whether the instance is `.sessionDeinitialized`. - public var isSessionDeinitializedError: Bool { - if case .sessionDeinitialized = self { return true } - return false - } - - /// Returns whether the instance is `.sessionInvalidated`. - public var isSessionInvalidatedError: Bool { - if case .sessionInvalidated = self { return true } - return false - } - - /// Returns whether the instance is `.explicitlyCancelled`. - public var isExplicitlyCancelledError: Bool { - if case .explicitlyCancelled = self { return true } - return false - } - - /// Returns whether the instance is `.invalidURL`. - public var isInvalidURLError: Bool { - if case .invalidURL = self { return true } - return false - } - - /// Returns whether the instance is `.parameterEncodingFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isParameterEncodingError: Bool { - if case .parameterEncodingFailed = self { return true } - return false - } - - /// Returns whether the instance is `.parameterEncoderFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isParameterEncoderError: Bool { - if case .parameterEncoderFailed = self { return true } - return false - } - - /// Returns whether the instance is `.multipartEncodingFailed`. When `true`, the `url` and `underlyingError` - /// properties will contain the associated values. - public var isMultipartEncodingError: Bool { - if case .multipartEncodingFailed = self { return true } - return false - } - - /// Returns whether the instance is `.requestAdaptationFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isRequestAdaptationError: Bool { - if case .requestAdaptationFailed = self { return true } - return false - } - - /// Returns whether the instance is `.responseValidationFailed`. When `true`, the `acceptableContentTypes`, - /// `responseContentType`, `responseCode`, and `underlyingError` properties will contain the associated values. - public var isResponseValidationError: Bool { - if case .responseValidationFailed = self { return true } - return false - } - - /// Returns whether the instance is `.responseSerializationFailed`. When `true`, the `failedStringEncoding` and - /// `underlyingError` properties will contain the associated values. - public var isResponseSerializationError: Bool { - if case .responseSerializationFailed = self { return true } - return false - } - - /// Returns whether the instance is `.serverTrustEvaluationFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isServerTrustEvaluationError: Bool { - if case .serverTrustEvaluationFailed = self { return true } - return false - } - - /// Returns whether the instance is `requestRetryFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isRequestRetryError: Bool { - if case .requestRetryFailed = self { return true } - return false - } - - /// Returns whether the instance is `createUploadableFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isCreateUploadableError: Bool { - if case .createUploadableFailed = self { return true } - return false - } - - /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isCreateURLRequestError: Bool { - if case .createURLRequestFailed = self { return true } - return false - } - - /// Returns whether the instance is `downloadedFileMoveFailed`. When `true`, the `destination` and `underlyingError` properties will - /// contain the associated values. - public var isDownloadedFileMoveError: Bool { - if case .downloadedFileMoveFailed = self { return true } - return false - } - - /// Returns whether the instance is `createURLRequestFailed`. When `true`, the `underlyingError` property will - /// contain the associated value. - public var isSessionTaskError: Bool { - if case .sessionTaskFailed = self { return true } - return false - } -} - -// MARK: - Convenience Properties - -extension AFError { - /// The `URLConvertible` associated with the error. - public var urlConvertible: URLConvertible? { - guard case let .invalidURL(url) = self else { return nil } - return url - } - - /// The `URL` associated with the error. - public var url: URL? { - guard case let .multipartEncodingFailed(reason) = self else { return nil } - return reason.url - } - - /// The underlying `Error` responsible for generating the failure associated with `.sessionInvalidated`, - /// `.parameterEncodingFailed`, `.parameterEncoderFailed`, `.multipartEncodingFailed`, `.requestAdaptationFailed`, - /// `.responseSerializationFailed`, `.requestRetryFailed` errors. - public var underlyingError: Error? { - switch self { - case let .multipartEncodingFailed(reason): - return reason.underlyingError - case let .parameterEncodingFailed(reason): - return reason.underlyingError - case let .parameterEncoderFailed(reason): - return reason.underlyingError - case let .requestAdaptationFailed(error): - return error - case let .requestRetryFailed(retryError, _): - return retryError - case let .responseValidationFailed(reason): - return reason.underlyingError - case let .responseSerializationFailed(reason): - return reason.underlyingError - case let .serverTrustEvaluationFailed(reason): - return reason.underlyingError - case let .sessionInvalidated(error): - return error - case let .createUploadableFailed(error): - return error - case let .createURLRequestFailed(error): - return error - case let .downloadedFileMoveFailed(error, _, _): - return error - case let .sessionTaskFailed(error): - return error - case .explicitlyCancelled, - .invalidURL, - .sessionDeinitialized, - .urlRequestValidationFailed: - return nil - } - } - - /// The acceptable `Content-Type`s of a `.responseValidationFailed` error. - public var acceptableContentTypes: [String]? { - guard case let .responseValidationFailed(reason) = self else { return nil } - return reason.acceptableContentTypes - } - - /// The response `Content-Type` of a `.responseValidationFailed` error. - public var responseContentType: String? { - guard case let .responseValidationFailed(reason) = self else { return nil } - return reason.responseContentType - } - - /// The response code of a `.responseValidationFailed` error. - public var responseCode: Int? { - guard case let .responseValidationFailed(reason) = self else { return nil } - return reason.responseCode - } - - /// The `String.Encoding` associated with a failed `.stringResponse()` call. - public var failedStringEncoding: String.Encoding? { - guard case let .responseSerializationFailed(reason) = self else { return nil } - return reason.failedStringEncoding - } - - /// The `source` URL of a `.downloadedFileMoveFailed` error. - public var sourceURL: URL? { - guard case let .downloadedFileMoveFailed(_, source, _) = self else { return nil } - return source - } - - /// The `destination` URL of a `.downloadedFileMoveFailed` error. - public var destinationURL: URL? { - guard case let .downloadedFileMoveFailed(_, _, destination) = self else { return nil } - return destination - } - - /// The download resume data of any underlying network error. Only produced by `DownloadRequest`s. - public var downloadResumeData: Data? { - (underlyingError as? URLError)?.userInfo[NSURLSessionDownloadTaskResumeData] as? Data - } -} - -extension AFError.ParameterEncodingFailureReason { - var underlyingError: Error? { - switch self { - case let .jsonEncodingFailed(error), - let .customEncodingFailed(error): - return error - case .missingURL: - return nil - } - } -} - -extension AFError.ParameterEncoderFailureReason { - var underlyingError: Error? { - switch self { - case let .encoderFailed(error): - return error - case .missingRequiredComponent: - return nil - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var url: URL? { - switch self { - case let .bodyPartURLInvalid(url), - let .bodyPartFilenameInvalid(url), - let .bodyPartFileNotReachable(url), - let .bodyPartFileIsDirectory(url), - let .bodyPartFileSizeNotAvailable(url), - let .bodyPartInputStreamCreationFailed(url), - let .outputStreamCreationFailed(url), - let .outputStreamFileAlreadyExists(url), - let .outputStreamURLInvalid(url), - let .bodyPartFileNotReachableWithError(url, _), - let .bodyPartFileSizeQueryFailedWithError(url, _): - return url - case .outputStreamWriteFailed, - .inputStreamReadFailed: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .bodyPartFileNotReachableWithError(_, error), - let .bodyPartFileSizeQueryFailedWithError(_, error), - let .outputStreamWriteFailed(error), - let .inputStreamReadFailed(error): - return error - case .bodyPartURLInvalid, - .bodyPartFilenameInvalid, - .bodyPartFileNotReachable, - .bodyPartFileIsDirectory, - .bodyPartFileSizeNotAvailable, - .bodyPartInputStreamCreationFailed, - .outputStreamCreationFailed, - .outputStreamFileAlreadyExists, - .outputStreamURLInvalid: - return nil - } - } -} - -extension AFError.ResponseValidationFailureReason { - var acceptableContentTypes: [String]? { - switch self { - case let .missingContentType(types), - let .unacceptableContentType(types, _): - return types - case .dataFileNil, - .dataFileReadFailed, - .unacceptableStatusCode, - .customValidationFailed: - return nil - } - } - - var responseContentType: String? { - switch self { - case let .unacceptableContentType(_, responseType): - return responseType - case .dataFileNil, - .dataFileReadFailed, - .missingContentType, - .unacceptableStatusCode, - .customValidationFailed: - return nil - } - } - - var responseCode: Int? { - switch self { - case let .unacceptableStatusCode(code): - return code - case .dataFileNil, - .dataFileReadFailed, - .missingContentType, - .unacceptableContentType, - .customValidationFailed: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .customValidationFailed(error): - return error - case .dataFileNil, - .dataFileReadFailed, - .missingContentType, - .unacceptableContentType, - .unacceptableStatusCode: - return nil - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var failedStringEncoding: String.Encoding? { - switch self { - case let .stringSerializationFailed(encoding): - return encoding - case .inputDataNilOrZeroLength, - .inputFileNil, - .inputFileReadFailed(_), - .jsonSerializationFailed(_), - .decodingFailed(_), - .customSerializationFailed(_), - .invalidEmptyResponse: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .jsonSerializationFailed(error), - let .decodingFailed(error), - let .customSerializationFailed(error): - return error - case .inputDataNilOrZeroLength, - .inputFileNil, - .inputFileReadFailed, - .stringSerializationFailed, - .invalidEmptyResponse: - return nil - } - } -} - -extension AFError.ServerTrustFailureReason { - var output: AFError.ServerTrustFailureReason.Output? { - switch self { - case let .defaultEvaluationFailed(output), - let .hostValidationFailed(output), - let .revocationCheckFailed(output, _): - return output - case .noRequiredEvaluator, - .noCertificatesFound, - .noPublicKeysFound, - .policyApplicationFailed, - .settingAnchorCertificatesFailed, - .revocationPolicyCreationFailed, - .trustEvaluationFailed, - .certificatePinningFailed, - .publicKeyPinningFailed, - .customEvaluationFailed: - return nil - } - } - - var underlyingError: Error? { - switch self { - case let .customEvaluationFailed(error): - return error - case let .trustEvaluationFailed(error): - return error - case .noRequiredEvaluator, - .noCertificatesFound, - .noPublicKeysFound, - .policyApplicationFailed, - .settingAnchorCertificatesFailed, - .revocationPolicyCreationFailed, - .defaultEvaluationFailed, - .hostValidationFailed, - .revocationCheckFailed, - .certificatePinningFailed, - .publicKeyPinningFailed: - return nil - } - } -} - -// MARK: - Error Descriptions - -extension AFError: LocalizedError { - public var errorDescription: String? { - switch self { - case .explicitlyCancelled: - return "Request explicitly cancelled." - case let .invalidURL(url): - return "URL is not valid: \(url)" - case let .parameterEncodingFailed(reason): - return reason.localizedDescription - case let .parameterEncoderFailed(reason): - return reason.localizedDescription - case let .multipartEncodingFailed(reason): - return reason.localizedDescription - case let .requestAdaptationFailed(error): - return "Request adaption failed with error: \(error.localizedDescription)" - case let .responseValidationFailed(reason): - return reason.localizedDescription - case let .responseSerializationFailed(reason): - return reason.localizedDescription - case let .requestRetryFailed(retryError, originalError): - return """ - Request retry failed with retry error: \(retryError.localizedDescription), \ - original error: \(originalError.localizedDescription) - """ - case .sessionDeinitialized: - return """ - Session was invalidated without error, so it was likely deinitialized unexpectedly. \ - Be sure to retain a reference to your Session for the duration of your requests. - """ - case let .sessionInvalidated(error): - return "Session was invalidated with error: \(error?.localizedDescription ?? "No description.")" - case let .serverTrustEvaluationFailed(reason): - return "Server trust evaluation failed due to reason: \(reason.localizedDescription)" - case let .urlRequestValidationFailed(reason): - return "URLRequest validation failed due to reason: \(reason.localizedDescription)" - case let .createUploadableFailed(error): - return "Uploadable creation failed with error: \(error.localizedDescription)" - case let .createURLRequestFailed(error): - return "URLRequest creation failed with error: \(error.localizedDescription)" - case let .downloadedFileMoveFailed(error, source, destination): - return "Moving downloaded file from: \(source) to: \(destination) failed with error: \(error.localizedDescription)" - case let .sessionTaskFailed(error): - return "URLSessionTask failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.ParameterEncodingFailureReason { - var localizedDescription: String { - switch self { - case .missingURL: - return "URL request to encode was missing a URL" - case let .jsonEncodingFailed(error): - return "JSON could not be encoded because of error:\n\(error.localizedDescription)" - case let .customEncodingFailed(error): - return "Custom parameter encoder failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.ParameterEncoderFailureReason { - var localizedDescription: String { - switch self { - case let .missingRequiredComponent(component): - return "Encoding failed due to a missing request component: \(component)" - case let .encoderFailed(error): - return "The underlying encoder failed with the error: \(error)" - } - } -} - -extension AFError.MultipartEncodingFailureReason { - var localizedDescription: String { - switch self { - case let .bodyPartURLInvalid(url): - return "The URL provided is not a file URL: \(url)" - case let .bodyPartFilenameInvalid(url): - return "The URL provided does not have a valid filename: \(url)" - case let .bodyPartFileNotReachable(url): - return "The URL provided is not reachable: \(url)" - case let .bodyPartFileNotReachableWithError(url, error): - return """ - The system returned an error while checking the provided URL for reachability. - URL: \(url) - Error: \(error) - """ - case let .bodyPartFileIsDirectory(url): - return "The URL provided is a directory: \(url)" - case let .bodyPartFileSizeNotAvailable(url): - return "Could not fetch the file size from the provided URL: \(url)" - case let .bodyPartFileSizeQueryFailedWithError(url, error): - return """ - The system returned an error while attempting to fetch the file size from the provided URL. - URL: \(url) - Error: \(error) - """ - case let .bodyPartInputStreamCreationFailed(url): - return "Failed to create an InputStream for the provided URL: \(url)" - case let .outputStreamCreationFailed(url): - return "Failed to create an OutputStream for URL: \(url)" - case let .outputStreamFileAlreadyExists(url): - return "A file already exists at the provided URL: \(url)" - case let .outputStreamURLInvalid(url): - return "The provided OutputStream URL is invalid: \(url)" - case let .outputStreamWriteFailed(error): - return "OutputStream write failed with error: \(error)" - case let .inputStreamReadFailed(error): - return "InputStream read failed with error: \(error)" - } - } -} - -extension AFError.ResponseSerializationFailureReason { - var localizedDescription: String { - switch self { - case .inputDataNilOrZeroLength: - return "Response could not be serialized, input data was nil or zero length." - case .inputFileNil: - return "Response could not be serialized, input file was nil." - case let .inputFileReadFailed(url): - return "Response could not be serialized, input file could not be read: \(url)." - case let .stringSerializationFailed(encoding): - return "String could not be serialized with encoding: \(encoding)." - case let .jsonSerializationFailed(error): - return "JSON could not be serialized because of error:\n\(error.localizedDescription)" - case let .invalidEmptyResponse(type): - return """ - Empty response could not be serialized to type: \(type). \ - Use Empty as the expected type for such responses. - """ - case let .decodingFailed(error): - return "Response could not be decoded because of error:\n\(error.localizedDescription)" - case let .customSerializationFailed(error): - return "Custom response serializer failed with error:\n\(error.localizedDescription)" - } - } -} - -extension AFError.ResponseValidationFailureReason { - var localizedDescription: String { - switch self { - case .dataFileNil: - return "Response could not be validated, data file was nil." - case let .dataFileReadFailed(url): - return "Response could not be validated, data file could not be read: \(url)." - case let .missingContentType(types): - return """ - Response Content-Type was missing and acceptable content types \ - (\(types.joined(separator: ","))) do not match "*/*". - """ - case let .unacceptableContentType(acceptableTypes, responseType): - return """ - Response Content-Type "\(responseType)" does not match any acceptable types: \ - \(acceptableTypes.joined(separator: ",")). - """ - case let .unacceptableStatusCode(code): - return "Response status code was unacceptable: \(code)." - case let .customValidationFailed(error): - return "Custom response validation failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.ServerTrustFailureReason { - var localizedDescription: String { - switch self { - case let .noRequiredEvaluator(host): - return "A ServerTrustEvaluating value is required for host \(host) but none was found." - case .noCertificatesFound: - return "No certificates were found or provided for evaluation." - case .noPublicKeysFound: - return "No public keys were found or provided for evaluation." - case .policyApplicationFailed: - return "Attempting to set a SecPolicy failed." - case .settingAnchorCertificatesFailed: - return "Attempting to set the provided certificates as anchor certificates failed." - case .revocationPolicyCreationFailed: - return "Attempting to create a revocation policy failed." - case let .trustEvaluationFailed(error): - return "SecTrust evaluation failed with error: \(error?.localizedDescription ?? "None")" - case let .defaultEvaluationFailed(output): - return "Default evaluation failed for host \(output.host)." - case let .hostValidationFailed(output): - return "Host validation failed for host \(output.host)." - case let .revocationCheckFailed(output, _): - return "Revocation check failed for host \(output.host)." - case let .certificatePinningFailed(host, _, _, _): - return "Certificate pinning failed for host \(host)." - case let .publicKeyPinningFailed(host, _, _, _): - return "Public key pinning failed for host \(host)." - case let .customEvaluationFailed(error): - return "Custom trust evaluation failed with error: \(error.localizedDescription)" - } - } -} - -extension AFError.URLRequestValidationFailureReason { - var localizedDescription: String { - switch self { - case let .bodyDataInGETRequest(data): - return """ - Invalid URLRequest: Requests with GET method cannot have body data: - \(String(decoding: data, as: UTF8.self)) - """ - } - } -} diff --git a/Pods/Alamofire/Source/Alamofire.swift b/Pods/Alamofire/Source/Alamofire.swift deleted file mode 100644 index bcf43d02..00000000 --- a/Pods/Alamofire/Source/Alamofire.swift +++ /dev/null @@ -1,29 +0,0 @@ -// -// Alamofire.swift -// -// Copyright (c) 2014-2021 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -/// Reference to `Session.default` for quick bootstrapping and examples. -public let AF = Session.default - -/// Current Alamofire version. Necessary since SPM doesn't use dynamic libraries. Plus this will be more accurate. -let version = "5.4.3" diff --git a/Pods/Alamofire/Source/AlamofireExtended.swift b/Pods/Alamofire/Source/AlamofireExtended.swift deleted file mode 100644 index 280c6de9..00000000 --- a/Pods/Alamofire/Source/AlamofireExtended.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// AlamofireExtended.swift -// -// Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -/// Type that acts as a generic extension point for all `AlamofireExtended` types. -public struct AlamofireExtension { - /// Stores the type or meta-type of any extended type. - public private(set) var type: ExtendedType - - /// Create an instance from the provided value. - /// - /// - Parameter type: Instance being extended. - public init(_ type: ExtendedType) { - self.type = type - } -} - -/// Protocol describing the `af` extension points for Alamofire extended types. -public protocol AlamofireExtended { - /// Type being extended. - associatedtype ExtendedType - - /// Static Alamofire extension point. - static var af: AlamofireExtension.Type { get set } - /// Instance Alamofire extension point. - var af: AlamofireExtension { get set } -} - -extension AlamofireExtended { - /// Static Alamofire extension point. - public static var af: AlamofireExtension.Type { - get { AlamofireExtension.self } - set {} - } - - /// Instance Alamofire extension point. - public var af: AlamofireExtension { - get { AlamofireExtension(self) } - set {} - } -} diff --git a/Pods/Alamofire/Source/AuthenticationInterceptor.swift b/Pods/Alamofire/Source/AuthenticationInterceptor.swift deleted file mode 100644 index 9d7f8360..00000000 --- a/Pods/Alamofire/Source/AuthenticationInterceptor.swift +++ /dev/null @@ -1,404 +0,0 @@ -// -// AuthenticationInterceptor.swift -// -// Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Types adopting the `AuthenticationCredential` protocol can be used to authenticate `URLRequest`s. -/// -/// One common example of an `AuthenticationCredential` is an OAuth2 credential containing an access token used to -/// authenticate all requests on behalf of a user. The access token generally has an expiration window of 60 minutes -/// which will then require a refresh of the credential using the refresh token to generate a new access token. -public protocol AuthenticationCredential { - /// Whether the credential requires a refresh. This property should always return `true` when the credential is - /// expired. It is also wise to consider returning `true` when the credential will expire in several seconds or - /// minutes depending on the expiration window of the credential. - /// - /// For example, if the credential is valid for 60 minutes, then it would be wise to return `true` when the - /// credential is only valid for 5 minutes or less. That ensures the credential will not expire as it is passed - /// around backend services. - var requiresRefresh: Bool { get } -} - -// MARK: - - -/// Types adopting the `Authenticator` protocol can be used to authenticate `URLRequest`s with an -/// `AuthenticationCredential` as well as refresh the `AuthenticationCredential` when required. -public protocol Authenticator: AnyObject { - /// The type of credential associated with the `Authenticator` instance. - associatedtype Credential: AuthenticationCredential - - /// Applies the `Credential` to the `URLRequest`. - /// - /// In the case of OAuth2, the access token of the `Credential` would be added to the `URLRequest` as a Bearer - /// token to the `Authorization` header. - /// - /// - Parameters: - /// - credential: The `Credential`. - /// - urlRequest: The `URLRequest`. - func apply(_ credential: Credential, to urlRequest: inout URLRequest) - - /// Refreshes the `Credential` and executes the `completion` closure with the `Result` once complete. - /// - /// Refresh can be called in one of two ways. It can be called before the `Request` is actually executed due to - /// a `requiresRefresh` returning `true` during the adapt portion of the `Request` creation process. It can also - /// be triggered by a failed `Request` where the authentication server denied access due to an expired or - /// invalidated access token. - /// - /// In the case of OAuth2, this method would use the refresh token of the `Credential` to generate a new - /// `Credential` using the authentication service. Once complete, the `completion` closure should be called with - /// the new `Credential`, or the error that occurred. - /// - /// In general, if the refresh call fails with certain status codes from the authentication server (commonly a 401), - /// the refresh token in the `Credential` can no longer be used to generate a valid `Credential`. In these cases, - /// you will need to reauthenticate the user with their username / password. - /// - /// Please note, these are just general examples of common use cases. They are not meant to solve your specific - /// authentication server challenges. Please work with your authentication server team to ensure your - /// `Authenticator` logic matches their expectations. - /// - /// - Parameters: - /// - credential: The `Credential` to refresh. - /// - session: The `Session` requiring the refresh. - /// - completion: The closure to be executed once the refresh is complete. - func refresh(_ credential: Credential, for session: Session, completion: @escaping (Result) -> Void) - - /// Determines whether the `URLRequest` failed due to an authentication error based on the `HTTPURLResponse`. - /// - /// If the authentication server **CANNOT** invalidate credentials after they are issued, then simply return `false` - /// for this method. If the authentication server **CAN** invalidate credentials due to security breaches, then you - /// will need to work with your authentication server team to understand how to identify when this occurs. - /// - /// In the case of OAuth2, where an authentication server can invalidate credentials, you will need to inspect the - /// `HTTPURLResponse` or possibly the `Error` for when this occurs. This is commonly handled by the authentication - /// server returning a 401 status code and some additional header to indicate an OAuth2 failure occurred. - /// - /// It is very important to understand how your authentication server works to be able to implement this correctly. - /// For example, if your authentication server returns a 401 when an OAuth2 error occurs, and your downstream - /// service also returns a 401 when you are not authorized to perform that operation, how do you know which layer - /// of the backend returned you a 401? You do not want to trigger a refresh unless you know your authentication - /// server is actually the layer rejecting the request. Again, work with your authentication server team to understand - /// how to identify an OAuth2 401 error vs. a downstream 401 error to avoid endless refresh loops. - /// - /// - Parameters: - /// - urlRequest: The `URLRequest`. - /// - response: The `HTTPURLResponse`. - /// - error: The `Error`. - /// - /// - Returns: `true` if the `URLRequest` failed due to an authentication error, `false` otherwise. - func didRequest(_ urlRequest: URLRequest, with response: HTTPURLResponse, failDueToAuthenticationError error: Error) -> Bool - - /// Determines whether the `URLRequest` is authenticated with the `Credential`. - /// - /// If the authentication server **CANNOT** invalidate credentials after they are issued, then simply return `true` - /// for this method. If the authentication server **CAN** invalidate credentials due to security breaches, then - /// read on. - /// - /// When an authentication server can invalidate credentials, it means that you may have a non-expired credential - /// that appears to be valid, but will be rejected by the authentication server when used. Generally when this - /// happens, a number of requests are all sent when the application is foregrounded, and all of them will be - /// rejected by the authentication server in the order they are received. The first failed request will trigger a - /// refresh internally, which will update the credential, and then retry all the queued requests with the new - /// credential. However, it is possible that some of the original requests will not return from the authentication - /// server until the refresh has completed. This is where this method comes in. - /// - /// When the authentication server rejects a credential, we need to check to make sure we haven't refreshed the - /// credential while the request was in flight. If it has already refreshed, then we don't need to trigger an - /// additional refresh. If it hasn't refreshed, then we need to refresh. - /// - /// Now that it is understood how the result of this method is used in the refresh lifecyle, let's walk through how - /// to implement it. You should return `true` in this method if the `URLRequest` is authenticated in a way that - /// matches the values in the `Credential`. In the case of OAuth2, this would mean that the Bearer token in the - /// `Authorization` header of the `URLRequest` matches the access token in the `Credential`. If it matches, then we - /// know the `Credential` was used to authenticate the `URLRequest` and should return `true`. If the Bearer token - /// did not match the access token, then you should return `false`. - /// - /// - Parameters: - /// - urlRequest: The `URLRequest`. - /// - credential: The `Credential`. - /// - /// - Returns: `true` if the `URLRequest` is authenticated with the `Credential`, `false` otherwise. - func isRequest(_ urlRequest: URLRequest, authenticatedWith credential: Credential) -> Bool -} - -// MARK: - - -/// Represents various authentication failures that occur when using the `AuthenticationInterceptor`. All errors are -/// still vended from Alamofire as `AFError` types. The `AuthenticationError` instances will be embedded within -/// `AFError` `.requestAdaptationFailed` or `.requestRetryFailed` cases. -public enum AuthenticationError: Error { - /// The credential was missing so the request could not be authenticated. - case missingCredential - /// The credential was refreshed too many times within the `RefreshWindow`. - case excessiveRefresh -} - -// MARK: - - -/// The `AuthenticationInterceptor` class manages the queuing and threading complexity of authenticating requests. -/// It relies on an `Authenticator` type to handle the actual `URLRequest` authentication and `Credential` refresh. -public class AuthenticationInterceptor: RequestInterceptor where AuthenticatorType: Authenticator { - // MARK: Typealiases - - /// Type of credential used to authenticate requests. - public typealias Credential = AuthenticatorType.Credential - - // MARK: Helper Types - - /// Type that defines a time window used to identify excessive refresh calls. When enabled, prior to executing a - /// refresh, the `AuthenticationInterceptor` compares the timestamp history of previous refresh calls against the - /// `RefreshWindow`. If more refreshes have occurred within the refresh window than allowed, the refresh is - /// cancelled and an `AuthorizationError.excessiveRefresh` error is thrown. - public struct RefreshWindow { - /// `TimeInterval` defining the duration of the time window before the current time in which the number of - /// refresh attempts is compared against `maximumAttempts`. For example, if `interval` is 30 seconds, then the - /// `RefreshWindow` represents the past 30 seconds. If more attempts occurred in the past 30 seconds than - /// `maximumAttempts`, an `.excessiveRefresh` error will be thrown. - public let interval: TimeInterval - - /// Total refresh attempts allowed within `interval` before throwing an `.excessiveRefresh` error. - public let maximumAttempts: Int - - /// Creates a `RefreshWindow` instance from the specified `interval` and `maximumAttempts`. - /// - /// - Parameters: - /// - interval: `TimeInterval` defining the duration of the time window before the current time. - /// - maximumAttempts: The maximum attempts allowed within the `TimeInterval`. - public init(interval: TimeInterval = 30.0, maximumAttempts: Int = 5) { - self.interval = interval - self.maximumAttempts = maximumAttempts - } - } - - private struct AdaptOperation { - let urlRequest: URLRequest - let session: Session - let completion: (Result) -> Void - } - - private enum AdaptResult { - case adapt(Credential) - case doNotAdapt(AuthenticationError) - case adaptDeferred - } - - private struct MutableState { - var credential: Credential? - - var isRefreshing = false - var refreshTimestamps: [TimeInterval] = [] - var refreshWindow: RefreshWindow? - - var adaptOperations: [AdaptOperation] = [] - var requestsToRetry: [(RetryResult) -> Void] = [] - } - - // MARK: Properties - - /// The `Credential` used to authenticate requests. - public var credential: Credential? { - get { mutableState.credential } - set { mutableState.credential = newValue } - } - - let authenticator: AuthenticatorType - let queue = DispatchQueue(label: "org.alamofire.authentication.inspector") - - @Protected - private var mutableState = MutableState() - - // MARK: Initialization - - /// Creates an `AuthenticationInterceptor` instance from the specified parameters. - /// - /// A `nil` `RefreshWindow` will result in the `AuthenticationInterceptor` not checking for excessive refresh calls. - /// It is recommended to always use a `RefreshWindow` to avoid endless refresh cycles. - /// - /// - Parameters: - /// - authenticator: The `Authenticator` type. - /// - credential: The `Credential` if it exists. `nil` by default. - /// - refreshWindow: The `RefreshWindow` used to identify excessive refresh calls. `RefreshWindow()` by default. - public init(authenticator: AuthenticatorType, - credential: Credential? = nil, - refreshWindow: RefreshWindow? = RefreshWindow()) { - self.authenticator = authenticator - mutableState.credential = credential - mutableState.refreshWindow = refreshWindow - } - - // MARK: Adapt - - public func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result) -> Void) { - let adaptResult: AdaptResult = $mutableState.write { mutableState in - // Queue the adapt operation if a refresh is already in place. - guard !mutableState.isRefreshing else { - let operation = AdaptOperation(urlRequest: urlRequest, session: session, completion: completion) - mutableState.adaptOperations.append(operation) - return .adaptDeferred - } - - // Throw missing credential error is the credential is missing. - guard let credential = mutableState.credential else { - let error = AuthenticationError.missingCredential - return .doNotAdapt(error) - } - - // Queue the adapt operation and trigger refresh operation if credential requires refresh. - guard !credential.requiresRefresh else { - let operation = AdaptOperation(urlRequest: urlRequest, session: session, completion: completion) - mutableState.adaptOperations.append(operation) - refresh(credential, for: session, insideLock: &mutableState) - return .adaptDeferred - } - - return .adapt(credential) - } - - switch adaptResult { - case let .adapt(credential): - var authenticatedRequest = urlRequest - authenticator.apply(credential, to: &authenticatedRequest) - completion(.success(authenticatedRequest)) - - case let .doNotAdapt(adaptError): - completion(.failure(adaptError)) - - case .adaptDeferred: - // No-op: adapt operation captured during refresh. - break - } - } - - // MARK: Retry - - public func retry(_ request: Request, for session: Session, dueTo error: Error, completion: @escaping (RetryResult) -> Void) { - // Do not attempt retry if there was not an original request and response from the server. - guard let urlRequest = request.request, let response = request.response else { - completion(.doNotRetry) - return - } - - // Do not attempt retry unless the `Authenticator` verifies failure was due to authentication error (i.e. 401 status code). - guard authenticator.didRequest(urlRequest, with: response, failDueToAuthenticationError: error) else { - completion(.doNotRetry) - return - } - - // Do not attempt retry if there is no credential. - guard let credential = credential else { - let error = AuthenticationError.missingCredential - completion(.doNotRetryWithError(error)) - return - } - - // Retry the request if the `Authenticator` verifies it was authenticated with a previous credential. - guard authenticator.isRequest(urlRequest, authenticatedWith: credential) else { - completion(.retry) - return - } - - $mutableState.write { mutableState in - mutableState.requestsToRetry.append(completion) - - guard !mutableState.isRefreshing else { return } - - refresh(credential, for: session, insideLock: &mutableState) - } - } - - // MARK: Refresh - - private func refresh(_ credential: Credential, for session: Session, insideLock mutableState: inout MutableState) { - guard !isRefreshExcessive(insideLock: &mutableState) else { - let error = AuthenticationError.excessiveRefresh - handleRefreshFailure(error, insideLock: &mutableState) - return - } - - mutableState.refreshTimestamps.append(ProcessInfo.processInfo.systemUptime) - mutableState.isRefreshing = true - - // Dispatch to queue to hop out of the lock in case authenticator.refresh is implemented synchronously. - queue.async { - self.authenticator.refresh(credential, for: session) { result in - self.$mutableState.write { mutableState in - switch result { - case let .success(credential): - self.handleRefreshSuccess(credential, insideLock: &mutableState) - case let .failure(error): - self.handleRefreshFailure(error, insideLock: &mutableState) - } - } - } - } - } - - private func isRefreshExcessive(insideLock mutableState: inout MutableState) -> Bool { - guard let refreshWindow = mutableState.refreshWindow else { return false } - - let refreshWindowMin = ProcessInfo.processInfo.systemUptime - refreshWindow.interval - - let refreshAttemptsWithinWindow = mutableState.refreshTimestamps.reduce(into: 0) { attempts, refreshTimestamp in - guard refreshWindowMin <= refreshTimestamp else { return } - attempts += 1 - } - - let isRefreshExcessive = refreshAttemptsWithinWindow >= refreshWindow.maximumAttempts - - return isRefreshExcessive - } - - private func handleRefreshSuccess(_ credential: Credential, insideLock mutableState: inout MutableState) { - mutableState.credential = credential - - let adaptOperations = mutableState.adaptOperations - let requestsToRetry = mutableState.requestsToRetry - - mutableState.adaptOperations.removeAll() - mutableState.requestsToRetry.removeAll() - - mutableState.isRefreshing = false - - // Dispatch to queue to hop out of the mutable state lock - queue.async { - adaptOperations.forEach { self.adapt($0.urlRequest, for: $0.session, completion: $0.completion) } - requestsToRetry.forEach { $0(.retry) } - } - } - - private func handleRefreshFailure(_ error: Error, insideLock mutableState: inout MutableState) { - let adaptOperations = mutableState.adaptOperations - let requestsToRetry = mutableState.requestsToRetry - - mutableState.adaptOperations.removeAll() - mutableState.requestsToRetry.removeAll() - - mutableState.isRefreshing = false - - // Dispatch to queue to hop out of the mutable state lock - queue.async { - adaptOperations.forEach { $0.completion(.failure(error)) } - requestsToRetry.forEach { $0(.doNotRetryWithError(error)) } - } - } -} diff --git a/Pods/Alamofire/Source/CachedResponseHandler.swift b/Pods/Alamofire/Source/CachedResponseHandler.swift deleted file mode 100644 index b6e0d4b2..00000000 --- a/Pods/Alamofire/Source/CachedResponseHandler.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// CachedResponseHandler.swift -// -// Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that handles whether the data task should store the HTTP response in the cache. -public protocol CachedResponseHandler { - /// Determines whether the HTTP response should be stored in the cache. - /// - /// The `completion` closure should be passed one of three possible options: - /// - /// 1. The cached response provided by the server (this is the most common use case). - /// 2. A modified version of the cached response (you may want to modify it in some way before caching). - /// 3. A `nil` value to prevent the cached response from being stored in the cache. - /// - /// - Parameters: - /// - task: The data task whose request resulted in the cached response. - /// - response: The cached response to potentially store in the cache. - /// - completion: The closure to execute containing cached response, a modified response, or `nil`. - func dataTask(_ task: URLSessionDataTask, - willCacheResponse response: CachedURLResponse, - completion: @escaping (CachedURLResponse?) -> Void) -} - -// MARK: - - -/// `ResponseCacher` is a convenience `CachedResponseHandler` making it easy to cache, not cache, or modify a cached -/// response. -public struct ResponseCacher { - /// Defines the behavior of the `ResponseCacher` type. - public enum Behavior { - /// Stores the cached response in the cache. - case cache - /// Prevents the cached response from being stored in the cache. - case doNotCache - /// Modifies the cached response before storing it in the cache. - case modify((URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?) - } - - /// Returns a `ResponseCacher` with a follow `Behavior`. - public static let cache = ResponseCacher(behavior: .cache) - /// Returns a `ResponseCacher` with a do not follow `Behavior`. - public static let doNotCache = ResponseCacher(behavior: .doNotCache) - - /// The `Behavior` of the `ResponseCacher`. - public let behavior: Behavior - - /// Creates a `ResponseCacher` instance from the `Behavior`. - /// - /// - Parameter behavior: The `Behavior`. - public init(behavior: Behavior) { - self.behavior = behavior - } -} - -extension ResponseCacher: CachedResponseHandler { - public func dataTask(_ task: URLSessionDataTask, - willCacheResponse response: CachedURLResponse, - completion: @escaping (CachedURLResponse?) -> Void) { - switch behavior { - case .cache: - completion(response) - case .doNotCache: - completion(nil) - case let .modify(closure): - let response = closure(task, response) - completion(response) - } - } -} diff --git a/Pods/Alamofire/Source/Combine.swift b/Pods/Alamofire/Source/Combine.swift deleted file mode 100644 index a1382494..00000000 --- a/Pods/Alamofire/Source/Combine.swift +++ /dev/null @@ -1,622 +0,0 @@ -// -// Combine.swift -// -// Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if canImport(Combine) - -import Combine -import Dispatch -import Foundation - -// MARK: - DataRequest / UploadRequest - -/// A Combine `Publisher` that publishes the `DataResponse` of the provided `DataRequest`. -@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) -public struct DataResponsePublisher: Publisher { - public typealias Output = DataResponse - public typealias Failure = Never - - private typealias Handler = (@escaping (_ response: DataResponse) -> Void) -> DataRequest - - private let request: DataRequest - private let responseHandler: Handler - - /// Creates an instance which will serialize responses using the provided `ResponseSerializer`. - /// - /// - Parameters: - /// - request: `DataRequest` for which to publish the response. - /// - queue: `DispatchQueue` on which the `DataResponse` value will be published. `.main` by default. - /// - serializer: `ResponseSerializer` used to produce the published `DataResponse`. - public init(_ request: DataRequest, queue: DispatchQueue, serializer: Serializer) - where Value == Serializer.SerializedObject { - self.request = request - responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) } - } - - /// Creates an instance which will serialize responses using the provided `DataResponseSerializerProtocol`. - /// - /// - Parameters: - /// - request: `DataRequest` for which to publish the response. - /// - queue: `DispatchQueue` on which the `DataResponse` value will be published. `.main` by default. - /// - serializer: `DataResponseSerializerProtocol` used to produce the published `DataResponse`. - public init(_ request: DataRequest, - queue: DispatchQueue, - serializer: Serializer) - where Value == Serializer.SerializedObject { - self.request = request - responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) } - } - - /// Publishes only the `Result` of the `DataResponse` value. - /// - /// - Returns: The `AnyPublisher` publishing the `Result` value. - public func result() -> AnyPublisher, Never> { - map { $0.result }.eraseToAnyPublisher() - } - - /// Publishes the `Result` of the `DataResponse` as a single `Value` or fail with the `AFError` instance. - /// - /// - Returns: The `AnyPublisher` publishing the stream. - public func value() -> AnyPublisher { - setFailureType(to: AFError.self).flatMap { $0.result.publisher }.eraseToAnyPublisher() - } - - public func receive(subscriber: S) where S: Subscriber, DataResponsePublisher.Failure == S.Failure, DataResponsePublisher.Output == S.Input { - subscriber.receive(subscription: Inner(request: request, - responseHandler: responseHandler, - downstream: subscriber)) - } - - private final class Inner: Subscription, Cancellable - where Downstream.Input == Output { - typealias Failure = Downstream.Failure - - @Protected - private var downstream: Downstream? - private let request: DataRequest - private let responseHandler: Handler - - init(request: DataRequest, responseHandler: @escaping Handler, downstream: Downstream) { - self.request = request - self.responseHandler = responseHandler - self.downstream = downstream - } - - func request(_ demand: Subscribers.Demand) { - assert(demand > 0) - - guard let downstream = downstream else { return } - - self.downstream = nil - responseHandler { response in - _ = downstream.receive(response) - downstream.receive(completion: .finished) - }.resume() - } - - func cancel() { - request.cancel() - downstream = nil - } - } -} - -@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) -extension DataResponsePublisher where Value == Data? { - /// Creates an instance which publishes a `DataResponse` value without serialization. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public init(_ request: DataRequest, queue: DispatchQueue) { - self.request = request - responseHandler = { request.response(queue: queue, completionHandler: $0) } - } -} - -extension DataRequest { - /// Creates a `DataResponsePublisher` for this instance using the given `ResponseSerializer` and `DispatchQueue`. - /// - /// - Parameters: - /// - serializer: `ResponseSerializer` used to serialize response `Data`. - /// - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default. - /// - /// - Returns: The `DataResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishResponse(using serializer: Serializer, on queue: DispatchQueue = .main) -> DataResponsePublisher - where Serializer.SerializedObject == T { - DataResponsePublisher(self, queue: queue, serializer: serializer) - } - - /// Creates a `DataResponsePublisher` for this instance and uses a `DataResponseSerializer` to serialize the - /// response. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default. - /// - preprocessor: `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()` - /// by default. - /// - emptyResponseCodes: `Set` of HTTP status codes for which empty responses are allowed. `[204, 205]` by - /// default. - /// - emptyRequestMethods: `Set` of `HTTPMethod`s for which empty responses are allowed, regardless of - /// status code. `[.head]` by default. - /// - Returns: The `DataResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishData(queue: DispatchQueue = .main, - preprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = DataResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DataResponseSerializer.defaultEmptyRequestMethods) -> DataResponsePublisher { - publishResponse(using: DataResponseSerializer(dataPreprocessor: preprocessor, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - on: queue) - } - - /// Creates a `DataResponsePublisher` for this instance and uses a `StringResponseSerializer` to serialize the - /// response. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default. - /// - preprocessor: `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()` - /// by default. - /// - encoding: `String.Encoding` to parse the response. `nil` by default, in which case the encoding - /// will be determined by the server response, falling back to the default HTTP character - /// set, `ISO-8859-1`. - /// - emptyResponseCodes: `Set` of HTTP status codes for which empty responses are allowed. `[204, 205]` by - /// default. - /// - emptyRequestMethods: `Set` of `HTTPMethod`s for which empty responses are allowed, regardless of - /// status code. `[.head]` by default. - /// - /// - Returns: The `DataResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishString(queue: DispatchQueue = .main, - preprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor, - encoding: String.Encoding? = nil, - emptyResponseCodes: Set = StringResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = StringResponseSerializer.defaultEmptyRequestMethods) -> DataResponsePublisher { - publishResponse(using: StringResponseSerializer(dataPreprocessor: preprocessor, - encoding: encoding, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - on: queue) - } - - /// Creates a `DataResponsePublisher` for this instance and uses a `DecodableResponseSerializer` to serialize the - /// response. - /// - /// - Parameters: - /// - type: `Decodable` type to which to decode response `Data`. Inferred from the context by default. - /// - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default. - /// - preprocessor: `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()` - /// by default. - /// - decoder: `DataDecoder` instance used to decode response `Data`. `JSONDecoder()` by default. - /// - emptyResponseCodes: `Set` of HTTP status codes for which empty responses are allowed. `[204, 205]` by - /// default. - /// - emptyRequestMethods: `Set` of `HTTPMethod`s for which empty responses are allowed, regardless of - /// status code. `[.head]` by default. - /// - /// - Returns: The `DataResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishDecodable(type: T.Type = T.self, - queue: DispatchQueue = .main, - preprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, - decoder: DataDecoder = JSONDecoder(), - emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, - emptyResponseMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods) -> DataResponsePublisher { - publishResponse(using: DecodableResponseSerializer(dataPreprocessor: preprocessor, - decoder: decoder, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyResponseMethods), - on: queue) - } - - /// Creates a `DataResponsePublisher` for this instance which does not serialize the response before publishing. - /// - /// - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default. - /// - /// - Returns: The `DataResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishUnserialized(queue: DispatchQueue = .main) -> DataResponsePublisher { - DataResponsePublisher(self, queue: queue) - } -} - -// A Combine `Publisher` that publishes a sequence of `Stream` values received by the provided `DataStreamRequest`. -@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) -public struct DataStreamPublisher: Publisher { - public typealias Output = DataStreamRequest.Stream - public typealias Failure = Never - - private typealias Handler = (@escaping DataStreamRequest.Handler) -> DataStreamRequest - - private let request: DataStreamRequest - private let streamHandler: Handler - - /// Creates an instance which will serialize responses using the provided `DataStreamSerializer`. - /// - /// - Parameters: - /// - request: `DataStreamRequest` for which to publish the response. - /// - queue: `DispatchQueue` on which the `Stream` values will be published. `.main` by - /// default. - /// - serializer: `DataStreamSerializer` used to produce the published `Stream` values. - public init(_ request: DataStreamRequest, queue: DispatchQueue, serializer: Serializer) - where Value == Serializer.SerializedObject { - self.request = request - streamHandler = { request.responseStream(using: serializer, on: queue, stream: $0) } - } - - /// Publishes only the `Result` of the `DataStreamRequest.Stream`'s `Event`s. - /// - /// - Returns: The `AnyPublisher` publishing the `Result` value. - public func result() -> AnyPublisher, Never> { - compactMap { stream in - switch stream.event { - case let .stream(result): - return result - // If the stream has completed with an error, send the error value downstream as a `.failure`. - case let .complete(completion): - return completion.error.map(Result.failure) - } - } - .eraseToAnyPublisher() - } - - /// Publishes the streamed values of the `DataStreamRequest.Stream` as a sequence of `Value` or fail with the - /// `AFError` instance. - /// - /// - Returns: The `AnyPublisher` publishing the stream. - public func value() -> AnyPublisher { - result().setFailureType(to: AFError.self).flatMap { $0.publisher }.eraseToAnyPublisher() - } - - public func receive(subscriber: S) where S: Subscriber, DataStreamPublisher.Failure == S.Failure, DataStreamPublisher.Output == S.Input { - subscriber.receive(subscription: Inner(request: request, - streamHandler: streamHandler, - downstream: subscriber)) - } - - private final class Inner: Subscription, Cancellable - where Downstream.Input == Output { - typealias Failure = Downstream.Failure - - @Protected - private var downstream: Downstream? - private let request: DataStreamRequest - private let streamHandler: Handler - - init(request: DataStreamRequest, streamHandler: @escaping Handler, downstream: Downstream) { - self.request = request - self.streamHandler = streamHandler - self.downstream = downstream - } - - func request(_ demand: Subscribers.Demand) { - assert(demand > 0) - - guard let downstream = downstream else { return } - - self.downstream = nil - streamHandler { stream in - _ = downstream.receive(stream) - if case .complete = stream.event { - downstream.receive(completion: .finished) - } - }.resume() - } - - func cancel() { - request.cancel() - downstream = nil - } - } -} - -extension DataStreamRequest { - /// Creates a `DataStreamPublisher` for this instance using the given `DataStreamSerializer` and `DispatchQueue`. - /// - /// - Parameters: - /// - serializer: `DataStreamSerializer` used to serialize the streamed `Data`. - /// - queue: `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default. - /// - Returns: The `DataStreamPublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishStream(using serializer: Serializer, - on queue: DispatchQueue = .main) -> DataStreamPublisher { - DataStreamPublisher(self, queue: queue, serializer: serializer) - } - - /// Creates a `DataStreamPublisher` for this instance which uses a `PassthroughStreamSerializer` to stream `Data` - /// unserialized. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default. - /// - Returns: The `DataStreamPublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishData(queue: DispatchQueue = .main) -> DataStreamPublisher { - publishStream(using: PassthroughStreamSerializer(), on: queue) - } - - /// Creates a `DataStreamPublisher` for this instance which uses a `StringStreamSerializer` to serialize stream - /// `Data` values into `String` values. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default. - /// - Returns: The `DataStreamPublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishString(queue: DispatchQueue = .main) -> DataStreamPublisher { - publishStream(using: StringStreamSerializer(), on: queue) - } - - /// Creates a `DataStreamPublisher` for this instance which uses a `DecodableStreamSerializer` with the provided - /// parameters to serialize stream `Data` values into the provided type. - /// - /// - Parameters: - /// - type: `Decodable` type to which to decode stream `Data`. Inferred from the context by default. - /// - queue: `DispatchQueue` on which the `DataRequest.Stream` values will be published. `.main` by default. - /// - decoder: `DataDecoder` instance used to decode stream `Data`. `JSONDecoder()` by default. - /// - preprocessor: `DataPreprocessor` which filters incoming stream `Data` before serialization. - /// `PassthroughPreprocessor()` by default. - /// - Returns: The `DataStreamPublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishDecodable(type: T.Type = T.self, - queue: DispatchQueue = .main, - decoder: DataDecoder = JSONDecoder(), - preprocessor: DataPreprocessor = PassthroughPreprocessor()) -> DataStreamPublisher { - publishStream(using: DecodableStreamSerializer(decoder: decoder, - dataPreprocessor: preprocessor), - on: queue) - } -} - -/// A Combine `Publisher` that publishes the `DownloadResponse` of the provided `DownloadRequest`. -@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) -public struct DownloadResponsePublisher: Publisher { - public typealias Output = DownloadResponse - public typealias Failure = Never - - private typealias Handler = (@escaping (_ response: DownloadResponse) -> Void) -> DownloadRequest - - private let request: DownloadRequest - private let responseHandler: Handler - - /// Creates an instance which will serialize responses using the provided `ResponseSerializer`. - /// - /// - Parameters: - /// - request: `DownloadRequest` for which to publish the response. - /// - queue: `DispatchQueue` on which the `DownloadResponse` value will be published. `.main` by default. - /// - serializer: `ResponseSerializer` used to produce the published `DownloadResponse`. - public init(_ request: DownloadRequest, queue: DispatchQueue, serializer: Serializer) - where Value == Serializer.SerializedObject { - self.request = request - responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) } - } - - /// Creates an instance which will serialize responses using the provided `DownloadResponseSerializerProtocol` value. - /// - /// - Parameters: - /// - request: `DownloadRequest` for which to publish the response. - /// - queue: `DispatchQueue` on which the `DataResponse` value will be published. `.main` by default. - /// - serializer: `DownloadResponseSerializerProtocol` used to produce the published `DownloadResponse`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public init(_ request: DownloadRequest, - queue: DispatchQueue, - serializer: Serializer) - where Value == Serializer.SerializedObject { - self.request = request - responseHandler = { request.response(queue: queue, responseSerializer: serializer, completionHandler: $0) } - } - - /// Publishes only the `Result` of the `DownloadResponse` value. - /// - /// - Returns: The `AnyPublisher` publishing the `Result` value. - public func result() -> AnyPublisher, Never> { - map { $0.result }.eraseToAnyPublisher() - } - - /// Publishes the `Result` of the `DownloadResponse` as a single `Value` or fail with the `AFError` instance. - /// - /// - Returns: The `AnyPublisher` publishing the stream. - public func value() -> AnyPublisher { - setFailureType(to: AFError.self).flatMap { $0.result.publisher }.eraseToAnyPublisher() - } - - public func receive(subscriber: S) where S: Subscriber, DownloadResponsePublisher.Failure == S.Failure, DownloadResponsePublisher.Output == S.Input { - subscriber.receive(subscription: Inner(request: request, - responseHandler: responseHandler, - downstream: subscriber)) - } - - private final class Inner: Subscription, Cancellable - where Downstream.Input == Output { - typealias Failure = Downstream.Failure - - @Protected - private var downstream: Downstream? - private let request: DownloadRequest - private let responseHandler: Handler - - init(request: DownloadRequest, responseHandler: @escaping Handler, downstream: Downstream) { - self.request = request - self.responseHandler = responseHandler - self.downstream = downstream - } - - func request(_ demand: Subscribers.Demand) { - assert(demand > 0) - - guard let downstream = downstream else { return } - - self.downstream = nil - responseHandler { response in - _ = downstream.receive(response) - downstream.receive(completion: .finished) - }.resume() - } - - func cancel() { - request.cancel() - downstream = nil - } - } -} - -extension DownloadRequest { - /// Creates a `DownloadResponsePublisher` for this instance using the given `ResponseSerializer` and `DispatchQueue`. - /// - /// - Parameters: - /// - serializer: `ResponseSerializer` used to serialize the response `Data` from disk. - /// - queue: `DispatchQueue` on which the `DownloadResponse` will be published.`.main` by default. - /// - /// - Returns: The `DownloadResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishResponse(using serializer: Serializer, on queue: DispatchQueue = .main) -> DownloadResponsePublisher - where Serializer.SerializedObject == T { - DownloadResponsePublisher(self, queue: queue, serializer: serializer) - } - - /// Creates a `DownloadResponsePublisher` for this instance using the given `DownloadResponseSerializerProtocol` and - /// `DispatchQueue`. - /// - /// - Parameters: - /// - serializer: `DownloadResponseSerializer` used to serialize the response `Data` from disk. - /// - queue: `DispatchQueue` on which the `DownloadResponse` will be published.`.main` by default. - /// - /// - Returns: The `DownloadResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishResponse(using serializer: Serializer, on queue: DispatchQueue = .main) -> DownloadResponsePublisher - where Serializer.SerializedObject == T { - DownloadResponsePublisher(self, queue: queue, serializer: serializer) - } - - /// Creates a `DownloadResponsePublisher` for this instance and uses a `URLResponseSerializer` to serialize the - /// response. - /// - /// - Parameter queue: `DispatchQueue` on which the `DownloadResponse` will be published. `.main` by default. - /// - /// - Returns: The `DownloadResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishURL(queue: DispatchQueue = .main) -> DownloadResponsePublisher { - publishResponse(using: URLResponseSerializer(), on: queue) - } - - /// Creates a `DownloadResponsePublisher` for this instance and uses a `DataResponseSerializer` to serialize the - /// response. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which the `DownloadResponse` will be published. `.main` by default. - /// - preprocessor: `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()` - /// by default. - /// - emptyResponseCodes: `Set` of HTTP status codes for which empty responses are allowed. `[204, 205]` by - /// default. - /// - emptyRequestMethods: `Set` of `HTTPMethod`s for which empty responses are allowed, regardless of - /// status code. `[.head]` by default. - /// - /// - Returns: The `DownloadResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishData(queue: DispatchQueue = .main, - preprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = DataResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DataResponseSerializer.defaultEmptyRequestMethods) -> DownloadResponsePublisher { - publishResponse(using: DataResponseSerializer(dataPreprocessor: preprocessor, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - on: queue) - } - - /// Creates a `DataResponsePublisher` for this instance and uses a `StringResponseSerializer` to serialize the - /// response. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default. - /// - preprocessor: `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()` - /// by default. - /// - encoding: `String.Encoding` to parse the response. `nil` by default, in which case the encoding - /// will be determined by the server response, falling back to the default HTTP character - /// set, `ISO-8859-1`. - /// - emptyResponseCodes: `Set` of HTTP status codes for which empty responses are allowed. `[204, 205]` by - /// default. - /// - emptyRequestMethods: `Set` of `HTTPMethod`s for which empty responses are allowed, regardless of - /// status code. `[.head]` by default. - /// - /// - Returns: The `DownloadResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishString(queue: DispatchQueue = .main, - preprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor, - encoding: String.Encoding? = nil, - emptyResponseCodes: Set = StringResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = StringResponseSerializer.defaultEmptyRequestMethods) -> DownloadResponsePublisher { - publishResponse(using: StringResponseSerializer(dataPreprocessor: preprocessor, - encoding: encoding, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - on: queue) - } - - /// Creates a `DataResponsePublisher` for this instance and uses a `DecodableResponseSerializer` to serialize the - /// response. - /// - /// - Parameters: - /// - type: `Decodable` type to which to decode response `Data`. Inferred from the context by default. - /// - queue: `DispatchQueue` on which the `DataResponse` will be published. `.main` by default. - /// - preprocessor: `DataPreprocessor` which filters the `Data` before serialization. `PassthroughPreprocessor()` - /// by default. - /// - decoder: `DataDecoder` instance used to decode response `Data`. `JSONDecoder()` by default. - /// - emptyResponseCodes: `Set` of HTTP status codes for which empty responses are allowed. `[204, 205]` by - /// default. - /// - emptyRequestMethods: `Set` of `HTTPMethod`s for which empty responses are allowed, regardless of - /// status code. `[.head]` by default. - /// - /// - Returns: The `DownloadResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishDecodable(type: T.Type = T.self, - queue: DispatchQueue = .main, - preprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, - decoder: DataDecoder = JSONDecoder(), - emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, - emptyResponseMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods) -> DownloadResponsePublisher { - publishResponse(using: DecodableResponseSerializer(dataPreprocessor: preprocessor, - decoder: decoder, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyResponseMethods), - on: queue) - } -} - -@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) -extension DownloadResponsePublisher where Value == URL? { - /// Creates an instance which publishes a `DownloadResponse` value without serialization. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public init(_ request: DownloadRequest, queue: DispatchQueue) { - self.request = request - responseHandler = { request.response(queue: queue, completionHandler: $0) } - } -} - -extension DownloadRequest { - /// Creates a `DownloadResponsePublisher` for this instance which does not serialize the response before publishing. - /// - /// - Parameter queue: `DispatchQueue` on which the `DownloadResponse` will be published. `.main` by default. - /// - /// - Returns: The `DownloadResponsePublisher`. - @available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) - public func publishUnserialized(on queue: DispatchQueue = .main) -> DownloadResponsePublisher { - DownloadResponsePublisher(self, queue: queue) - } -} - -#endif diff --git a/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift b/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift deleted file mode 100644 index 10cd273e..00000000 --- a/Pods/Alamofire/Source/DispatchQueue+Alamofire.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// DispatchQueue+Alamofire.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Dispatch -import Foundation - -extension DispatchQueue { - /// Execute the provided closure after a `TimeInterval`. - /// - /// - Parameters: - /// - delay: `TimeInterval` to delay execution. - /// - closure: Closure to execute. - func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { - asyncAfter(deadline: .now() + delay, execute: closure) - } -} diff --git a/Pods/Alamofire/Source/EventMonitor.swift b/Pods/Alamofire/Source/EventMonitor.swift deleted file mode 100644 index 3b096712..00000000 --- a/Pods/Alamofire/Source/EventMonitor.swift +++ /dev/null @@ -1,892 +0,0 @@ -// -// EventMonitor.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Protocol outlining the lifetime events inside Alamofire. It includes both events received from the various -/// `URLSession` delegate protocols as well as various events from the lifetime of `Request` and its subclasses. -public protocol EventMonitor { - /// The `DispatchQueue` onto which Alamofire's root `CompositeEventMonitor` will dispatch events. `.main` by default. - var queue: DispatchQueue { get } - - // MARK: - URLSession Events - - // MARK: URLSessionDelegate Events - - /// Event called during `URLSessionDelegate`'s `urlSession(_:didBecomeInvalidWithError:)` method. - func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) - - // MARK: URLSessionTaskDelegate Events - - /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didReceive:completionHandler:)` method. - func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge) - - /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)` method. - func urlSession(_ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) - - /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:needNewBodyStream:)` method. - func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask) - - /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` method. - func urlSession(_ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest) - - /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didFinishCollecting:)` method. - func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) - - /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:task:didCompleteWithError:)` method. - func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) - - /// Event called during `URLSessionTaskDelegate`'s `urlSession(_:taskIsWaitingForConnectivity:)` method. - @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) - func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) - - // MARK: URLSessionDataDelegate Events - - /// Event called during `URLSessionDataDelegate`'s `urlSession(_:dataTask:didReceive:)` method. - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) - - /// Event called during `URLSessionDataDelegate`'s `urlSession(_:dataTask:willCacheResponse:completionHandler:)` method. - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse) - - // MARK: URLSessionDownloadDelegate Events - - /// Event called during `URLSessionDownloadDelegate`'s `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)` method. - func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) - - /// Event called during `URLSessionDownloadDelegate`'s `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)` method. - func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) - - /// Event called during `URLSessionDownloadDelegate`'s `urlSession(_:downloadTask:didFinishDownloadingTo:)` method. - func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) - - // MARK: - Request Events - - /// Event called when a `URLRequest` is first created for a `Request`. If a `RequestAdapter` is active, the - /// `URLRequest` will be adapted before being issued. - func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest) - - /// Event called when the attempt to create a `URLRequest` from a `Request`'s original `URLRequestConvertible` value fails. - func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError) - - /// Event called when a `RequestAdapter` adapts the `Request`'s initial `URLRequest`. - func request(_ request: Request, didAdaptInitialRequest initialRequest: URLRequest, to adaptedRequest: URLRequest) - - /// Event called when a `RequestAdapter` fails to adapt the `Request`'s initial `URLRequest`. - func request(_ request: Request, didFailToAdaptURLRequest initialRequest: URLRequest, withError error: AFError) - - /// Event called when a final `URLRequest` is created for a `Request`. - func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest) - - /// Event called when a `URLSessionTask` subclass instance is created for a `Request`. - func request(_ request: Request, didCreateTask task: URLSessionTask) - - /// Event called when a `Request` receives a `URLSessionTaskMetrics` value. - func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics) - - /// Event called when a `Request` fails due to an error created by Alamofire. e.g. When certificate pinning fails. - func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError) - - /// Event called when a `Request`'s task completes, possibly with an error. A `Request` may receive this event - /// multiple times if it is retried. - func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) - - /// Event called when a `Request` is about to be retried. - func requestIsRetrying(_ request: Request) - - /// Event called when a `Request` finishes and response serializers are being called. - func requestDidFinish(_ request: Request) - - /// Event called when a `Request` receives a `resume` call. - func requestDidResume(_ request: Request) - - /// Event called when a `Request`'s associated `URLSessionTask` is resumed. - func request(_ request: Request, didResumeTask task: URLSessionTask) - - /// Event called when a `Request` receives a `suspend` call. - func requestDidSuspend(_ request: Request) - - /// Event called when a `Request`'s associated `URLSessionTask` is suspended. - func request(_ request: Request, didSuspendTask task: URLSessionTask) - - /// Event called when a `Request` receives a `cancel` call. - func requestDidCancel(_ request: Request) - - /// Event called when a `Request`'s associated `URLSessionTask` is cancelled. - func request(_ request: Request, didCancelTask task: URLSessionTask) - - // MARK: DataRequest Events - - /// Event called when a `DataRequest` calls a `Validation`. - func request(_ request: DataRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - data: Data?, - withResult result: Request.ValidationResult) - - /// Event called when a `DataRequest` creates a `DataResponse` value without calling a `ResponseSerializer`. - func request(_ request: DataRequest, didParseResponse response: DataResponse) - - /// Event called when a `DataRequest` calls a `ResponseSerializer` and creates a generic `DataResponse`. - func request(_ request: DataRequest, didParseResponse response: DataResponse) - - // MARK: DataStreamRequest Events - - /// Event called when a `DataStreamRequest` calls a `Validation` closure. - /// - /// - Parameters: - /// - request: `DataStreamRequest` which is calling the `Validation`. - /// - urlRequest: `URLRequest` of the request being validated. - /// - response: `HTTPURLResponse` of the request being validated. - /// - result: Produced `ValidationResult`. - func request(_ request: DataStreamRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - withResult result: Request.ValidationResult) - - /// Event called when a `DataStreamSerializer` produces a value from streamed `Data`. - /// - /// - Parameters: - /// - request: `DataStreamRequest` for which the value was serialized. - /// - result: `Result` of the serialization attempt. - func request(_ request: DataStreamRequest, didParseStream result: Result) - - // MARK: UploadRequest Events - - /// Event called when an `UploadRequest` creates its `Uploadable` value, indicating the type of upload it represents. - func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable) - - /// Event called when an `UploadRequest` failed to create its `Uploadable` value due to an error. - func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError) - - /// Event called when an `UploadRequest` provides the `InputStream` from its `Uploadable` value. This only occurs if - /// the `InputStream` does not wrap a `Data` value or file `URL`. - func request(_ request: UploadRequest, didProvideInputStream stream: InputStream) - - // MARK: DownloadRequest Events - - /// Event called when a `DownloadRequest`'s `URLSessionDownloadTask` finishes and the temporary file has been moved. - func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result) - - /// Event called when a `DownloadRequest`'s `Destination` closure is called and creates the destination URL the - /// downloaded file will be moved to. - func request(_ request: DownloadRequest, didCreateDestinationURL url: URL) - - /// Event called when a `DownloadRequest` calls a `Validation`. - func request(_ request: DownloadRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - fileURL: URL?, - withResult result: Request.ValidationResult) - - /// Event called when a `DownloadRequest` creates a `DownloadResponse` without calling a `ResponseSerializer`. - func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse) - - /// Event called when a `DownloadRequest` calls a `DownloadResponseSerializer` and creates a generic `DownloadResponse` - func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse) -} - -extension EventMonitor { - /// The default queue on which `CompositeEventMonitor`s will call the `EventMonitor` methods. `.main` by default. - public var queue: DispatchQueue { .main } - - // MARK: Default Implementations - - public func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) {} - public func urlSession(_ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge) {} - public func urlSession(_ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) {} - public func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask) {} - public func urlSession(_ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest) {} - public func urlSession(_ session: URLSession, - task: URLSessionTask, - didFinishCollecting metrics: URLSessionTaskMetrics) {} - public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {} - public func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) {} - public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) {} - public func urlSession(_ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse) {} - public func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) {} - public func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) {} - public func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) {} - public func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest) {} - public func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError) {} - public func request(_ request: Request, - didAdaptInitialRequest initialRequest: URLRequest, - to adaptedRequest: URLRequest) {} - public func request(_ request: Request, - didFailToAdaptURLRequest initialRequest: URLRequest, - withError error: AFError) {} - public func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest) {} - public func request(_ request: Request, didCreateTask task: URLSessionTask) {} - public func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics) {} - public func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError) {} - public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) {} - public func requestIsRetrying(_ request: Request) {} - public func requestDidFinish(_ request: Request) {} - public func requestDidResume(_ request: Request) {} - public func request(_ request: Request, didResumeTask task: URLSessionTask) {} - public func requestDidSuspend(_ request: Request) {} - public func request(_ request: Request, didSuspendTask task: URLSessionTask) {} - public func requestDidCancel(_ request: Request) {} - public func request(_ request: Request, didCancelTask task: URLSessionTask) {} - public func request(_ request: DataRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - data: Data?, - withResult result: Request.ValidationResult) {} - public func request(_ request: DataRequest, didParseResponse response: DataResponse) {} - public func request(_ request: DataRequest, didParseResponse response: DataResponse) {} - public func request(_ request: DataStreamRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - withResult result: Request.ValidationResult) {} - public func request(_ request: DataStreamRequest, didParseStream result: Result) {} - public func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable) {} - public func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError) {} - public func request(_ request: UploadRequest, didProvideInputStream stream: InputStream) {} - public func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result) {} - public func request(_ request: DownloadRequest, didCreateDestinationURL url: URL) {} - public func request(_ request: DownloadRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - fileURL: URL?, - withResult result: Request.ValidationResult) {} - public func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse) {} - public func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse) {} -} - -/// An `EventMonitor` which can contain multiple `EventMonitor`s and calls their methods on their queues. -public final class CompositeEventMonitor: EventMonitor { - public let queue = DispatchQueue(label: "org.alamofire.compositeEventMonitor", qos: .utility) - - let monitors: [EventMonitor] - - init(monitors: [EventMonitor]) { - self.monitors = monitors - } - - func performEvent(_ event: @escaping (EventMonitor) -> Void) { - queue.async { - for monitor in self.monitors { - monitor.queue.async { event(monitor) } - } - } - } - - public func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - performEvent { $0.urlSession(session, didBecomeInvalidWithError: error) } - } - - public func urlSession(_ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge) { - performEvent { $0.urlSession(session, task: task, didReceive: challenge) } - } - - public func urlSession(_ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) { - performEvent { - $0.urlSession(session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend) - } - } - - public func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask) { - performEvent { - $0.urlSession(session, taskNeedsNewBodyStream: task) - } - } - - public func urlSession(_ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest) { - performEvent { - $0.urlSession(session, - task: task, - willPerformHTTPRedirection: response, - newRequest: request) - } - } - - public func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - performEvent { $0.urlSession(session, task: task, didFinishCollecting: metrics) } - } - - public func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - performEvent { $0.urlSession(session, task: task, didCompleteWithError: error) } - } - - @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) - public func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) { - performEvent { $0.urlSession(session, taskIsWaitingForConnectivity: task) } - } - - public func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - performEvent { $0.urlSession(session, dataTask: dataTask, didReceive: data) } - } - - public func urlSession(_ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse) { - performEvent { $0.urlSession(session, dataTask: dataTask, willCacheResponse: proposedResponse) } - } - - public func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) { - performEvent { - $0.urlSession(session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes) - } - } - - public func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) { - performEvent { - $0.urlSession(session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite) - } - } - - public func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didFinishDownloadingTo location: URL) { - performEvent { $0.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) } - } - - public func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest) { - performEvent { $0.request(request, didCreateInitialURLRequest: urlRequest) } - } - - public func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError) { - performEvent { $0.request(request, didFailToCreateURLRequestWithError: error) } - } - - public func request(_ request: Request, didAdaptInitialRequest initialRequest: URLRequest, to adaptedRequest: URLRequest) { - performEvent { $0.request(request, didAdaptInitialRequest: initialRequest, to: adaptedRequest) } - } - - public func request(_ request: Request, didFailToAdaptURLRequest initialRequest: URLRequest, withError error: AFError) { - performEvent { $0.request(request, didFailToAdaptURLRequest: initialRequest, withError: error) } - } - - public func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest) { - performEvent { $0.request(request, didCreateURLRequest: urlRequest) } - } - - public func request(_ request: Request, didCreateTask task: URLSessionTask) { - performEvent { $0.request(request, didCreateTask: task) } - } - - public func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics) { - performEvent { $0.request(request, didGatherMetrics: metrics) } - } - - public func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError) { - performEvent { $0.request(request, didFailTask: task, earlyWithError: error) } - } - - public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) { - performEvent { $0.request(request, didCompleteTask: task, with: error) } - } - - public func requestIsRetrying(_ request: Request) { - performEvent { $0.requestIsRetrying(request) } - } - - public func requestDidFinish(_ request: Request) { - performEvent { $0.requestDidFinish(request) } - } - - public func requestDidResume(_ request: Request) { - performEvent { $0.requestDidResume(request) } - } - - public func request(_ request: Request, didResumeTask task: URLSessionTask) { - performEvent { $0.request(request, didResumeTask: task) } - } - - public func requestDidSuspend(_ request: Request) { - performEvent { $0.requestDidSuspend(request) } - } - - public func request(_ request: Request, didSuspendTask task: URLSessionTask) { - performEvent { $0.request(request, didSuspendTask: task) } - } - - public func requestDidCancel(_ request: Request) { - performEvent { $0.requestDidCancel(request) } - } - - public func request(_ request: Request, didCancelTask task: URLSessionTask) { - performEvent { $0.request(request, didCancelTask: task) } - } - - public func request(_ request: DataRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - data: Data?, - withResult result: Request.ValidationResult) { - performEvent { $0.request(request, - didValidateRequest: urlRequest, - response: response, - data: data, - withResult: result) - } - } - - public func request(_ request: DataRequest, didParseResponse response: DataResponse) { - performEvent { $0.request(request, didParseResponse: response) } - } - - public func request(_ request: DataRequest, didParseResponse response: DataResponse) { - performEvent { $0.request(request, didParseResponse: response) } - } - - public func request(_ request: DataStreamRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - withResult result: Request.ValidationResult) { - performEvent { $0.request(request, - didValidateRequest: urlRequest, - response: response, - withResult: result) - } - } - - public func request(_ request: DataStreamRequest, didParseStream result: Result) { - performEvent { $0.request(request, didParseStream: result) } - } - - public func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable) { - performEvent { $0.request(request, didCreateUploadable: uploadable) } - } - - public func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError) { - performEvent { $0.request(request, didFailToCreateUploadableWithError: error) } - } - - public func request(_ request: UploadRequest, didProvideInputStream stream: InputStream) { - performEvent { $0.request(request, didProvideInputStream: stream) } - } - - public func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result) { - performEvent { $0.request(request, didFinishDownloadingUsing: task, with: result) } - } - - public func request(_ request: DownloadRequest, didCreateDestinationURL url: URL) { - performEvent { $0.request(request, didCreateDestinationURL: url) } - } - - public func request(_ request: DownloadRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - fileURL: URL?, - withResult result: Request.ValidationResult) { - performEvent { $0.request(request, - didValidateRequest: urlRequest, - response: response, - fileURL: fileURL, - withResult: result) } - } - - public func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse) { - performEvent { $0.request(request, didParseResponse: response) } - } - - public func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse) { - performEvent { $0.request(request, didParseResponse: response) } - } -} - -/// `EventMonitor` that allows optional closures to be set to receive events. -open class ClosureEventMonitor: EventMonitor { - /// Closure called on the `urlSession(_:didBecomeInvalidWithError:)` event. - open var sessionDidBecomeInvalidWithError: ((URLSession, Error?) -> Void)? - - /// Closure called on the `urlSession(_:task:didReceive:completionHandler:)`. - open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> Void)? - - /// Closure that receives `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)` event. - open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? - - /// Closure called on the `urlSession(_:task:needNewBodyStream:)` event. - open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> Void)? - - /// Closure called on the `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` event. - open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> Void)? - - /// Closure called on the `urlSession(_:task:didFinishCollecting:)` event. - open var taskDidFinishCollectingMetrics: ((URLSession, URLSessionTask, URLSessionTaskMetrics) -> Void)? - - /// Closure called on the `urlSession(_:task:didCompleteWithError:)` event. - open var taskDidComplete: ((URLSession, URLSessionTask, Error?) -> Void)? - - /// Closure called on the `urlSession(_:taskIsWaitingForConnectivity:)` event. - open var taskIsWaitingForConnectivity: ((URLSession, URLSessionTask) -> Void)? - - /// Closure that receives the `urlSession(_:dataTask:didReceive:)` event. - open var dataTaskDidReceiveData: ((URLSession, URLSessionDataTask, Data) -> Void)? - - /// Closure called on the `urlSession(_:dataTask:willCacheResponse:completionHandler:)` event. - open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> Void)? - - /// Closure called on the `urlSession(_:downloadTask:didFinishDownloadingTo:)` event. - open var downloadTaskDidFinishDownloadingToURL: ((URLSession, URLSessionDownloadTask, URL) -> Void)? - - /// Closure called on the `urlSession(_:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:)` - /// event. - open var downloadTaskDidWriteData: ((URLSession, URLSessionDownloadTask, Int64, Int64, Int64) -> Void)? - - /// Closure called on the `urlSession(_:downloadTask:didResumeAtOffset:expectedTotalBytes:)` event. - open var downloadTaskDidResumeAtOffset: ((URLSession, URLSessionDownloadTask, Int64, Int64) -> Void)? - - // MARK: - Request Events - - /// Closure called on the `request(_:didCreateInitialURLRequest:)` event. - open var requestDidCreateInitialURLRequest: ((Request, URLRequest) -> Void)? - - /// Closure called on the `request(_:didFailToCreateURLRequestWithError:)` event. - open var requestDidFailToCreateURLRequestWithError: ((Request, AFError) -> Void)? - - /// Closure called on the `request(_:didAdaptInitialRequest:to:)` event. - open var requestDidAdaptInitialRequestToAdaptedRequest: ((Request, URLRequest, URLRequest) -> Void)? - - /// Closure called on the `request(_:didFailToAdaptURLRequest:withError:)` event. - open var requestDidFailToAdaptURLRequestWithError: ((Request, URLRequest, AFError) -> Void)? - - /// Closure called on the `request(_:didCreateURLRequest:)` event. - open var requestDidCreateURLRequest: ((Request, URLRequest) -> Void)? - - /// Closure called on the `request(_:didCreateTask:)` event. - open var requestDidCreateTask: ((Request, URLSessionTask) -> Void)? - - /// Closure called on the `request(_:didGatherMetrics:)` event. - open var requestDidGatherMetrics: ((Request, URLSessionTaskMetrics) -> Void)? - - /// Closure called on the `request(_:didFailTask:earlyWithError:)` event. - open var requestDidFailTaskEarlyWithError: ((Request, URLSessionTask, AFError) -> Void)? - - /// Closure called on the `request(_:didCompleteTask:with:)` event. - open var requestDidCompleteTaskWithError: ((Request, URLSessionTask, AFError?) -> Void)? - - /// Closure called on the `requestIsRetrying(_:)` event. - open var requestIsRetrying: ((Request) -> Void)? - - /// Closure called on the `requestDidFinish(_:)` event. - open var requestDidFinish: ((Request) -> Void)? - - /// Closure called on the `requestDidResume(_:)` event. - open var requestDidResume: ((Request) -> Void)? - - /// Closure called on the `request(_:didResumeTask:)` event. - open var requestDidResumeTask: ((Request, URLSessionTask) -> Void)? - - /// Closure called on the `requestDidSuspend(_:)` event. - open var requestDidSuspend: ((Request) -> Void)? - - /// Closure called on the `request(_:didSuspendTask:)` event. - open var requestDidSuspendTask: ((Request, URLSessionTask) -> Void)? - - /// Closure called on the `requestDidCancel(_:)` event. - open var requestDidCancel: ((Request) -> Void)? - - /// Closure called on the `request(_:didCancelTask:)` event. - open var requestDidCancelTask: ((Request, URLSessionTask) -> Void)? - - /// Closure called on the `request(_:didValidateRequest:response:data:withResult:)` event. - open var requestDidValidateRequestResponseDataWithResult: ((DataRequest, URLRequest?, HTTPURLResponse, Data?, Request.ValidationResult) -> Void)? - - /// Closure called on the `request(_:didParseResponse:)` event. - open var requestDidParseResponse: ((DataRequest, DataResponse) -> Void)? - - /// Closure called on the `request(_:didValidateRequest:response:withResult:)` event. - open var requestDidValidateRequestResponseWithResult: ((DataStreamRequest, URLRequest?, HTTPURLResponse, Request.ValidationResult) -> Void)? - - /// Closure called on the `request(_:didCreateUploadable:)` event. - open var requestDidCreateUploadable: ((UploadRequest, UploadRequest.Uploadable) -> Void)? - - /// Closure called on the `request(_:didFailToCreateUploadableWithError:)` event. - open var requestDidFailToCreateUploadableWithError: ((UploadRequest, AFError) -> Void)? - - /// Closure called on the `request(_:didProvideInputStream:)` event. - open var requestDidProvideInputStream: ((UploadRequest, InputStream) -> Void)? - - /// Closure called on the `request(_:didFinishDownloadingUsing:with:)` event. - open var requestDidFinishDownloadingUsingTaskWithResult: ((DownloadRequest, URLSessionTask, Result) -> Void)? - - /// Closure called on the `request(_:didCreateDestinationURL:)` event. - open var requestDidCreateDestinationURL: ((DownloadRequest, URL) -> Void)? - - /// Closure called on the `request(_:didValidateRequest:response:temporaryURL:destinationURL:withResult:)` event. - open var requestDidValidateRequestResponseFileURLWithResult: ((DownloadRequest, URLRequest?, HTTPURLResponse, URL?, Request.ValidationResult) -> Void)? - - /// Closure called on the `request(_:didParseResponse:)` event. - open var requestDidParseDownloadResponse: ((DownloadRequest, DownloadResponse) -> Void)? - - public let queue: DispatchQueue - - /// Creates an instance using the provided queue. - /// - /// - Parameter queue: `DispatchQueue` on which events will fired. `.main` by default. - public init(queue: DispatchQueue = .main) { - self.queue = queue - } - - open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - sessionDidBecomeInvalidWithError?(session, error) - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge) { - taskDidReceiveChallenge?(session, task, challenge) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) { - taskDidSendBodyData?(session, task, bytesSent, totalBytesSent, totalBytesExpectedToSend) - } - - open func urlSession(_ session: URLSession, taskNeedsNewBodyStream task: URLSessionTask) { - taskNeedNewBodyStream?(session, task) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest) { - taskWillPerformHTTPRedirection?(session, task, response, request) - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - taskDidFinishCollectingMetrics?(session, task, metrics) - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - taskDidComplete?(session, task, error) - } - - open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) { - taskIsWaitingForConnectivity?(session, task) - } - - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - dataTaskDidReceiveData?(session, dataTask, data) - } - - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, willCacheResponse proposedResponse: CachedURLResponse) { - dataTaskWillCacheResponse?(session, dataTask, proposedResponse) - } - - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) { - downloadTaskDidResumeAtOffset?(session, downloadTask, fileOffset, expectedTotalBytes) - } - - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) { - downloadTaskDidWriteData?(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite) - } - - open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { - downloadTaskDidFinishDownloadingToURL?(session, downloadTask, location) - } - - // MARK: Request Events - - open func request(_ request: Request, didCreateInitialURLRequest urlRequest: URLRequest) { - requestDidCreateInitialURLRequest?(request, urlRequest) - } - - open func request(_ request: Request, didFailToCreateURLRequestWithError error: AFError) { - requestDidFailToCreateURLRequestWithError?(request, error) - } - - open func request(_ request: Request, didAdaptInitialRequest initialRequest: URLRequest, to adaptedRequest: URLRequest) { - requestDidAdaptInitialRequestToAdaptedRequest?(request, initialRequest, adaptedRequest) - } - - open func request(_ request: Request, didFailToAdaptURLRequest initialRequest: URLRequest, withError error: AFError) { - requestDidFailToAdaptURLRequestWithError?(request, initialRequest, error) - } - - open func request(_ request: Request, didCreateURLRequest urlRequest: URLRequest) { - requestDidCreateURLRequest?(request, urlRequest) - } - - open func request(_ request: Request, didCreateTask task: URLSessionTask) { - requestDidCreateTask?(request, task) - } - - open func request(_ request: Request, didGatherMetrics metrics: URLSessionTaskMetrics) { - requestDidGatherMetrics?(request, metrics) - } - - open func request(_ request: Request, didFailTask task: URLSessionTask, earlyWithError error: AFError) { - requestDidFailTaskEarlyWithError?(request, task, error) - } - - open func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) { - requestDidCompleteTaskWithError?(request, task, error) - } - - open func requestIsRetrying(_ request: Request) { - requestIsRetrying?(request) - } - - open func requestDidFinish(_ request: Request) { - requestDidFinish?(request) - } - - open func requestDidResume(_ request: Request) { - requestDidResume?(request) - } - - public func request(_ request: Request, didResumeTask task: URLSessionTask) { - requestDidResumeTask?(request, task) - } - - open func requestDidSuspend(_ request: Request) { - requestDidSuspend?(request) - } - - public func request(_ request: Request, didSuspendTask task: URLSessionTask) { - requestDidSuspendTask?(request, task) - } - - open func requestDidCancel(_ request: Request) { - requestDidCancel?(request) - } - - public func request(_ request: Request, didCancelTask task: URLSessionTask) { - requestDidCancelTask?(request, task) - } - - open func request(_ request: DataRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - data: Data?, - withResult result: Request.ValidationResult) { - requestDidValidateRequestResponseDataWithResult?(request, urlRequest, response, data, result) - } - - open func request(_ request: DataRequest, didParseResponse response: DataResponse) { - requestDidParseResponse?(request, response) - } - - public func request(_ request: DataStreamRequest, didValidateRequest urlRequest: URLRequest?, response: HTTPURLResponse, withResult result: Request.ValidationResult) { - requestDidValidateRequestResponseWithResult?(request, urlRequest, response, result) - } - - open func request(_ request: UploadRequest, didCreateUploadable uploadable: UploadRequest.Uploadable) { - requestDidCreateUploadable?(request, uploadable) - } - - open func request(_ request: UploadRequest, didFailToCreateUploadableWithError error: AFError) { - requestDidFailToCreateUploadableWithError?(request, error) - } - - open func request(_ request: UploadRequest, didProvideInputStream stream: InputStream) { - requestDidProvideInputStream?(request, stream) - } - - open func request(_ request: DownloadRequest, didFinishDownloadingUsing task: URLSessionTask, with result: Result) { - requestDidFinishDownloadingUsingTaskWithResult?(request, task, result) - } - - open func request(_ request: DownloadRequest, didCreateDestinationURL url: URL) { - requestDidCreateDestinationURL?(request, url) - } - - open func request(_ request: DownloadRequest, - didValidateRequest urlRequest: URLRequest?, - response: HTTPURLResponse, - fileURL: URL?, - withResult result: Request.ValidationResult) { - requestDidValidateRequestResponseFileURLWithResult?(request, - urlRequest, - response, - fileURL, - result) - } - - open func request(_ request: DownloadRequest, didParseResponse response: DownloadResponse) { - requestDidParseDownloadResponse?(request, response) - } -} diff --git a/Pods/Alamofire/Source/HTTPHeaders.swift b/Pods/Alamofire/Source/HTTPHeaders.swift deleted file mode 100644 index 7829fc69..00000000 --- a/Pods/Alamofire/Source/HTTPHeaders.swift +++ /dev/null @@ -1,449 +0,0 @@ -// -// HTTPHeaders.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// An order-preserving and case-insensitive representation of HTTP headers. -public struct HTTPHeaders { - private var headers: [HTTPHeader] = [] - - /// Creates an empty instance. - public init() {} - - /// Creates an instance from an array of `HTTPHeader`s. Duplicate case-insensitive names are collapsed into the last - /// name and value encountered. - public init(_ headers: [HTTPHeader]) { - self.init() - - headers.forEach { update($0) } - } - - /// Creates an instance from a `[String: String]`. Duplicate case-insensitive names are collapsed into the last name - /// and value encountered. - public init(_ dictionary: [String: String]) { - self.init() - - dictionary.forEach { update(HTTPHeader(name: $0.key, value: $0.value)) } - } - - /// Case-insensitively updates or appends an `HTTPHeader` into the instance using the provided `name` and `value`. - /// - /// - Parameters: - /// - name: The `HTTPHeader` name. - /// - value: The `HTTPHeader value. - public mutating func add(name: String, value: String) { - update(HTTPHeader(name: name, value: value)) - } - - /// Case-insensitively updates or appends the provided `HTTPHeader` into the instance. - /// - /// - Parameter header: The `HTTPHeader` to update or append. - public mutating func add(_ header: HTTPHeader) { - update(header) - } - - /// Case-insensitively updates or appends an `HTTPHeader` into the instance using the provided `name` and `value`. - /// - /// - Parameters: - /// - name: The `HTTPHeader` name. - /// - value: The `HTTPHeader value. - public mutating func update(name: String, value: String) { - update(HTTPHeader(name: name, value: value)) - } - - /// Case-insensitively updates or appends the provided `HTTPHeader` into the instance. - /// - /// - Parameter header: The `HTTPHeader` to update or append. - public mutating func update(_ header: HTTPHeader) { - guard let index = headers.index(of: header.name) else { - headers.append(header) - return - } - - headers.replaceSubrange(index...index, with: [header]) - } - - /// Case-insensitively removes an `HTTPHeader`, if it exists, from the instance. - /// - /// - Parameter name: The name of the `HTTPHeader` to remove. - public mutating func remove(name: String) { - guard let index = headers.index(of: name) else { return } - - headers.remove(at: index) - } - - /// Sort the current instance by header name, case insensitively. - public mutating func sort() { - headers.sort { $0.name.lowercased() < $1.name.lowercased() } - } - - /// Returns an instance sorted by header name. - /// - /// - Returns: A copy of the current instance sorted by name. - public func sorted() -> HTTPHeaders { - var headers = self - headers.sort() - - return headers - } - - /// Case-insensitively find a header's value by name. - /// - /// - Parameter name: The name of the header to search for, case-insensitively. - /// - /// - Returns: The value of header, if it exists. - public func value(for name: String) -> String? { - guard let index = headers.index(of: name) else { return nil } - - return headers[index].value - } - - /// Case-insensitively access the header with the given name. - /// - /// - Parameter name: The name of the header. - public subscript(_ name: String) -> String? { - get { value(for: name) } - set { - if let value = newValue { - update(name: name, value: value) - } else { - remove(name: name) - } - } - } - - /// The dictionary representation of all headers. - /// - /// This representation does not preserve the current order of the instance. - public var dictionary: [String: String] { - let namesAndValues = headers.map { ($0.name, $0.value) } - - return Dictionary(namesAndValues, uniquingKeysWith: { _, last in last }) - } -} - -extension HTTPHeaders: ExpressibleByDictionaryLiteral { - public init(dictionaryLiteral elements: (String, String)...) { - self.init() - - elements.forEach { update(name: $0.0, value: $0.1) } - } -} - -extension HTTPHeaders: ExpressibleByArrayLiteral { - public init(arrayLiteral elements: HTTPHeader...) { - self.init(elements) - } -} - -extension HTTPHeaders: Sequence { - public func makeIterator() -> IndexingIterator<[HTTPHeader]> { - headers.makeIterator() - } -} - -extension HTTPHeaders: Collection { - public var startIndex: Int { - headers.startIndex - } - - public var endIndex: Int { - headers.endIndex - } - - public subscript(position: Int) -> HTTPHeader { - headers[position] - } - - public func index(after i: Int) -> Int { - headers.index(after: i) - } -} - -extension HTTPHeaders: CustomStringConvertible { - public var description: String { - headers.map { $0.description } - .joined(separator: "\n") - } -} - -// MARK: - HTTPHeader - -/// A representation of a single HTTP header's name / value pair. -public struct HTTPHeader: Hashable { - /// Name of the header. - public let name: String - - /// Value of the header. - public let value: String - - /// Creates an instance from the given `name` and `value`. - /// - /// - Parameters: - /// - name: The name of the header. - /// - value: The value of the header. - public init(name: String, value: String) { - self.name = name - self.value = value - } -} - -extension HTTPHeader: CustomStringConvertible { - public var description: String { - "\(name): \(value)" - } -} - -extension HTTPHeader { - /// Returns an `Accept` header. - /// - /// - Parameter value: The `Accept` value. - /// - Returns: The header. - public static func accept(_ value: String) -> HTTPHeader { - HTTPHeader(name: "Accept", value: value) - } - - /// Returns an `Accept-Charset` header. - /// - /// - Parameter value: The `Accept-Charset` value. - /// - Returns: The header. - public static func acceptCharset(_ value: String) -> HTTPHeader { - HTTPHeader(name: "Accept-Charset", value: value) - } - - /// Returns an `Accept-Language` header. - /// - /// Alamofire offers a default Accept-Language header that accumulates and encodes the system's preferred languages. - /// Use `HTTPHeader.defaultAcceptLanguage`. - /// - /// - Parameter value: The `Accept-Language` value. - /// - /// - Returns: The header. - public static func acceptLanguage(_ value: String) -> HTTPHeader { - HTTPHeader(name: "Accept-Language", value: value) - } - - /// Returns an `Accept-Encoding` header. - /// - /// Alamofire offers a default accept encoding value that provides the most common values. Use - /// `HTTPHeader.defaultAcceptEncoding`. - /// - /// - Parameter value: The `Accept-Encoding` value. - /// - /// - Returns: The header - public static func acceptEncoding(_ value: String) -> HTTPHeader { - HTTPHeader(name: "Accept-Encoding", value: value) - } - - /// Returns a `Basic` `Authorization` header using the `username` and `password` provided. - /// - /// - Parameters: - /// - username: The username of the header. - /// - password: The password of the header. - /// - /// - Returns: The header. - public static func authorization(username: String, password: String) -> HTTPHeader { - let credential = Data("\(username):\(password)".utf8).base64EncodedString() - - return authorization("Basic \(credential)") - } - - /// Returns a `Bearer` `Authorization` header using the `bearerToken` provided - /// - /// - Parameter bearerToken: The bearer token. - /// - /// - Returns: The header. - public static func authorization(bearerToken: String) -> HTTPHeader { - authorization("Bearer \(bearerToken)") - } - - /// Returns an `Authorization` header. - /// - /// Alamofire provides built-in methods to produce `Authorization` headers. For a Basic `Authorization` header use - /// `HTTPHeader.authorization(username:password:)`. For a Bearer `Authorization` header, use - /// `HTTPHeader.authorization(bearerToken:)`. - /// - /// - Parameter value: The `Authorization` value. - /// - /// - Returns: The header. - public static func authorization(_ value: String) -> HTTPHeader { - HTTPHeader(name: "Authorization", value: value) - } - - /// Returns a `Content-Disposition` header. - /// - /// - Parameter value: The `Content-Disposition` value. - /// - /// - Returns: The header. - public static func contentDisposition(_ value: String) -> HTTPHeader { - HTTPHeader(name: "Content-Disposition", value: value) - } - - /// Returns a `Content-Type` header. - /// - /// All Alamofire `ParameterEncoding`s and `ParameterEncoder`s set the `Content-Type` of the request, so it may not be necessary to manually - /// set this value. - /// - /// - Parameter value: The `Content-Type` value. - /// - /// - Returns: The header. - public static func contentType(_ value: String) -> HTTPHeader { - HTTPHeader(name: "Content-Type", value: value) - } - - /// Returns a `User-Agent` header. - /// - /// - Parameter value: The `User-Agent` value. - /// - /// - Returns: The header. - public static func userAgent(_ value: String) -> HTTPHeader { - HTTPHeader(name: "User-Agent", value: value) - } -} - -extension Array where Element == HTTPHeader { - /// Case-insensitively finds the index of an `HTTPHeader` with the provided name, if it exists. - func index(of name: String) -> Int? { - let lowercasedName = name.lowercased() - return firstIndex { $0.name.lowercased() == lowercasedName } - } -} - -// MARK: - Defaults - -extension HTTPHeaders { - /// The default set of `HTTPHeaders` used by Alamofire. Includes `Accept-Encoding`, `Accept-Language`, and - /// `User-Agent`. - public static let `default`: HTTPHeaders = [.defaultAcceptEncoding, - .defaultAcceptLanguage, - .defaultUserAgent] -} - -extension HTTPHeader { - /// Returns Alamofire's default `Accept-Encoding` header, appropriate for the encodings supported by particular OS - /// versions. - /// - /// See the [Accept-Encoding HTTP header documentation](https://tools.ietf.org/html/rfc7230#section-4.2.3) . - public static let defaultAcceptEncoding: HTTPHeader = { - let encodings: [String] - if #available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0, *) { - encodings = ["br", "gzip", "deflate"] - } else { - encodings = ["gzip", "deflate"] - } - - return .acceptEncoding(encodings.qualityEncoded()) - }() - - /// Returns Alamofire's default `Accept-Language` header, generated by querying `Locale` for the user's - /// `preferredLanguages`. - /// - /// See the [Accept-Language HTTP header documentation](https://tools.ietf.org/html/rfc7231#section-5.3.5). - public static let defaultAcceptLanguage: HTTPHeader = { - .acceptLanguage(Locale.preferredLanguages.prefix(6).qualityEncoded()) - }() - - /// Returns Alamofire's default `User-Agent` header. - /// - /// See the [User-Agent header documentation](https://tools.ietf.org/html/rfc7231#section-5.5.3). - /// - /// Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 13.0.0) Alamofire/5.0.0` - public static let defaultUserAgent: HTTPHeader = { - let info = Bundle.main.infoDictionary - let executable = (info?[kCFBundleExecutableKey as String] as? String) ?? - (ProcessInfo.processInfo.arguments.first?.split(separator: "/").last.map(String.init)) ?? - "Unknown" - let bundle = info?[kCFBundleIdentifierKey as String] as? String ?? "Unknown" - let appVersion = info?["CFBundleShortVersionString"] as? String ?? "Unknown" - let appBuild = info?[kCFBundleVersionKey as String] as? String ?? "Unknown" - - let osNameVersion: String = { - let version = ProcessInfo.processInfo.operatingSystemVersion - let versionString = "\(version.majorVersion).\(version.minorVersion).\(version.patchVersion)" - let osName: String = { - #if os(iOS) - #if targetEnvironment(macCatalyst) - return "macOS(Catalyst)" - #else - return "iOS" - #endif - #elseif os(watchOS) - return "watchOS" - #elseif os(tvOS) - return "tvOS" - #elseif os(macOS) - return "macOS" - #elseif os(Linux) - return "Linux" - #elseif os(Windows) - return "Windows" - #else - return "Unknown" - #endif - }() - - return "\(osName) \(versionString)" - }() - - let alamofireVersion = "Alamofire/\(version)" - - let userAgent = "\(executable)/\(appVersion) (\(bundle); build:\(appBuild); \(osNameVersion)) \(alamofireVersion)" - - return .userAgent(userAgent) - }() -} - -extension Collection where Element == String { - func qualityEncoded() -> String { - enumerated().map { index, encoding in - let quality = 1.0 - (Double(index) * 0.1) - return "\(encoding);q=\(quality)" - }.joined(separator: ", ") - } -} - -// MARK: - System Type Extensions - -extension URLRequest { - /// Returns `allHTTPHeaderFields` as `HTTPHeaders`. - public var headers: HTTPHeaders { - get { allHTTPHeaderFields.map(HTTPHeaders.init) ?? HTTPHeaders() } - set { allHTTPHeaderFields = newValue.dictionary } - } -} - -extension HTTPURLResponse { - /// Returns `allHeaderFields` as `HTTPHeaders`. - public var headers: HTTPHeaders { - (allHeaderFields as? [String: String]).map(HTTPHeaders.init) ?? HTTPHeaders() - } -} - -extension URLSessionConfiguration { - /// Returns `httpAdditionalHeaders` as `HTTPHeaders`. - public var headers: HTTPHeaders { - get { (httpAdditionalHeaders as? [String: String]).map(HTTPHeaders.init) ?? HTTPHeaders() } - set { httpAdditionalHeaders = newValue.dictionary } - } -} diff --git a/Pods/Alamofire/Source/HTTPMethod.swift b/Pods/Alamofire/Source/HTTPMethod.swift deleted file mode 100644 index 4867c1e9..00000000 --- a/Pods/Alamofire/Source/HTTPMethod.swift +++ /dev/null @@ -1,54 +0,0 @@ -// -// HTTPMethod.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -/// Type representing HTTP methods. Raw `String` value is stored and compared case-sensitively, so -/// `HTTPMethod.get != HTTPMethod(rawValue: "get")`. -/// -/// See https://tools.ietf.org/html/rfc7231#section-4.3 -public struct HTTPMethod: RawRepresentable, Equatable, Hashable { - /// `CONNECT` method. - public static let connect = HTTPMethod(rawValue: "CONNECT") - /// `DELETE` method. - public static let delete = HTTPMethod(rawValue: "DELETE") - /// `GET` method. - public static let get = HTTPMethod(rawValue: "GET") - /// `HEAD` method. - public static let head = HTTPMethod(rawValue: "HEAD") - /// `OPTIONS` method. - public static let options = HTTPMethod(rawValue: "OPTIONS") - /// `PATCH` method. - public static let patch = HTTPMethod(rawValue: "PATCH") - /// `POST` method. - public static let post = HTTPMethod(rawValue: "POST") - /// `PUT` method. - public static let put = HTTPMethod(rawValue: "PUT") - /// `TRACE` method. - public static let trace = HTTPMethod(rawValue: "TRACE") - - public let rawValue: String - - public init(rawValue: String) { - self.rawValue = rawValue - } -} diff --git a/Pods/Alamofire/Source/MultipartFormData.swift b/Pods/Alamofire/Source/MultipartFormData.swift deleted file mode 100644 index d9cecef5..00000000 --- a/Pods/Alamofire/Source/MultipartFormData.swift +++ /dev/null @@ -1,553 +0,0 @@ -// -// MultipartFormData.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -#if os(iOS) || os(watchOS) || os(tvOS) -import MobileCoreServices -#elseif os(macOS) -import CoreServices -#endif - -/// Constructs `multipart/form-data` for uploads within an HTTP or HTTPS body. There are currently two ways to encode -/// multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead -/// to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the -/// data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for -/// larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset. -/// -/// For more information on `multipart/form-data` in general, please refer to the RFC-2388 and RFC-2045 specs as well -/// and the w3 form documentation. -/// -/// - https://www.ietf.org/rfc/rfc2388.txt -/// - https://www.ietf.org/rfc/rfc2045.txt -/// - https://www.w3.org/TR/html401/interact/forms.html#h-17.13 -open class MultipartFormData { - // MARK: - Helper Types - - enum EncodingCharacters { - static let crlf = "\r\n" - } - - enum BoundaryGenerator { - enum BoundaryType { - case initial, encapsulated, final - } - - static func randomBoundary() -> String { - let first = UInt32.random(in: UInt32.min...UInt32.max) - let second = UInt32.random(in: UInt32.min...UInt32.max) - - return String(format: "alamofire.boundary.%08x%08x", first, second) - } - - static func boundaryData(forBoundaryType boundaryType: BoundaryType, boundary: String) -> Data { - let boundaryText: String - - switch boundaryType { - case .initial: - boundaryText = "--\(boundary)\(EncodingCharacters.crlf)" - case .encapsulated: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)\(EncodingCharacters.crlf)" - case .final: - boundaryText = "\(EncodingCharacters.crlf)--\(boundary)--\(EncodingCharacters.crlf)" - } - - return Data(boundaryText.utf8) - } - } - - class BodyPart { - let headers: HTTPHeaders - let bodyStream: InputStream - let bodyContentLength: UInt64 - var hasInitialBoundary = false - var hasFinalBoundary = false - - init(headers: HTTPHeaders, bodyStream: InputStream, bodyContentLength: UInt64) { - self.headers = headers - self.bodyStream = bodyStream - self.bodyContentLength = bodyContentLength - } - } - - // MARK: - Properties - - /// Default memory threshold used when encoding `MultipartFormData`, in bytes. - public static let encodingMemoryThreshold: UInt64 = 10_000_000 - - /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" - - /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. - public var contentLength: UInt64 { bodyParts.reduce(0) { $0 + $1.bodyContentLength } } - - /// The boundary used to separate the body parts in the encoded form data. - public let boundary: String - - let fileManager: FileManager - - private var bodyParts: [BodyPart] - private var bodyPartError: AFError? - private let streamBufferSize: Int - - // MARK: - Lifecycle - - /// Creates an instance. - /// - /// - Parameters: - /// - fileManager: `FileManager` to use for file operations, if needed. - /// - boundary: Boundary `String` used to separate body parts. - public init(fileManager: FileManager = .default, boundary: String? = nil) { - self.fileManager = fileManager - self.boundary = boundary ?? BoundaryGenerator.randomBoundary() - bodyParts = [] - - // - // The optimal read/write buffer size in bytes for input and output streams is 1024 (1KB). For more - // information, please refer to the following article: - // - https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Streams/Articles/ReadingInputStreams.html - // - streamBufferSize = 1024 - } - - // MARK: - Body Parts - - /// Creates a body part from the data and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - Parameters: - /// - data: `Data` to encoding into the instance. - /// - name: Name to associate with the `Data` in the `Content-Disposition` HTTP header. - /// - fileName: Filename to associate with the `Data` in the `Content-Disposition` HTTP header. - /// - mimeType: MIME type to associate with the data in the `Content-Type` HTTP header. - public func append(_ data: Data, withName name: String, fileName: String? = nil, mimeType: String? = nil) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - let stream = InputStream(data: data) - let length = UInt64(data.count) - - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part from the file and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{generated filename}` (HTTP Header) - /// - `Content-Type: #{generated mimeType}` (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// The filename in the `Content-Disposition` HTTP header is generated from the last path component of the - /// `fileURL`. The `Content-Type` HTTP header MIME type is generated by mapping the `fileURL` extension to the - /// system associated MIME type. - /// - /// - Parameters: - /// - fileURL: `URL` of the file whose content will be encoded into the instance. - /// - name: Name to associate with the file content in the `Content-Disposition` HTTP header. - public func append(_ fileURL: URL, withName name: String) { - let fileName = fileURL.lastPathComponent - let pathExtension = fileURL.pathExtension - - if !fileName.isEmpty && !pathExtension.isEmpty { - let mime = mimeType(forPathExtension: pathExtension) - append(fileURL, withName: name, fileName: fileName, mimeType: mime) - } else { - setBodyPartError(withReason: .bodyPartFilenameInvalid(in: fileURL)) - } - } - - /// Creates a body part from the file and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header) - /// - Content-Type: #{mimeType} (HTTP Header) - /// - Encoded file data - /// - Multipart form boundary - /// - /// - Parameters: - /// - fileURL: `URL` of the file whose content will be encoded into the instance. - /// - name: Name to associate with the file content in the `Content-Disposition` HTTP header. - /// - fileName: Filename to associate with the file content in the `Content-Disposition` HTTP header. - /// - mimeType: MIME type to associate with the file content in the `Content-Type` HTTP header. - public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - - //============================================================ - // Check 1 - is file URL? - //============================================================ - - guard fileURL.isFileURL else { - setBodyPartError(withReason: .bodyPartURLInvalid(url: fileURL)) - return - } - - //============================================================ - // Check 2 - is file URL reachable? - //============================================================ - - do { - let isReachable = try fileURL.checkPromisedItemIsReachable() - guard isReachable else { - setBodyPartError(withReason: .bodyPartFileNotReachable(at: fileURL)) - return - } - } catch { - setBodyPartError(withReason: .bodyPartFileNotReachableWithError(atURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 3 - is file URL a directory? - //============================================================ - - var isDirectory: ObjCBool = false - let path = fileURL.path - - guard fileManager.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { - setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) - return - } - - //============================================================ - // Check 4 - can the file size be extracted? - //============================================================ - - let bodyContentLength: UInt64 - - do { - guard let fileSize = try fileManager.attributesOfItem(atPath: path)[.size] as? NSNumber else { - setBodyPartError(withReason: .bodyPartFileSizeNotAvailable(at: fileURL)) - return - } - - bodyContentLength = fileSize.uint64Value - } catch { - setBodyPartError(withReason: .bodyPartFileSizeQueryFailedWithError(forURL: fileURL, error: error)) - return - } - - //============================================================ - // Check 5 - can a stream be created from file URL? - //============================================================ - - guard let stream = InputStream(url: fileURL) else { - setBodyPartError(withReason: .bodyPartInputStreamCreationFailed(for: fileURL)) - return - } - - append(stream, withLength: bodyContentLength, headers: headers) - } - - /// Creates a body part from the stream and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - `Content-Disposition: form-data; name=#{name}; filename=#{filename}` (HTTP Header) - /// - `Content-Type: #{mimeType}` (HTTP Header) - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - Parameters: - /// - stream: `InputStream` to encode into the instance. - /// - length: Length, in bytes, of the stream. - /// - name: Name to associate with the stream content in the `Content-Disposition` HTTP header. - /// - fileName: Filename to associate with the stream content in the `Content-Disposition` HTTP header. - /// - mimeType: MIME type to associate with the stream content in the `Content-Type` HTTP header. - public func append(_ stream: InputStream, - withLength length: UInt64, - name: String, - fileName: String, - mimeType: String) { - let headers = contentHeaders(withName: name, fileName: fileName, mimeType: mimeType) - append(stream, withLength: length, headers: headers) - } - - /// Creates a body part with the stream, length, and headers and appends it to the instance. - /// - /// The body part data will be encoded using the following format: - /// - /// - HTTP headers - /// - Encoded stream data - /// - Multipart form boundary - /// - /// - Parameters: - /// - stream: `InputStream` to encode into the instance. - /// - length: Length, in bytes, of the stream. - /// - headers: `HTTPHeaders` for the body part. - public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders) { - let bodyPart = BodyPart(headers: headers, bodyStream: stream, bodyContentLength: length) - bodyParts.append(bodyPart) - } - - // MARK: - Data Encoding - - /// Encodes all appended body parts into a single `Data` value. - /// - /// - Note: This method will load all the appended body parts into memory all at the same time. This method should - /// only be used when the encoded data will have a small memory footprint. For large data cases, please use - /// the `writeEncodedData(to:))` method. - /// - /// - Returns: The encoded `Data`, if encoding is successful. - /// - Throws: An `AFError` if encoding encounters an error. - public func encode() throws -> Data { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - var encoded = Data() - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - let encodedData = try encode(bodyPart) - encoded.append(encodedData) - } - - return encoded - } - - /// Writes all appended body parts to the given file `URL`. - /// - /// This process is facilitated by reading and writing with input and output streams, respectively. Thus, - /// this approach is very memory efficient and should be used for large body part data. - /// - /// - Parameter fileURL: File `URL` to which to write the form data. - /// - Throws: An `AFError` if encoding encounters an error. - public func writeEncodedData(to fileURL: URL) throws { - if let bodyPartError = bodyPartError { - throw bodyPartError - } - - if fileManager.fileExists(atPath: fileURL.path) { - throw AFError.multipartEncodingFailed(reason: .outputStreamFileAlreadyExists(at: fileURL)) - } else if !fileURL.isFileURL { - throw AFError.multipartEncodingFailed(reason: .outputStreamURLInvalid(url: fileURL)) - } - - guard let outputStream = OutputStream(url: fileURL, append: false) else { - throw AFError.multipartEncodingFailed(reason: .outputStreamCreationFailed(for: fileURL)) - } - - outputStream.open() - defer { outputStream.close() } - - bodyParts.first?.hasInitialBoundary = true - bodyParts.last?.hasFinalBoundary = true - - for bodyPart in bodyParts { - try write(bodyPart, to: outputStream) - } - } - - // MARK: - Private - Body Part Encoding - - private func encode(_ bodyPart: BodyPart) throws -> Data { - var encoded = Data() - - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - encoded.append(initialData) - - let headerData = encodeHeaders(for: bodyPart) - encoded.append(headerData) - - let bodyStreamData = try encodeBodyStream(for: bodyPart) - encoded.append(bodyStreamData) - - if bodyPart.hasFinalBoundary { - encoded.append(finalBoundaryData()) - } - - return encoded - } - - private func encodeHeaders(for bodyPart: BodyPart) -> Data { - let headerText = bodyPart.headers.map { "\($0.name): \($0.value)\(EncodingCharacters.crlf)" } - .joined() - + EncodingCharacters.crlf - - return Data(headerText.utf8) - } - - private func encodeBodyStream(for bodyPart: BodyPart) throws -> Data { - let inputStream = bodyPart.bodyStream - inputStream.open() - defer { inputStream.close() } - - var encoded = Data() - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let error = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) - } - - if bytesRead > 0 { - encoded.append(buffer, count: bytesRead) - } else { - break - } - } - - guard UInt64(encoded.count) == bodyPart.bodyContentLength else { - let error = AFError.UnexpectedInputStreamLength(bytesExpected: bodyPart.bodyContentLength, - bytesRead: UInt64(encoded.count)) - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: error)) - } - - return encoded - } - - // MARK: - Private - Writing Body Part to Output Stream - - private func write(_ bodyPart: BodyPart, to outputStream: OutputStream) throws { - try writeInitialBoundaryData(for: bodyPart, to: outputStream) - try writeHeaderData(for: bodyPart, to: outputStream) - try writeBodyStream(for: bodyPart, to: outputStream) - try writeFinalBoundaryData(for: bodyPart, to: outputStream) - } - - private func writeInitialBoundaryData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let initialData = bodyPart.hasInitialBoundary ? initialBoundaryData() : encapsulatedBoundaryData() - return try write(initialData, to: outputStream) - } - - private func writeHeaderData(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let headerData = encodeHeaders(for: bodyPart) - return try write(headerData, to: outputStream) - } - - private func writeBodyStream(for bodyPart: BodyPart, to outputStream: OutputStream) throws { - let inputStream = bodyPart.bodyStream - - inputStream.open() - defer { inputStream.close() } - - while inputStream.hasBytesAvailable { - var buffer = [UInt8](repeating: 0, count: streamBufferSize) - let bytesRead = inputStream.read(&buffer, maxLength: streamBufferSize) - - if let streamError = inputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .inputStreamReadFailed(error: streamError)) - } - - if bytesRead > 0 { - if buffer.count != bytesRead { - buffer = Array(buffer[0.. 0, outputStream.hasSpaceAvailable { - let bytesWritten = outputStream.write(buffer, maxLength: bytesToWrite) - - if let error = outputStream.streamError { - throw AFError.multipartEncodingFailed(reason: .outputStreamWriteFailed(error: error)) - } - - bytesToWrite -= bytesWritten - - if bytesToWrite > 0 { - buffer = Array(buffer[bytesWritten.. String { - if - let id = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, pathExtension as CFString, nil)?.takeRetainedValue(), - let contentType = UTTypeCopyPreferredTagWithClass(id, kUTTagClassMIMEType)?.takeRetainedValue() { - return contentType as String - } - - return "application/octet-stream" - } - - // MARK: - Private - Content Headers - - private func contentHeaders(withName name: String, fileName: String? = nil, mimeType: String? = nil) -> HTTPHeaders { - var disposition = "form-data; name=\"\(name)\"" - if let fileName = fileName { disposition += "; filename=\"\(fileName)\"" } - - var headers: HTTPHeaders = [.contentDisposition(disposition)] - if let mimeType = mimeType { headers.add(.contentType(mimeType)) } - - return headers - } - - // MARK: - Private - Boundary Encoding - - private func initialBoundaryData() -> Data { - BoundaryGenerator.boundaryData(forBoundaryType: .initial, boundary: boundary) - } - - private func encapsulatedBoundaryData() -> Data { - BoundaryGenerator.boundaryData(forBoundaryType: .encapsulated, boundary: boundary) - } - - private func finalBoundaryData() -> Data { - BoundaryGenerator.boundaryData(forBoundaryType: .final, boundary: boundary) - } - - // MARK: - Private - Errors - - private func setBodyPartError(withReason reason: AFError.MultipartEncodingFailureReason) { - guard bodyPartError == nil else { return } - bodyPartError = AFError.multipartEncodingFailed(reason: reason) - } -} diff --git a/Pods/Alamofire/Source/MultipartUpload.swift b/Pods/Alamofire/Source/MultipartUpload.swift deleted file mode 100644 index 606bd33e..00000000 --- a/Pods/Alamofire/Source/MultipartUpload.swift +++ /dev/null @@ -1,89 +0,0 @@ -// -// MultipartUpload.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Internal type which encapsulates a `MultipartFormData` upload. -final class MultipartUpload { - lazy var result = Result { try build() } - - @Protected - private(set) var multipartFormData: MultipartFormData - let encodingMemoryThreshold: UInt64 - let request: URLRequestConvertible - let fileManager: FileManager - - init(encodingMemoryThreshold: UInt64, - request: URLRequestConvertible, - multipartFormData: MultipartFormData) { - self.encodingMemoryThreshold = encodingMemoryThreshold - self.request = request - fileManager = multipartFormData.fileManager - self.multipartFormData = multipartFormData - } - - func build() throws -> UploadRequest.Uploadable { - let uploadable: UploadRequest.Uploadable - if multipartFormData.contentLength < encodingMemoryThreshold { - let data = try multipartFormData.encode() - - uploadable = .data(data) - } else { - let tempDirectoryURL = fileManager.temporaryDirectory - let directoryURL = tempDirectoryURL.appendingPathComponent("org.alamofire.manager/multipart.form.data") - let fileName = UUID().uuidString - let fileURL = directoryURL.appendingPathComponent(fileName) - - try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) - - do { - try multipartFormData.writeEncodedData(to: fileURL) - } catch { - // Cleanup after attempted write if it fails. - try? fileManager.removeItem(at: fileURL) - throw error - } - - uploadable = .file(fileURL, shouldRemove: true) - } - - return uploadable - } -} - -extension MultipartUpload: UploadConvertible { - func asURLRequest() throws -> URLRequest { - var urlRequest = try request.asURLRequest() - - $multipartFormData.read { multipartFormData in - urlRequest.headers.add(.contentType(multipartFormData.contentType)) - } - - return urlRequest - } - - func createUploadable() throws -> UploadRequest.Uploadable { - try result.get() - } -} diff --git a/Pods/Alamofire/Source/NetworkReachabilityManager.swift b/Pods/Alamofire/Source/NetworkReachabilityManager.swift deleted file mode 100644 index b97b62fa..00000000 --- a/Pods/Alamofire/Source/NetworkReachabilityManager.swift +++ /dev/null @@ -1,267 +0,0 @@ -// -// NetworkReachabilityManager.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#if !(os(watchOS) || os(Linux)) - -import Foundation -import SystemConfiguration - -/// The `NetworkReachabilityManager` class listens for reachability changes of hosts and addresses for both cellular and -/// WiFi network interfaces. -/// -/// Reachability can be used to determine background information about why a network operation failed, or to retry -/// network requests when a connection is established. It should not be used to prevent a user from initiating a network -/// request, as it's possible that an initial request may be required to establish reachability. -open class NetworkReachabilityManager { - /// Defines the various states of network reachability. - public enum NetworkReachabilityStatus { - /// It is unknown whether the network is reachable. - case unknown - /// The network is not reachable. - case notReachable - /// The network is reachable on the associated `ConnectionType`. - case reachable(ConnectionType) - - init(_ flags: SCNetworkReachabilityFlags) { - guard flags.isActuallyReachable else { self = .notReachable; return } - - var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - - if flags.isCellular { networkStatus = .reachable(.cellular) } - - self = networkStatus - } - - /// Defines the various connection types detected by reachability flags. - public enum ConnectionType { - /// The connection type is either over Ethernet or WiFi. - case ethernetOrWiFi - /// The connection type is a cellular connection. - case cellular - } - } - - /// A closure executed when the network reachability status changes. The closure takes a single argument: the - /// network reachability status. - public typealias Listener = (NetworkReachabilityStatus) -> Void - - /// Default `NetworkReachabilityManager` for the zero address and a `listenerQueue` of `.main`. - public static let `default` = NetworkReachabilityManager() - - // MARK: - Properties - - /// Whether the network is currently reachable. - open var isReachable: Bool { isReachableOnCellular || isReachableOnEthernetOrWiFi } - - /// Whether the network is currently reachable over the cellular interface. - /// - /// - Note: Using this property to decide whether to make a high or low bandwidth request is not recommended. - /// Instead, set the `allowsCellularAccess` on any `URLRequest`s being issued. - /// - open var isReachableOnCellular: Bool { status == .reachable(.cellular) } - - /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { status == .reachable(.ethernetOrWiFi) } - - /// `DispatchQueue` on which reachability will update. - public let reachabilityQueue = DispatchQueue(label: "org.alamofire.reachabilityQueue") - - /// Flags of the current reachability type, if any. - open var flags: SCNetworkReachabilityFlags? { - var flags = SCNetworkReachabilityFlags() - - return (SCNetworkReachabilityGetFlags(reachability, &flags)) ? flags : nil - } - - /// The current network reachability status. - open var status: NetworkReachabilityStatus { - flags.map(NetworkReachabilityStatus.init) ?? .unknown - } - - /// Mutable state storage. - struct MutableState { - /// A closure executed when the network reachability status changes. - var listener: Listener? - /// `DispatchQueue` on which listeners will be called. - var listenerQueue: DispatchQueue? - /// Previously calculated status. - var previousStatus: NetworkReachabilityStatus? - } - - /// `SCNetworkReachability` instance providing notifications. - private let reachability: SCNetworkReachability - - /// Protected storage for mutable state. - @Protected - private var mutableState = MutableState() - - // MARK: - Initialization - - /// Creates an instance with the specified host. - /// - /// - Note: The `host` value must *not* contain a scheme, just the hostname. - /// - /// - Parameters: - /// - host: Host used to evaluate network reachability. Must *not* include the scheme (e.g. `https`). - public convenience init?(host: String) { - guard let reachability = SCNetworkReachabilityCreateWithName(nil, host) else { return nil } - - self.init(reachability: reachability) - } - - /// Creates an instance that monitors the address 0.0.0.0. - /// - /// Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing - /// status of the device, both IPv4 and IPv6. - public convenience init?() { - var zero = sockaddr() - zero.sa_len = UInt8(MemoryLayout.size) - zero.sa_family = sa_family_t(AF_INET) - - guard let reachability = SCNetworkReachabilityCreateWithAddress(nil, &zero) else { return nil } - - self.init(reachability: reachability) - } - - private init(reachability: SCNetworkReachability) { - self.reachability = reachability - } - - deinit { - stopListening() - } - - // MARK: - Listening - - /// Starts listening for changes in network reachability status. - /// - /// - Note: Stops and removes any existing listener. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which to call the `listener` closure. `.main` by default. - /// - listener: `Listener` closure called when reachability changes. - /// - /// - Returns: `true` if listening was started successfully, `false` otherwise. - @discardableResult - open func startListening(onQueue queue: DispatchQueue = .main, - onUpdatePerforming listener: @escaping Listener) -> Bool { - stopListening() - - $mutableState.write { state in - state.listenerQueue = queue - state.listener = listener - } - - var context = SCNetworkReachabilityContext(version: 0, - info: Unmanaged.passUnretained(self).toOpaque(), - retain: nil, - release: nil, - copyDescription: nil) - let callback: SCNetworkReachabilityCallBack = { _, flags, info in - guard let info = info else { return } - - let instance = Unmanaged.fromOpaque(info).takeUnretainedValue() - instance.notifyListener(flags) - } - - let queueAdded = SCNetworkReachabilitySetDispatchQueue(reachability, reachabilityQueue) - let callbackAdded = SCNetworkReachabilitySetCallback(reachability, callback, &context) - - // Manually call listener to give initial state, since the framework may not. - if let currentFlags = flags { - reachabilityQueue.async { - self.notifyListener(currentFlags) - } - } - - return callbackAdded && queueAdded - } - - /// Stops listening for changes in network reachability status. - open func stopListening() { - SCNetworkReachabilitySetCallback(reachability, nil, nil) - SCNetworkReachabilitySetDispatchQueue(reachability, nil) - $mutableState.write { state in - state.listener = nil - state.listenerQueue = nil - state.previousStatus = nil - } - } - - // MARK: - Internal - Listener Notification - - /// Calls the `listener` closure of the `listenerQueue` if the computed status hasn't changed. - /// - /// - Note: Should only be called from the `reachabilityQueue`. - /// - /// - Parameter flags: `SCNetworkReachabilityFlags` to use to calculate the status. - func notifyListener(_ flags: SCNetworkReachabilityFlags) { - let newStatus = NetworkReachabilityStatus(flags) - - $mutableState.write { state in - guard state.previousStatus != newStatus else { return } - - state.previousStatus = newStatus - - let listener = state.listener - state.listenerQueue?.async { listener?(newStatus) } - } - } -} - -// MARK: - - -extension NetworkReachabilityManager.NetworkReachabilityStatus: Equatable {} - -extension SCNetworkReachabilityFlags { - var isReachable: Bool { contains(.reachable) } - var isConnectionRequired: Bool { contains(.connectionRequired) } - var canConnectAutomatically: Bool { contains(.connectionOnDemand) || contains(.connectionOnTraffic) } - var canConnectWithoutUserInteraction: Bool { canConnectAutomatically && !contains(.interventionRequired) } - var isActuallyReachable: Bool { isReachable && (!isConnectionRequired || canConnectWithoutUserInteraction) } - var isCellular: Bool { - #if os(iOS) || os(tvOS) - return contains(.isWWAN) - #else - return false - #endif - } - - /// Human readable `String` for all states, to help with debugging. - var readableDescription: String { - let W = isCellular ? "W" : "-" - let R = isReachable ? "R" : "-" - let c = isConnectionRequired ? "c" : "-" - let t = contains(.transientConnection) ? "t" : "-" - let i = contains(.interventionRequired) ? "i" : "-" - let C = contains(.connectionOnTraffic) ? "C" : "-" - let D = contains(.connectionOnDemand) ? "D" : "-" - let l = contains(.isLocalAddress) ? "l" : "-" - let d = contains(.isDirect) ? "d" : "-" - let a = contains(.connectionAutomatic) ? "a" : "-" - - return "\(W)\(R) \(c)\(t)\(i)\(C)\(D)\(l)\(d)\(a)" - } -} -#endif diff --git a/Pods/Alamofire/Source/Notifications.swift b/Pods/Alamofire/Source/Notifications.swift deleted file mode 100644 index 66434b6e..00000000 --- a/Pods/Alamofire/Source/Notifications.swift +++ /dev/null @@ -1,115 +0,0 @@ -// -// Notifications.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Request { - /// Posted when a `Request` is resumed. The `Notification` contains the resumed `Request`. - public static let didResumeNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResume") - /// Posted when a `Request` is suspended. The `Notification` contains the suspended `Request`. - public static let didSuspendNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspend") - /// Posted when a `Request` is cancelled. The `Notification` contains the cancelled `Request`. - public static let didCancelNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancel") - /// Posted when a `Request` is finished. The `Notification` contains the completed `Request`. - public static let didFinishNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didFinish") - - /// Posted when a `URLSessionTask` is resumed. The `Notification` contains the `Request` associated with the `URLSessionTask`. - public static let didResumeTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didResumeTask") - /// Posted when a `URLSessionTask` is suspended. The `Notification` contains the `Request` associated with the `URLSessionTask`. - public static let didSuspendTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didSuspendTask") - /// Posted when a `URLSessionTask` is cancelled. The `Notification` contains the `Request` associated with the `URLSessionTask`. - public static let didCancelTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCancelTask") - /// Posted when a `URLSessionTask` is completed. The `Notification` contains the `Request` associated with the `URLSessionTask`. - public static let didCompleteTaskNotification = Notification.Name(rawValue: "org.alamofire.notification.name.request.didCompleteTask") -} - -// MARK: - - -extension Notification { - /// The `Request` contained by the instance's `userInfo`, `nil` otherwise. - public var request: Request? { - userInfo?[String.requestKey] as? Request - } - - /// Convenience initializer for a `Notification` containing a `Request` payload. - /// - /// - Parameters: - /// - name: The name of the notification. - /// - request: The `Request` payload. - init(name: Notification.Name, request: Request) { - self.init(name: name, object: nil, userInfo: [String.requestKey: request]) - } -} - -extension NotificationCenter { - /// Convenience function for posting notifications with `Request` payloads. - /// - /// - Parameters: - /// - name: The name of the notification. - /// - request: The `Request` payload. - func postNotification(named name: Notification.Name, with request: Request) { - let notification = Notification(name: name, request: request) - post(notification) - } -} - -extension String { - /// User info dictionary key representing the `Request` associated with the notification. - fileprivate static let requestKey = "org.alamofire.notification.key.request" -} - -/// `EventMonitor` that provides Alamofire's notifications. -public final class AlamofireNotifications: EventMonitor { - public func requestDidResume(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didResumeNotification, with: request) - } - - public func requestDidSuspend(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didSuspendNotification, with: request) - } - - public func requestDidCancel(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didCancelNotification, with: request) - } - - public func requestDidFinish(_ request: Request) { - NotificationCenter.default.postNotification(named: Request.didFinishNotification, with: request) - } - - public func request(_ request: Request, didResumeTask task: URLSessionTask) { - NotificationCenter.default.postNotification(named: Request.didResumeTaskNotification, with: request) - } - - public func request(_ request: Request, didSuspendTask task: URLSessionTask) { - NotificationCenter.default.postNotification(named: Request.didSuspendTaskNotification, with: request) - } - - public func request(_ request: Request, didCancelTask task: URLSessionTask) { - NotificationCenter.default.postNotification(named: Request.didCancelTaskNotification, with: request) - } - - public func request(_ request: Request, didCompleteTask task: URLSessionTask, with error: AFError?) { - NotificationCenter.default.postNotification(named: Request.didCompleteTaskNotification, with: request) - } -} diff --git a/Pods/Alamofire/Source/OperationQueue+Alamofire.swift b/Pods/Alamofire/Source/OperationQueue+Alamofire.swift deleted file mode 100644 index b06a0ccc..00000000 --- a/Pods/Alamofire/Source/OperationQueue+Alamofire.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// OperationQueue+Alamofire.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension OperationQueue { - /// Creates an instance using the provided parameters. - /// - /// - Parameters: - /// - qualityOfService: `QualityOfService` to be applied to the queue. `.default` by default. - /// - maxConcurrentOperationCount: Maximum concurrent operations. - /// `OperationQueue.defaultMaxConcurrentOperationCount` by default. - /// - underlyingQueue: Underlying `DispatchQueue`. `nil` by default. - /// - name: Name for the queue. `nil` by default. - /// - startSuspended: Whether the queue starts suspended. `false` by default. - convenience init(qualityOfService: QualityOfService = .default, - maxConcurrentOperationCount: Int = OperationQueue.defaultMaxConcurrentOperationCount, - underlyingQueue: DispatchQueue? = nil, - name: String? = nil, - startSuspended: Bool = false) { - self.init() - self.qualityOfService = qualityOfService - self.maxConcurrentOperationCount = maxConcurrentOperationCount - self.underlyingQueue = underlyingQueue - self.name = name - isSuspended = startSuspended - } -} diff --git a/Pods/Alamofire/Source/ParameterEncoder.swift b/Pods/Alamofire/Source/ParameterEncoder.swift deleted file mode 100644 index f4facbee..00000000 --- a/Pods/Alamofire/Source/ParameterEncoder.swift +++ /dev/null @@ -1,184 +0,0 @@ -// -// ParameterEncoder.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that can encode any `Encodable` type into a `URLRequest`. -public protocol ParameterEncoder { - /// Encode the provided `Encodable` parameters into `request`. - /// - /// - Parameters: - /// - parameters: The `Encodable` parameter value. - /// - request: The `URLRequest` into which to encode the parameters. - /// - /// - Returns: A `URLRequest` with the result of the encoding. - /// - Throws: An `Error` when encoding fails. For Alamofire provided encoders, this will be an instance of - /// `AFError.parameterEncoderFailed` with an associated `ParameterEncoderFailureReason`. - func encode(_ parameters: Parameters?, into request: URLRequest) throws -> URLRequest -} - -/// A `ParameterEncoder` that encodes types as JSON body data. -/// -/// If no `Content-Type` header is already set on the provided `URLRequest`s, it's set to `application/json`. -open class JSONParameterEncoder: ParameterEncoder { - /// Returns an encoder with default parameters. - public static var `default`: JSONParameterEncoder { JSONParameterEncoder() } - - /// Returns an encoder with `JSONEncoder.outputFormatting` set to `.prettyPrinted`. - public static var prettyPrinted: JSONParameterEncoder { - let encoder = JSONEncoder() - encoder.outputFormatting = .prettyPrinted - - return JSONParameterEncoder(encoder: encoder) - } - - /// Returns an encoder with `JSONEncoder.outputFormatting` set to `.sortedKeys`. - @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) - public static var sortedKeys: JSONParameterEncoder { - let encoder = JSONEncoder() - encoder.outputFormatting = .sortedKeys - - return JSONParameterEncoder(encoder: encoder) - } - - /// `JSONEncoder` used to encode parameters. - public let encoder: JSONEncoder - - /// Creates an instance with the provided `JSONEncoder`. - /// - /// - Parameter encoder: The `JSONEncoder`. `JSONEncoder()` by default. - public init(encoder: JSONEncoder = JSONEncoder()) { - self.encoder = encoder - } - - open func encode(_ parameters: Parameters?, - into request: URLRequest) throws -> URLRequest { - guard let parameters = parameters else { return request } - - var request = request - - do { - let data = try encoder.encode(parameters) - request.httpBody = data - if request.headers["Content-Type"] == nil { - request.headers.update(.contentType("application/json")) - } - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return request - } -} - -/// A `ParameterEncoder` that encodes types as URL-encoded query strings to be set on the URL or as body data, depending -/// on the `Destination` set. -/// -/// If no `Content-Type` header is already set on the provided `URLRequest`s, it will be set to -/// `application/x-www-form-urlencoded; charset=utf-8`. -/// -/// Encoding behavior can be customized by passing an instance of `URLEncodedFormEncoder` to the initializer. -open class URLEncodedFormParameterEncoder: ParameterEncoder { - /// Defines where the URL-encoded string should be set for each `URLRequest`. - public enum Destination { - /// Applies the encoded query string to any existing query string for `.get`, `.head`, and `.delete` request. - /// Sets it to the `httpBody` for all other methods. - case methodDependent - /// Applies the encoded query string to any existing query string from the `URLRequest`. - case queryString - /// Applies the encoded query string to the `httpBody` of the `URLRequest`. - case httpBody - - /// Determines whether the URL-encoded string should be applied to the `URLRequest`'s `url`. - /// - /// - Parameter method: The `HTTPMethod`. - /// - /// - Returns: Whether the URL-encoded string should be applied to a `URL`. - func encodesParametersInURL(for method: HTTPMethod) -> Bool { - switch self { - case .methodDependent: return [.get, .head, .delete].contains(method) - case .queryString: return true - case .httpBody: return false - } - } - } - - /// Returns an encoder with default parameters. - public static var `default`: URLEncodedFormParameterEncoder { URLEncodedFormParameterEncoder() } - - /// The `URLEncodedFormEncoder` to use. - public let encoder: URLEncodedFormEncoder - - /// The `Destination` for the URL-encoded string. - public let destination: Destination - - /// Creates an instance with the provided `URLEncodedFormEncoder` instance and `Destination` value. - /// - /// - Parameters: - /// - encoder: The `URLEncodedFormEncoder`. `URLEncodedFormEncoder()` by default. - /// - destination: The `Destination`. `.methodDependent` by default. - public init(encoder: URLEncodedFormEncoder = URLEncodedFormEncoder(), destination: Destination = .methodDependent) { - self.encoder = encoder - self.destination = destination - } - - open func encode(_ parameters: Parameters?, - into request: URLRequest) throws -> URLRequest { - guard let parameters = parameters else { return request } - - var request = request - - guard let url = request.url else { - throw AFError.parameterEncoderFailed(reason: .missingRequiredComponent(.url)) - } - - guard let method = request.method else { - let rawValue = request.method?.rawValue ?? "nil" - throw AFError.parameterEncoderFailed(reason: .missingRequiredComponent(.httpMethod(rawValue: rawValue))) - } - - if destination.encodesParametersInURL(for: method), - var components = URLComponents(url: url, resolvingAgainstBaseURL: false) { - let query: String = try Result { try encoder.encode(parameters) } - .mapError { AFError.parameterEncoderFailed(reason: .encoderFailed(error: $0)) }.get() - let newQueryString = [components.percentEncodedQuery, query].compactMap { $0 }.joinedWithAmpersands() - components.percentEncodedQuery = newQueryString.isEmpty ? nil : newQueryString - - guard let newURL = components.url else { - throw AFError.parameterEncoderFailed(reason: .missingRequiredComponent(.url)) - } - - request.url = newURL - } else { - if request.headers["Content-Type"] == nil { - request.headers.update(.contentType("application/x-www-form-urlencoded; charset=utf-8")) - } - - request.httpBody = try Result { try encoder.encode(parameters) } - .mapError { AFError.parameterEncoderFailed(reason: .encoderFailed(error: $0)) }.get() - } - - return request - } -} diff --git a/Pods/Alamofire/Source/ParameterEncoding.swift b/Pods/Alamofire/Source/ParameterEncoding.swift deleted file mode 100644 index 6e72604c..00000000 --- a/Pods/Alamofire/Source/ParameterEncoding.swift +++ /dev/null @@ -1,317 +0,0 @@ -// -// ParameterEncoding.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A dictionary of parameters to apply to a `URLRequest`. -public typealias Parameters = [String: Any] - -/// A type used to define how a set of parameters are applied to a `URLRequest`. -public protocol ParameterEncoding { - /// Creates a `URLRequest` by encoding parameters and applying them on the passed request. - /// - /// - Parameters: - /// - urlRequest: `URLRequestConvertible` value onto which parameters will be encoded. - /// - parameters: `Parameters` to encode onto the request. - /// - /// - Returns: The encoded `URLRequest`. - /// - Throws: Any `Error` produced during parameter encoding. - func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest -} - -// MARK: - - -/// Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP -/// body of the URL request. Whether the query string is set or appended to any existing URL query string or set as -/// the HTTP body depends on the destination of the encoding. -/// -/// The `Content-Type` HTTP header field of an encoded request with HTTP body is set to -/// `application/x-www-form-urlencoded; charset=utf-8`. -/// -/// There is no published specification for how to encode collection types. By default the convention of appending -/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for -/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the -/// square brackets appended to array keys. -/// -/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode -/// `true` as 1 and `false` as 0. -public struct URLEncoding: ParameterEncoding { - // MARK: Helper Types - - /// Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the - /// resulting URL request. - public enum Destination { - /// Applies encoded query string result to existing query string for `GET`, `HEAD` and `DELETE` requests and - /// sets as the HTTP body for requests with any other HTTP method. - case methodDependent - /// Sets or appends encoded query string result to existing query string. - case queryString - /// Sets encoded query string result as the HTTP body of the URL request. - case httpBody - - func encodesParametersInURL(for method: HTTPMethod) -> Bool { - switch self { - case .methodDependent: return [.get, .head, .delete].contains(method) - case .queryString: return true - case .httpBody: return false - } - } - } - - /// Configures how `Array` parameters are encoded. - public enum ArrayEncoding { - /// An empty set of square brackets is appended to the key for every value. This is the default behavior. - case brackets - /// No brackets are appended. The key is encoded as is. - case noBrackets - - func encode(key: String) -> String { - switch self { - case .brackets: - return "\(key)[]" - case .noBrackets: - return key - } - } - } - - /// Configures how `Bool` parameters are encoded. - public enum BoolEncoding { - /// Encode `true` as `1` and `false` as `0`. This is the default behavior. - case numeric - /// Encode `true` and `false` as string literals. - case literal - - func encode(value: Bool) -> String { - switch self { - case .numeric: - return value ? "1" : "0" - case .literal: - return value ? "true" : "false" - } - } - } - - // MARK: Properties - - /// Returns a default `URLEncoding` instance with a `.methodDependent` destination. - public static var `default`: URLEncoding { URLEncoding() } - - /// Returns a `URLEncoding` instance with a `.queryString` destination. - public static var queryString: URLEncoding { URLEncoding(destination: .queryString) } - - /// Returns a `URLEncoding` instance with an `.httpBody` destination. - public static var httpBody: URLEncoding { URLEncoding(destination: .httpBody) } - - /// The destination defining where the encoded query string is to be applied to the URL request. - public let destination: Destination - - /// The encoding to use for `Array` parameters. - public let arrayEncoding: ArrayEncoding - - /// The encoding to use for `Bool` parameters. - public let boolEncoding: BoolEncoding - - // MARK: Initialization - - /// Creates an instance using the specified parameters. - /// - /// - Parameters: - /// - destination: `Destination` defining where the encoded query string will be applied. `.methodDependent` by - /// default. - /// - arrayEncoding: `ArrayEncoding` to use. `.brackets` by default. - /// - boolEncoding: `BoolEncoding` to use. `.numeric` by default. - public init(destination: Destination = .methodDependent, - arrayEncoding: ArrayEncoding = .brackets, - boolEncoding: BoolEncoding = .numeric) { - self.destination = destination - self.arrayEncoding = arrayEncoding - self.boolEncoding = boolEncoding - } - - // MARK: Encoding - - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - if let method = urlRequest.method, destination.encodesParametersInURL(for: method) { - guard let url = urlRequest.url else { - throw AFError.parameterEncodingFailed(reason: .missingURL) - } - - if var urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false), !parameters.isEmpty { - let percentEncodedQuery = (urlComponents.percentEncodedQuery.map { $0 + "&" } ?? "") + query(parameters) - urlComponents.percentEncodedQuery = percentEncodedQuery - urlRequest.url = urlComponents.url - } - } else { - if urlRequest.headers["Content-Type"] == nil { - urlRequest.headers.update(.contentType("application/x-www-form-urlencoded; charset=utf-8")) - } - - urlRequest.httpBody = Data(query(parameters).utf8) - } - - return urlRequest - } - - /// Creates a percent-escaped, URL encoded query string components from the given key-value pair recursively. - /// - /// - Parameters: - /// - key: Key of the query component. - /// - value: Value of the query component. - /// - /// - Returns: The percent-escaped, URL encoded query string components. - public func queryComponents(fromKey key: String, value: Any) -> [(String, String)] { - var components: [(String, String)] = [] - switch value { - case let dictionary as [String: Any]: - for (nestedKey, value) in dictionary { - components += queryComponents(fromKey: "\(key)[\(nestedKey)]", value: value) - } - case let array as [Any]: - for value in array { - components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value) - } - case let number as NSNumber: - if number.isBool { - components.append((escape(key), escape(boolEncoding.encode(value: number.boolValue)))) - } else { - components.append((escape(key), escape("\(number)"))) - } - case let bool as Bool: - components.append((escape(key), escape(boolEncoding.encode(value: bool)))) - default: - components.append((escape(key), escape("\(value)"))) - } - return components - } - - /// Creates a percent-escaped string following RFC 3986 for a query string key or value. - /// - /// - Parameter string: `String` to be percent-escaped. - /// - /// - Returns: The percent-escaped `String`. - public func escape(_ string: String) -> String { - string.addingPercentEncoding(withAllowedCharacters: .afURLQueryAllowed) ?? string - } - - private func query(_ parameters: [String: Any]) -> String { - var components: [(String, String)] = [] - - for key in parameters.keys.sorted(by: <) { - let value = parameters[key]! - components += queryComponents(fromKey: key, value: value) - } - return components.map { "\($0)=\($1)" }.joined(separator: "&") - } -} - -// MARK: - - -/// Uses `JSONSerialization` to create a JSON representation of the parameters object, which is set as the body of the -/// request. The `Content-Type` HTTP header field of an encoded request is set to `application/json`. -public struct JSONEncoding: ParameterEncoding { - // MARK: Properties - - /// Returns a `JSONEncoding` instance with default writing options. - public static var `default`: JSONEncoding { JSONEncoding() } - - /// Returns a `JSONEncoding` instance with `.prettyPrinted` writing options. - public static var prettyPrinted: JSONEncoding { JSONEncoding(options: .prettyPrinted) } - - /// The options for writing the parameters as JSON data. - public let options: JSONSerialization.WritingOptions - - // MARK: Initialization - - /// Creates an instance using the specified `WritingOptions`. - /// - /// - Parameter options: `JSONSerialization.WritingOptions` to use. - public init(options: JSONSerialization.WritingOptions = []) { - self.options = options - } - - // MARK: Encoding - - public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let parameters = parameters else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: parameters, options: options) - - if urlRequest.headers["Content-Type"] == nil { - urlRequest.headers.update(.contentType("application/json")) - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } - - /// Encodes any JSON compatible object into a `URLRequest`. - /// - /// - Parameters: - /// - urlRequest: `URLRequestConvertible` value into which the object will be encoded. - /// - jsonObject: `Any` value (must be JSON compatible` to be encoded into the `URLRequest`. `nil` by default. - /// - /// - Returns: The encoded `URLRequest`. - /// - Throws: Any `Error` produced during encoding. - public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest { - var urlRequest = try urlRequest.asURLRequest() - - guard let jsonObject = jsonObject else { return urlRequest } - - do { - let data = try JSONSerialization.data(withJSONObject: jsonObject, options: options) - - if urlRequest.headers["Content-Type"] == nil { - urlRequest.headers.update(.contentType("application/json")) - } - - urlRequest.httpBody = data - } catch { - throw AFError.parameterEncodingFailed(reason: .jsonEncodingFailed(error: error)) - } - - return urlRequest - } -} - -// MARK: - - -extension NSNumber { - fileprivate var isBool: Bool { - // Use Obj-C type encoding to check whether the underlying type is a `Bool`, as it's guaranteed as part of - // swift-corelibs-foundation, per [this discussion on the Swift forums](https://forums.swift.org/t/alamofire-on-linux-possible-but-not-release-ready/34553/22). - String(cString: objCType) == "c" - } -} diff --git a/Pods/Alamofire/Source/Protected.swift b/Pods/Alamofire/Source/Protected.swift deleted file mode 100644 index 6288205e..00000000 --- a/Pods/Alamofire/Source/Protected.swift +++ /dev/null @@ -1,224 +0,0 @@ -// -// Protected.swift -// -// Copyright (c) 2014-2020 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -private protocol Lock { - func lock() - func unlock() -} - -extension Lock { - /// Executes a closure returning a value while acquiring the lock. - /// - /// - Parameter closure: The closure to run. - /// - /// - Returns: The value the closure generated. - func around(_ closure: () -> T) -> T { - lock(); defer { unlock() } - return closure() - } - - /// Execute a closure while acquiring the lock. - /// - /// - Parameter closure: The closure to run. - func around(_ closure: () -> Void) { - lock(); defer { unlock() } - closure() - } -} - -#if os(Linux) -/// A `pthread_mutex_t` wrapper. -final class MutexLock: Lock { - private var mutex: UnsafeMutablePointer - - init() { - mutex = .allocate(capacity: 1) - - var attr = pthread_mutexattr_t() - pthread_mutexattr_init(&attr) - pthread_mutexattr_settype(&attr, .init(PTHREAD_MUTEX_ERRORCHECK)) - - let error = pthread_mutex_init(mutex, &attr) - precondition(error == 0, "Failed to create pthread_mutex") - } - - deinit { - let error = pthread_mutex_destroy(mutex) - precondition(error == 0, "Failed to destroy pthread_mutex") - } - - fileprivate func lock() { - let error = pthread_mutex_lock(mutex) - precondition(error == 0, "Failed to lock pthread_mutex") - } - - fileprivate func unlock() { - let error = pthread_mutex_unlock(mutex) - precondition(error == 0, "Failed to unlock pthread_mutex") - } -} -#endif - -#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) -/// An `os_unfair_lock` wrapper. -final class UnfairLock: Lock { - private let unfairLock: os_unfair_lock_t - - init() { - unfairLock = .allocate(capacity: 1) - unfairLock.initialize(to: os_unfair_lock()) - } - - deinit { - unfairLock.deinitialize(count: 1) - unfairLock.deallocate() - } - - fileprivate func lock() { - os_unfair_lock_lock(unfairLock) - } - - fileprivate func unlock() { - os_unfair_lock_unlock(unfairLock) - } -} -#endif - -/// A thread-safe wrapper around a value. -@propertyWrapper -@dynamicMemberLookup -final class Protected { - #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) - private let lock = UnfairLock() - #elseif os(Linux) - private let lock = MutexLock() - #endif - private var value: T - - init(_ value: T) { - self.value = value - } - - /// The contained value. Unsafe for anything more than direct read or write. - var wrappedValue: T { - get { lock.around { value } } - set { lock.around { value = newValue } } - } - - var projectedValue: Protected { self } - - init(wrappedValue: T) { - value = wrappedValue - } - - /// Synchronously read or transform the contained value. - /// - /// - Parameter closure: The closure to execute. - /// - /// - Returns: The return value of the closure passed. - func read(_ closure: (T) -> U) -> U { - lock.around { closure(self.value) } - } - - /// Synchronously modify the protected value. - /// - /// - Parameter closure: The closure to execute. - /// - /// - Returns: The modified value. - @discardableResult - func write(_ closure: (inout T) -> U) -> U { - lock.around { closure(&self.value) } - } - - subscript(dynamicMember keyPath: WritableKeyPath) -> Property { - get { lock.around { value[keyPath: keyPath] } } - set { lock.around { value[keyPath: keyPath] = newValue } } - } -} - -extension Protected where T: RangeReplaceableCollection { - /// Adds a new element to the end of this protected collection. - /// - /// - Parameter newElement: The `Element` to append. - func append(_ newElement: T.Element) { - write { (ward: inout T) in - ward.append(newElement) - } - } - - /// Adds the elements of a sequence to the end of this protected collection. - /// - /// - Parameter newElements: The `Sequence` to append. - func append(contentsOf newElements: S) where S.Element == T.Element { - write { (ward: inout T) in - ward.append(contentsOf: newElements) - } - } - - /// Add the elements of a collection to the end of the protected collection. - /// - /// - Parameter newElements: The `Collection` to append. - func append(contentsOf newElements: C) where C.Element == T.Element { - write { (ward: inout T) in - ward.append(contentsOf: newElements) - } - } -} - -extension Protected where T == Data? { - /// Adds the contents of a `Data` value to the end of the protected `Data`. - /// - /// - Parameter data: The `Data` to be appended. - func append(_ data: Data) { - write { (ward: inout T) in - ward?.append(data) - } - } -} - -extension Protected where T == Request.MutableState { - /// Attempts to transition to the passed `State`. - /// - /// - Parameter state: The `State` to attempt transition to. - /// - /// - Returns: Whether the transition occurred. - func attemptToTransitionTo(_ state: Request.State) -> Bool { - lock.around { - guard value.state.canTransitionTo(state) else { return false } - - value.state = state - - return true - } - } - - /// Perform a closure while locked with the provided `Request.State`. - /// - /// - Parameter perform: The closure to perform while locked. - func withState(perform: (Request.State) -> Void) { - lock.around { perform(value.state) } - } -} diff --git a/Pods/Alamofire/Source/RedirectHandler.swift b/Pods/Alamofire/Source/RedirectHandler.swift deleted file mode 100644 index b6c069ca..00000000 --- a/Pods/Alamofire/Source/RedirectHandler.swift +++ /dev/null @@ -1,95 +0,0 @@ -// -// RedirectHandler.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that handles how an HTTP redirect response from a remote server should be redirected to the new request. -public protocol RedirectHandler { - /// Determines how the HTTP redirect response should be redirected to the new request. - /// - /// The `completion` closure should be passed one of three possible options: - /// - /// 1. The new request specified by the redirect (this is the most common use case). - /// 2. A modified version of the new request (you may want to route it somewhere else). - /// 3. A `nil` value to deny the redirect request and return the body of the redirect response. - /// - /// - Parameters: - /// - task: The `URLSessionTask` whose request resulted in a redirect. - /// - request: The `URLRequest` to the new location specified by the redirect response. - /// - response: The `HTTPURLResponse` containing the server's response to the original request. - /// - completion: The closure to execute containing the new `URLRequest`, a modified `URLRequest`, or `nil`. - func task(_ task: URLSessionTask, - willBeRedirectedTo request: URLRequest, - for response: HTTPURLResponse, - completion: @escaping (URLRequest?) -> Void) -} - -// MARK: - - -/// `Redirector` is a convenience `RedirectHandler` making it easy to follow, not follow, or modify a redirect. -public struct Redirector { - /// Defines the behavior of the `Redirector` type. - public enum Behavior { - /// Follow the redirect as defined in the response. - case follow - /// Do not follow the redirect defined in the response. - case doNotFollow - /// Modify the redirect request defined in the response. - case modify((URLSessionTask, URLRequest, HTTPURLResponse) -> URLRequest?) - } - - /// Returns a `Redirector` with a `.follow` `Behavior`. - public static let follow = Redirector(behavior: .follow) - /// Returns a `Redirector` with a `.doNotFollow` `Behavior`. - public static let doNotFollow = Redirector(behavior: .doNotFollow) - - /// The `Behavior` of the `Redirector`. - public let behavior: Behavior - - /// Creates a `Redirector` instance from the `Behavior`. - /// - /// - Parameter behavior: The `Behavior`. - public init(behavior: Behavior) { - self.behavior = behavior - } -} - -// MARK: - - -extension Redirector: RedirectHandler { - public func task(_ task: URLSessionTask, - willBeRedirectedTo request: URLRequest, - for response: HTTPURLResponse, - completion: @escaping (URLRequest?) -> Void) { - switch behavior { - case .follow: - completion(request) - case .doNotFollow: - completion(nil) - case let .modify(closure): - let request = closure(task, request, response) - completion(request) - } - } -} diff --git a/Pods/Alamofire/Source/Request.swift b/Pods/Alamofire/Source/Request.swift deleted file mode 100644 index 849f8784..00000000 --- a/Pods/Alamofire/Source/Request.swift +++ /dev/null @@ -1,1882 +0,0 @@ -// -// Request.swift -// -// Copyright (c) 2014-2020 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// `Request` is the common superclass of all Alamofire request types and provides common state, delegate, and callback -/// handling. -public class Request { - /// State of the `Request`, with managed transitions between states set when calling `resume()`, `suspend()`, or - /// `cancel()` on the `Request`. - public enum State { - /// Initial state of the `Request`. - case initialized - /// `State` set when `resume()` is called. Any tasks created for the `Request` will have `resume()` called on - /// them in this state. - case resumed - /// `State` set when `suspend()` is called. Any tasks created for the `Request` will have `suspend()` called on - /// them in this state. - case suspended - /// `State` set when `cancel()` is called. Any tasks created for the `Request` will have `cancel()` called on - /// them. Unlike `resumed` or `suspended`, once in the `cancelled` state, the `Request` can no longer transition - /// to any other state. - case cancelled - /// `State` set when all response serialization completion closures have been cleared on the `Request` and - /// enqueued on their respective queues. - case finished - - /// Determines whether `self` can be transitioned to the provided `State`. - func canTransitionTo(_ state: State) -> Bool { - switch (self, state) { - case (.initialized, _): - return true - case (_, .initialized), (.cancelled, _), (.finished, _): - return false - case (.resumed, .cancelled), (.suspended, .cancelled), (.resumed, .suspended), (.suspended, .resumed): - return true - case (.suspended, .suspended), (.resumed, .resumed): - return false - case (_, .finished): - return true - } - } - } - - // MARK: - Initial State - - /// `UUID` providing a unique identifier for the `Request`, used in the `Hashable` and `Equatable` conformances. - public let id: UUID - /// The serial queue for all internal async actions. - public let underlyingQueue: DispatchQueue - /// The queue used for all serialization actions. By default it's a serial queue that targets `underlyingQueue`. - public let serializationQueue: DispatchQueue - /// `EventMonitor` used for event callbacks. - public let eventMonitor: EventMonitor? - /// The `Request`'s interceptor. - public let interceptor: RequestInterceptor? - /// The `Request`'s delegate. - public private(set) weak var delegate: RequestDelegate? - - // MARK: - Mutable State - - /// Type encapsulating all mutable state that may need to be accessed from anything other than the `underlyingQueue`. - struct MutableState { - /// State of the `Request`. - var state: State = .initialized - /// `ProgressHandler` and `DispatchQueue` provided for upload progress callbacks. - var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? - /// `ProgressHandler` and `DispatchQueue` provided for download progress callbacks. - var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? - /// `RedirectHandler` provided for to handle request redirection. - var redirectHandler: RedirectHandler? - /// `CachedResponseHandler` provided to handle response caching. - var cachedResponseHandler: CachedResponseHandler? - /// Queue and closure called when the `Request` is able to create a cURL description of itself. - var cURLHandler: (queue: DispatchQueue, handler: (String) -> Void)? - /// Queue and closure called when the `Request` creates a `URLRequest`. - var urlRequestHandler: (queue: DispatchQueue, handler: (URLRequest) -> Void)? - /// Queue and closure called when the `Request` creates a `URLSessionTask`. - var urlSessionTaskHandler: (queue: DispatchQueue, handler: (URLSessionTask) -> Void)? - /// Response serialization closures that handle response parsing. - var responseSerializers: [() -> Void] = [] - /// Response serialization completion closures executed once all response serializers are complete. - var responseSerializerCompletions: [() -> Void] = [] - /// Whether response serializer processing is finished. - var responseSerializerProcessingFinished = false - /// `URLCredential` used for authentication challenges. - var credential: URLCredential? - /// All `URLRequest`s created by Alamofire on behalf of the `Request`. - var requests: [URLRequest] = [] - /// All `URLSessionTask`s created by Alamofire on behalf of the `Request`. - var tasks: [URLSessionTask] = [] - /// All `URLSessionTaskMetrics` values gathered by Alamofire on behalf of the `Request`. Should correspond - /// exactly the the `tasks` created. - var metrics: [URLSessionTaskMetrics] = [] - /// Number of times any retriers provided retried the `Request`. - var retryCount = 0 - /// Final `AFError` for the `Request`, whether from various internal Alamofire calls or as a result of a `task`. - var error: AFError? - /// Whether the instance has had `finish()` called and is running the serializers. Should be replaced with a - /// representation in the state machine in the future. - var isFinishing = false - } - - /// Protected `MutableState` value that provides thread-safe access to state values. - @Protected - fileprivate var mutableState = MutableState() - - /// `State` of the `Request`. - public var state: State { mutableState.state } - /// Returns whether `state` is `.initialized`. - public var isInitialized: Bool { state == .initialized } - /// Returns whether `state is `.resumed`. - public var isResumed: Bool { state == .resumed } - /// Returns whether `state` is `.suspended`. - public var isSuspended: Bool { state == .suspended } - /// Returns whether `state` is `.cancelled`. - public var isCancelled: Bool { state == .cancelled } - /// Returns whether `state` is `.finished`. - public var isFinished: Bool { state == .finished } - - // MARK: Progress - - /// Closure type executed when monitoring the upload or download progress of a request. - public typealias ProgressHandler = (Progress) -> Void - - /// `Progress` of the upload of the body of the executed `URLRequest`. Reset to `0` if the `Request` is retried. - public let uploadProgress = Progress(totalUnitCount: 0) - /// `Progress` of the download of any response data. Reset to `0` if the `Request` is retried. - public let downloadProgress = Progress(totalUnitCount: 0) - /// `ProgressHandler` called when `uploadProgress` is updated, on the provided `DispatchQueue`. - private var uploadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { - get { mutableState.uploadProgressHandler } - set { mutableState.uploadProgressHandler = newValue } - } - - /// `ProgressHandler` called when `downloadProgress` is updated, on the provided `DispatchQueue`. - fileprivate var downloadProgressHandler: (handler: ProgressHandler, queue: DispatchQueue)? { - get { mutableState.downloadProgressHandler } - set { mutableState.downloadProgressHandler = newValue } - } - - // MARK: Redirect Handling - - /// `RedirectHandler` set on the instance. - public private(set) var redirectHandler: RedirectHandler? { - get { mutableState.redirectHandler } - set { mutableState.redirectHandler = newValue } - } - - // MARK: Cached Response Handling - - /// `CachedResponseHandler` set on the instance. - public private(set) var cachedResponseHandler: CachedResponseHandler? { - get { mutableState.cachedResponseHandler } - set { mutableState.cachedResponseHandler = newValue } - } - - // MARK: URLCredential - - /// `URLCredential` used for authentication challenges. Created by calling one of the `authenticate` methods. - public private(set) var credential: URLCredential? { - get { mutableState.credential } - set { mutableState.credential = newValue } - } - - // MARK: Validators - - /// `Validator` callback closures that store the validation calls enqueued. - @Protected - fileprivate var validators: [() -> Void] = [] - - // MARK: URLRequests - - /// All `URLRequests` created on behalf of the `Request`, including original and adapted requests. - public var requests: [URLRequest] { mutableState.requests } - /// First `URLRequest` created on behalf of the `Request`. May not be the first one actually executed. - public var firstRequest: URLRequest? { requests.first } - /// Last `URLRequest` created on behalf of the `Request`. - public var lastRequest: URLRequest? { requests.last } - /// Current `URLRequest` created on behalf of the `Request`. - public var request: URLRequest? { lastRequest } - - /// `URLRequest`s from all of the `URLSessionTask`s executed on behalf of the `Request`. May be different from - /// `requests` due to `URLSession` manipulation. - public var performedRequests: [URLRequest] { $mutableState.read { $0.tasks.compactMap { $0.currentRequest } } } - - // MARK: HTTPURLResponse - - /// `HTTPURLResponse` received from the server, if any. If the `Request` was retried, this is the response of the - /// last `URLSessionTask`. - public var response: HTTPURLResponse? { lastTask?.response as? HTTPURLResponse } - - // MARK: Tasks - - /// All `URLSessionTask`s created on behalf of the `Request`. - public var tasks: [URLSessionTask] { mutableState.tasks } - /// First `URLSessionTask` created on behalf of the `Request`. - public var firstTask: URLSessionTask? { tasks.first } - /// Last `URLSessionTask` crated on behalf of the `Request`. - public var lastTask: URLSessionTask? { tasks.last } - /// Current `URLSessionTask` created on behalf of the `Request`. - public var task: URLSessionTask? { lastTask } - - // MARK: Metrics - - /// All `URLSessionTaskMetrics` gathered on behalf of the `Request`. Should correspond to the `tasks` created. - public var allMetrics: [URLSessionTaskMetrics] { mutableState.metrics } - /// First `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var firstMetrics: URLSessionTaskMetrics? { allMetrics.first } - /// Last `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var lastMetrics: URLSessionTaskMetrics? { allMetrics.last } - /// Current `URLSessionTaskMetrics` gathered on behalf of the `Request`. - public var metrics: URLSessionTaskMetrics? { lastMetrics } - - // MARK: Retry Count - - /// Number of times the `Request` has been retried. - public var retryCount: Int { mutableState.retryCount } - - // MARK: Error - - /// `Error` returned from Alamofire internally, from the network request directly, or any validators executed. - public fileprivate(set) var error: AFError? { - get { mutableState.error } - set { mutableState.error = newValue } - } - - /// Default initializer for the `Request` superclass. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate) { - self.id = id - self.underlyingQueue = underlyingQueue - self.serializationQueue = serializationQueue - self.eventMonitor = eventMonitor - self.interceptor = interceptor - self.delegate = delegate - } - - // MARK: - Internal Event API - - // All API must be called from underlyingQueue. - - /// Called when an initial `URLRequest` has been created on behalf of the instance. If a `RequestAdapter` is active, - /// the `URLRequest` will be adapted before being issued. - /// - /// - Parameter request: The `URLRequest` created. - func didCreateInitialURLRequest(_ request: URLRequest) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - $mutableState.write { $0.requests.append(request) } - - eventMonitor?.request(self, didCreateInitialURLRequest: request) - } - - /// Called when initial `URLRequest` creation has failed, typically through a `URLRequestConvertible`. - /// - /// - Note: Triggers retry. - /// - /// - Parameter error: `AFError` thrown from the failed creation. - func didFailToCreateURLRequest(with error: AFError) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - self.error = error - - eventMonitor?.request(self, didFailToCreateURLRequestWithError: error) - - callCURLHandlerIfNecessary() - - retryOrFinish(error: error) - } - - /// Called when a `RequestAdapter` has successfully adapted a `URLRequest`. - /// - /// - Parameters: - /// - initialRequest: The `URLRequest` that was adapted. - /// - adaptedRequest: The `URLRequest` returned by the `RequestAdapter`. - func didAdaptInitialRequest(_ initialRequest: URLRequest, to adaptedRequest: URLRequest) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - $mutableState.write { $0.requests.append(adaptedRequest) } - - eventMonitor?.request(self, didAdaptInitialRequest: initialRequest, to: adaptedRequest) - } - - /// Called when a `RequestAdapter` fails to adapt a `URLRequest`. - /// - /// - Note: Triggers retry. - /// - /// - Parameters: - /// - request: The `URLRequest` the adapter was called with. - /// - error: The `AFError` returned by the `RequestAdapter`. - func didFailToAdaptURLRequest(_ request: URLRequest, withError error: AFError) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - self.error = error - - eventMonitor?.request(self, didFailToAdaptURLRequest: request, withError: error) - - callCURLHandlerIfNecessary() - - retryOrFinish(error: error) - } - - /// Final `URLRequest` has been created for the instance. - /// - /// - Parameter request: The `URLRequest` created. - func didCreateURLRequest(_ request: URLRequest) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - $mutableState.read { state in - state.urlRequestHandler?.queue.async { state.urlRequestHandler?.handler(request) } - } - - eventMonitor?.request(self, didCreateURLRequest: request) - - callCURLHandlerIfNecessary() - } - - /// Asynchronously calls any stored `cURLHandler` and then removes it from `mutableState`. - private func callCURLHandlerIfNecessary() { - $mutableState.write { mutableState in - guard let cURLHandler = mutableState.cURLHandler else { return } - - cURLHandler.queue.async { cURLHandler.handler(self.cURLDescription()) } - - mutableState.cURLHandler = nil - } - } - - /// Called when a `URLSessionTask` is created on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` created. - func didCreateTask(_ task: URLSessionTask) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - $mutableState.write { state in - state.tasks.append(task) - - guard let urlSessionTaskHandler = state.urlSessionTaskHandler else { return } - - urlSessionTaskHandler.queue.async { urlSessionTaskHandler.handler(task) } - } - - eventMonitor?.request(self, didCreateTask: task) - } - - /// Called when resumption is completed. - func didResume() { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - eventMonitor?.requestDidResume(self) - } - - /// Called when a `URLSessionTask` is resumed on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` resumed. - func didResumeTask(_ task: URLSessionTask) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - eventMonitor?.request(self, didResumeTask: task) - } - - /// Called when suspension is completed. - func didSuspend() { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - eventMonitor?.requestDidSuspend(self) - } - - /// Called when a `URLSessionTask` is suspended on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` suspended. - func didSuspendTask(_ task: URLSessionTask) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - eventMonitor?.request(self, didSuspendTask: task) - } - - /// Called when cancellation is completed, sets `error` to `AFError.explicitlyCancelled`. - func didCancel() { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - error = error ?? AFError.explicitlyCancelled - - eventMonitor?.requestDidCancel(self) - } - - /// Called when a `URLSessionTask` is cancelled on behalf of the instance. - /// - /// - Parameter task: The `URLSessionTask` cancelled. - func didCancelTask(_ task: URLSessionTask) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - eventMonitor?.request(self, didCancelTask: task) - } - - /// Called when a `URLSessionTaskMetrics` value is gathered on behalf of the instance. - /// - /// - Parameter metrics: The `URLSessionTaskMetrics` gathered. - func didGatherMetrics(_ metrics: URLSessionTaskMetrics) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - $mutableState.write { $0.metrics.append(metrics) } - - eventMonitor?.request(self, didGatherMetrics: metrics) - } - - /// Called when a `URLSessionTask` fails before it is finished, typically during certificate pinning. - /// - /// - Parameters: - /// - task: The `URLSessionTask` which failed. - /// - error: The early failure `AFError`. - func didFailTask(_ task: URLSessionTask, earlyWithError error: AFError) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - self.error = error - - // Task will still complete, so didCompleteTask(_:with:) will handle retry. - eventMonitor?.request(self, didFailTask: task, earlyWithError: error) - } - - /// Called when a `URLSessionTask` completes. All tasks will eventually call this method. - /// - /// - Note: Response validation is synchronously triggered in this step. - /// - /// - Parameters: - /// - task: The `URLSessionTask` which completed. - /// - error: The `AFError` `task` may have completed with. If `error` has already been set on the instance, this - /// value is ignored. - func didCompleteTask(_ task: URLSessionTask, with error: AFError?) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - self.error = self.error ?? error - - validators.forEach { $0() } - - eventMonitor?.request(self, didCompleteTask: task, with: error) - - retryOrFinish(error: self.error) - } - - /// Called when the `RequestDelegate` is going to retry this `Request`. Calls `reset()`. - func prepareForRetry() { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - $mutableState.write { $0.retryCount += 1 } - - reset() - - eventMonitor?.requestIsRetrying(self) - } - - /// Called to determine whether retry will be triggered for the particular error, or whether the instance should - /// call `finish()`. - /// - /// - Parameter error: The possible `AFError` which may trigger retry. - func retryOrFinish(error: AFError?) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - guard let error = error, let delegate = delegate else { finish(); return } - - delegate.retryResult(for: self, dueTo: error) { retryResult in - switch retryResult { - case .doNotRetry: - self.finish() - case let .doNotRetryWithError(retryError): - self.finish(error: retryError.asAFError(orFailWith: "Received retryError was not already AFError")) - case .retry, .retryWithDelay: - delegate.retryRequest(self, withDelay: retryResult.delay) - } - } - } - - /// Finishes this `Request` and starts the response serializers. - /// - /// - Parameter error: The possible `Error` with which the instance will finish. - func finish(error: AFError? = nil) { - dispatchPrecondition(condition: .onQueue(underlyingQueue)) - - guard !mutableState.isFinishing else { return } - - mutableState.isFinishing = true - - if let error = error { self.error = error } - - // Start response handlers - processNextResponseSerializer() - - eventMonitor?.requestDidFinish(self) - } - - /// Appends the response serialization closure to the instance. - /// - /// - Note: This method will also `resume` the instance if `delegate.startImmediately` returns `true`. - /// - /// - Parameter closure: The closure containing the response serialization call. - func appendResponseSerializer(_ closure: @escaping () -> Void) { - $mutableState.write { mutableState in - mutableState.responseSerializers.append(closure) - - if mutableState.state == .finished { - mutableState.state = .resumed - } - - if mutableState.responseSerializerProcessingFinished { - underlyingQueue.async { self.processNextResponseSerializer() } - } - - if mutableState.state.canTransitionTo(.resumed) { - underlyingQueue.async { if self.delegate?.startImmediately == true { self.resume() } } - } - } - } - - /// Returns the next response serializer closure to execute if there's one left. - /// - /// - Returns: The next response serialization closure, if there is one. - func nextResponseSerializer() -> (() -> Void)? { - var responseSerializer: (() -> Void)? - - $mutableState.write { mutableState in - let responseSerializerIndex = mutableState.responseSerializerCompletions.count - - if responseSerializerIndex < mutableState.responseSerializers.count { - responseSerializer = mutableState.responseSerializers[responseSerializerIndex] - } - } - - return responseSerializer - } - - /// Processes the next response serializer and calls all completions if response serialization is complete. - func processNextResponseSerializer() { - guard let responseSerializer = nextResponseSerializer() else { - // Execute all response serializer completions and clear them - var completions: [() -> Void] = [] - - $mutableState.write { mutableState in - completions = mutableState.responseSerializerCompletions - - // Clear out all response serializers and response serializer completions in mutable state since the - // request is complete. It's important to do this prior to calling the completion closures in case - // the completions call back into the request triggering a re-processing of the response serializers. - // An example of how this can happen is by calling cancel inside a response completion closure. - mutableState.responseSerializers.removeAll() - mutableState.responseSerializerCompletions.removeAll() - - if mutableState.state.canTransitionTo(.finished) { - mutableState.state = .finished - } - - mutableState.responseSerializerProcessingFinished = true - mutableState.isFinishing = false - } - - completions.forEach { $0() } - - // Cleanup the request - cleanup() - - return - } - - serializationQueue.async { responseSerializer() } - } - - /// Notifies the `Request` that the response serializer is complete. - /// - /// - Parameter completion: The completion handler provided with the response serializer, called when all serializers - /// are complete. - func responseSerializerDidComplete(completion: @escaping () -> Void) { - $mutableState.write { $0.responseSerializerCompletions.append(completion) } - processNextResponseSerializer() - } - - /// Resets all task and response serializer related state for retry. - func reset() { - error = nil - - uploadProgress.totalUnitCount = 0 - uploadProgress.completedUnitCount = 0 - downloadProgress.totalUnitCount = 0 - downloadProgress.completedUnitCount = 0 - - $mutableState.write { state in - state.isFinishing = false - state.responseSerializerCompletions = [] - } - } - - /// Called when updating the upload progress. - /// - /// - Parameters: - /// - totalBytesSent: Total bytes sent so far. - /// - totalBytesExpectedToSend: Total bytes expected to send. - func updateUploadProgress(totalBytesSent: Int64, totalBytesExpectedToSend: Int64) { - uploadProgress.totalUnitCount = totalBytesExpectedToSend - uploadProgress.completedUnitCount = totalBytesSent - - uploadProgressHandler?.queue.async { self.uploadProgressHandler?.handler(self.uploadProgress) } - } - - /// Perform a closure on the current `state` while locked. - /// - /// - Parameter perform: The closure to perform. - func withState(perform: (State) -> Void) { - $mutableState.withState(perform: perform) - } - - // MARK: Task Creation - - /// Called when creating a `URLSessionTask` for this `Request`. Subclasses must override. - /// - /// - Parameters: - /// - request: `URLRequest` to use to create the `URLSessionTask`. - /// - session: `URLSession` which creates the `URLSessionTask`. - /// - /// - Returns: The `URLSessionTask` created. - func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - fatalError("Subclasses must override.") - } - - // MARK: - Public API - - // These APIs are callable from any queue. - - // MARK: State - - /// Cancels the instance. Once cancelled, a `Request` can no longer be resumed or suspended. - /// - /// - Returns: The instance. - @discardableResult - public func cancel() -> Self { - $mutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.cancelled) else { return } - - mutableState.state = .cancelled - - underlyingQueue.async { self.didCancel() } - - guard let task = mutableState.tasks.last, task.state != .completed else { - underlyingQueue.async { self.finish() } - return - } - - // Resume to ensure metrics are gathered. - task.resume() - task.cancel() - underlyingQueue.async { self.didCancelTask(task) } - } - - return self - } - - /// Suspends the instance. - /// - /// - Returns: The instance. - @discardableResult - public func suspend() -> Self { - $mutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.suspended) else { return } - - mutableState.state = .suspended - - underlyingQueue.async { self.didSuspend() } - - guard let task = mutableState.tasks.last, task.state != .completed else { return } - - task.suspend() - underlyingQueue.async { self.didSuspendTask(task) } - } - - return self - } - - /// Resumes the instance. - /// - /// - Returns: The instance. - @discardableResult - public func resume() -> Self { - $mutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.resumed) else { return } - - mutableState.state = .resumed - - underlyingQueue.async { self.didResume() } - - guard let task = mutableState.tasks.last, task.state != .completed else { return } - - task.resume() - underlyingQueue.async { self.didResumeTask(task) } - } - - return self - } - - // MARK: - Closure API - - /// Associates a credential using the provided values with the instance. - /// - /// - Parameters: - /// - username: The username. - /// - password: The password. - /// - persistence: The `URLCredential.Persistence` for the created `URLCredential`. `.forSession` by default. - /// - /// - Returns: The instance. - @discardableResult - public func authenticate(username: String, password: String, persistence: URLCredential.Persistence = .forSession) -> Self { - let credential = URLCredential(user: username, password: password, persistence: persistence) - - return authenticate(with: credential) - } - - /// Associates the provided credential with the instance. - /// - /// - Parameter credential: The `URLCredential`. - /// - /// - Returns: The instance. - @discardableResult - public func authenticate(with credential: URLCredential) -> Self { - mutableState.credential = credential - - return self - } - - /// Sets a closure to be called periodically during the lifecycle of the instance as data is read from the server. - /// - /// - Note: Only the last closure provided is used. - /// - /// - Parameters: - /// - queue: The `DispatchQueue` to execute the closure on. `.main` by default. - /// - closure: The closure to be executed periodically as data is read from the server. - /// - /// - Returns: The instance. - @discardableResult - public func downloadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { - mutableState.downloadProgressHandler = (handler: closure, queue: queue) - - return self - } - - /// Sets a closure to be called periodically during the lifecycle of the instance as data is sent to the server. - /// - /// - Note: Only the last closure provided is used. - /// - /// - Parameters: - /// - queue: The `DispatchQueue` to execute the closure on. `.main` by default. - /// - closure: The closure to be executed periodically as data is sent to the server. - /// - /// - Returns: The instance. - @discardableResult - public func uploadProgress(queue: DispatchQueue = .main, closure: @escaping ProgressHandler) -> Self { - mutableState.uploadProgressHandler = (handler: closure, queue: queue) - - return self - } - - // MARK: Redirects - - /// Sets the redirect handler for the instance which will be used if a redirect response is encountered. - /// - /// - Note: Attempting to set the redirect handler more than once is a logic error and will crash. - /// - /// - Parameter handler: The `RedirectHandler`. - /// - /// - Returns: The instance. - @discardableResult - public func redirect(using handler: RedirectHandler) -> Self { - $mutableState.write { mutableState in - precondition(mutableState.redirectHandler == nil, "Redirect handler has already been set.") - mutableState.redirectHandler = handler - } - - return self - } - - // MARK: Cached Responses - - /// Sets the cached response handler for the `Request` which will be used when attempting to cache a response. - /// - /// - Note: Attempting to set the cache handler more than once is a logic error and will crash. - /// - /// - Parameter handler: The `CachedResponseHandler`. - /// - /// - Returns: The instance. - @discardableResult - public func cacheResponse(using handler: CachedResponseHandler) -> Self { - $mutableState.write { mutableState in - precondition(mutableState.cachedResponseHandler == nil, "Cached response handler has already been set.") - mutableState.cachedResponseHandler = handler - } - - return self - } - - // MARK: - Lifetime APIs - - /// Sets a handler to be called when the cURL description of the request is available. - /// - /// - Note: When waiting for a `Request`'s `URLRequest` to be created, only the last `handler` will be called. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which `handler` will be called. - /// - handler: Closure to be called when the cURL description is available. - /// - /// - Returns: The instance. - @discardableResult - public func cURLDescription(on queue: DispatchQueue, calling handler: @escaping (String) -> Void) -> Self { - $mutableState.write { mutableState in - if mutableState.requests.last != nil { - queue.async { handler(self.cURLDescription()) } - } else { - mutableState.cURLHandler = (queue, handler) - } - } - - return self - } - - /// Sets a handler to be called when the cURL description of the request is available. - /// - /// - Note: When waiting for a `Request`'s `URLRequest` to be created, only the last `handler` will be called. - /// - /// - Parameter handler: Closure to be called when the cURL description is available. Called on the instance's - /// `underlyingQueue` by default. - /// - /// - Returns: The instance. - @discardableResult - public func cURLDescription(calling handler: @escaping (String) -> Void) -> Self { - $mutableState.write { mutableState in - if mutableState.requests.last != nil { - underlyingQueue.async { handler(self.cURLDescription()) } - } else { - mutableState.cURLHandler = (underlyingQueue, handler) - } - } - - return self - } - - /// Sets a closure to called whenever Alamofire creates a `URLRequest` for this instance. - /// - /// - Note: This closure will be called multiple times if the instance adapts incoming `URLRequest`s or is retried. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which `handler` will be called. `.main` by default. - /// - handler: Closure to be called when a `URLRequest` is available. - /// - /// - Returns: The instance. - @discardableResult - public func onURLRequestCreation(on queue: DispatchQueue = .main, perform handler: @escaping (URLRequest) -> Void) -> Self { - $mutableState.write { state in - if let request = state.requests.last { - queue.async { handler(request) } - } - - state.urlRequestHandler = (queue, handler) - } - - return self - } - - /// Sets a closure to be called whenever the instance creates a `URLSessionTask`. - /// - /// - Note: This API should only be used to provide `URLSessionTask`s to existing API, like `NSFileProvider`. It - /// **SHOULD NOT** be used to interact with tasks directly, as that may be break Alamofire features. - /// Additionally, this closure may be called multiple times if the instance is retried. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which `handler` will be called. `.main` by default. - /// - handler: Closure to be called when the `URLSessionTask` is available. - /// - /// - Returns: The instance. - @discardableResult - public func onURLSessionTaskCreation(on queue: DispatchQueue = .main, perform handler: @escaping (URLSessionTask) -> Void) -> Self { - $mutableState.write { state in - if let task = state.tasks.last { - queue.async { handler(task) } - } - - state.urlSessionTaskHandler = (queue, handler) - } - - return self - } - - // MARK: Cleanup - - /// Final cleanup step executed when the instance finishes response serialization. - func cleanup() { - delegate?.cleanup(after: self) - // No-op: override in subclass - } -} - -// MARK: - Protocol Conformances - -extension Request: Equatable { - public static func ==(lhs: Request, rhs: Request) -> Bool { - lhs.id == rhs.id - } -} - -extension Request: Hashable { - public func hash(into hasher: inout Hasher) { - hasher.combine(id) - } -} - -extension Request: CustomStringConvertible { - /// A textual representation of this instance, including the `HTTPMethod` and `URL` if the `URLRequest` has been - /// created, as well as the response status code, if a response has been received. - public var description: String { - guard let request = performedRequests.last ?? lastRequest, - let url = request.url, - let method = request.httpMethod else { return "No request created yet." } - - let requestDescription = "\(method) \(url.absoluteString)" - - return response.map { "\(requestDescription) (\($0.statusCode))" } ?? requestDescription - } -} - -extension Request { - /// cURL representation of the instance. - /// - /// - Returns: The cURL equivalent of the instance. - public func cURLDescription() -> String { - guard - let request = lastRequest, - let url = request.url, - let host = url.host, - let method = request.httpMethod else { return "$ curl command could not be created" } - - var components = ["$ curl -v"] - - components.append("-X \(method)") - - if let credentialStorage = delegate?.sessionConfiguration.urlCredentialStorage { - let protectionSpace = URLProtectionSpace(host: host, - port: url.port ?? 0, - protocol: url.scheme, - realm: host, - authenticationMethod: NSURLAuthenticationMethodHTTPBasic) - - if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { - for credential in credentials { - guard let user = credential.user, let password = credential.password else { continue } - components.append("-u \(user):\(password)") - } - } else { - if let credential = credential, let user = credential.user, let password = credential.password { - components.append("-u \(user):\(password)") - } - } - } - - if let configuration = delegate?.sessionConfiguration, configuration.httpShouldSetCookies { - if - let cookieStorage = configuration.httpCookieStorage, - let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty { - let allCookies = cookies.map { "\($0.name)=\($0.value)" }.joined(separator: ";") - - components.append("-b \"\(allCookies)\"") - } - } - - var headers = HTTPHeaders() - - if let sessionHeaders = delegate?.sessionConfiguration.headers { - for header in sessionHeaders where header.name != "Cookie" { - headers[header.name] = header.value - } - } - - for header in request.headers where header.name != "Cookie" { - headers[header.name] = header.value - } - - for header in headers { - let escapedValue = header.value.replacingOccurrences(of: "\"", with: "\\\"") - components.append("-H \"\(header.name): \(escapedValue)\"") - } - - if let httpBodyData = request.httpBody { - let httpBody = String(decoding: httpBodyData, as: UTF8.self) - var escapedBody = httpBody.replacingOccurrences(of: "\\\"", with: "\\\\\"") - escapedBody = escapedBody.replacingOccurrences(of: "\"", with: "\\\"") - - components.append("-d \"\(escapedBody)\"") - } - - components.append("\"\(url.absoluteString)\"") - - return components.joined(separator: " \\\n\t") - } -} - -/// Protocol abstraction for `Request`'s communication back to the `SessionDelegate`. -public protocol RequestDelegate: AnyObject { - /// `URLSessionConfiguration` used to create the underlying `URLSessionTask`s. - var sessionConfiguration: URLSessionConfiguration { get } - - /// Determines whether the `Request` should automatically call `resume()` when adding the first response handler. - var startImmediately: Bool { get } - - /// Notifies the delegate the `Request` has reached a point where it needs cleanup. - /// - /// - Parameter request: The `Request` to cleanup after. - func cleanup(after request: Request) - - /// Asynchronously ask the delegate whether a `Request` will be retried. - /// - /// - Parameters: - /// - request: `Request` which failed. - /// - error: `Error` which produced the failure. - /// - completion: Closure taking the `RetryResult` for evaluation. - func retryResult(for request: Request, dueTo error: AFError, completion: @escaping (RetryResult) -> Void) - - /// Asynchronously retry the `Request`. - /// - /// - Parameters: - /// - request: `Request` which will be retried. - /// - timeDelay: `TimeInterval` after which the retry will be triggered. - func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?) -} - -// MARK: - Subclasses - -// MARK: - DataRequest - -/// `Request` subclass which handles in-memory `Data` download using `URLSessionDataTask`. -public class DataRequest: Request { - /// `URLRequestConvertible` value used to create `URLRequest`s for this instance. - public let convertible: URLRequestConvertible - /// `Data` read from the server so far. - public var data: Data? { mutableData } - - /// Protected storage for the `Data` read by the instance. - @Protected - private var mutableData: Data? = nil - - /// Creates a `DataRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - convertible: `URLRequestConvertible` value used to create `URLRequest`s for this instance. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - convertible: URLRequestConvertible, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate) { - self.convertible = convertible - - super.init(id: id, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - override func reset() { - super.reset() - - mutableData = nil - } - - /// Called when `Data` is received by this instance. - /// - /// - Note: Also calls `updateDownloadProgress`. - /// - /// - Parameter data: The `Data` received. - func didReceive(data: Data) { - if self.data == nil { - mutableData = data - } else { - $mutableData.write { $0?.append(data) } - } - - updateDownloadProgress() - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - let copiedRequest = request - return session.dataTask(with: copiedRequest) - } - - /// Called to updated the `downloadProgress` of the instance. - func updateDownloadProgress() { - let totalBytesReceived = Int64(data?.count ?? 0) - let totalBytesExpected = task?.response?.expectedContentLength ?? NSURLSessionTransferSizeUnknown - - downloadProgress.totalUnitCount = totalBytesExpected - downloadProgress.completedUnitCount = totalBytesReceived - - downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) } - } - - /// Validates the request, using the specified closure. - /// - /// - Note: If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter validation: `Validation` closure used to validate the response. - /// - /// - Returns: The instance. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validator: () -> Void = { [unowned self] in - guard self.error == nil, let response = self.response else { return } - - let result = validation(self.request, response, self.data) - - if case let .failure(error) = result { self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) } - - self.eventMonitor?.request(self, - didValidateRequest: self.request, - response: response, - data: self.data, - withResult: result) - } - - $validators.write { $0.append(validator) } - - return self - } -} - -// MARK: - DataStreamRequest - -/// `Request` subclass which streams HTTP response `Data` through a `Handler` closure. -public final class DataStreamRequest: Request { - /// Closure type handling `DataStreamRequest.Stream` values. - public typealias Handler = (Stream) throws -> Void - - /// Type encapsulating an `Event` as it flows through the stream, as well as a `CancellationToken` which can be used - /// to stop the stream at any time. - public struct Stream { - /// Latest `Event` from the stream. - public let event: Event - /// Token used to cancel the stream. - public let token: CancellationToken - - /// Cancel the ongoing stream by canceling the underlying `DataStreamRequest`. - public func cancel() { - token.cancel() - } - } - - /// Type representing an event flowing through the stream. Contains either the `Result` of processing streamed - /// `Data` or the completion of the stream. - public enum Event { - /// Output produced every time the instance receives additional `Data`. The associated value contains the - /// `Result` of processing the incoming `Data`. - case stream(Result) - /// Output produced when the instance has completed, whether due to stream end, cancellation, or an error. - /// Associated `Completion` value contains the final state. - case complete(Completion) - } - - /// Value containing the state of a `DataStreamRequest` when the stream was completed. - public struct Completion { - /// Last `URLRequest` issued by the instance. - public let request: URLRequest? - /// Last `HTTPURLResponse` received by the instance. - public let response: HTTPURLResponse? - /// Last `URLSessionTaskMetrics` produced for the instance. - public let metrics: URLSessionTaskMetrics? - /// `AFError` produced for the instance, if any. - public let error: AFError? - } - - /// Type used to cancel an ongoing stream. - public struct CancellationToken { - weak var request: DataStreamRequest? - - init(_ request: DataStreamRequest) { - self.request = request - } - - /// Cancel the ongoing stream by canceling the underlying `DataStreamRequest`. - public func cancel() { - request?.cancel() - } - } - - /// `URLRequestConvertible` value used to create `URLRequest`s for this instance. - public let convertible: URLRequestConvertible - /// Whether or not the instance will be cancelled if stream parsing encounters an error. - public let automaticallyCancelOnStreamError: Bool - - /// Internal mutable state specific to this type. - struct StreamMutableState { - /// `OutputStream` bound to the `InputStream` produced by `asInputStream`, if it has been called. - var outputStream: OutputStream? - /// Stream closures called as `Data` is received. - var streams: [(_ data: Data) -> Void] = [] - /// Number of currently executing streams. Used to ensure completions are only fired after all streams are - /// enqueued. - var numberOfExecutingStreams = 0 - /// Completion calls enqueued while streams are still executing. - var enqueuedCompletionEvents: [() -> Void] = [] - } - - @Protected - var streamMutableState = StreamMutableState() - - /// Creates a `DataStreamRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` - /// by default. - /// - convertible: `URLRequestConvertible` value used to create `URLRequest`s for this - /// instance. - /// - automaticallyCancelOnStreamError: `Bool` indicating whether the instance will be cancelled when an `Error` - /// is thrown while serializing stream `Data`. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default - /// targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by - /// the `Request`. - init(id: UUID = UUID(), - convertible: URLRequestConvertible, - automaticallyCancelOnStreamError: Bool, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate) { - self.convertible = convertible - self.automaticallyCancelOnStreamError = automaticallyCancelOnStreamError - - super.init(id: id, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - let copiedRequest = request - return session.dataTask(with: copiedRequest) - } - - override func finish(error: AFError? = nil) { - $streamMutableState.write { state in - state.outputStream?.close() - } - - super.finish(error: error) - } - - func didReceive(data: Data) { - $streamMutableState.write { state in - if let stream = state.outputStream { - underlyingQueue.async { - var bytes = Array(data) - stream.write(&bytes, maxLength: bytes.count) - } - } - state.numberOfExecutingStreams += state.streams.count - let localState = state - underlyingQueue.async { localState.streams.forEach { $0(data) } } - } - } - - /// Validates the `URLRequest` and `HTTPURLResponse` received for the instance using the provided `Validation` closure. - /// - /// - Parameter validation: `Validation` closure used to validate the request and response. - /// - /// - Returns: The `DataStreamRequest`. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validator: () -> Void = { [unowned self] in - guard self.error == nil, let response = self.response else { return } - - let result = validation(self.request, response) - - if case let .failure(error) = result { - self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) - } - - self.eventMonitor?.request(self, - didValidateRequest: self.request, - response: response, - withResult: result) - } - - $validators.write { $0.append(validator) } - - return self - } - - /// Produces an `InputStream` that receives the `Data` received by the instance. - /// - /// - Note: The `InputStream` produced by this method must have `open()` called before being able to read `Data`. - /// Additionally, this method will automatically call `resume()` on the instance, regardless of whether or - /// not the creating session has `startRequestsImmediately` set to `true`. - /// - /// - Parameter bufferSize: Size, in bytes, of the buffer between the `OutputStream` and `InputStream`. - /// - /// - Returns: The `InputStream` bound to the internal `OutboundStream`. - public func asInputStream(bufferSize: Int = 1024) -> InputStream? { - defer { resume() } - - var inputStream: InputStream? - $streamMutableState.write { state in - Foundation.Stream.getBoundStreams(withBufferSize: bufferSize, - inputStream: &inputStream, - outputStream: &state.outputStream) - state.outputStream?.open() - } - - return inputStream - } - - func capturingError(from closure: () throws -> Void) { - do { - try closure() - } catch { - self.error = error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) - cancel() - } - } - - func appendStreamCompletion(on queue: DispatchQueue, - stream: @escaping Handler) { - appendResponseSerializer { - self.underlyingQueue.async { - self.responseSerializerDidComplete { - self.$streamMutableState.write { state in - guard state.numberOfExecutingStreams == 0 else { - state.enqueuedCompletionEvents.append { - self.enqueueCompletion(on: queue, stream: stream) - } - - return - } - - self.enqueueCompletion(on: queue, stream: stream) - } - } - } - } - } - - func enqueueCompletion(on queue: DispatchQueue, - stream: @escaping Handler) { - queue.async { - do { - let completion = Completion(request: self.request, - response: self.response, - metrics: self.metrics, - error: self.error) - try stream(.init(event: .complete(completion), token: .init(self))) - } catch { - // Ignore error, as errors on Completion can't be handled anyway. - } - } - } -} - -extension DataStreamRequest.Stream { - /// Incoming `Result` values from `Event.stream`. - public var result: Result? { - guard case let .stream(result) = event else { return nil } - - return result - } - - /// `Success` value of the instance, if any. - public var value: Success? { - guard case let .success(value) = result else { return nil } - - return value - } - - /// `Failure` value of the instance, if any. - public var error: Failure? { - guard case let .failure(error) = result else { return nil } - - return error - } - - /// `Completion` value of the instance, if any. - public var completion: DataStreamRequest.Completion? { - guard case let .complete(completion) = event else { return nil } - - return completion - } -} - -// MARK: - DownloadRequest - -/// `Request` subclass which downloads `Data` to a file on disk using `URLSessionDownloadTask`. -public class DownloadRequest: Request { - /// A set of options to be executed prior to moving a downloaded file from the temporary `URL` to the destination - /// `URL`. - public struct Options: OptionSet { - /// Specifies that intermediate directories for the destination URL should be created. - public static let createIntermediateDirectories = Options(rawValue: 1 << 0) - /// Specifies that any previous file at the destination `URL` should be removed. - public static let removePreviousFile = Options(rawValue: 1 << 1) - - public let rawValue: Int - - public init(rawValue: Int) { - self.rawValue = rawValue - } - } - - // MARK: Destination - - /// A closure executed once a `DownloadRequest` has successfully completed in order to determine where to move the - /// temporary file written to during the download process. The closure takes two arguments: the temporary file URL - /// and the `HTTPURLResponse`, and returns two values: the file URL where the temporary file should be moved and - /// the options defining how the file should be moved. - /// - /// - Note: Downloads from a local `file://` `URL`s do not use the `Destination` closure, as those downloads do not - /// return an `HTTPURLResponse`. Instead the file is merely moved within the temporary directory. - public typealias Destination = (_ temporaryURL: URL, - _ response: HTTPURLResponse) -> (destinationURL: URL, options: Options) - - /// Creates a download file destination closure which uses the default file manager to move the temporary file to a - /// file URL in the first available directory with the specified search path directory and search path domain mask. - /// - /// - Parameters: - /// - directory: The search path directory. `.documentDirectory` by default. - /// - domain: The search path domain mask. `.userDomainMask` by default. - /// - options: `DownloadRequest.Options` used when moving the downloaded file to its destination. None by - /// default. - /// - Returns: The `Destination` closure. - public class func suggestedDownloadDestination(for directory: FileManager.SearchPathDirectory = .documentDirectory, - in domain: FileManager.SearchPathDomainMask = .userDomainMask, - options: Options = []) -> Destination { - { temporaryURL, response in - let directoryURLs = FileManager.default.urls(for: directory, in: domain) - let url = directoryURLs.first?.appendingPathComponent(response.suggestedFilename!) ?? temporaryURL - - return (url, options) - } - } - - /// Default `Destination` used by Alamofire to ensure all downloads persist. This `Destination` prepends - /// `Alamofire_` to the automatically generated download name and moves it within the temporary directory. Files - /// with this destination must be additionally moved if they should survive the system reclamation of temporary - /// space. - static let defaultDestination: Destination = { url, _ in - (defaultDestinationURL(url), []) - } - - /// Default `URL` creation closure. Creates a `URL` in the temporary directory with `Alamofire_` prepended to the - /// provided file name. - static let defaultDestinationURL: (URL) -> URL = { url in - let filename = "Alamofire_\(url.lastPathComponent)" - let destination = url.deletingLastPathComponent().appendingPathComponent(filename) - - return destination - } - - // MARK: Downloadable - - /// Type describing the source used to create the underlying `URLSessionDownloadTask`. - public enum Downloadable { - /// Download should be started from the `URLRequest` produced by the associated `URLRequestConvertible` value. - case request(URLRequestConvertible) - /// Download should be started from the associated resume `Data` value. - case resumeData(Data) - } - - // MARK: Mutable State - - /// Type containing all mutable state for `DownloadRequest` instances. - private struct DownloadRequestMutableState { - /// Possible resume `Data` produced when cancelling the instance. - var resumeData: Data? - /// `URL` to which `Data` is being downloaded. - var fileURL: URL? - } - - /// Protected mutable state specific to `DownloadRequest`. - @Protected - private var mutableDownloadState = DownloadRequestMutableState() - - /// If the download is resumable and is eventually cancelled or fails, this value may be used to resume the download - /// using the `download(resumingWith data:)` API. - /// - /// - Note: For more information about `resumeData`, see [Apple's documentation](https://developer.apple.com/documentation/foundation/urlsessiondownloadtask/1411634-cancel). - public var resumeData: Data? { mutableDownloadState.resumeData ?? error?.downloadResumeData } - /// If the download is successful, the `URL` where the file was downloaded. - public var fileURL: URL? { mutableDownloadState.fileURL } - - // MARK: Initial State - - /// `Downloadable` value used for this instance. - public let downloadable: Downloadable - /// The `Destination` to which the downloaded file is moved. - let destination: Destination - - /// Creates a `DownloadRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - downloadable: `Downloadable` value used to create `URLSessionDownloadTasks` for the instance. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request` - /// - destination: `Destination` closure used to move the downloaded file to its final location. - init(id: UUID = UUID(), - downloadable: Downloadable, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - delegate: RequestDelegate, - destination: @escaping Destination) { - self.downloadable = downloadable - self.destination = destination - - super.init(id: id, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - override func reset() { - super.reset() - - $mutableDownloadState.write { - $0.resumeData = nil - $0.fileURL = nil - } - } - - /// Called when a download has finished. - /// - /// - Parameters: - /// - task: `URLSessionTask` that finished the download. - /// - result: `Result` of the automatic move to `destination`. - func didFinishDownloading(using task: URLSessionTask, with result: Result) { - eventMonitor?.request(self, didFinishDownloadingUsing: task, with: result) - - switch result { - case let .success(url): mutableDownloadState.fileURL = url - case let .failure(error): self.error = error - } - } - - /// Updates the `downloadProgress` using the provided values. - /// - /// - Parameters: - /// - bytesWritten: Total bytes written so far. - /// - totalBytesExpectedToWrite: Total bytes expected to write. - func updateDownloadProgress(bytesWritten: Int64, totalBytesExpectedToWrite: Int64) { - downloadProgress.totalUnitCount = totalBytesExpectedToWrite - downloadProgress.completedUnitCount += bytesWritten - - downloadProgressHandler?.queue.async { self.downloadProgressHandler?.handler(self.downloadProgress) } - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - session.downloadTask(with: request) - } - - /// Creates a `URLSessionTask` from the provided resume data. - /// - /// - Parameters: - /// - data: `Data` used to resume the download. - /// - session: `URLSession` used to create the `URLSessionTask`. - /// - /// - Returns: The `URLSessionTask` created. - public func task(forResumeData data: Data, using session: URLSession) -> URLSessionTask { - session.downloadTask(withResumeData: data) - } - - /// Cancels the instance. Once cancelled, a `DownloadRequest` can no longer be resumed or suspended. - /// - /// - Note: This method will NOT produce resume data. If you wish to cancel and produce resume data, use - /// `cancel(producingResumeData:)` or `cancel(byProducingResumeData:)`. - /// - /// - Returns: The instance. - @discardableResult - override public func cancel() -> Self { - cancel(producingResumeData: false) - } - - /// Cancels the instance, optionally producing resume data. Once cancelled, a `DownloadRequest` can no longer be - /// resumed or suspended. - /// - /// - Note: If `producingResumeData` is `true`, the `resumeData` property will be populated with any resume data, if - /// available. - /// - /// - Returns: The instance. - @discardableResult - public func cancel(producingResumeData shouldProduceResumeData: Bool) -> Self { - cancel(optionallyProducingResumeData: shouldProduceResumeData ? { _ in } : nil) - } - - /// Cancels the instance while producing resume data. Once cancelled, a `DownloadRequest` can no longer be resumed - /// or suspended. - /// - /// - Note: The resume data passed to the completion handler will also be available on the instance's `resumeData` - /// property. - /// - /// - Parameter completionHandler: The completion handler that is called when the download has been successfully - /// cancelled. It is not guaranteed to be called on a particular queue, so you may - /// want use an appropriate queue to perform your work. - /// - /// - Returns: The instance. - @discardableResult - public func cancel(byProducingResumeData completionHandler: @escaping (_ data: Data?) -> Void) -> Self { - cancel(optionallyProducingResumeData: completionHandler) - } - - /// Internal implementation of cancellation that optionally takes a resume data handler. If no handler is passed, - /// cancellation is performed without producing resume data. - /// - /// - Parameter completionHandler: Optional resume data handler. - /// - /// - Returns: The instance. - private func cancel(optionallyProducingResumeData completionHandler: ((_ resumeData: Data?) -> Void)?) -> Self { - $mutableState.write { mutableState in - guard mutableState.state.canTransitionTo(.cancelled) else { return } - - mutableState.state = .cancelled - - underlyingQueue.async { self.didCancel() } - - guard let task = mutableState.tasks.last as? URLSessionDownloadTask, task.state != .completed else { - underlyingQueue.async { self.finish() } - return - } - - if let completionHandler = completionHandler { - // Resume to ensure metrics are gathered. - task.resume() - task.cancel { resumeData in - self.mutableDownloadState.resumeData = resumeData - self.underlyingQueue.async { self.didCancelTask(task) } - completionHandler(resumeData) - } - } else { - // Resume to ensure metrics are gathered. - task.resume() - task.cancel(byProducingResumeData: { _ in }) - self.underlyingQueue.async { self.didCancelTask(task) } - } - } - - return self - } - - /// Validates the request, using the specified closure. - /// - /// - Note: If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter validation: `Validation` closure to validate the response. - /// - /// - Returns: The instance. - @discardableResult - public func validate(_ validation: @escaping Validation) -> Self { - let validator: () -> Void = { [unowned self] in - guard self.error == nil, let response = self.response else { return } - - let result = validation(self.request, response, self.fileURL) - - if case let .failure(error) = result { - self.error = error.asAFError(or: .responseValidationFailed(reason: .customValidationFailed(error: error))) - } - - self.eventMonitor?.request(self, - didValidateRequest: self.request, - response: response, - fileURL: self.fileURL, - withResult: result) - } - - $validators.write { $0.append(validator) } - - return self - } -} - -// MARK: - UploadRequest - -/// `DataRequest` subclass which handles `Data` upload from memory, file, or stream using `URLSessionUploadTask`. -public class UploadRequest: DataRequest { - /// Type describing the origin of the upload, whether `Data`, file, or stream. - public enum Uploadable { - /// Upload from the provided `Data` value. - case data(Data) - /// Upload from the provided file `URL`, as well as a `Bool` determining whether the source file should be - /// automatically removed once uploaded. - case file(URL, shouldRemove: Bool) - /// Upload from the provided `InputStream`. - case stream(InputStream) - } - - // MARK: Initial State - - /// The `UploadableConvertible` value used to produce the `Uploadable` value for this instance. - public let upload: UploadableConvertible - - /// `FileManager` used to perform cleanup tasks, including the removal of multipart form encoded payloads written - /// to disk. - public let fileManager: FileManager - - // MARK: Mutable State - - /// `Uploadable` value used by the instance. - public var uploadable: Uploadable? - - /// Creates an `UploadRequest` using the provided parameters. - /// - /// - Parameters: - /// - id: `UUID` used for the `Hashable` and `Equatable` implementations. `UUID()` by default. - /// - convertible: `UploadConvertible` value used to determine the type of upload to be performed. - /// - underlyingQueue: `DispatchQueue` on which all internal `Request` work is performed. - /// - serializationQueue: `DispatchQueue` on which all serialization work is performed. By default targets - /// `underlyingQueue`, but can be passed another queue from a `Session`. - /// - eventMonitor: `EventMonitor` called for event callbacks from internal `Request` actions. - /// - interceptor: `RequestInterceptor` used throughout the request lifecycle. - /// - delegate: `RequestDelegate` that provides an interface to actions not performed by the `Request`. - init(id: UUID = UUID(), - convertible: UploadConvertible, - underlyingQueue: DispatchQueue, - serializationQueue: DispatchQueue, - eventMonitor: EventMonitor?, - interceptor: RequestInterceptor?, - fileManager: FileManager, - delegate: RequestDelegate) { - upload = convertible - self.fileManager = fileManager - - super.init(id: id, - convertible: convertible, - underlyingQueue: underlyingQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: delegate) - } - - /// Called when the `Uploadable` value has been created from the `UploadConvertible`. - /// - /// - Parameter uploadable: The `Uploadable` that was created. - func didCreateUploadable(_ uploadable: Uploadable) { - self.uploadable = uploadable - - eventMonitor?.request(self, didCreateUploadable: uploadable) - } - - /// Called when the `Uploadable` value could not be created. - /// - /// - Parameter error: `AFError` produced by the failure. - func didFailToCreateUploadable(with error: AFError) { - self.error = error - - eventMonitor?.request(self, didFailToCreateUploadableWithError: error) - - retryOrFinish(error: error) - } - - override func task(for request: URLRequest, using session: URLSession) -> URLSessionTask { - guard let uploadable = uploadable else { - fatalError("Attempting to create a URLSessionUploadTask when Uploadable value doesn't exist.") - } - - switch uploadable { - case let .data(data): return session.uploadTask(with: request, from: data) - case let .file(url, _): return session.uploadTask(with: request, fromFile: url) - case .stream: return session.uploadTask(withStreamedRequest: request) - } - } - - override func reset() { - // Uploadable must be recreated on every retry. - uploadable = nil - - super.reset() - } - - /// Produces the `InputStream` from `uploadable`, if it can. - /// - /// - Note: Calling this method with a non-`.stream` `Uploadable` is a logic error and will crash. - /// - /// - Returns: The `InputStream`. - func inputStream() -> InputStream { - guard let uploadable = uploadable else { - fatalError("Attempting to access the input stream but the uploadable doesn't exist.") - } - - guard case let .stream(stream) = uploadable else { - fatalError("Attempted to access the stream of an UploadRequest that wasn't created with one.") - } - - eventMonitor?.request(self, didProvideInputStream: stream) - - return stream - } - - override public func cleanup() { - defer { super.cleanup() } - - guard - let uploadable = self.uploadable, - case let .file(url, shouldRemove) = uploadable, - shouldRemove - else { return } - - try? fileManager.removeItem(at: url) - } -} - -/// A type that can produce an `UploadRequest.Uploadable` value. -public protocol UploadableConvertible { - /// Produces an `UploadRequest.Uploadable` value from the instance. - /// - /// - Returns: The `UploadRequest.Uploadable`. - /// - Throws: Any `Error` produced during creation. - func createUploadable() throws -> UploadRequest.Uploadable -} - -extension UploadRequest.Uploadable: UploadableConvertible { - public func createUploadable() throws -> UploadRequest.Uploadable { - self - } -} - -/// A type that can be converted to an upload, whether from an `UploadRequest.Uploadable` or `URLRequestConvertible`. -public protocol UploadConvertible: UploadableConvertible & URLRequestConvertible {} diff --git a/Pods/Alamofire/Source/RequestInterceptor.swift b/Pods/Alamofire/Source/RequestInterceptor.swift deleted file mode 100644 index 1912e9c1..00000000 --- a/Pods/Alamofire/Source/RequestInterceptor.swift +++ /dev/null @@ -1,244 +0,0 @@ -// -// RequestInterceptor.swift -// -// Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that can inspect and optionally adapt a `URLRequest` in some manner if necessary. -public protocol RequestAdapter { - /// Inspects and adapts the specified `URLRequest` in some manner and calls the completion handler with the Result. - /// - /// - Parameters: - /// - urlRequest: The `URLRequest` to adapt. - /// - session: The `Session` that will execute the `URLRequest`. - /// - completion: The completion handler that must be called when adaptation is complete. - func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result) -> Void) -} - -// MARK: - - -/// Outcome of determination whether retry is necessary. -public enum RetryResult { - /// Retry should be attempted immediately. - case retry - /// Retry should be attempted after the associated `TimeInterval`. - case retryWithDelay(TimeInterval) - /// Do not retry. - case doNotRetry - /// Do not retry due to the associated `Error`. - case doNotRetryWithError(Error) -} - -extension RetryResult { - var retryRequired: Bool { - switch self { - case .retry, .retryWithDelay: return true - default: return false - } - } - - var delay: TimeInterval? { - switch self { - case let .retryWithDelay(delay): return delay - default: return nil - } - } - - var error: Error? { - guard case let .doNotRetryWithError(error) = self else { return nil } - return error - } -} - -/// A type that determines whether a request should be retried after being executed by the specified session manager -/// and encountering an error. -public protocol RequestRetrier { - /// Determines whether the `Request` should be retried by calling the `completion` closure. - /// - /// This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs - /// to be retried. The one requirement is that the completion closure is called to ensure the request is properly - /// cleaned up after. - /// - /// - Parameters: - /// - request: `Request` that failed due to the provided `Error`. - /// - session: `Session` that produced the `Request`. - /// - error: `Error` encountered while executing the `Request`. - /// - completion: Completion closure to be executed when a retry decision has been determined. - func retry(_ request: Request, for session: Session, dueTo error: Error, completion: @escaping (RetryResult) -> Void) -} - -// MARK: - - -/// Type that provides both `RequestAdapter` and `RequestRetrier` functionality. -public protocol RequestInterceptor: RequestAdapter, RequestRetrier {} - -extension RequestInterceptor { - public func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result) -> Void) { - completion(.success(urlRequest)) - } - - public func retry(_ request: Request, - for session: Session, - dueTo error: Error, - completion: @escaping (RetryResult) -> Void) { - completion(.doNotRetry) - } -} - -/// `RequestAdapter` closure definition. -public typealias AdaptHandler = (URLRequest, Session, _ completion: @escaping (Result) -> Void) -> Void -/// `RequestRetrier` closure definition. -public typealias RetryHandler = (Request, Session, Error, _ completion: @escaping (RetryResult) -> Void) -> Void - -// MARK: - - -/// Closure-based `RequestAdapter`. -open class Adapter: RequestInterceptor { - private let adaptHandler: AdaptHandler - - /// Creates an instance using the provided closure. - /// - /// - Parameter adaptHandler: `AdaptHandler` closure to be executed when handling request adaptation. - public init(_ adaptHandler: @escaping AdaptHandler) { - self.adaptHandler = adaptHandler - } - - open func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result) -> Void) { - adaptHandler(urlRequest, session, completion) - } -} - -// MARK: - - -/// Closure-based `RequestRetrier`. -open class Retrier: RequestInterceptor { - private let retryHandler: RetryHandler - - /// Creates an instance using the provided closure. - /// - /// - Parameter retryHandler: `RetryHandler` closure to be executed when handling request retry. - public init(_ retryHandler: @escaping RetryHandler) { - self.retryHandler = retryHandler - } - - open func retry(_ request: Request, - for session: Session, - dueTo error: Error, - completion: @escaping (RetryResult) -> Void) { - retryHandler(request, session, error, completion) - } -} - -// MARK: - - -/// `RequestInterceptor` which can use multiple `RequestAdapter` and `RequestRetrier` values. -open class Interceptor: RequestInterceptor { - /// All `RequestAdapter`s associated with the instance. These adapters will be run until one fails. - public let adapters: [RequestAdapter] - /// All `RequestRetrier`s associated with the instance. These retriers will be run one at a time until one triggers retry. - public let retriers: [RequestRetrier] - - /// Creates an instance from `AdaptHandler` and `RetryHandler` closures. - /// - /// - Parameters: - /// - adaptHandler: `AdaptHandler` closure to be used. - /// - retryHandler: `RetryHandler` closure to be used. - public init(adaptHandler: @escaping AdaptHandler, retryHandler: @escaping RetryHandler) { - adapters = [Adapter(adaptHandler)] - retriers = [Retrier(retryHandler)] - } - - /// Creates an instance from `RequestAdapter` and `RequestRetrier` values. - /// - /// - Parameters: - /// - adapter: `RequestAdapter` value to be used. - /// - retrier: `RequestRetrier` value to be used. - public init(adapter: RequestAdapter, retrier: RequestRetrier) { - adapters = [adapter] - retriers = [retrier] - } - - /// Creates an instance from the arrays of `RequestAdapter` and `RequestRetrier` values. - /// - /// - Parameters: - /// - adapters: `RequestAdapter` values to be used. - /// - retriers: `RequestRetrier` values to be used. - /// - interceptors: `RequestInterceptor`s to be used. - public init(adapters: [RequestAdapter] = [], retriers: [RequestRetrier] = [], interceptors: [RequestInterceptor] = []) { - self.adapters = adapters + interceptors - self.retriers = retriers + interceptors - } - - open func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result) -> Void) { - adapt(urlRequest, for: session, using: adapters, completion: completion) - } - - private func adapt(_ urlRequest: URLRequest, - for session: Session, - using adapters: [RequestAdapter], - completion: @escaping (Result) -> Void) { - var pendingAdapters = adapters - - guard !pendingAdapters.isEmpty else { completion(.success(urlRequest)); return } - - let adapter = pendingAdapters.removeFirst() - - adapter.adapt(urlRequest, for: session) { result in - switch result { - case let .success(urlRequest): - self.adapt(urlRequest, for: session, using: pendingAdapters, completion: completion) - case .failure: - completion(result) - } - } - } - - open func retry(_ request: Request, - for session: Session, - dueTo error: Error, - completion: @escaping (RetryResult) -> Void) { - retry(request, for: session, dueTo: error, using: retriers, completion: completion) - } - - private func retry(_ request: Request, - for session: Session, - dueTo error: Error, - using retriers: [RequestRetrier], - completion: @escaping (RetryResult) -> Void) { - var pendingRetriers = retriers - - guard !pendingRetriers.isEmpty else { completion(.doNotRetry); return } - - let retrier = pendingRetriers.removeFirst() - - retrier.retry(request, for: session, dueTo: error) { result in - switch result { - case .retry, .retryWithDelay, .doNotRetryWithError: - completion(result) - case .doNotRetry: - // Only continue to the next retrier if retry was not triggered and no error was encountered - self.retry(request, for: session, dueTo: error, using: pendingRetriers, completion: completion) - } - } - } -} diff --git a/Pods/Alamofire/Source/RequestTaskMap.swift b/Pods/Alamofire/Source/RequestTaskMap.swift deleted file mode 100644 index 85b58f37..00000000 --- a/Pods/Alamofire/Source/RequestTaskMap.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// RequestTaskMap.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A type that maintains a two way, one to one map of `URLSessionTask`s to `Request`s. -struct RequestTaskMap { - private typealias Events = (completed: Bool, metricsGathered: Bool) - - private var tasksToRequests: [URLSessionTask: Request] - private var requestsToTasks: [Request: URLSessionTask] - private var taskEvents: [URLSessionTask: Events] - - var requests: [Request] { - Array(tasksToRequests.values) - } - - init(tasksToRequests: [URLSessionTask: Request] = [:], - requestsToTasks: [Request: URLSessionTask] = [:], - taskEvents: [URLSessionTask: (completed: Bool, metricsGathered: Bool)] = [:]) { - self.tasksToRequests = tasksToRequests - self.requestsToTasks = requestsToTasks - self.taskEvents = taskEvents - } - - subscript(_ request: Request) -> URLSessionTask? { - get { requestsToTasks[request] } - set { - guard let newValue = newValue else { - guard let task = requestsToTasks[request] else { - fatalError("RequestTaskMap consistency error: no task corresponding to request found.") - } - - requestsToTasks.removeValue(forKey: request) - tasksToRequests.removeValue(forKey: task) - taskEvents.removeValue(forKey: task) - - return - } - - requestsToTasks[request] = newValue - tasksToRequests[newValue] = request - taskEvents[newValue] = (completed: false, metricsGathered: false) - } - } - - subscript(_ task: URLSessionTask) -> Request? { - get { tasksToRequests[task] } - set { - guard let newValue = newValue else { - guard let request = tasksToRequests[task] else { - fatalError("RequestTaskMap consistency error: no request corresponding to task found.") - } - - tasksToRequests.removeValue(forKey: task) - requestsToTasks.removeValue(forKey: request) - taskEvents.removeValue(forKey: task) - - return - } - - tasksToRequests[task] = newValue - requestsToTasks[newValue] = task - taskEvents[task] = (completed: false, metricsGathered: false) - } - } - - var count: Int { - precondition(tasksToRequests.count == requestsToTasks.count, - "RequestTaskMap.count invalid, requests.count: \(tasksToRequests.count) != tasks.count: \(requestsToTasks.count)") - - return tasksToRequests.count - } - - var eventCount: Int { - precondition(taskEvents.count == count, "RequestTaskMap.eventCount invalid, count: \(count) != taskEvents.count: \(taskEvents.count)") - - return taskEvents.count - } - - var isEmpty: Bool { - precondition(tasksToRequests.isEmpty == requestsToTasks.isEmpty, - "RequestTaskMap.isEmpty invalid, requests.isEmpty: \(tasksToRequests.isEmpty) != tasks.isEmpty: \(requestsToTasks.isEmpty)") - - return tasksToRequests.isEmpty - } - - var isEventsEmpty: Bool { - precondition(taskEvents.isEmpty == isEmpty, "RequestTaskMap.isEventsEmpty invalid, isEmpty: \(isEmpty) != taskEvents.isEmpty: \(taskEvents.isEmpty)") - - return taskEvents.isEmpty - } - - mutating func disassociateIfNecessaryAfterGatheringMetricsForTask(_ task: URLSessionTask) -> Bool { - guard let events = taskEvents[task] else { - fatalError("RequestTaskMap consistency error: no events corresponding to task found.") - } - - switch (events.completed, events.metricsGathered) { - case (_, true): fatalError("RequestTaskMap consistency error: duplicate metricsGatheredForTask call.") - case (false, false): taskEvents[task] = (completed: false, metricsGathered: true); return false - case (true, false): self[task] = nil; return true - } - } - - mutating func disassociateIfNecessaryAfterCompletingTask(_ task: URLSessionTask) -> Bool { - guard let events = taskEvents[task] else { - fatalError("RequestTaskMap consistency error: no events corresponding to task found.") - } - - switch (events.completed, events.metricsGathered) { - case (true, _): fatalError("RequestTaskMap consistency error: duplicate completionReceivedForTask call.") - #if os(Linux) // Linux doesn't gather metrics, so unconditionally remove the reference and return true. - default: self[task] = nil; return true - #else - case (false, false): - if #available(macOS 10.12, iOS 10, watchOS 7, tvOS 10, *) { - taskEvents[task] = (completed: true, metricsGathered: false); return false - } else { - // watchOS < 7 doesn't gather metrics, so unconditionally remove the reference and return true. - self[task] = nil; return true - } - case (false, true): - self[task] = nil; return true - #endif - } - } -} diff --git a/Pods/Alamofire/Source/Response.swift b/Pods/Alamofire/Source/Response.swift deleted file mode 100644 index 92e9c44e..00000000 --- a/Pods/Alamofire/Source/Response.swift +++ /dev/null @@ -1,454 +0,0 @@ -// -// Response.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Default type of `DataResponse` returned by Alamofire, with an `AFError` `Failure` type. -public typealias AFDataResponse = DataResponse -/// Default type of `DownloadResponse` returned by Alamofire, with an `AFError` `Failure` type. -public typealias AFDownloadResponse = DownloadResponse - -/// Type used to store all values associated with a serialized response of a `DataRequest` or `UploadRequest`. -public struct DataResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The data returned by the server. - public let data: Data? - - /// The final metrics of the response. - /// - /// - Note: Due to `FB7624529`, collection of `URLSessionTaskMetrics` on watchOS is currently disabled.` - /// - public let metrics: URLSessionTaskMetrics? - - /// The time taken to serialize the response. - public let serializationDuration: TimeInterval - - /// The result of response serialization. - public let result: Result - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Success? { result.success } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Failure? { result.failure } - - /// Creates a `DataResponse` instance with the specified parameters derived from the response serialization. - /// - /// - Parameters: - /// - request: The `URLRequest` sent to the server. - /// - response: The `HTTPURLResponse` from the server. - /// - data: The `Data` returned by the server. - /// - metrics: The `URLSessionTaskMetrics` of the `DataRequest` or `UploadRequest`. - /// - serializationDuration: The duration taken by serialization. - /// - result: The `Result` of response serialization. - public init(request: URLRequest?, - response: HTTPURLResponse?, - data: Data?, - metrics: URLSessionTaskMetrics?, - serializationDuration: TimeInterval, - result: Result) { - self.request = request - self.response = response - self.data = data - self.metrics = metrics - self.serializationDuration = serializationDuration - self.result = result - } -} - -// MARK: - - -extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - "\(result)" - } - - /// The debug textual representation used when written to an output stream, which includes (if available) a summary - /// of the `URLRequest`, the request's headers and body (if decodable as a `String` below 100KB); the - /// `HTTPURLResponse`'s status code, headers, and body; the duration of the network and serialization actions; and - /// the `Result` of serialization. - public var debugDescription: String { - guard let urlRequest = request else { return "[Request]: None\n[Result]: \(result)" } - - let requestDescription = DebugDescription.description(of: urlRequest) - - let responseDescription = response.map { response in - let responseBodyDescription = DebugDescription.description(for: data, headers: response.headers) - - return """ - \(DebugDescription.description(of: response)) - \(responseBodyDescription.indentingNewlines()) - """ - } ?? "[Response]: None" - - let networkDuration = metrics.map { "\($0.taskInterval.duration)s" } ?? "None" - - return """ - \(requestDescription) - \(responseDescription) - [Network Duration]: \(networkDuration) - [Serialization Duration]: \(serializationDuration)s - [Result]: \(result) - """ - } -} - -// MARK: - - -extension DataResponse { - /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Success) -> NewSuccess) -> DataResponse { - DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.map(transform)) - } - - /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result - /// value as a parameter. - /// - /// Use the `tryMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.tryMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's - /// result is a failure, returns the same failure. - public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DataResponse { - DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMap(transform)) - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DataResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func mapError(_ transform: (Failure) -> NewFailure) -> DataResponse { - DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.mapError(transform)) - } - - /// Evaluates the specified closure when the `DataResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `tryMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DataResponse = ... - /// let possibleObject = possibleData.tryMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DataResponse` instance containing the result of the transform. - public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DataResponse { - DataResponse(request: request, - response: response, - data: data, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMapError(transform)) - } -} - -// MARK: - - -/// Used to store all data associated with a serialized response of a download request. -public struct DownloadResponse { - /// The URL request sent to the server. - public let request: URLRequest? - - /// The server's response to the URL request. - public let response: HTTPURLResponse? - - /// The final destination URL of the data returned from the server after it is moved. - public let fileURL: URL? - - /// The resume data generated if the request was cancelled. - public let resumeData: Data? - - /// The final metrics of the response. - /// - /// - Note: Due to `FB7624529`, collection of `URLSessionTaskMetrics` on watchOS is currently disabled.` - /// - public let metrics: URLSessionTaskMetrics? - - /// The time taken to serialize the response. - public let serializationDuration: TimeInterval - - /// The result of response serialization. - public let result: Result - - /// Returns the associated value of the result if it is a success, `nil` otherwise. - public var value: Success? { result.success } - - /// Returns the associated error value if the result if it is a failure, `nil` otherwise. - public var error: Failure? { result.failure } - - /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. - /// - /// - Parameters: - /// - request: The `URLRequest` sent to the server. - /// - response: The `HTTPURLResponse` from the server. - /// - temporaryURL: The temporary destination `URL` of the data returned from the server. - /// - destinationURL: The final destination `URL` of the data returned from the server, if it was moved. - /// - resumeData: The resume `Data` generated if the request was cancelled. - /// - metrics: The `URLSessionTaskMetrics` of the `DownloadRequest`. - /// - serializationDuration: The duration taken by serialization. - /// - result: The `Result` of response serialization. - public init(request: URLRequest?, - response: HTTPURLResponse?, - fileURL: URL?, - resumeData: Data?, - metrics: URLSessionTaskMetrics?, - serializationDuration: TimeInterval, - result: Result) { - self.request = request - self.response = response - self.fileURL = fileURL - self.resumeData = resumeData - self.metrics = metrics - self.serializationDuration = serializationDuration - self.result = result - } -} - -// MARK: - - -extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertible { - /// The textual representation used when written to an output stream, which includes whether the result was a - /// success or failure. - public var description: String { - "\(result)" - } - - /// The debug textual representation used when written to an output stream, which includes the URL request, the URL - /// response, the temporary and destination URLs, the resume data, the durations of the network and serialization - /// actions, and the response serialization result. - public var debugDescription: String { - guard let urlRequest = request else { return "[Request]: None\n[Result]: \(result)" } - - let requestDescription = DebugDescription.description(of: urlRequest) - let responseDescription = response.map(DebugDescription.description(of:)) ?? "[Response]: None" - let networkDuration = metrics.map { "\($0.taskInterval.duration)s" } ?? "None" - let resumeDataDescription = resumeData.map { "\($0)" } ?? "None" - - return """ - \(requestDescription) - \(responseDescription) - [File URL]: \(fileURL?.path ?? "None") - [Resume Data]: \(resumeDataDescription) - [Network Duration]: \(networkDuration) - [Serialization Duration]: \(serializationDuration)s - [Result]: \(result) - """ - } -} - -// MARK: - - -extension DownloadResponse { - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `map` method with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleInt = possibleData.map { $0.count } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's - /// result is a failure, returns a response wrapping the same failure. - public func map(_ transform: (Success) -> NewSuccess) -> DownloadResponse { - DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.map(transform)) - } - - /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped - /// result value as a parameter. - /// - /// Use the `tryMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.tryMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance's result. - /// - /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this - /// instance's result is a failure, returns the same failure. - public func tryMap(_ transform: (Success) throws -> NewSuccess) -> DownloadResponse { - DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMap(transform)) - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `mapError` function with a closure that does not throw. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let withMyError = possibleData.mapError { MyError.error($0) } - /// - /// - Parameter transform: A closure that takes the error of the instance. - /// - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func mapError(_ transform: (Failure) -> NewFailure) -> DownloadResponse { - DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.mapError(transform)) - } - - /// Evaluates the specified closure when the `DownloadResponse` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `tryMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: DownloadResponse = ... - /// let possibleObject = possibleData.tryMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `DownloadResponse` instance containing the result of the transform. - public func tryMapError(_ transform: (Failure) throws -> NewFailure) -> DownloadResponse { - DownloadResponse(request: request, - response: response, - fileURL: fileURL, - resumeData: resumeData, - metrics: metrics, - serializationDuration: serializationDuration, - result: result.tryMapError(transform)) - } -} - -private enum DebugDescription { - static func description(of request: URLRequest) -> String { - let requestSummary = "\(request.httpMethod!) \(request)" - let requestHeadersDescription = DebugDescription.description(for: request.headers) - let requestBodyDescription = DebugDescription.description(for: request.httpBody, headers: request.headers) - - return """ - [Request]: \(requestSummary) - \(requestHeadersDescription.indentingNewlines()) - \(requestBodyDescription.indentingNewlines()) - """ - } - - static func description(of response: HTTPURLResponse) -> String { - """ - [Response]: - [Status Code]: \(response.statusCode) - \(DebugDescription.description(for: response.headers).indentingNewlines()) - """ - } - - static func description(for headers: HTTPHeaders) -> String { - guard !headers.isEmpty else { return "[Headers]: None" } - - let headerDescription = "\(headers.sorted())".indentingNewlines() - return """ - [Headers]: - \(headerDescription) - """ - } - - static func description(for data: Data?, - headers: HTTPHeaders, - allowingPrintableTypes printableTypes: [String] = ["json", "xml", "text"], - maximumLength: Int = 100_000) -> String { - guard let data = data, !data.isEmpty else { return "[Body]: None" } - - guard - data.count <= maximumLength, - printableTypes.compactMap({ headers["Content-Type"]?.contains($0) }).contains(true) - else { return "[Body]: \(data.count) bytes" } - - return """ - [Body]: - \(String(decoding: data, as: UTF8.self) - .trimmingCharacters(in: .whitespacesAndNewlines) - .indentingNewlines()) - """ - } -} - -extension String { - fileprivate func indentingNewlines(by spaceCount: Int = 4) -> String { - let spaces = String(repeating: " ", count: spaceCount) - return replacingOccurrences(of: "\n", with: "\n\(spaces)") - } -} diff --git a/Pods/Alamofire/Source/ResponseSerialization.swift b/Pods/Alamofire/Source/ResponseSerialization.swift deleted file mode 100644 index 1b77016d..00000000 --- a/Pods/Alamofire/Source/ResponseSerialization.swift +++ /dev/null @@ -1,1116 +0,0 @@ -// -// ResponseSerialization.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -// MARK: Protocols - -/// The type to which all data response serializers must conform in order to serialize a response. -public protocol DataResponseSerializerProtocol { - /// The type of serialized object to be created. - associatedtype SerializedObject - - /// Serialize the response `Data` into the provided type.. - /// - /// - Parameters: - /// - request: `URLRequest` which was used to perform the request, if any. - /// - response: `HTTPURLResponse` received from the server, if any. - /// - data: `Data` returned from the server, if any. - /// - error: `Error` produced by Alamofire or the underlying `URLSession` during the request. - /// - /// - Returns: The `SerializedObject`. - /// - Throws: Any `Error` produced during serialization. - func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> SerializedObject -} - -/// The type to which all download response serializers must conform in order to serialize a response. -public protocol DownloadResponseSerializerProtocol { - /// The type of serialized object to be created. - associatedtype SerializedObject - - /// Serialize the downloaded response `Data` from disk into the provided type.. - /// - /// - Parameters: - /// - request: `URLRequest` which was used to perform the request, if any. - /// - response: `HTTPURLResponse` received from the server, if any. - /// - fileURL: File `URL` to which the response data was downloaded. - /// - error: `Error` produced by Alamofire or the underlying `URLSession` during the request. - /// - /// - Returns: The `SerializedObject`. - /// - Throws: Any `Error` produced during serialization. - func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> SerializedObject -} - -/// A serializer that can handle both data and download responses. -public protocol ResponseSerializer: DataResponseSerializerProtocol & DownloadResponseSerializerProtocol { - /// `DataPreprocessor` used to prepare incoming `Data` for serialization. - var dataPreprocessor: DataPreprocessor { get } - /// `HTTPMethod`s for which empty response bodies are considered appropriate. - var emptyRequestMethods: Set { get } - /// HTTP response codes for which empty response bodies are considered appropriate. - var emptyResponseCodes: Set { get } -} - -/// Type used to preprocess `Data` before it handled by a serializer. -public protocol DataPreprocessor { - /// Process `Data` before it's handled by a serializer. - /// - Parameter data: The raw `Data` to process. - func preprocess(_ data: Data) throws -> Data -} - -/// `DataPreprocessor` that returns passed `Data` without any transform. -public struct PassthroughPreprocessor: DataPreprocessor { - public init() {} - - public func preprocess(_ data: Data) throws -> Data { data } -} - -/// `DataPreprocessor` that trims Google's typical `)]}',\n` XSSI JSON header. -public struct GoogleXSSIPreprocessor: DataPreprocessor { - public init() {} - - public func preprocess(_ data: Data) throws -> Data { - (data.prefix(6) == Data(")]}',\n".utf8)) ? data.dropFirst(6) : data - } -} - -extension ResponseSerializer { - /// Default `DataPreprocessor`. `PassthroughPreprocessor` by default. - public static var defaultDataPreprocessor: DataPreprocessor { PassthroughPreprocessor() } - /// Default `HTTPMethod`s for which empty response bodies are considered appropriate. `[.head]` by default. - public static var defaultEmptyRequestMethods: Set { [.head] } - /// HTTP response codes for which empty response bodies are considered appropriate. `[204, 205]` by default. - public static var defaultEmptyResponseCodes: Set { [204, 205] } - - public var dataPreprocessor: DataPreprocessor { Self.defaultDataPreprocessor } - public var emptyRequestMethods: Set { Self.defaultEmptyRequestMethods } - public var emptyResponseCodes: Set { Self.defaultEmptyResponseCodes } - - /// Determines whether the `request` allows empty response bodies, if `request` exists. - /// - /// - Parameter request: `URLRequest` to evaluate. - /// - /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `request` was `nil`. - public func requestAllowsEmptyResponseData(_ request: URLRequest?) -> Bool? { - request.flatMap { $0.httpMethod } - .flatMap(HTTPMethod.init) - .map { emptyRequestMethods.contains($0) } - } - - /// Determines whether the `response` allows empty response bodies, if `response` exists`. - /// - /// - Parameter response: `HTTPURLResponse` to evaluate. - /// - /// - Returns: `Bool` representing the outcome of the evaluation, or `nil` if `response` was `nil`. - public func responseAllowsEmptyResponseData(_ response: HTTPURLResponse?) -> Bool? { - response.flatMap { $0.statusCode } - .map { emptyResponseCodes.contains($0) } - } - - /// Determines whether `request` and `response` allow empty response bodies. - /// - /// - Parameters: - /// - request: `URLRequest` to evaluate. - /// - response: `HTTPURLResponse` to evaluate. - /// - /// - Returns: `true` if `request` or `response` allow empty bodies, `false` otherwise. - public func emptyResponseAllowed(forRequest request: URLRequest?, response: HTTPURLResponse?) -> Bool { - (requestAllowsEmptyResponseData(request) == true) || (responseAllowsEmptyResponseData(response) == true) - } -} - -/// By default, any serializer declared to conform to both types will get file serialization for free, as it just feeds -/// the data read from disk into the data response serializer. -extension DownloadResponseSerializerProtocol where Self: DataResponseSerializerProtocol { - public func serializeDownload(request: URLRequest?, response: HTTPURLResponse?, fileURL: URL?, error: Error?) throws -> Self.SerializedObject { - guard error == nil else { throw error! } - - guard let fileURL = fileURL else { - throw AFError.responseSerializationFailed(reason: .inputFileNil) - } - - let data: Data - do { - data = try Data(contentsOf: fileURL) - } catch { - throw AFError.responseSerializationFailed(reason: .inputFileReadFailed(at: fileURL)) - } - - do { - return try serialize(request: request, response: response, data: data, error: error) - } catch { - throw error - } - } -} - -// MARK: - Default - -extension DataRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let result = AFResult(value: self.data, error: self.error) - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DataResponse(request: self.request, - response: self.response, - data: self.data, - metrics: self.metrics, - serializationDuration: 0, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default - /// - responseSerializer: The response serializer responsible for serializing the request, response, and data. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, - responseSerializer: Serializer, - completionHandler: @escaping (AFDataResponse) -> Void) - -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let start = ProcessInfo.processInfo.systemUptime - let result: AFResult = Result { - try responseSerializer.serialize(request: self.request, - response: self.response, - data: self.data, - error: self.error) - }.mapError { error in - error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) - } - - let end = ProcessInfo.processInfo.systemUptime - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DataResponse(request: self.request, - response: self.response, - data: self.data, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - guard let serializerError = result.failure, let delegate = self.delegate else { - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - return - } - - delegate.retryResult(for: self, dueTo: serializerError) { retryResult in - var didComplete: (() -> Void)? - - defer { - if let didComplete = didComplete { - self.responseSerializerDidComplete { queue.async { didComplete() } } - } - } - - switch retryResult { - case .doNotRetry: - didComplete = { completionHandler(response) } - - case let .doNotRetryWithError(retryError): - let result: AFResult = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError")) - - let response = DataResponse(request: self.request, - response: self.response, - data: self.data, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - didComplete = { completionHandler(response) } - - case .retry, .retryWithDelay: - delegate.retryRequest(self, withDelay: retryResult.delay) - } - } - } - } - - return self - } -} - -extension DownloadRequest { - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let result = AFResult(value: self.fileURL, error: self.error) - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DownloadResponse(request: self.request, - response: self.response, - fileURL: self.fileURL, - resumeData: self.resumeData, - metrics: self.metrics, - serializationDuration: 0, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - } - } - - return self - } - - /// Adds a handler to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - responseSerializer: The response serializer responsible for serializing the request, response, and data - /// contained in the destination `URL`. - /// - completionHandler: The code to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func response(queue: DispatchQueue = .main, - responseSerializer: Serializer, - completionHandler: @escaping (AFDownloadResponse) -> Void) - -> Self { - appendResponseSerializer { - // Start work that should be on the serialization queue. - let start = ProcessInfo.processInfo.systemUptime - let result: AFResult = Result { - try responseSerializer.serializeDownload(request: self.request, - response: self.response, - fileURL: self.fileURL, - error: self.error) - }.mapError { error in - error.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: error))) - } - let end = ProcessInfo.processInfo.systemUptime - // End work that should be on the serialization queue. - - self.underlyingQueue.async { - let response = DownloadResponse(request: self.request, - response: self.response, - fileURL: self.fileURL, - resumeData: self.resumeData, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - self.eventMonitor?.request(self, didParseResponse: response) - - guard let serializerError = result.failure, let delegate = self.delegate else { - self.responseSerializerDidComplete { queue.async { completionHandler(response) } } - return - } - - delegate.retryResult(for: self, dueTo: serializerError) { retryResult in - var didComplete: (() -> Void)? - - defer { - if let didComplete = didComplete { - self.responseSerializerDidComplete { queue.async { didComplete() } } - } - } - - switch retryResult { - case .doNotRetry: - didComplete = { completionHandler(response) } - - case let .doNotRetryWithError(retryError): - let result: AFResult = .failure(retryError.asAFError(orFailWith: "Received retryError was not already AFError")) - - let response = DownloadResponse(request: self.request, - response: self.response, - fileURL: self.fileURL, - resumeData: self.resumeData, - metrics: self.metrics, - serializationDuration: end - start, - result: result) - - didComplete = { completionHandler(response) } - - case .retry, .retryWithDelay: - delegate.retryRequest(self, withDelay: retryResult.delay) - } - } - } - } - - return self - } -} - -// MARK: - URL - -/// A `DownloadResponseSerializerProtocol` that performs only `Error` checking and ensures that a downloaded `fileURL` -/// is present. -public struct URLResponseSerializer: DownloadResponseSerializerProtocol { - /// Creates an instance. - public init() {} - - public func serializeDownload(request: URLRequest?, - response: HTTPURLResponse?, - fileURL: URL?, - error: Error?) throws -> URL { - guard error == nil else { throw error! } - - guard let url = fileURL else { - throw AFError.responseSerializationFailed(reason: .inputFileNil) - } - - return url - } -} - -extension DownloadRequest { - /// Adds a handler using a `URLResponseSerializer` to be called once the request is finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is called. `.main` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseURL(queue: DispatchQueue = .main, - completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { - response(queue: queue, responseSerializer: URLResponseSerializer(), completionHandler: completionHandler) - } -} - -// MARK: - Data - -/// A `ResponseSerializer` that performs minimal response checking and returns any response `Data` as-is. By default, a -/// request returning `nil` or no data is considered an error. However, if the request has an `HTTPMethod` or the -/// response has an HTTP status code valid for empty responses, then an empty `Data` value is returned. -public final class DataResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - - /// Creates an instance using the provided values. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - public init(dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = DataResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DataResponseSerializer.defaultEmptyRequestMethods) { - self.dataPreprocessor = dataPreprocessor - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Data { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - return Data() - } - - data = try dataPreprocessor.preprocess(data) - - return data - } -} - -extension DataRequest { - /// Adds a handler using a `DataResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is called. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseData(queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = DataResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DataResponseSerializer.defaultEmptyRequestMethods, - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: DataResponseSerializer(dataPreprocessor: dataPreprocessor, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - completionHandler: completionHandler) - } -} - -extension DownloadRequest { - /// Adds a handler using a `DataResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is called. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseData(queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = DataResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = DataResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DataResponseSerializer.defaultEmptyRequestMethods, - completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: DataResponseSerializer(dataPreprocessor: dataPreprocessor, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - completionHandler: completionHandler) - } -} - -// MARK: - String - -/// A `ResponseSerializer` that decodes the response data as a `String`. By default, a request returning `nil` or no -/// data is considered an error. However, if the request has an `HTTPMethod` or the response has an HTTP status code -/// valid for empty responses, then an empty `String` is returned. -public final class StringResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - /// Optional string encoding used to validate the response. - public let encoding: String.Encoding? - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - - /// Creates an instance with the provided values. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - encoding: A string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - public init(dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor, - encoding: String.Encoding? = nil, - emptyResponseCodes: Set = StringResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = StringResponseSerializer.defaultEmptyRequestMethods) { - self.dataPreprocessor = dataPreprocessor - self.encoding = encoding - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> String { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - return "" - } - - data = try dataPreprocessor.preprocess(data) - - var convertedEncoding = encoding - - if let encodingName = response?.textEncodingName, convertedEncoding == nil { - convertedEncoding = String.Encoding(ianaCharsetName: encodingName) - } - - let actualEncoding = convertedEncoding ?? .isoLatin1 - - guard let string = String(data: data, encoding: actualEncoding) else { - throw AFError.responseSerializationFailed(reason: .stringSerializationFailed(encoding: actualEncoding)) - } - - return string - } -} - -extension DataRequest { - /// Adds a handler using a `StringResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseString(queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor, - encoding: String.Encoding? = nil, - emptyResponseCodes: Set = StringResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = StringResponseSerializer.defaultEmptyRequestMethods, - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: StringResponseSerializer(dataPreprocessor: dataPreprocessor, - encoding: encoding, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - completionHandler: completionHandler) - } -} - -extension DownloadRequest { - /// Adds a handler using a `StringResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseString(queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = StringResponseSerializer.defaultDataPreprocessor, - encoding: String.Encoding? = nil, - emptyResponseCodes: Set = StringResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = StringResponseSerializer.defaultEmptyRequestMethods, - completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: StringResponseSerializer(dataPreprocessor: dataPreprocessor, - encoding: encoding, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - completionHandler: completionHandler) - } -} - -// MARK: - JSON - -/// A `ResponseSerializer` that decodes the response data using `JSONSerialization`. By default, a request returning -/// `nil` or no data is considered an error. However, if the request has an `HTTPMethod` or the response has an -/// HTTP status code valid for empty responses, then an `NSNull` value is returned. -public final class JSONResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - /// `JSONSerialization.ReadingOptions` used when serializing a response. - public let options: JSONSerialization.ReadingOptions - - /// Creates an instance with the provided values. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - /// - options: The options to use. `.allowFragments` by default. - public init(dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = JSONResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = JSONResponseSerializer.defaultEmptyRequestMethods, - options: JSONSerialization.ReadingOptions = .allowFragments) { - self.dataPreprocessor = dataPreprocessor - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - self.options = options - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> Any { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - return NSNull() - } - - data = try dataPreprocessor.preprocess(data) - - do { - return try JSONSerialization.jsonObject(with: data, options: options) - } catch { - throw AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error)) - } - } -} - -extension DataRequest { - /// Adds a handler using a `JSONResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - options: `JSONSerialization.ReadingOptions` used when parsing the response. `.allowFragments` - /// by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseJSON(queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = JSONResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = JSONResponseSerializer.defaultEmptyRequestMethods, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: JSONResponseSerializer(dataPreprocessor: dataPreprocessor, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods, - options: options), - completionHandler: completionHandler) - } -} - -extension DownloadRequest { - /// Adds a handler using a `JSONResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - options: `JSONSerialization.ReadingOptions` used when parsing the response. `.allowFragments` - /// by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseJSON(queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = JSONResponseSerializer.defaultDataPreprocessor, - emptyResponseCodes: Set = JSONResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = JSONResponseSerializer.defaultEmptyRequestMethods, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: JSONResponseSerializer(dataPreprocessor: dataPreprocessor, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods, - options: options), - completionHandler: completionHandler) - } -} - -// MARK: - Empty - -/// Protocol representing an empty response. Use `T.emptyValue()` to get an instance. -public protocol EmptyResponse { - /// Empty value for the conforming type. - /// - /// - Returns: Value of `Self` to use for empty values. - static func emptyValue() -> Self -} - -/// Type representing an empty value. Use `Empty.value` to get the static instance. -public struct Empty: Codable { - /// Static `Empty` instance used for all `Empty` responses. - public static let value = Empty() -} - -extension Empty: EmptyResponse { - public static func emptyValue() -> Empty { - value - } -} - -// MARK: - DataDecoder Protocol - -/// Any type which can decode `Data` into a `Decodable` type. -public protocol DataDecoder { - /// Decode `Data` into the provided type. - /// - /// - Parameters: - /// - type: The `Type` to be decoded. - /// - data: The `Data` to be decoded. - /// - /// - Returns: The decoded value of type `D`. - /// - Throws: Any error that occurs during decode. - func decode(_ type: D.Type, from data: Data) throws -> D -} - -/// `JSONDecoder` automatically conforms to `DataDecoder`. -extension JSONDecoder: DataDecoder {} -/// `PropertyListDecoder` automatically conforms to `DataDecoder`. -extension PropertyListDecoder: DataDecoder {} - -// MARK: - Decodable - -/// A `ResponseSerializer` that decodes the response data as a generic value using any type that conforms to -/// `DataDecoder`. By default, this is an instance of `JSONDecoder`. Additionally, a request returning `nil` or no data -/// is considered an error. However, if the request has an `HTTPMethod` or the response has an HTTP status code valid -/// for empty responses then an empty value will be returned. If the decoded type conforms to `EmptyResponse`, the -/// type's `emptyValue()` will be returned. If the decoded type is `Empty`, the `.value` instance is returned. If the -/// decoded type *does not* conform to `EmptyResponse` and isn't `Empty`, an error will be produced. -public final class DecodableResponseSerializer: ResponseSerializer { - public let dataPreprocessor: DataPreprocessor - /// The `DataDecoder` instance used to decode responses. - public let decoder: DataDecoder - public let emptyResponseCodes: Set - public let emptyRequestMethods: Set - - /// Creates an instance using the values provided. - /// - /// - Parameters: - /// - dataPreprocessor: `DataPreprocessor` used to prepare the received `Data` for serialization. - /// - decoder: The `DataDecoder`. `JSONDecoder()` by default. - /// - emptyResponseCodes: The HTTP response codes for which empty responses are allowed. `[204, 205]` by default. - /// - emptyRequestMethods: The HTTP request methods for which empty responses are allowed. `[.head]` by default. - public init(dataPreprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, - decoder: DataDecoder = JSONDecoder(), - emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods) { - self.dataPreprocessor = dataPreprocessor - self.decoder = decoder - self.emptyResponseCodes = emptyResponseCodes - self.emptyRequestMethods = emptyRequestMethods - } - - public func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws -> T { - guard error == nil else { throw error! } - - guard var data = data, !data.isEmpty else { - guard emptyResponseAllowed(forRequest: request, response: response) else { - throw AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength) - } - - guard let emptyResponseType = T.self as? EmptyResponse.Type, let emptyValue = emptyResponseType.emptyValue() as? T else { - throw AFError.responseSerializationFailed(reason: .invalidEmptyResponse(type: "\(T.self)")) - } - - return emptyValue - } - - data = try dataPreprocessor.preprocess(data) - - do { - return try decoder.decode(T.self, from: data) - } catch { - throw AFError.responseSerializationFailed(reason: .decodingFailed(error: error)) - } - } -} - -extension DataRequest { - /// Adds a handler using a `DecodableResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - type: `Decodable` type to decode from response data. - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - decoder: `DataDecoder` to use to decode the response. `JSONDecoder()` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - options: `JSONSerialization.ReadingOptions` used when parsing the response. `.allowFragments` - /// by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseDecodable(of type: T.Type = T.self, - queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, - decoder: DataDecoder = JSONDecoder(), - emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods, - completionHandler: @escaping (AFDataResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: DecodableResponseSerializer(dataPreprocessor: dataPreprocessor, - decoder: decoder, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - completionHandler: completionHandler) - } -} - -extension DownloadRequest { - /// Adds a handler using a `DecodableResponseSerializer` to be called once the request has finished. - /// - /// - Parameters: - /// - type: `Decodable` type to decode from response data. - /// - queue: The queue on which the completion handler is dispatched. `.main` by default. - /// - dataPreprocessor: `DataPreprocessor` which processes the received `Data` before calling the - /// `completionHandler`. `PassthroughPreprocessor()` by default. - /// - decoder: `DataDecoder` to use to decode the response. `JSONDecoder()` by default. - /// - encoding: The string encoding. Defaults to `nil`, in which case the encoding will be determined - /// from the server response, falling back to the default HTTP character set, `ISO-8859-1`. - /// - emptyResponseCodes: HTTP status codes for which empty responses are always valid. `[204, 205]` by default. - /// - emptyRequestMethods: `HTTPMethod`s for which empty responses are always valid. `[.head]` by default. - /// - options: `JSONSerialization.ReadingOptions` used when parsing the response. `.allowFragments` - /// by default. - /// - completionHandler: A closure to be executed once the request has finished. - /// - /// - Returns: The request. - @discardableResult - public func responseDecodable(of type: T.Type = T.self, - queue: DispatchQueue = .main, - dataPreprocessor: DataPreprocessor = DecodableResponseSerializer.defaultDataPreprocessor, - decoder: DataDecoder = JSONDecoder(), - emptyResponseCodes: Set = DecodableResponseSerializer.defaultEmptyResponseCodes, - emptyRequestMethods: Set = DecodableResponseSerializer.defaultEmptyRequestMethods, - completionHandler: @escaping (AFDownloadResponse) -> Void) -> Self { - response(queue: queue, - responseSerializer: DecodableResponseSerializer(dataPreprocessor: dataPreprocessor, - decoder: decoder, - emptyResponseCodes: emptyResponseCodes, - emptyRequestMethods: emptyRequestMethods), - completionHandler: completionHandler) - } -} - -// MARK: - DataStreamRequest - -/// A type which can serialize incoming `Data`. -public protocol DataStreamSerializer { - /// Type produced from the serialized `Data`. - associatedtype SerializedObject - - /// Serializes incoming `Data` into a `SerializedObject` value. - /// - /// - Parameter data: `Data` to be serialized. - /// - /// - Throws: Any error produced during serialization. - func serialize(_ data: Data) throws -> SerializedObject -} - -/// `DataStreamSerializer` which uses the provided `DataPreprocessor` and `DataDecoder` to serialize the incoming `Data`. -public struct DecodableStreamSerializer: DataStreamSerializer { - /// `DataDecoder` used to decode incoming `Data`. - public let decoder: DataDecoder - /// `DataPreprocessor` incoming `Data` is passed through before being passed to the `DataDecoder`. - public let dataPreprocessor: DataPreprocessor - - /// Creates an instance with the provided `DataDecoder` and `DataPreprocessor`. - /// - Parameters: - /// - decoder: ` DataDecoder` used to decode incoming `Data`. - /// - dataPreprocessor: `DataPreprocessor` used to process incoming `Data` before it's passed through the `decoder`. - public init(decoder: DataDecoder = JSONDecoder(), dataPreprocessor: DataPreprocessor = PassthroughPreprocessor()) { - self.decoder = decoder - self.dataPreprocessor = dataPreprocessor - } - - public func serialize(_ data: Data) throws -> T { - let processedData = try dataPreprocessor.preprocess(data) - do { - return try decoder.decode(T.self, from: processedData) - } catch { - throw AFError.responseSerializationFailed(reason: .decodingFailed(error: error)) - } - } -} - -/// `DataStreamSerializer` which performs no serialization on incoming `Data`. -public struct PassthroughStreamSerializer: DataStreamSerializer { - public func serialize(_ data: Data) throws -> Data { data } -} - -/// `DataStreamSerializer` which serializes incoming stream `Data` into `UTF8`-decoded `String` values. -public struct StringStreamSerializer: DataStreamSerializer { - public func serialize(_ data: Data) throws -> String { - String(decoding: data, as: UTF8.self) - } -} - -extension DataStreamRequest { - /// Adds a `StreamHandler` which performs no parsing on incoming `Data`. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which to perform `StreamHandler` closure. - /// - stream: `StreamHandler` closure called as `Data` is received. May be called multiple times. - /// - /// - Returns: The `DataStreamRequest`. - @discardableResult - public func responseStream(on queue: DispatchQueue = .main, stream: @escaping Handler) -> Self { - let parser = { [unowned self] (data: Data) in - queue.async { - self.capturingError { - try stream(.init(event: .stream(.success(data)), token: .init(self))) - } - - self.updateAndCompleteIfPossible() - } - } - - $streamMutableState.write { $0.streams.append(parser) } - appendStreamCompletion(on: queue, stream: stream) - - return self - } - - /// Adds a `StreamHandler` which uses the provided `DataStreamSerializer` to process incoming `Data`. - /// - /// - Parameters: - /// - serializer: `DataStreamSerializer` used to process incoming `Data`. Its work is done on the `serializationQueue`. - /// - queue: `DispatchQueue` on which to perform `StreamHandler` closure. - /// - stream: `StreamHandler` closure called as `Data` is received. May be called multiple times. - /// - /// - Returns: The `DataStreamRequest`. - @discardableResult - public func responseStream(using serializer: Serializer, - on queue: DispatchQueue = .main, - stream: @escaping Handler) -> Self { - let parser = { [unowned self] (data: Data) in - self.serializationQueue.async { - // Start work on serialization queue. - let result = Result { try serializer.serialize(data) } - .mapError { $0.asAFError(or: .responseSerializationFailed(reason: .customSerializationFailed(error: $0))) } - // End work on serialization queue. - self.underlyingQueue.async { - self.eventMonitor?.request(self, didParseStream: result) - - if result.isFailure, self.automaticallyCancelOnStreamError { - self.cancel() - } - - queue.async { - self.capturingError { - try stream(.init(event: .stream(result), token: .init(self))) - } - - self.updateAndCompleteIfPossible() - } - } - } - } - - $streamMutableState.write { $0.streams.append(parser) } - appendStreamCompletion(on: queue, stream: stream) - - return self - } - - /// Adds a `StreamHandler` which parses incoming `Data` as a UTF8 `String`. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which to perform `StreamHandler` closure. - /// - stream: `StreamHandler` closure called as `Data` is received. May be called multiple times. - /// - /// - Returns: The `DataStreamRequest`. - @discardableResult - public func responseStreamString(on queue: DispatchQueue = .main, - stream: @escaping Handler) -> Self { - let parser = { [unowned self] (data: Data) in - self.serializationQueue.async { - // Start work on serialization queue. - let string = String(decoding: data, as: UTF8.self) - // End work on serialization queue. - self.underlyingQueue.async { - self.eventMonitor?.request(self, didParseStream: .success(string)) - - queue.async { - self.capturingError { - try stream(.init(event: .stream(.success(string)), token: .init(self))) - } - - self.updateAndCompleteIfPossible() - } - } - } - } - - $streamMutableState.write { $0.streams.append(parser) } - appendStreamCompletion(on: queue, stream: stream) - - return self - } - - private func updateAndCompleteIfPossible() { - $streamMutableState.write { state in - state.numberOfExecutingStreams -= 1 - - guard state.numberOfExecutingStreams == 0, !state.enqueuedCompletionEvents.isEmpty else { return } - - let completionEvents = state.enqueuedCompletionEvents - self.underlyingQueue.async { completionEvents.forEach { $0() } } - state.enqueuedCompletionEvents.removeAll() - } - } - - /// Adds a `StreamHandler` which parses incoming `Data` using the provided `DataDecoder`. - /// - /// - Parameters: - /// - type: `Decodable` type to parse incoming `Data` into. - /// - queue: `DispatchQueue` on which to perform `StreamHandler` closure. - /// - decoder: `DataDecoder` used to decode the incoming `Data`. - /// - preprocessor: `DataPreprocessor` used to process the incoming `Data` before it's passed to the `decoder`. - /// - stream: `StreamHandler` closure called as `Data` is received. May be called multiple times. - /// - /// - Returns: The `DataStreamRequest`. - @discardableResult - public func responseStreamDecodable(of type: T.Type = T.self, - on queue: DispatchQueue = .main, - using decoder: DataDecoder = JSONDecoder(), - preprocessor: DataPreprocessor = PassthroughPreprocessor(), - stream: @escaping Handler) -> Self { - responseStream(using: DecodableStreamSerializer(decoder: decoder, dataPreprocessor: preprocessor), - stream: stream) - } -} diff --git a/Pods/Alamofire/Source/Result+Alamofire.swift b/Pods/Alamofire/Source/Result+Alamofire.swift deleted file mode 100644 index 39ac2860..00000000 --- a/Pods/Alamofire/Source/Result+Alamofire.swift +++ /dev/null @@ -1,120 +0,0 @@ -// -// Result+Alamofire.swift -// -// Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Default type of `Result` returned by Alamofire, with an `AFError` `Failure` type. -public typealias AFResult = Result - -// MARK: - Internal APIs - -extension Result { - /// Returns whether the instance is `.success`. - var isSuccess: Bool { - guard case .success = self else { return false } - return true - } - - /// Returns whether the instance is `.failure`. - var isFailure: Bool { - !isSuccess - } - - /// Returns the associated value if the result is a success, `nil` otherwise. - var success: Success? { - guard case let .success(value) = self else { return nil } - return value - } - - /// Returns the associated error value if the result is a failure, `nil` otherwise. - var failure: Failure? { - guard case let .failure(error) = self else { return nil } - return error - } - - /// Initializes a `Result` from value or error. Returns `.failure` if the error is non-nil, `.success` otherwise. - /// - /// - Parameters: - /// - value: A value. - /// - error: An `Error`. - init(value: Success, error: Failure?) { - if let error = error { - self = .failure(error) - } else { - self = .success(value) - } - } - - /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. - /// - /// Use the `tryMap` method with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.tryMap { - /// try JSONSerialization.jsonObject(with: $0) - /// } - /// - /// - parameter transform: A closure that takes the success value of the instance. - /// - /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the - /// same failure. - func tryMap(_ transform: (Success) throws -> NewSuccess) -> Result { - switch self { - case let .success(value): - do { - return try .success(transform(value)) - } catch { - return .failure(error) - } - case let .failure(error): - return .failure(error) - } - } - - /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. - /// - /// Use the `tryMapError` function with a closure that may throw an error. For example: - /// - /// let possibleData: Result = .success(Data(...)) - /// let possibleObject = possibleData.tryMapError { - /// try someFailableFunction(taking: $0) - /// } - /// - /// - Parameter transform: A throwing closure that takes the error of the instance. - /// - /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns - /// the same success. - func tryMapError(_ transform: (Failure) throws -> NewFailure) -> Result { - switch self { - case let .failure(error): - do { - return try .failure(transform(error)) - } catch { - return .failure(error) - } - case let .success(value): - return .success(value) - } - } -} diff --git a/Pods/Alamofire/Source/RetryPolicy.swift b/Pods/Alamofire/Source/RetryPolicy.swift deleted file mode 100644 index e9cbcaf4..00000000 --- a/Pods/Alamofire/Source/RetryPolicy.swift +++ /dev/null @@ -1,370 +0,0 @@ -// -// RetryPolicy.swift -// -// Copyright (c) 2019-2020 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// A retry policy that retries requests using an exponential backoff for allowed HTTP methods and HTTP status codes -/// as well as certain types of networking errors. -open class RetryPolicy: RequestInterceptor { - /// The default retry limit for retry policies. - public static let defaultRetryLimit: UInt = 2 - - /// The default exponential backoff base for retry policies (must be a minimum of 2). - public static let defaultExponentialBackoffBase: UInt = 2 - - /// The default exponential backoff scale for retry policies. - public static let defaultExponentialBackoffScale: Double = 0.5 - - /// The default HTTP methods to retry. - /// See [RFC 2616 - Section 9.1.2](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) for more information. - public static let defaultRetryableHTTPMethods: Set = [.delete, // [Delete](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.7) - not always idempotent - .get, // [GET](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3) - generally idempotent - .head, // [HEAD](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4) - generally idempotent - .options, // [OPTIONS](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.2) - inherently idempotent - .put, // [PUT](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.6) - not always idempotent - .trace // [TRACE](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.8) - inherently idempotent - ] - - /// The default HTTP status codes to retry. - /// See [RFC 2616 - Section 10](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10) for more information. - public static let defaultRetryableHTTPStatusCodes: Set = [408, // [Request Timeout](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.9) - 500, // [Internal Server Error](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1) - 502, // [Bad Gateway](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3) - 503, // [Service Unavailable](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4) - 504 // [Gateway Timeout](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.5) - ] - - /// The default URL error codes to retry. - public static let defaultRetryableURLErrorCodes: Set = [// [Security] App Transport Security disallowed a connection because there is no secure network connection. - // - [Disabled] ATS settings do not change at runtime. - // .appTransportSecurityRequiresSecureConnection, - - // [System] An app or app extension attempted to connect to a background session that is already connected to a - // process. - // - [Enabled] The other process could release the background session. - .backgroundSessionInUseByAnotherProcess, - - // [System] The shared container identifier of the URL session configuration is needed but has not been set. - // - [Disabled] Cannot change at runtime. - // .backgroundSessionRequiresSharedContainer, - - // [System] The app is suspended or exits while a background data task is processing. - // - [Enabled] App can be foregrounded or launched to recover. - .backgroundSessionWasDisconnected, - - // [Network] The URL Loading system received bad data from the server. - // - [Enabled] Server could return valid data when retrying. - .badServerResponse, - - // [Resource] A malformed URL prevented a URL request from being initiated. - // - [Disabled] URL was most likely constructed incorrectly. - // .badURL, - - // [System] A connection was attempted while a phone call is active on a network that does not support - // simultaneous phone and data communication (EDGE or GPRS). - // - [Enabled] Phone call could be ended to allow request to recover. - .callIsActive, - - // [Client] An asynchronous load has been canceled. - // - [Disabled] Request was cancelled by the client. - // .cancelled, - - // [File System] A download task couldn’t close the downloaded file on disk. - // - [Disabled] File system error is unlikely to recover with retry. - // .cannotCloseFile, - - // [Network] An attempt to connect to a host failed. - // - [Enabled] Server or DNS lookup could recover during retry. - .cannotConnectToHost, - - // [File System] A download task couldn’t create the downloaded file on disk because of an I/O failure. - // - [Disabled] File system error is unlikely to recover with retry. - // .cannotCreateFile, - - // [Data] Content data received during a connection request had an unknown content encoding. - // - [Disabled] Server is unlikely to modify the content encoding during a retry. - // .cannotDecodeContentData, - - // [Data] Content data received during a connection request could not be decoded for a known content encoding. - // - [Disabled] Server is unlikely to modify the content encoding during a retry. - // .cannotDecodeRawData, - - // [Network] The host name for a URL could not be resolved. - // - [Enabled] Server or DNS lookup could recover during retry. - .cannotFindHost, - - // [Network] A request to load an item only from the cache could not be satisfied. - // - [Enabled] Cache could be populated during a retry. - .cannotLoadFromNetwork, - - // [File System] A download task was unable to move a downloaded file on disk. - // - [Disabled] File system error is unlikely to recover with retry. - // .cannotMoveFile, - - // [File System] A download task was unable to open the downloaded file on disk. - // - [Disabled] File system error is unlikely to recover with retry. - // .cannotOpenFile, - - // [Data] A task could not parse a response. - // - [Disabled] Invalid response is unlikely to recover with retry. - // .cannotParseResponse, - - // [File System] A download task was unable to remove a downloaded file from disk. - // - [Disabled] File system error is unlikely to recover with retry. - // .cannotRemoveFile, - - // [File System] A download task was unable to write to the downloaded file on disk. - // - [Disabled] File system error is unlikely to recover with retry. - // .cannotWriteToFile, - - // [Security] A client certificate was rejected. - // - [Disabled] Client certificate is unlikely to change with retry. - // .clientCertificateRejected, - - // [Security] A client certificate was required to authenticate an SSL connection during a request. - // - [Disabled] Client certificate is unlikely to be provided with retry. - // .clientCertificateRequired, - - // [Data] The length of the resource data exceeds the maximum allowed. - // - [Disabled] Resource will likely still exceed the length maximum on retry. - // .dataLengthExceedsMaximum, - - // [System] The cellular network disallowed a connection. - // - [Enabled] WiFi connection could be established during retry. - .dataNotAllowed, - - // [Network] The host address could not be found via DNS lookup. - // - [Enabled] DNS lookup could succeed during retry. - .dnsLookupFailed, - - // [Data] A download task failed to decode an encoded file during the download. - // - [Enabled] Server could correct the decoding issue with retry. - .downloadDecodingFailedMidStream, - - // [Data] A download task failed to decode an encoded file after downloading. - // - [Enabled] Server could correct the decoding issue with retry. - .downloadDecodingFailedToComplete, - - // [File System] A file does not exist. - // - [Disabled] File system error is unlikely to recover with retry. - // .fileDoesNotExist, - - // [File System] A request for an FTP file resulted in the server responding that the file is not a plain file, - // but a directory. - // - [Disabled] FTP directory is not likely to change to a file during a retry. - // .fileIsDirectory, - - // [Network] A redirect loop has been detected or the threshold for number of allowable redirects has been - // exceeded (currently 16). - // - [Disabled] The redirect loop is unlikely to be resolved within the retry window. - // .httpTooManyRedirects, - - // [System] The attempted connection required activating a data context while roaming, but international roaming - // is disabled. - // - [Enabled] WiFi connection could be established during retry. - .internationalRoamingOff, - - // [Connectivity] A client or server connection was severed in the middle of an in-progress load. - // - [Enabled] A network connection could be established during retry. - .networkConnectionLost, - - // [File System] A resource couldn’t be read because of insufficient permissions. - // - [Disabled] Permissions are unlikely to be granted during retry. - // .noPermissionsToReadFile, - - // [Connectivity] A network resource was requested, but an internet connection has not been established and - // cannot be established automatically. - // - [Enabled] A network connection could be established during retry. - .notConnectedToInternet, - - // [Resource] A redirect was specified by way of server response code, but the server did not accompany this - // code with a redirect URL. - // - [Disabled] The redirect URL is unlikely to be supplied during a retry. - // .redirectToNonExistentLocation, - - // [Client] A body stream is needed but the client did not provide one. - // - [Disabled] The client will be unlikely to supply a body stream during retry. - // .requestBodyStreamExhausted, - - // [Resource] A requested resource couldn’t be retrieved. - // - [Disabled] The resource is unlikely to become available during the retry window. - // .resourceUnavailable, - - // [Security] An attempt to establish a secure connection failed for reasons that can’t be expressed more - // specifically. - // - [Enabled] The secure connection could be established during a retry given the lack of specificity - // provided by the error. - .secureConnectionFailed, - - // [Security] A server certificate had a date which indicates it has expired, or is not yet valid. - // - [Enabled] The server certificate could become valid within the retry window. - .serverCertificateHasBadDate, - - // [Security] A server certificate was not signed by any root server. - // - [Disabled] The server certificate is unlikely to change during the retry window. - // .serverCertificateHasUnknownRoot, - - // [Security] A server certificate is not yet valid. - // - [Enabled] The server certificate could become valid within the retry window. - .serverCertificateNotYetValid, - - // [Security] A server certificate was signed by a root server that isn’t trusted. - // - [Disabled] The server certificate is unlikely to become trusted within the retry window. - // .serverCertificateUntrusted, - - // [Network] An asynchronous operation timed out. - // - [Enabled] The request timed out for an unknown reason and should be retried. - .timedOut - - // [System] The URL Loading System encountered an error that it can’t interpret. - // - [Disabled] The error could not be interpreted and is unlikely to be recovered from during a retry. - // .unknown, - - // [Resource] A properly formed URL couldn’t be handled by the framework. - // - [Disabled] The URL is unlikely to change during a retry. - // .unsupportedURL, - - // [Client] Authentication is required to access a resource. - // - [Disabled] The user authentication is unlikely to be provided by retrying. - // .userAuthenticationRequired, - - // [Client] An asynchronous request for authentication has been canceled by the user. - // - [Disabled] The user cancelled authentication and explicitly took action to not retry. - // .userCancelledAuthentication, - - // [Resource] A server reported that a URL has a non-zero content length, but terminated the network connection - // gracefully without sending any data. - // - [Disabled] The server is unlikely to provide data during the retry window. - // .zeroByteResource, - ] - - /// The total number of times the request is allowed to be retried. - public let retryLimit: UInt - - /// The base of the exponential backoff policy (should always be greater than or equal to 2). - public let exponentialBackoffBase: UInt - - /// The scale of the exponential backoff. - public let exponentialBackoffScale: Double - - /// The HTTP methods that are allowed to be retried. - public let retryableHTTPMethods: Set - - /// The HTTP status codes that are automatically retried by the policy. - public let retryableHTTPStatusCodes: Set - - /// The URL error codes that are automatically retried by the policy. - public let retryableURLErrorCodes: Set - - /// Creates an `ExponentialBackoffRetryPolicy` from the specified parameters. - /// - /// - Parameters: - /// - retryLimit: The total number of times the request is allowed to be retried. `2` by default. - /// - exponentialBackoffBase: The base of the exponential backoff policy. `2` by default. - /// - exponentialBackoffScale: The scale of the exponential backoff. `0.5` by default. - /// - retryableHTTPMethods: The HTTP methods that are allowed to be retried. - /// `RetryPolicy.defaultRetryableHTTPMethods` by default. - /// - retryableHTTPStatusCodes: The HTTP status codes that are automatically retried by the policy. - /// `RetryPolicy.defaultRetryableHTTPStatusCodes` by default. - /// - retryableURLErrorCodes: The URL error codes that are automatically retried by the policy. - /// `RetryPolicy.defaultRetryableURLErrorCodes` by default. - public init(retryLimit: UInt = RetryPolicy.defaultRetryLimit, - exponentialBackoffBase: UInt = RetryPolicy.defaultExponentialBackoffBase, - exponentialBackoffScale: Double = RetryPolicy.defaultExponentialBackoffScale, - retryableHTTPMethods: Set = RetryPolicy.defaultRetryableHTTPMethods, - retryableHTTPStatusCodes: Set = RetryPolicy.defaultRetryableHTTPStatusCodes, - retryableURLErrorCodes: Set = RetryPolicy.defaultRetryableURLErrorCodes) { - precondition(exponentialBackoffBase >= 2, "The `exponentialBackoffBase` must be a minimum of 2.") - - self.retryLimit = retryLimit - self.exponentialBackoffBase = exponentialBackoffBase - self.exponentialBackoffScale = exponentialBackoffScale - self.retryableHTTPMethods = retryableHTTPMethods - self.retryableHTTPStatusCodes = retryableHTTPStatusCodes - self.retryableURLErrorCodes = retryableURLErrorCodes - } - - open func retry(_ request: Request, - for session: Session, - dueTo error: Error, - completion: @escaping (RetryResult) -> Void) { - if request.retryCount < retryLimit, shouldRetry(request: request, dueTo: error) { - completion(.retryWithDelay(pow(Double(exponentialBackoffBase), Double(request.retryCount)) * exponentialBackoffScale)) - } else { - completion(.doNotRetry) - } - } - - /// Determines whether or not to retry the provided `Request`. - /// - /// - Parameters: - /// - request: `Request` that failed due to the provided `Error`. - /// - error: `Error` encountered while executing the `Request`. - /// - /// - Returns: `Bool` determining whether or not to retry the `Request`. - open func shouldRetry(request: Request, dueTo error: Error) -> Bool { - guard let httpMethod = request.request?.method, retryableHTTPMethods.contains(httpMethod) else { return false } - - if let statusCode = request.response?.statusCode, retryableHTTPStatusCodes.contains(statusCode) { - return true - } else { - let errorCode = (error as? URLError)?.code - let afErrorCode = (error.asAFError?.underlyingError as? URLError)?.code - - guard let code = errorCode ?? afErrorCode else { return false } - - return retryableURLErrorCodes.contains(code) - } - } -} - -// MARK: - - -/// A retry policy that automatically retries idempotent requests for network connection lost errors. For more -/// information about retrying network connection lost errors, please refer to Apple's -/// [technical document](https://developer.apple.com/library/content/qa/qa1941/_index.html). -open class ConnectionLostRetryPolicy: RetryPolicy { - /// Creates a `ConnectionLostRetryPolicy` instance from the specified parameters. - /// - /// - Parameters: - /// - retryLimit: The total number of times the request is allowed to be retried. - /// `RetryPolicy.defaultRetryLimit` by default. - /// - exponentialBackoffBase: The base of the exponential backoff policy. - /// `RetryPolicy.defaultExponentialBackoffBase` by default. - /// - exponentialBackoffScale: The scale of the exponential backoff. - /// `RetryPolicy.defaultExponentialBackoffScale` by default. - /// - retryableHTTPMethods: The idempotent http methods to retry. - /// `RetryPolicy.defaultRetryableHTTPMethods` by default. - public init(retryLimit: UInt = RetryPolicy.defaultRetryLimit, - exponentialBackoffBase: UInt = RetryPolicy.defaultExponentialBackoffBase, - exponentialBackoffScale: Double = RetryPolicy.defaultExponentialBackoffScale, - retryableHTTPMethods: Set = RetryPolicy.defaultRetryableHTTPMethods) { - super.init(retryLimit: retryLimit, - exponentialBackoffBase: exponentialBackoffBase, - exponentialBackoffScale: exponentialBackoffScale, - retryableHTTPMethods: retryableHTTPMethods, - retryableHTTPStatusCodes: [], - retryableURLErrorCodes: [.networkConnectionLost]) - } -} diff --git a/Pods/Alamofire/Source/ServerTrustEvaluation.swift b/Pods/Alamofire/Source/ServerTrustEvaluation.swift deleted file mode 100644 index 9ca94f16..00000000 --- a/Pods/Alamofire/Source/ServerTrustEvaluation.swift +++ /dev/null @@ -1,619 +0,0 @@ -// -// ServerTrustPolicy.swift -// -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Responsible for managing the mapping of `ServerTrustEvaluating` values to given hosts. -open class ServerTrustManager { - /// Determines whether all hosts for this `ServerTrustManager` must be evaluated. `true` by default. - public let allHostsMustBeEvaluated: Bool - - /// The dictionary of policies mapped to a particular host. - public let evaluators: [String: ServerTrustEvaluating] - - /// Initializes the `ServerTrustManager` instance with the given evaluators. - /// - /// Since different servers and web services can have different leaf certificates, intermediate and even root - /// certificates, it is important to have the flexibility to specify evaluation policies on a per host basis. This - /// allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key - /// pinning for host3 and disabling evaluation for host4. - /// - /// - Parameters: - /// - allHostsMustBeEvaluated: The value determining whether all hosts for this instance must be evaluated. `true` - /// by default. - /// - evaluators: A dictionary of evaluators mapped to hosts. - public init(allHostsMustBeEvaluated: Bool = true, evaluators: [String: ServerTrustEvaluating]) { - self.allHostsMustBeEvaluated = allHostsMustBeEvaluated - self.evaluators = evaluators - } - - /// Returns the `ServerTrustEvaluating` value for the given host, if one is set. - /// - /// By default, this method will return the policy that perfectly matches the given host. Subclasses could override - /// this method and implement more complex mapping implementations such as wildcards. - /// - /// - Parameter host: The host to use when searching for a matching policy. - /// - /// - Returns: The `ServerTrustEvaluating` value for the given host if found, `nil` otherwise. - /// - Throws: `AFError.serverTrustEvaluationFailed` if `allHostsMustBeEvaluated` is `true` and no matching - /// evaluators are found. - open func serverTrustEvaluator(forHost host: String) throws -> ServerTrustEvaluating? { - guard let evaluator = evaluators[host] else { - if allHostsMustBeEvaluated { - throw AFError.serverTrustEvaluationFailed(reason: .noRequiredEvaluator(host: host)) - } - - return nil - } - - return evaluator - } -} - -/// A protocol describing the API used to evaluate server trusts. -public protocol ServerTrustEvaluating { - #if os(Linux) - // Implement this once Linux has API for evaluating server trusts. - #else - /// Evaluates the given `SecTrust` value for the given `host`. - /// - /// - Parameters: - /// - trust: The `SecTrust` value to evaluate. - /// - host: The host for which to evaluate the `SecTrust` value. - /// - /// - Returns: A `Bool` indicating whether the evaluator considers the `SecTrust` value valid for `host`. - func evaluate(_ trust: SecTrust, forHost host: String) throws - #endif -} - -// MARK: - Server Trust Evaluators - -/// An evaluator which uses the default server trust evaluation while allowing you to control whether to validate the -/// host provided by the challenge. Applications are encouraged to always validate the host in production environments -/// to guarantee the validity of the server's certificate chain. -public final class DefaultTrustEvaluator: ServerTrustEvaluating { - private let validateHost: Bool - - /// Creates a `DefaultTrustEvaluator`. - /// - /// - Parameter validateHost: Determines whether or not the evaluator should validate the host. `true` by default. - public init(validateHost: Bool = true) { - self.validateHost = validateHost - } - - public func evaluate(_ trust: SecTrust, forHost host: String) throws { - if validateHost { - try trust.af.performValidation(forHost: host) - } - - try trust.af.performDefaultValidation(forHost: host) - } -} - -/// An evaluator which Uses the default and revoked server trust evaluations allowing you to control whether to validate -/// the host provided by the challenge as well as specify the revocation flags for testing for revoked certificates. -/// Apple platforms did not start testing for revoked certificates automatically until iOS 10.1, macOS 10.12 and tvOS -/// 10.1 which is demonstrated in our TLS tests. Applications are encouraged to always validate the host in production -/// environments to guarantee the validity of the server's certificate chain. -public final class RevocationTrustEvaluator: ServerTrustEvaluating { - /// Represents the options to be use when evaluating the status of a certificate. - /// Only Revocation Policy Constants are valid, and can be found in [Apple's documentation](https://developer.apple.com/documentation/security/certificate_key_and_trust_services/policies/1563600-revocation_policy_constants). - public struct Options: OptionSet { - /// Perform revocation checking using the CRL (Certification Revocation List) method. - public static let crl = Options(rawValue: kSecRevocationCRLMethod) - /// Consult only locally cached replies; do not use network access. - public static let networkAccessDisabled = Options(rawValue: kSecRevocationNetworkAccessDisabled) - /// Perform revocation checking using OCSP (Online Certificate Status Protocol). - public static let ocsp = Options(rawValue: kSecRevocationOCSPMethod) - /// Prefer CRL revocation checking over OCSP; by default, OCSP is preferred. - public static let preferCRL = Options(rawValue: kSecRevocationPreferCRL) - /// Require a positive response to pass the policy. If the flag is not set, revocation checking is done on a - /// "best attempt" basis, where failure to reach the server is not considered fatal. - public static let requirePositiveResponse = Options(rawValue: kSecRevocationRequirePositiveResponse) - /// Perform either OCSP or CRL checking. The checking is performed according to the method(s) specified in the - /// certificate and the value of `preferCRL`. - public static let any = Options(rawValue: kSecRevocationUseAnyAvailableMethod) - - /// The raw value of the option. - public let rawValue: CFOptionFlags - - /// Creates an `Options` value with the given `CFOptionFlags`. - /// - /// - Parameter rawValue: The `CFOptionFlags` value to initialize with. - public init(rawValue: CFOptionFlags) { - self.rawValue = rawValue - } - } - - private let performDefaultValidation: Bool - private let validateHost: Bool - private let options: Options - - /// Creates a `RevocationTrustEvaluator`. - /// - /// - Note: Default and host validation will fail when using this evaluator with self-signed certificates. Use - /// `PinnedCertificatesTrustEvaluator` if you need to use self-signed certificates. - /// - /// - Parameters: - /// - performDefaultValidation: Determines whether default validation should be performed in addition to - /// evaluating the pinned certificates. `true` by default. - /// - validateHost: Determines whether or not the evaluator should validate the host, in addition - /// to performing the default evaluation, even if `performDefaultValidation` is - /// `false`. `true` by default. - /// - options: The `Options` to use to check the revocation status of the certificate. `.any` - /// by default. - public init(performDefaultValidation: Bool = true, validateHost: Bool = true, options: Options = .any) { - self.performDefaultValidation = performDefaultValidation - self.validateHost = validateHost - self.options = options - } - - public func evaluate(_ trust: SecTrust, forHost host: String) throws { - if performDefaultValidation { - try trust.af.performDefaultValidation(forHost: host) - } - - if validateHost { - try trust.af.performValidation(forHost: host) - } - - if #available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *) { - try trust.af.evaluate(afterApplying: SecPolicy.af.revocation(options: options)) - } else { - try trust.af.validate(policy: SecPolicy.af.revocation(options: options)) { status, result in - AFError.serverTrustEvaluationFailed(reason: .revocationCheckFailed(output: .init(host, trust, status, result), options: options)) - } - } - } -} - -/// Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned -/// certificates match one of the server certificates. By validating both the certificate chain and host, certificate -/// pinning provides a very secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate chain in production -/// environments. -public final class PinnedCertificatesTrustEvaluator: ServerTrustEvaluating { - private let certificates: [SecCertificate] - private let acceptSelfSignedCertificates: Bool - private let performDefaultValidation: Bool - private let validateHost: Bool - - /// Creates a `PinnedCertificatesTrustEvaluator`. - /// - /// - Parameters: - /// - certificates: The certificates to use to evaluate the trust. All `cer`, `crt`, and `der` - /// certificates in `Bundle.main` by default. - /// - acceptSelfSignedCertificates: Adds the provided certificates as anchors for the trust evaluation, allowing - /// self-signed certificates to pass. `false` by default. THIS SETTING SHOULD BE - /// FALSE IN PRODUCTION! - /// - performDefaultValidation: Determines whether default validation should be performed in addition to - /// evaluating the pinned certificates. `true` by default. - /// - validateHost: Determines whether or not the evaluator should validate the host, in addition - /// to performing the default evaluation, even if `performDefaultValidation` is - /// `false`. `true` by default. - public init(certificates: [SecCertificate] = Bundle.main.af.certificates, - acceptSelfSignedCertificates: Bool = false, - performDefaultValidation: Bool = true, - validateHost: Bool = true) { - self.certificates = certificates - self.acceptSelfSignedCertificates = acceptSelfSignedCertificates - self.performDefaultValidation = performDefaultValidation - self.validateHost = validateHost - } - - public func evaluate(_ trust: SecTrust, forHost host: String) throws { - guard !certificates.isEmpty else { - throw AFError.serverTrustEvaluationFailed(reason: .noCertificatesFound) - } - - if acceptSelfSignedCertificates { - try trust.af.setAnchorCertificates(certificates) - } - - if performDefaultValidation { - try trust.af.performDefaultValidation(forHost: host) - } - - if validateHost { - try trust.af.performValidation(forHost: host) - } - - let serverCertificatesData = Set(trust.af.certificateData) - let pinnedCertificatesData = Set(certificates.af.data) - let pinnedCertificatesInServerData = !serverCertificatesData.isDisjoint(with: pinnedCertificatesData) - if !pinnedCertificatesInServerData { - throw AFError.serverTrustEvaluationFailed(reason: .certificatePinningFailed(host: host, - trust: trust, - pinnedCertificates: certificates, - serverCertificates: trust.af.certificates)) - } - } -} - -/// Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned -/// public keys match one of the server certificate public keys. By validating both the certificate chain and host, -/// public key pinning provides a very secure form of server trust validation mitigating most, if not all, MITM attacks. -/// Applications are encouraged to always validate the host and require a valid certificate chain in production -/// environments. -public final class PublicKeysTrustEvaluator: ServerTrustEvaluating { - private let keys: [SecKey] - private let performDefaultValidation: Bool - private let validateHost: Bool - - /// Creates a `PublicKeysTrustEvaluator`. - /// - /// - Note: Default and host validation will fail when using this evaluator with self-signed certificates. Use - /// `PinnedCertificatesTrustEvaluator` if you need to use self-signed certificates. - /// - /// - Parameters: - /// - keys: The `SecKey`s to use to validate public keys. Defaults to the public keys of all - /// certificates included in the main bundle. - /// - performDefaultValidation: Determines whether default validation should be performed in addition to - /// evaluating the pinned certificates. `true` by default. - /// - validateHost: Determines whether or not the evaluator should validate the host, in addition to - /// performing the default evaluation, even if `performDefaultValidation` is `false`. - /// `true` by default. - public init(keys: [SecKey] = Bundle.main.af.publicKeys, - performDefaultValidation: Bool = true, - validateHost: Bool = true) { - self.keys = keys - self.performDefaultValidation = performDefaultValidation - self.validateHost = validateHost - } - - public func evaluate(_ trust: SecTrust, forHost host: String) throws { - guard !keys.isEmpty else { - throw AFError.serverTrustEvaluationFailed(reason: .noPublicKeysFound) - } - - if performDefaultValidation { - try trust.af.performDefaultValidation(forHost: host) - } - - if validateHost { - try trust.af.performValidation(forHost: host) - } - - let pinnedKeysInServerKeys: Bool = { - for serverPublicKey in trust.af.publicKeys { - for pinnedPublicKey in keys { - if serverPublicKey == pinnedPublicKey { - return true - } - } - } - return false - }() - - if !pinnedKeysInServerKeys { - throw AFError.serverTrustEvaluationFailed(reason: .publicKeyPinningFailed(host: host, - trust: trust, - pinnedKeys: keys, - serverKeys: trust.af.publicKeys)) - } - } -} - -/// Uses the provided evaluators to validate the server trust. The trust is only considered valid if all of the -/// evaluators consider it valid. -public final class CompositeTrustEvaluator: ServerTrustEvaluating { - private let evaluators: [ServerTrustEvaluating] - - /// Creates a `CompositeTrustEvaluator`. - /// - /// - Parameter evaluators: The `ServerTrustEvaluating` values used to evaluate the server trust. - public init(evaluators: [ServerTrustEvaluating]) { - self.evaluators = evaluators - } - - public func evaluate(_ trust: SecTrust, forHost host: String) throws { - try evaluators.evaluate(trust, forHost: host) - } -} - -/// Disables all evaluation which in turn will always consider any server trust as valid. -/// -/// - Note: Instead of disabling server trust evaluation, it's a better idea to configure systems to properly trust test -/// certificates, as outlined in [this Apple tech note](https://developer.apple.com/library/archive/qa/qa1948/_index.html). -/// -/// **THIS EVALUATOR SHOULD NEVER BE USED IN PRODUCTION!** -@available(*, deprecated, renamed: "DisabledTrustEvaluator", message: "DisabledEvaluator has been renamed DisabledTrustEvaluator.") -public typealias DisabledEvaluator = DisabledTrustEvaluator - -/// Disables all evaluation which in turn will always consider any server trust as valid. -/// -/// -/// - Note: Instead of disabling server trust evaluation, it's a better idea to configure systems to properly trust test -/// certificates, as outlined in [this Apple tech note](https://developer.apple.com/library/archive/qa/qa1948/_index.html). -/// -/// **THIS EVALUATOR SHOULD NEVER BE USED IN PRODUCTION!** -public final class DisabledTrustEvaluator: ServerTrustEvaluating { - /// Creates an instance. - public init() {} - - public func evaluate(_ trust: SecTrust, forHost host: String) throws {} -} - -// MARK: - Extensions - -extension Array where Element == ServerTrustEvaluating { - #if os(Linux) - // Add this same convenience method for Linux. - #else - /// Evaluates the given `SecTrust` value for the given `host`. - /// - /// - Parameters: - /// - trust: The `SecTrust` value to evaluate. - /// - host: The host for which to evaluate the `SecTrust` value. - /// - /// - Returns: Whether or not the evaluator considers the `SecTrust` value valid for `host`. - public func evaluate(_ trust: SecTrust, forHost host: String) throws { - for evaluator in self { - try evaluator.evaluate(trust, forHost: host) - } - } - #endif -} - -extension Bundle: AlamofireExtended {} -extension AlamofireExtension where ExtendedType: Bundle { - /// Returns all valid `cer`, `crt`, and `der` certificates in the bundle. - public var certificates: [SecCertificate] { - paths(forResourcesOfTypes: [".cer", ".CER", ".crt", ".CRT", ".der", ".DER"]).compactMap { path in - guard - let certificateData = try? Data(contentsOf: URL(fileURLWithPath: path)) as CFData, - let certificate = SecCertificateCreateWithData(nil, certificateData) else { return nil } - - return certificate - } - } - - /// Returns all public keys for the valid certificates in the bundle. - public var publicKeys: [SecKey] { - certificates.af.publicKeys - } - - /// Returns all pathnames for the resources identified by the provided file extensions. - /// - /// - Parameter types: The filename extensions locate. - /// - /// - Returns: All pathnames for the given filename extensions. - public func paths(forResourcesOfTypes types: [String]) -> [String] { - Array(Set(types.flatMap { type.paths(forResourcesOfType: $0, inDirectory: nil) })) - } -} - -extension SecTrust: AlamofireExtended {} -extension AlamofireExtension where ExtendedType == SecTrust { - /// Evaluates `self` after applying the `SecPolicy` value provided. - /// - /// - Parameter policy: The `SecPolicy` to apply to `self` before evaluation. - /// - /// - Throws: Any `Error` from applying the `SecPolicy` or from evaluation. - @available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *) - public func evaluate(afterApplying policy: SecPolicy) throws { - try apply(policy: policy).af.evaluate() - } - - /// Attempts to validate `self` using the `SecPolicy` provided and transforming any error produced using the closure passed. - /// - /// - Parameters: - /// - policy: The `SecPolicy` used to evaluate `self`. - /// - errorProducer: The closure used transform the failed `OSStatus` and `SecTrustResultType`. - /// - Throws: Any `Error` from applying the `policy`, or the result of `errorProducer` if validation fails. - @available(iOS, introduced: 10, deprecated: 12, renamed: "evaluate(afterApplying:)") - @available(macOS, introduced: 10.12, deprecated: 10.14, renamed: "evaluate(afterApplying:)") - @available(tvOS, introduced: 10, deprecated: 12, renamed: "evaluate(afterApplying:)") - @available(watchOS, introduced: 3, deprecated: 5, renamed: "evaluate(afterApplying:)") - public func validate(policy: SecPolicy, errorProducer: (_ status: OSStatus, _ result: SecTrustResultType) -> Error) throws { - try apply(policy: policy).af.validate(errorProducer: errorProducer) - } - - /// Applies a `SecPolicy` to `self`, throwing if it fails. - /// - /// - Parameter policy: The `SecPolicy`. - /// - /// - Returns: `self`, with the policy applied. - /// - Throws: An `AFError.serverTrustEvaluationFailed` instance with a `.policyApplicationFailed` reason. - public func apply(policy: SecPolicy) throws -> SecTrust { - let status = SecTrustSetPolicies(type, policy) - - guard status.af.isSuccess else { - throw AFError.serverTrustEvaluationFailed(reason: .policyApplicationFailed(trust: type, - policy: policy, - status: status)) - } - - return type - } - - /// Evaluate `self`, throwing an `Error` if evaluation fails. - /// - /// - Throws: `AFError.serverTrustEvaluationFailed` with reason `.trustValidationFailed` and associated error from - /// the underlying evaluation. - @available(iOS 12, macOS 10.14, tvOS 12, watchOS 5, *) - public func evaluate() throws { - var error: CFError? - let evaluationSucceeded = SecTrustEvaluateWithError(type, &error) - - if !evaluationSucceeded { - throw AFError.serverTrustEvaluationFailed(reason: .trustEvaluationFailed(error: error)) - } - } - - /// Validate `self`, passing any failure values through `errorProducer`. - /// - /// - Parameter errorProducer: The closure used to transform the failed `OSStatus` and `SecTrustResultType` into an - /// `Error`. - /// - Throws: The `Error` produced by the `errorProducer` closure. - @available(iOS, introduced: 10, deprecated: 12, renamed: "evaluate()") - @available(macOS, introduced: 10.12, deprecated: 10.14, renamed: "evaluate()") - @available(tvOS, introduced: 10, deprecated: 12, renamed: "evaluate()") - @available(watchOS, introduced: 3, deprecated: 5, renamed: "evaluate()") - public func validate(errorProducer: (_ status: OSStatus, _ result: SecTrustResultType) -> Error) throws { - var result = SecTrustResultType.invalid - let status = SecTrustEvaluate(type, &result) - - guard status.af.isSuccess && result.af.isSuccess else { - throw errorProducer(status, result) - } - } - - /// Sets a custom certificate chain on `self`, allowing full validation of a self-signed certificate and its chain. - /// - /// - Parameter certificates: The `SecCertificate`s to add to the chain. - /// - Throws: Any error produced when applying the new certificate chain. - public func setAnchorCertificates(_ certificates: [SecCertificate]) throws { - // Add additional anchor certificates. - let status = SecTrustSetAnchorCertificates(type, certificates as CFArray) - guard status.af.isSuccess else { - throw AFError.serverTrustEvaluationFailed(reason: .settingAnchorCertificatesFailed(status: status, - certificates: certificates)) - } - - // Trust only the set anchor certs. - let onlyStatus = SecTrustSetAnchorCertificatesOnly(type, true) - guard onlyStatus.af.isSuccess else { - throw AFError.serverTrustEvaluationFailed(reason: .settingAnchorCertificatesFailed(status: onlyStatus, - certificates: certificates)) - } - } - - /// The public keys contained in `self`. - public var publicKeys: [SecKey] { - certificates.af.publicKeys - } - - /// The `SecCertificate`s contained i `self`. - public var certificates: [SecCertificate] { - (0.. SecPolicy { - SecPolicyCreateSSL(true, hostname as CFString) - } - - /// Creates a `SecPolicy` which checks the revocation of certificates. - /// - /// - Parameter options: The `RevocationTrustEvaluator.Options` for evaluation. - /// - /// - Returns: The `SecPolicy`. - /// - Throws: An `AFError.serverTrustEvaluationFailed` error with reason `.revocationPolicyCreationFailed` - /// if the policy cannot be created. - public static func revocation(options: RevocationTrustEvaluator.Options) throws -> SecPolicy { - guard let policy = SecPolicyCreateRevocation(options.rawValue) else { - throw AFError.serverTrustEvaluationFailed(reason: .revocationPolicyCreationFailed) - } - - return policy - } -} - -extension Array: AlamofireExtended {} -extension AlamofireExtension where ExtendedType == [SecCertificate] { - /// All `Data` values for the contained `SecCertificate`s. - public var data: [Data] { - type.map { SecCertificateCopyData($0) as Data } - } - - /// All public `SecKey` values for the contained `SecCertificate`s. - public var publicKeys: [SecKey] { - type.compactMap { $0.af.publicKey } - } -} - -extension SecCertificate: AlamofireExtended {} -extension AlamofireExtension where ExtendedType == SecCertificate { - /// The public key for `self`, if it can be extracted. - public var publicKey: SecKey? { - let policy = SecPolicyCreateBasicX509() - var trust: SecTrust? - let trustCreationStatus = SecTrustCreateWithCertificates(type, policy, &trust) - - guard let createdTrust = trust, trustCreationStatus == errSecSuccess else { return nil } - - return SecTrustCopyPublicKey(createdTrust) - } -} - -extension OSStatus: AlamofireExtended {} -extension AlamofireExtension where ExtendedType == OSStatus { - /// Returns whether `self` is `errSecSuccess`. - public var isSuccess: Bool { type == errSecSuccess } -} - -extension SecTrustResultType: AlamofireExtended {} -extension AlamofireExtension where ExtendedType == SecTrustResultType { - /// Returns whether `self is `.unspecified` or `.proceed`. - public var isSuccess: Bool { - type == .unspecified || type == .proceed - } -} diff --git a/Pods/Alamofire/Source/Session.swift b/Pods/Alamofire/Source/Session.swift deleted file mode 100644 index ac0ab229..00000000 --- a/Pods/Alamofire/Source/Session.swift +++ /dev/null @@ -1,1258 +0,0 @@ -// -// Session.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// `Session` creates and manages Alamofire's `Request` types during their lifetimes. It also provides common -/// functionality for all `Request`s, including queuing, interception, trust management, redirect handling, and response -/// cache handling. -open class Session { - /// Shared singleton instance used by all `AF.request` APIs. Cannot be modified. - public static let `default` = Session() - - /// Underlying `URLSession` used to create `URLSessionTasks` for this instance, and for which this instance's - /// `delegate` handles `URLSessionDelegate` callbacks. - /// - /// - Note: This instance should **NOT** be used to interact with the underlying `URLSessionTask`s. Doing so will - /// break internal Alamofire logic that tracks those tasks. - /// - public let session: URLSession - /// Instance's `SessionDelegate`, which handles the `URLSessionDelegate` methods and `Request` interaction. - public let delegate: SessionDelegate - /// Root `DispatchQueue` for all internal callbacks and state update. **MUST** be a serial queue. - public let rootQueue: DispatchQueue - /// Value determining whether this instance automatically calls `resume()` on all created `Request`s. - public let startRequestsImmediately: Bool - /// `DispatchQueue` on which `URLRequest`s are created asynchronously. By default this queue uses `rootQueue` as its - /// `target`, but a separate queue can be used if request creation is determined to be a bottleneck. Always profile - /// and test before introducing an additional queue. - public let requestQueue: DispatchQueue - /// `DispatchQueue` passed to all `Request`s on which they perform their response serialization. By default this - /// queue uses `rootQueue` as its `target` but a separate queue can be used if response serialization is determined - /// to be a bottleneck. Always profile and test before introducing an additional queue. - public let serializationQueue: DispatchQueue - /// `RequestInterceptor` used for all `Request` created by the instance. `RequestInterceptor`s can also be set on a - /// per-`Request` basis, in which case the `Request`'s interceptor takes precedence over this value. - public let interceptor: RequestInterceptor? - /// `ServerTrustManager` instance used to evaluate all trust challenges and provide certificate and key pinning. - public let serverTrustManager: ServerTrustManager? - /// `RedirectHandler` instance used to provide customization for request redirection. - public let redirectHandler: RedirectHandler? - /// `CachedResponseHandler` instance used to provide customization of cached response handling. - public let cachedResponseHandler: CachedResponseHandler? - /// `CompositeEventMonitor` used to compose Alamofire's `defaultEventMonitors` and any passed `EventMonitor`s. - public let eventMonitor: CompositeEventMonitor - /// `EventMonitor`s included in all instances. `[AlamofireNotifications()]` by default. - public let defaultEventMonitors: [EventMonitor] = [AlamofireNotifications()] - - /// Internal map between `Request`s and any `URLSessionTasks` that may be in flight for them. - var requestTaskMap = RequestTaskMap() - /// `Set` of currently active `Request`s. - var activeRequests: Set = [] - /// Completion events awaiting `URLSessionTaskMetrics`. - var waitingCompletions: [URLSessionTask: () -> Void] = [:] - - /// Creates a `Session` from a `URLSession` and other parameters. - /// - /// - Note: When passing a `URLSession`, you must create the `URLSession` with a specific `delegateQueue` value and - /// pass the `delegateQueue`'s `underlyingQueue` as the `rootQueue` parameter of this initializer. - /// - /// - Parameters: - /// - session: Underlying `URLSession` for this instance. - /// - delegate: `SessionDelegate` that handles `session`'s delegate callbacks as well as `Request` - /// interaction. - /// - rootQueue: Root `DispatchQueue` for all internal callbacks and state updates. **MUST** be a - /// serial queue. - /// - startRequestsImmediately: Determines whether this instance will automatically start all `Request`s. `true` - /// by default. If set to `false`, all `Request`s created must have `.resume()` called. - /// on them for them to start. - /// - requestQueue: `DispatchQueue` on which to perform `URLRequest` creation. By default this queue - /// will use the `rootQueue` as its `target`. A separate queue can be used if it's - /// determined request creation is a bottleneck, but that should only be done after - /// careful testing and profiling. `nil` by default. - /// - serializationQueue: `DispatchQueue` on which to perform all response serialization. By default this - /// queue will use the `rootQueue` as its `target`. A separate queue can be used if - /// it's determined response serialization is a bottleneck, but that should only be - /// done after careful testing and profiling. `nil` by default. - /// - interceptor: `RequestInterceptor` to be used for all `Request`s created by this instance. `nil` - /// by default. - /// - serverTrustManager: `ServerTrustManager` to be used for all trust evaluations by this instance. `nil` - /// by default. - /// - redirectHandler: `RedirectHandler` to be used by all `Request`s created by this instance. `nil` by - /// default. - /// - cachedResponseHandler: `CachedResponseHandler` to be used by all `Request`s created by this instance. - /// `nil` by default. - /// - eventMonitors: Additional `EventMonitor`s used by the instance. Alamofire always adds a - /// `AlamofireNotifications` `EventMonitor` to the array passed here. `[]` by default. - public init(session: URLSession, - delegate: SessionDelegate, - rootQueue: DispatchQueue, - startRequestsImmediately: Bool = true, - requestQueue: DispatchQueue? = nil, - serializationQueue: DispatchQueue? = nil, - interceptor: RequestInterceptor? = nil, - serverTrustManager: ServerTrustManager? = nil, - redirectHandler: RedirectHandler? = nil, - cachedResponseHandler: CachedResponseHandler? = nil, - eventMonitors: [EventMonitor] = []) { - precondition(session.configuration.identifier == nil, - "Alamofire does not support background URLSessionConfigurations.") - precondition(session.delegateQueue.underlyingQueue === rootQueue, - "Session(session:) initializer must be passed the DispatchQueue used as the delegateQueue's underlyingQueue as rootQueue.") - - self.session = session - self.delegate = delegate - self.rootQueue = rootQueue - self.startRequestsImmediately = startRequestsImmediately - self.requestQueue = requestQueue ?? DispatchQueue(label: "\(rootQueue.label).requestQueue", target: rootQueue) - self.serializationQueue = serializationQueue ?? DispatchQueue(label: "\(rootQueue.label).serializationQueue", target: rootQueue) - self.interceptor = interceptor - self.serverTrustManager = serverTrustManager - self.redirectHandler = redirectHandler - self.cachedResponseHandler = cachedResponseHandler - eventMonitor = CompositeEventMonitor(monitors: defaultEventMonitors + eventMonitors) - delegate.eventMonitor = eventMonitor - delegate.stateProvider = self - } - - /// Creates a `Session` from a `URLSessionConfiguration`. - /// - /// - Note: This initializer lets Alamofire handle the creation of the underlying `URLSession` and its - /// `delegateQueue`, and is the recommended initializer for most uses. - /// - /// - Parameters: - /// - configuration: `URLSessionConfiguration` to be used to create the underlying `URLSession`. Changes - /// to this value after being passed to this initializer will have no effect. - /// `URLSessionConfiguration.af.default` by default. - /// - delegate: `SessionDelegate` that handles `session`'s delegate callbacks as well as `Request` - /// interaction. `SessionDelegate()` by default. - /// - rootQueue: Root `DispatchQueue` for all internal callbacks and state updates. **MUST** be a - /// serial queue. `DispatchQueue(label: "org.alamofire.session.rootQueue")` by default. - /// - startRequestsImmediately: Determines whether this instance will automatically start all `Request`s. `true` - /// by default. If set to `false`, all `Request`s created must have `.resume()` called. - /// on them for them to start. - /// - requestQueue: `DispatchQueue` on which to perform `URLRequest` creation. By default this queue - /// will use the `rootQueue` as its `target`. A separate queue can be used if it's - /// determined request creation is a bottleneck, but that should only be done after - /// careful testing and profiling. `nil` by default. - /// - serializationQueue: `DispatchQueue` on which to perform all response serialization. By default this - /// queue will use the `rootQueue` as its `target`. A separate queue can be used if - /// it's determined response serialization is a bottleneck, but that should only be - /// done after careful testing and profiling. `nil` by default. - /// - interceptor: `RequestInterceptor` to be used for all `Request`s created by this instance. `nil` - /// by default. - /// - serverTrustManager: `ServerTrustManager` to be used for all trust evaluations by this instance. `nil` - /// by default. - /// - redirectHandler: `RedirectHandler` to be used by all `Request`s created by this instance. `nil` by - /// default. - /// - cachedResponseHandler: `CachedResponseHandler` to be used by all `Request`s created by this instance. - /// `nil` by default. - /// - eventMonitors: Additional `EventMonitor`s used by the instance. Alamofire always adds a - /// `AlamofireNotifications` `EventMonitor` to the array passed here. `[]` by default. - public convenience init(configuration: URLSessionConfiguration = URLSessionConfiguration.af.default, - delegate: SessionDelegate = SessionDelegate(), - rootQueue: DispatchQueue = DispatchQueue(label: "org.alamofire.session.rootQueue"), - startRequestsImmediately: Bool = true, - requestQueue: DispatchQueue? = nil, - serializationQueue: DispatchQueue? = nil, - interceptor: RequestInterceptor? = nil, - serverTrustManager: ServerTrustManager? = nil, - redirectHandler: RedirectHandler? = nil, - cachedResponseHandler: CachedResponseHandler? = nil, - eventMonitors: [EventMonitor] = []) { - precondition(configuration.identifier == nil, "Alamofire does not support background URLSessionConfigurations.") - - let delegateQueue = OperationQueue(maxConcurrentOperationCount: 1, underlyingQueue: rootQueue, name: "org.alamofire.session.sessionDelegateQueue") - let session = URLSession(configuration: configuration, delegate: delegate, delegateQueue: delegateQueue) - - self.init(session: session, - delegate: delegate, - rootQueue: rootQueue, - startRequestsImmediately: startRequestsImmediately, - requestQueue: requestQueue, - serializationQueue: serializationQueue, - interceptor: interceptor, - serverTrustManager: serverTrustManager, - redirectHandler: redirectHandler, - cachedResponseHandler: cachedResponseHandler, - eventMonitors: eventMonitors) - } - - deinit { - finishRequestsForDeinit() - session.invalidateAndCancel() - } - - // MARK: - All Requests API - - /// Perform an action on all active `Request`s. - /// - /// - Note: The provided `action` closure is performed asynchronously, meaning that some `Request`s may complete and - /// be unavailable by time it runs. Additionally, this action is performed on the instances's `rootQueue`, - /// so care should be taken that actions are fast. Once the work on the `Request`s is complete, any - /// additional work should be performed on another queue. - /// - /// - Parameters: - /// - action: Closure to perform with all `Request`s. - public func withAllRequests(perform action: @escaping (Set) -> Void) { - rootQueue.async { - action(self.activeRequests) - } - } - - /// Cancel all active `Request`s, optionally calling a completion handler when complete. - /// - /// - Note: This is an asynchronous operation and does not block the creation of future `Request`s. Cancelled - /// `Request`s may not cancel immediately due internal work, and may not cancel at all if they are close to - /// completion when cancelled. - /// - /// - Parameters: - /// - queue: `DispatchQueue` on which the completion handler is run. `.main` by default. - /// - completion: Closure to be called when all `Request`s have been cancelled. - public func cancelAllRequests(completingOnQueue queue: DispatchQueue = .main, completion: (() -> Void)? = nil) { - withAllRequests { requests in - requests.forEach { $0.cancel() } - queue.async { - completion?() - } - } - } - - // MARK: - DataRequest - - /// Closure which provides a `URLRequest` for mutation. - public typealias RequestModifier = (inout URLRequest) throws -> Void - - struct RequestConvertible: URLRequestConvertible { - let url: URLConvertible - let method: HTTPMethod - let parameters: Parameters? - let encoding: ParameterEncoding - let headers: HTTPHeaders? - let requestModifier: RequestModifier? - - func asURLRequest() throws -> URLRequest { - var request = try URLRequest(url: url, method: method, headers: headers) - try requestModifier?(&request) - - return try encoding.encode(request, with: parameters) - } - } - - /// Creates a `DataRequest` from a `URLRequest` created using the passed components and a `RequestInterceptor`. - /// - /// - Parameters: - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.get` by default. - /// - parameters: `Parameters` (a.k.a. `[String: Any]`) value to be encoded into the `URLRequest`. `nil` by - /// default. - /// - encoding: `ParameterEncoding` to be used to encode the `parameters` value into the `URLRequest`. - /// `URLEncoding.default` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided - /// parameters. `nil` by default. - /// - /// - Returns: The created `DataRequest`. - open func request(_ convertible: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - requestModifier: RequestModifier? = nil) -> DataRequest { - let convertible = RequestConvertible(url: convertible, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - requestModifier: requestModifier) - - return request(convertible, interceptor: interceptor) - } - - struct RequestEncodableConvertible: URLRequestConvertible { - let url: URLConvertible - let method: HTTPMethod - let parameters: Parameters? - let encoder: ParameterEncoder - let headers: HTTPHeaders? - let requestModifier: RequestModifier? - - func asURLRequest() throws -> URLRequest { - var request = try URLRequest(url: url, method: method, headers: headers) - try requestModifier?(&request) - - return try parameters.map { try encoder.encode($0, into: request) } ?? request - } - } - - /// Creates a `DataRequest` from a `URLRequest` created using the passed components, `Encodable` parameters, and a - /// `RequestInterceptor`. - /// - /// - Parameters: - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.get` by default. - /// - parameters: `Encodable` value to be encoded into the `URLRequest`. `nil` by default. - /// - encoder: `ParameterEncoder` to be used to encode the `parameters` value into the `URLRequest`. - /// `URLEncodedFormParameterEncoder.default` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - /// - Returns: The created `DataRequest`. - open func request(_ convertible: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - requestModifier: RequestModifier? = nil) -> DataRequest { - let convertible = RequestEncodableConvertible(url: convertible, - method: method, - parameters: parameters, - encoder: encoder, - headers: headers, - requestModifier: requestModifier) - - return request(convertible, interceptor: interceptor) - } - - /// Creates a `DataRequest` from a `URLRequestConvertible` value and a `RequestInterceptor`. - /// - /// - Parameters: - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - /// - Returns: The created `DataRequest`. - open func request(_ convertible: URLRequestConvertible, interceptor: RequestInterceptor? = nil) -> DataRequest { - let request = DataRequest(convertible: convertible, - underlyingQueue: rootQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: self) - - perform(request) - - return request - } - - // MARK: - DataStreamRequest - - /// Creates a `DataStreamRequest` from the passed components, `Encodable` parameters, and `RequestInterceptor`. - /// - /// - Parameters: - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.get` by default. - /// - parameters: `Encodable` value to be encoded into the `URLRequest`. `nil` by default. - /// - encoder: `ParameterEncoder` to be used to encode the `parameters` value into the - /// `URLRequest`. - /// `URLEncodedFormParameterEncoder.default` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - automaticallyCancelOnStreamError: `Bool` indicating whether the instance should be canceled when an `Error` - /// is thrown while serializing stream `Data`. `false` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` - /// by default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from - /// the provided parameters. `nil` by default. - /// - /// - Returns: The created `DataStream` request. - open func streamRequest(_ convertible: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default, - headers: HTTPHeaders? = nil, - automaticallyCancelOnStreamError: Bool = false, - interceptor: RequestInterceptor? = nil, - requestModifier: RequestModifier? = nil) -> DataStreamRequest { - let convertible = RequestEncodableConvertible(url: convertible, - method: method, - parameters: parameters, - encoder: encoder, - headers: headers, - requestModifier: requestModifier) - - return streamRequest(convertible, - automaticallyCancelOnStreamError: automaticallyCancelOnStreamError, - interceptor: interceptor) - } - - /// Creates a `DataStreamRequest` from the passed components and `RequestInterceptor`. - /// - /// - Parameters: - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.get` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - automaticallyCancelOnStreamError: `Bool` indicating whether the instance should be canceled when an `Error` - /// is thrown while serializing stream `Data`. `false` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` - /// by default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from - /// the provided parameters. `nil` by default. - /// - /// - Returns: The created `DataStream` request. - open func streamRequest(_ convertible: URLConvertible, - method: HTTPMethod = .get, - headers: HTTPHeaders? = nil, - automaticallyCancelOnStreamError: Bool = false, - interceptor: RequestInterceptor? = nil, - requestModifier: RequestModifier? = nil) -> DataStreamRequest { - let convertible = RequestEncodableConvertible(url: convertible, - method: method, - parameters: Empty?.none, - encoder: URLEncodedFormParameterEncoder.default, - headers: headers, - requestModifier: requestModifier) - - return streamRequest(convertible, - automaticallyCancelOnStreamError: automaticallyCancelOnStreamError, - interceptor: interceptor) - } - - /// Creates a `DataStreamRequest` from the passed `URLRequestConvertible` value and `RequestInterceptor`. - /// - /// - Parameters: - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - automaticallyCancelOnStreamError: `Bool` indicating whether the instance should be canceled when an `Error` - /// is thrown while serializing stream `Data`. `false` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` - /// by default. - /// - /// - Returns: The created `DataStreamRequest`. - open func streamRequest(_ convertible: URLRequestConvertible, - automaticallyCancelOnStreamError: Bool = false, - interceptor: RequestInterceptor? = nil) -> DataStreamRequest { - let request = DataStreamRequest(convertible: convertible, - automaticallyCancelOnStreamError: automaticallyCancelOnStreamError, - underlyingQueue: rootQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: self) - - perform(request) - - return request - } - - // MARK: - DownloadRequest - - /// Creates a `DownloadRequest` using a `URLRequest` created using the passed components, `RequestInterceptor`, and - /// `Destination`. - /// - /// - Parameters: - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.get` by default. - /// - parameters: `Parameters` (a.k.a. `[String: Any]`) value to be encoded into the `URLRequest`. `nil` by - /// default. - /// - encoding: `ParameterEncoding` to be used to encode the `parameters` value into the `URLRequest`. - /// Defaults to `URLEncoding.default`. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided - /// parameters. `nil` by default. - /// - destination: `DownloadRequest.Destination` closure used to determine how and where the downloaded file - /// should be moved. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - open func download(_ convertible: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoding: ParameterEncoding = URLEncoding.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - requestModifier: RequestModifier? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - let convertible = RequestConvertible(url: convertible, - method: method, - parameters: parameters, - encoding: encoding, - headers: headers, - requestModifier: requestModifier) - - return download(convertible, interceptor: interceptor, to: destination) - } - - /// Creates a `DownloadRequest` from a `URLRequest` created using the passed components, `Encodable` parameters, and - /// a `RequestInterceptor`. - /// - /// - Parameters: - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.get` by default. - /// - parameters: Value conforming to `Encodable` to be encoded into the `URLRequest`. `nil` by default. - /// - encoder: `ParameterEncoder` to be used to encode the `parameters` value into the `URLRequest`. - /// Defaults to `URLEncodedFormParameterEncoder.default`. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided - /// parameters. `nil` by default. - /// - destination: `DownloadRequest.Destination` closure used to determine how and where the downloaded file - /// should be moved. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - open func download(_ convertible: URLConvertible, - method: HTTPMethod = .get, - parameters: Parameters? = nil, - encoder: ParameterEncoder = URLEncodedFormParameterEncoder.default, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - requestModifier: RequestModifier? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - let convertible = RequestEncodableConvertible(url: convertible, - method: method, - parameters: parameters, - encoder: encoder, - headers: headers, - requestModifier: requestModifier) - - return download(convertible, interceptor: interceptor, to: destination) - } - - /// Creates a `DownloadRequest` from a `URLRequestConvertible` value, a `RequestInterceptor`, and a `Destination`. - /// - /// - Parameters: - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - destination: `DownloadRequest.Destination` closure used to determine how and where the downloaded file - /// should be moved. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - open func download(_ convertible: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - let request = DownloadRequest(downloadable: .request(convertible), - underlyingQueue: rootQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: self, - destination: destination ?? DownloadRequest.defaultDestination) - - perform(request) - - return request - } - - /// Creates a `DownloadRequest` from the `resumeData` produced from a previously cancelled `DownloadRequest`, as - /// well as a `RequestInterceptor`, and a `Destination`. - /// - /// - Note: If `destination` is not specified, the download will be moved to a temporary location determined by - /// Alamofire. The file will not be deleted until the system purges the temporary files. - /// - /// - Note: On some versions of all Apple platforms (iOS 10 - 10.2, macOS 10.12 - 10.12.2, tvOS 10 - 10.1, watchOS 3 - 3.1.1), - /// `resumeData` is broken on background URL session configurations. There's an underlying bug in the `resumeData` - /// generation logic where the data is written incorrectly and will always fail to resume the download. For more - /// information about the bug and possible workarounds, please refer to the [this Stack Overflow post](http://stackoverflow.com/a/39347461/1342462). - /// - /// - Parameters: - /// - data: The resume data from a previously cancelled `DownloadRequest` or `URLSessionDownloadTask`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - destination: `DownloadRequest.Destination` closure used to determine how and where the downloaded file - /// should be moved. `nil` by default. - /// - /// - Returns: The created `DownloadRequest`. - open func download(resumingWith data: Data, - interceptor: RequestInterceptor? = nil, - to destination: DownloadRequest.Destination? = nil) -> DownloadRequest { - let request = DownloadRequest(downloadable: .resumeData(data), - underlyingQueue: rootQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - delegate: self, - destination: destination ?? DownloadRequest.defaultDestination) - - perform(request) - - return request - } - - // MARK: - UploadRequest - - struct ParameterlessRequestConvertible: URLRequestConvertible { - let url: URLConvertible - let method: HTTPMethod - let headers: HTTPHeaders? - let requestModifier: RequestModifier? - - func asURLRequest() throws -> URLRequest { - var request = try URLRequest(url: url, method: method, headers: headers) - try requestModifier?(&request) - - return request - } - } - - struct Upload: UploadConvertible { - let request: URLRequestConvertible - let uploadable: UploadableConvertible - - func createUploadable() throws -> UploadRequest.Uploadable { - try uploadable.createUploadable() - } - - func asURLRequest() throws -> URLRequest { - try request.asURLRequest() - } - } - - // MARK: Data - - /// Creates an `UploadRequest` for the given `Data`, `URLRequest` components, and `RequestInterceptor`. - /// - /// - Parameters: - /// - data: The `Data` to upload. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided - /// parameters. `nil` by default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(_ data: Data, - to convertible: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default, - requestModifier: RequestModifier? = nil) -> UploadRequest { - let convertible = ParameterlessRequestConvertible(url: convertible, - method: method, - headers: headers, - requestModifier: requestModifier) - - return upload(data, with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the given `Data` using the `URLRequestConvertible` value and `RequestInterceptor`. - /// - /// - Parameters: - /// - data: The `Data` to upload. - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(_ data: Data, - with convertible: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - upload(.data(data), with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - // MARK: File - - /// Creates an `UploadRequest` for the file at the given file `URL`, using a `URLRequest` from the provided - /// components and `RequestInterceptor`. - /// - /// - Parameters: - /// - fileURL: The `URL` of the file to upload. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `UploadRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided - /// parameters. `nil` by default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(_ fileURL: URL, - to convertible: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default, - requestModifier: RequestModifier? = nil) -> UploadRequest { - let convertible = ParameterlessRequestConvertible(url: convertible, - method: method, - headers: headers, - requestModifier: requestModifier) - - return upload(fileURL, with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the file at the given file `URL` using the `URLRequestConvertible` value and - /// `RequestInterceptor`. - /// - /// - Parameters: - /// - fileURL: The `URL` of the file to upload. - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(_ fileURL: URL, - with convertible: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - upload(.file(fileURL, shouldRemove: false), with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - // MARK: InputStream - - /// Creates an `UploadRequest` from the `InputStream` provided using a `URLRequest` from the provided components and - /// `RequestInterceptor`. - /// - /// - Parameters: - /// - stream: The `InputStream` that provides the data to upload. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the provided - /// parameters. `nil` by default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(_ stream: InputStream, - to convertible: URLConvertible, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default, - requestModifier: RequestModifier? = nil) -> UploadRequest { - let convertible = ParameterlessRequestConvertible(url: convertible, - method: method, - headers: headers, - requestModifier: requestModifier) - - return upload(stream, with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - /// Creates an `UploadRequest` from the provided `InputStream` using the `URLRequestConvertible` value and - /// `RequestInterceptor`. - /// - /// - Parameters: - /// - stream: The `InputStream` that provides the data to upload. - /// - convertible: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(_ stream: InputStream, - with convertible: URLRequestConvertible, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - upload(.stream(stream), with: convertible, interceptor: interceptor, fileManager: fileManager) - } - - // MARK: MultipartFormData - - /// Creates an `UploadRequest` for the multipart form data built using a closure and sent using the provided - /// `URLRequest` components and `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` building closure. - /// - convertible: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is - /// written to disk before being uploaded. `.default` instance by default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the - /// provided parameters. `nil` by default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(multipartFormData: @escaping (MultipartFormData) -> Void, - to url: URLConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default, - requestModifier: RequestModifier? = nil) -> UploadRequest { - let convertible = ParameterlessRequestConvertible(url: url, - method: method, - headers: headers, - requestModifier: requestModifier) - - let formData = MultipartFormData(fileManager: fileManager) - multipartFormData(formData) - - return upload(multipartFormData: formData, - with: convertible, - usingThreshold: encodingMemoryThreshold, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` using a `MultipartFormData` building closure, the provided `URLRequestConvertible` - /// value, and a `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` building closure. - /// - request: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is - /// written to disk before being uploaded. `.default` instance by default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(multipartFormData: @escaping (MultipartFormData) -> Void, - with request: URLRequestConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - let formData = MultipartFormData(fileManager: fileManager) - multipartFormData(formData) - - return upload(multipartFormData: formData, - with: request, - usingThreshold: encodingMemoryThreshold, - interceptor: interceptor, - fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the provided `URLRequest` components - /// and `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` instance to upload. - /// - url: `URLConvertible` value to be used as the `URLRequest`'s `URL`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - method: `HTTPMethod` for the `URLRequest`. `.post` by default. - /// - headers: `HTTPHeaders` value to be added to the `URLRequest`. `nil` by default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` to be used if the form data exceeds the memory threshold and is - /// written to disk before being uploaded. `.default` instance by default. - /// - requestModifier: `RequestModifier` which will be applied to the `URLRequest` created from the - /// provided parameters. `nil` by default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(multipartFormData: MultipartFormData, - to url: URLConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - method: HTTPMethod = .post, - headers: HTTPHeaders? = nil, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default, - requestModifier: RequestModifier? = nil) -> UploadRequest { - let convertible = ParameterlessRequestConvertible(url: url, - method: method, - headers: headers, - requestModifier: requestModifier) - - let multipartUpload = MultipartUpload(encodingMemoryThreshold: encodingMemoryThreshold, - request: convertible, - multipartFormData: multipartFormData) - - return upload(multipartUpload, interceptor: interceptor, fileManager: fileManager) - } - - /// Creates an `UploadRequest` for the prebuilt `MultipartFormData` value using the providing `URLRequestConvertible` - /// value and `RequestInterceptor`. - /// - /// It is important to understand the memory implications of uploading `MultipartFormData`. If the cumulative - /// payload is small, encoding the data in-memory and directly uploading to a server is the by far the most - /// efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to - /// be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory - /// footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be - /// used for larger payloads such as video content. - /// - /// The `encodingMemoryThreshold` parameter allows Alamofire to automatically determine whether to encode in-memory - /// or stream from disk. If the content length of the `MultipartFormData` is below the `encodingMemoryThreshold`, - /// encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk - /// during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding - /// technique was used. - /// - /// - Parameters: - /// - multipartFormData: `MultipartFormData` instance to upload. - /// - request: `URLRequestConvertible` value to be used to create the `URLRequest`. - /// - encodingMemoryThreshold: Byte threshold used to determine whether the form data is encoded into memory or - /// onto disk before being uploaded. `MultipartFormData.encodingMemoryThreshold` by - /// default. - /// - interceptor: `RequestInterceptor` value to be used by the returned `DataRequest`. `nil` by default. - /// - fileManager: `FileManager` instance to be used by the returned `UploadRequest`. `.default` instance by - /// default. - /// - /// - Returns: The created `UploadRequest`. - open func upload(multipartFormData: MultipartFormData, - with request: URLRequestConvertible, - usingThreshold encodingMemoryThreshold: UInt64 = MultipartFormData.encodingMemoryThreshold, - interceptor: RequestInterceptor? = nil, - fileManager: FileManager = .default) -> UploadRequest { - let multipartUpload = MultipartUpload(encodingMemoryThreshold: encodingMemoryThreshold, - request: request, - multipartFormData: multipartFormData) - - return upload(multipartUpload, interceptor: interceptor, fileManager: fileManager) - } - - // MARK: - Internal API - - // MARK: Uploadable - - func upload(_ uploadable: UploadRequest.Uploadable, - with convertible: URLRequestConvertible, - interceptor: RequestInterceptor?, - fileManager: FileManager) -> UploadRequest { - let uploadable = Upload(request: convertible, uploadable: uploadable) - - return upload(uploadable, interceptor: interceptor, fileManager: fileManager) - } - - func upload(_ upload: UploadConvertible, interceptor: RequestInterceptor?, fileManager: FileManager) -> UploadRequest { - let request = UploadRequest(convertible: upload, - underlyingQueue: rootQueue, - serializationQueue: serializationQueue, - eventMonitor: eventMonitor, - interceptor: interceptor, - fileManager: fileManager, - delegate: self) - - perform(request) - - return request - } - - // MARK: Perform - - /// Starts performing the provided `Request`. - /// - /// - Parameter request: The `Request` to perform. - func perform(_ request: Request) { - rootQueue.async { - guard !request.isCancelled else { return } - - self.activeRequests.insert(request) - - self.requestQueue.async { - // Leaf types must come first, otherwise they will cast as their superclass. - switch request { - case let r as UploadRequest: self.performUploadRequest(r) // UploadRequest must come before DataRequest due to subtype relationship. - case let r as DataRequest: self.performDataRequest(r) - case let r as DownloadRequest: self.performDownloadRequest(r) - case let r as DataStreamRequest: self.performDataStreamRequest(r) - default: fatalError("Attempted to perform unsupported Request subclass: \(type(of: request))") - } - } - } - } - - func performDataRequest(_ request: DataRequest) { - dispatchPrecondition(condition: .onQueue(requestQueue)) - - performSetupOperations(for: request, convertible: request.convertible) - } - - func performDataStreamRequest(_ request: DataStreamRequest) { - dispatchPrecondition(condition: .onQueue(requestQueue)) - - performSetupOperations(for: request, convertible: request.convertible) - } - - func performUploadRequest(_ request: UploadRequest) { - dispatchPrecondition(condition: .onQueue(requestQueue)) - - performSetupOperations(for: request, convertible: request.convertible) { - do { - let uploadable = try request.upload.createUploadable() - self.rootQueue.async { request.didCreateUploadable(uploadable) } - return true - } catch { - self.rootQueue.async { request.didFailToCreateUploadable(with: error.asAFError(or: .createUploadableFailed(error: error))) } - return false - } - } - } - - func performDownloadRequest(_ request: DownloadRequest) { - dispatchPrecondition(condition: .onQueue(requestQueue)) - - switch request.downloadable { - case let .request(convertible): - performSetupOperations(for: request, convertible: convertible) - case let .resumeData(resumeData): - rootQueue.async { self.didReceiveResumeData(resumeData, for: request) } - } - } - - func performSetupOperations(for request: Request, - convertible: URLRequestConvertible, - shouldCreateTask: @escaping () -> Bool = { true }) - { - dispatchPrecondition(condition: .onQueue(requestQueue)) - - let initialRequest: URLRequest - - do { - initialRequest = try convertible.asURLRequest() - try initialRequest.validate() - } catch { - rootQueue.async { request.didFailToCreateURLRequest(with: error.asAFError(or: .createURLRequestFailed(error: error))) } - return - } - - rootQueue.async { request.didCreateInitialURLRequest(initialRequest) } - - guard !request.isCancelled else { return } - - guard let adapter = adapter(for: request) else { - guard shouldCreateTask() else { return } - rootQueue.async { self.didCreateURLRequest(initialRequest, for: request) } - return - } - - adapter.adapt(initialRequest, for: self) { result in - do { - let adaptedRequest = try result.get() - try adaptedRequest.validate() - - self.rootQueue.async { request.didAdaptInitialRequest(initialRequest, to: adaptedRequest) } - - guard shouldCreateTask() else { return } - - self.rootQueue.async { self.didCreateURLRequest(adaptedRequest, for: request) } - } catch { - self.rootQueue.async { request.didFailToAdaptURLRequest(initialRequest, withError: .requestAdaptationFailed(error: error)) } - } - } - } - - // MARK: - Task Handling - - func didCreateURLRequest(_ urlRequest: URLRequest, for request: Request) { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - request.didCreateURLRequest(urlRequest) - - guard !request.isCancelled else { return } - - let task = request.task(for: urlRequest, using: session) - requestTaskMap[request] = task - request.didCreateTask(task) - - updateStatesForTask(task, request: request) - } - - func didReceiveResumeData(_ data: Data, for request: DownloadRequest) { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - guard !request.isCancelled else { return } - - let task = request.task(forResumeData: data, using: session) - requestTaskMap[request] = task - request.didCreateTask(task) - - updateStatesForTask(task, request: request) - } - - func updateStatesForTask(_ task: URLSessionTask, request: Request) { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - request.withState { state in - switch state { - case .initialized, .finished: - // Do nothing. - break - case .resumed: - task.resume() - rootQueue.async { request.didResumeTask(task) } - case .suspended: - task.suspend() - rootQueue.async { request.didSuspendTask(task) } - case .cancelled: - // Resume to ensure metrics are gathered. - task.resume() - task.cancel() - rootQueue.async { request.didCancelTask(task) } - } - } - } - - // MARK: - Adapters and Retriers - - func adapter(for request: Request) -> RequestAdapter? { - if let requestInterceptor = request.interceptor, let sessionInterceptor = interceptor { - return Interceptor(adapters: [requestInterceptor, sessionInterceptor]) - } else { - return request.interceptor ?? interceptor - } - } - - func retrier(for request: Request) -> RequestRetrier? { - if let requestInterceptor = request.interceptor, let sessionInterceptor = interceptor { - return Interceptor(retriers: [requestInterceptor, sessionInterceptor]) - } else { - return request.interceptor ?? interceptor - } - } - - // MARK: - Invalidation - - func finishRequestsForDeinit() { - requestTaskMap.requests.forEach { request in - rootQueue.async { - request.finish(error: AFError.sessionDeinitialized) - } - } - } -} - -// MARK: - RequestDelegate - -extension Session: RequestDelegate { - public var sessionConfiguration: URLSessionConfiguration { - session.configuration - } - - public var startImmediately: Bool { startRequestsImmediately } - - public func cleanup(after request: Request) { - activeRequests.remove(request) - } - - public func retryResult(for request: Request, dueTo error: AFError, completion: @escaping (RetryResult) -> Void) { - guard let retrier = retrier(for: request) else { - rootQueue.async { completion(.doNotRetry) } - return - } - - retrier.retry(request, for: self, dueTo: error) { retryResult in - self.rootQueue.async { - guard let retryResultError = retryResult.error else { completion(retryResult); return } - - let retryError = AFError.requestRetryFailed(retryError: retryResultError, originalError: error) - completion(.doNotRetryWithError(retryError)) - } - } - } - - public func retryRequest(_ request: Request, withDelay timeDelay: TimeInterval?) { - rootQueue.async { - let retry: () -> Void = { - guard !request.isCancelled else { return } - - request.prepareForRetry() - self.perform(request) - } - - if let retryDelay = timeDelay { - self.rootQueue.after(retryDelay) { retry() } - } else { - retry() - } - } - } -} - -// MARK: - SessionStateProvider - -extension Session: SessionStateProvider { - func request(for task: URLSessionTask) -> Request? { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - return requestTaskMap[task] - } - - func didGatherMetricsForTask(_ task: URLSessionTask) { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - let didDisassociate = requestTaskMap.disassociateIfNecessaryAfterGatheringMetricsForTask(task) - - if didDisassociate { - waitingCompletions[task]?() - waitingCompletions[task] = nil - } - } - - func didCompleteTask(_ task: URLSessionTask, completion: @escaping () -> Void) { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - let didDisassociate = requestTaskMap.disassociateIfNecessaryAfterCompletingTask(task) - - if didDisassociate { - completion() - } else { - waitingCompletions[task] = completion - } - } - - func credential(for task: URLSessionTask, in protectionSpace: URLProtectionSpace) -> URLCredential? { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - return requestTaskMap[task]?.credential ?? - session.configuration.urlCredentialStorage?.defaultCredential(for: protectionSpace) - } - - func cancelRequestsForSessionInvalidation(with error: Error?) { - dispatchPrecondition(condition: .onQueue(rootQueue)) - - requestTaskMap.requests.forEach { $0.finish(error: AFError.sessionInvalidated(error: error)) } - } -} diff --git a/Pods/Alamofire/Source/SessionDelegate.swift b/Pods/Alamofire/Source/SessionDelegate.swift deleted file mode 100644 index befc80ea..00000000 --- a/Pods/Alamofire/Source/SessionDelegate.swift +++ /dev/null @@ -1,330 +0,0 @@ -// -// SessionDelegate.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Class which implements the various `URLSessionDelegate` methods to connect various Alamofire features. -open class SessionDelegate: NSObject { - private let fileManager: FileManager - - weak var stateProvider: SessionStateProvider? - var eventMonitor: EventMonitor? - - /// Creates an instance from the given `FileManager`. - /// - /// - Parameter fileManager: `FileManager` to use for underlying file management, such as moving downloaded files. - /// `.default` by default. - public init(fileManager: FileManager = .default) { - self.fileManager = fileManager - } - - /// Internal method to find and cast requests while maintaining some integrity checking. - /// - /// - Parameters: - /// - task: The `URLSessionTask` for which to find the associated `Request`. - /// - type: The `Request` subclass type to cast any `Request` associate with `task`. - func request(for task: URLSessionTask, as type: R.Type) -> R? { - guard let provider = stateProvider else { - assertionFailure("StateProvider is nil.") - return nil - } - - return provider.request(for: task) as? R - } -} - -/// Type which provides various `Session` state values. -protocol SessionStateProvider: AnyObject { - var serverTrustManager: ServerTrustManager? { get } - var redirectHandler: RedirectHandler? { get } - var cachedResponseHandler: CachedResponseHandler? { get } - - func request(for task: URLSessionTask) -> Request? - func didGatherMetricsForTask(_ task: URLSessionTask) - func didCompleteTask(_ task: URLSessionTask, completion: @escaping () -> Void) - func credential(for task: URLSessionTask, in protectionSpace: URLProtectionSpace) -> URLCredential? - func cancelRequestsForSessionInvalidation(with error: Error?) -} - -// MARK: URLSessionDelegate - -extension SessionDelegate: URLSessionDelegate { - open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?) { - eventMonitor?.urlSession(session, didBecomeInvalidWithError: error) - - stateProvider?.cancelRequestsForSessionInvalidation(with: error) - } -} - -// MARK: URLSessionTaskDelegate - -extension SessionDelegate: URLSessionTaskDelegate { - /// Result of a `URLAuthenticationChallenge` evaluation. - typealias ChallengeEvaluation = (disposition: URLSession.AuthChallengeDisposition, credential: URLCredential?, error: AFError?) - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - didReceive challenge: URLAuthenticationChallenge, - completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - eventMonitor?.urlSession(session, task: task, didReceive: challenge) - - let evaluation: ChallengeEvaluation - switch challenge.protectionSpace.authenticationMethod { - case NSURLAuthenticationMethodServerTrust: - evaluation = attemptServerTrustAuthentication(with: challenge) - case NSURLAuthenticationMethodHTTPBasic, NSURLAuthenticationMethodHTTPDigest, NSURLAuthenticationMethodNTLM, - NSURLAuthenticationMethodNegotiate, NSURLAuthenticationMethodClientCertificate: - evaluation = attemptCredentialAuthentication(for: challenge, belongingTo: task) - default: - evaluation = (.performDefaultHandling, nil, nil) - } - - if let error = evaluation.error { - stateProvider?.request(for: task)?.didFailTask(task, earlyWithError: error) - } - - completionHandler(evaluation.disposition, evaluation.credential) - } - - /// Evaluates the server trust `URLAuthenticationChallenge` received. - /// - /// - Parameter challenge: The `URLAuthenticationChallenge`. - /// - /// - Returns: The `ChallengeEvaluation`. - func attemptServerTrustAuthentication(with challenge: URLAuthenticationChallenge) -> ChallengeEvaluation { - let host = challenge.protectionSpace.host - - guard challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust, - let trust = challenge.protectionSpace.serverTrust - else { - return (.performDefaultHandling, nil, nil) - } - - do { - guard let evaluator = try stateProvider?.serverTrustManager?.serverTrustEvaluator(forHost: host) else { - return (.performDefaultHandling, nil, nil) - } - - try evaluator.evaluate(trust, forHost: host) - - return (.useCredential, URLCredential(trust: trust), nil) - } catch { - return (.cancelAuthenticationChallenge, nil, error.asAFError(or: .serverTrustEvaluationFailed(reason: .customEvaluationFailed(error: error)))) - } - } - - /// Evaluates the credential-based authentication `URLAuthenticationChallenge` received for `task`. - /// - /// - Parameters: - /// - challenge: The `URLAuthenticationChallenge`. - /// - task: The `URLSessionTask` which received the challenge. - /// - /// - Returns: The `ChallengeEvaluation`. - func attemptCredentialAuthentication(for challenge: URLAuthenticationChallenge, - belongingTo task: URLSessionTask) -> ChallengeEvaluation { - guard challenge.previousFailureCount == 0 else { - return (.rejectProtectionSpace, nil, nil) - } - - guard let credential = stateProvider?.credential(for: task, in: challenge.protectionSpace) else { - return (.performDefaultHandling, nil, nil) - } - - return (.useCredential, credential, nil) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - didSendBodyData bytesSent: Int64, - totalBytesSent: Int64, - totalBytesExpectedToSend: Int64) { - eventMonitor?.urlSession(session, - task: task, - didSendBodyData: bytesSent, - totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend) - - stateProvider?.request(for: task)?.updateUploadProgress(totalBytesSent: totalBytesSent, - totalBytesExpectedToSend: totalBytesExpectedToSend) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - needNewBodyStream completionHandler: @escaping (InputStream?) -> Void) { - eventMonitor?.urlSession(session, taskNeedsNewBodyStream: task) - - guard let request = request(for: task, as: UploadRequest.self) else { - assertionFailure("needNewBodyStream did not find UploadRequest.") - completionHandler(nil) - return - } - - completionHandler(request.inputStream()) - } - - open func urlSession(_ session: URLSession, - task: URLSessionTask, - willPerformHTTPRedirection response: HTTPURLResponse, - newRequest request: URLRequest, - completionHandler: @escaping (URLRequest?) -> Void) { - eventMonitor?.urlSession(session, task: task, willPerformHTTPRedirection: response, newRequest: request) - - if let redirectHandler = stateProvider?.request(for: task)?.redirectHandler ?? stateProvider?.redirectHandler { - redirectHandler.task(task, willBeRedirectedTo: request, for: response, completion: completionHandler) - } else { - completionHandler(request) - } - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics) { - eventMonitor?.urlSession(session, task: task, didFinishCollecting: metrics) - - stateProvider?.request(for: task)?.didGatherMetrics(metrics) - - stateProvider?.didGatherMetricsForTask(task) - } - - open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - eventMonitor?.urlSession(session, task: task, didCompleteWithError: error) - - let request = stateProvider?.request(for: task) - - stateProvider?.didCompleteTask(task) { - request?.didCompleteTask(task, with: error.map { $0.asAFError(or: .sessionTaskFailed(error: $0)) }) - } - } - - @available(macOS 10.13, iOS 11.0, tvOS 11.0, watchOS 4.0, *) - open func urlSession(_ session: URLSession, taskIsWaitingForConnectivity task: URLSessionTask) { - eventMonitor?.urlSession(session, taskIsWaitingForConnectivity: task) - } -} - -// MARK: URLSessionDataDelegate - -extension SessionDelegate: URLSessionDataDelegate { - open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - eventMonitor?.urlSession(session, dataTask: dataTask, didReceive: data) - - if let request = request(for: dataTask, as: DataRequest.self) { - request.didReceive(data: data) - } else if let request = request(for: dataTask, as: DataStreamRequest.self) { - request.didReceive(data: data) - } else { - assertionFailure("dataTask did not find DataRequest or DataStreamRequest in didReceive") - return - } - } - - open func urlSession(_ session: URLSession, - dataTask: URLSessionDataTask, - willCacheResponse proposedResponse: CachedURLResponse, - completionHandler: @escaping (CachedURLResponse?) -> Void) { - eventMonitor?.urlSession(session, dataTask: dataTask, willCacheResponse: proposedResponse) - - if let handler = stateProvider?.request(for: dataTask)?.cachedResponseHandler ?? stateProvider?.cachedResponseHandler { - handler.dataTask(dataTask, willCacheResponse: proposedResponse, completion: completionHandler) - } else { - completionHandler(proposedResponse) - } - } -} - -// MARK: URLSessionDownloadDelegate - -extension SessionDelegate: URLSessionDownloadDelegate { - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didResumeAtOffset fileOffset: Int64, - expectedTotalBytes: Int64) { - eventMonitor?.urlSession(session, - downloadTask: downloadTask, - didResumeAtOffset: fileOffset, - expectedTotalBytes: expectedTotalBytes) - guard let downloadRequest = request(for: downloadTask, as: DownloadRequest.self) else { - assertionFailure("downloadTask did not find DownloadRequest.") - return - } - - downloadRequest.updateDownloadProgress(bytesWritten: fileOffset, - totalBytesExpectedToWrite: expectedTotalBytes) - } - - open func urlSession(_ session: URLSession, - downloadTask: URLSessionDownloadTask, - didWriteData bytesWritten: Int64, - totalBytesWritten: Int64, - totalBytesExpectedToWrite: Int64) { - eventMonitor?.urlSession(session, - downloadTask: downloadTask, - didWriteData: bytesWritten, - totalBytesWritten: totalBytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite) - guard let downloadRequest = request(for: downloadTask, as: DownloadRequest.self) else { - assertionFailure("downloadTask did not find DownloadRequest.") - return - } - - downloadRequest.updateDownloadProgress(bytesWritten: bytesWritten, - totalBytesExpectedToWrite: totalBytesExpectedToWrite) - } - - open func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { - eventMonitor?.urlSession(session, downloadTask: downloadTask, didFinishDownloadingTo: location) - - guard let request = request(for: downloadTask, as: DownloadRequest.self) else { - assertionFailure("downloadTask did not find DownloadRequest.") - return - } - - let (destination, options): (URL, DownloadRequest.Options) - if let response = request.response { - (destination, options) = request.destination(location, response) - } else { - // If there's no response this is likely a local file download, so generate the temporary URL directly. - (destination, options) = (DownloadRequest.defaultDestinationURL(location), []) - } - - eventMonitor?.request(request, didCreateDestinationURL: destination) - - do { - if options.contains(.removePreviousFile), fileManager.fileExists(atPath: destination.path) { - try fileManager.removeItem(at: destination) - } - - if options.contains(.createIntermediateDirectories) { - let directory = destination.deletingLastPathComponent() - try fileManager.createDirectory(at: directory, withIntermediateDirectories: true) - } - - try fileManager.moveItem(at: location, to: destination) - - request.didFinishDownloading(using: downloadTask, with: .success(destination)) - } catch { - request.didFinishDownloading(using: downloadTask, with: .failure(.downloadedFileMoveFailed(error: error, - source: location, - destination: destination))) - } - } -} diff --git a/Pods/Alamofire/Source/StringEncoding+Alamofire.swift b/Pods/Alamofire/Source/StringEncoding+Alamofire.swift deleted file mode 100644 index 8fa61333..00000000 --- a/Pods/Alamofire/Source/StringEncoding+Alamofire.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// StringEncoding+Alamofire.swift -// -// Copyright (c) 2020 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension String.Encoding { - /// Creates an encoding from the IANA charset name. - /// - /// - Notes: These mappings match those [provided by CoreFoundation](https://opensource.apple.com/source/CF/CF-476.18/CFStringUtilities.c.auto.html) - /// - /// - Parameter name: IANA charset name. - init?(ianaCharsetName name: String) { - switch name.lowercased() { - case "utf-8": - self = .utf8 - case "iso-8859-1": - self = .isoLatin1 - case "unicode-1-1", "iso-10646-ucs-2", "utf-16": - self = .utf16 - case "utf-16be": - self = .utf16BigEndian - case "utf-16le": - self = .utf16LittleEndian - case "utf-32": - self = .utf32 - case "utf-32be": - self = .utf32BigEndian - case "utf-32le": - self = .utf32LittleEndian - default: - return nil - } - } -} diff --git a/Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift b/Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift deleted file mode 100644 index 455c4bcb..00000000 --- a/Pods/Alamofire/Source/URLConvertible+URLRequestConvertible.swift +++ /dev/null @@ -1,105 +0,0 @@ -// -// URLConvertible+URLRequestConvertible.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// Types adopting the `URLConvertible` protocol can be used to construct `URL`s, which can then be used to construct -/// `URLRequests`. -public protocol URLConvertible { - /// Returns a `URL` from the conforming instance or throws. - /// - /// - Returns: The `URL` created from the instance. - /// - Throws: Any error thrown while creating the `URL`. - func asURL() throws -> URL -} - -extension String: URLConvertible { - /// Returns a `URL` if `self` can be used to initialize a `URL` instance, otherwise throws. - /// - /// - Returns: The `URL` initialized with `self`. - /// - Throws: An `AFError.invalidURL` instance. - public func asURL() throws -> URL { - guard let url = URL(string: self) else { throw AFError.invalidURL(url: self) } - - return url - } -} - -extension URL: URLConvertible { - /// Returns `self`. - public func asURL() throws -> URL { self } -} - -extension URLComponents: URLConvertible { - /// Returns a `URL` if the `self`'s `url` is not nil, otherwise throws. - /// - /// - Returns: The `URL` from the `url` property. - /// - Throws: An `AFError.invalidURL` instance. - public func asURL() throws -> URL { - guard let url = url else { throw AFError.invalidURL(url: self) } - - return url - } -} - -// MARK: - - -/// Types adopting the `URLRequestConvertible` protocol can be used to safely construct `URLRequest`s. -public protocol URLRequestConvertible { - /// Returns a `URLRequest` or throws if an `Error` was encountered. - /// - /// - Returns: A `URLRequest`. - /// - Throws: Any error thrown while constructing the `URLRequest`. - func asURLRequest() throws -> URLRequest -} - -extension URLRequestConvertible { - /// The `URLRequest` returned by discarding any `Error` encountered. - public var urlRequest: URLRequest? { try? asURLRequest() } -} - -extension URLRequest: URLRequestConvertible { - /// Returns `self`. - public func asURLRequest() throws -> URLRequest { self } -} - -// MARK: - - -extension URLRequest { - /// Creates an instance with the specified `url`, `method`, and `headers`. - /// - /// - Parameters: - /// - url: The `URLConvertible` value. - /// - method: The `HTTPMethod`. - /// - headers: The `HTTPHeaders`, `nil` by default. - /// - Throws: Any error thrown while converting the `URLConvertible` to a `URL`. - public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws { - let url = try url.asURL() - - self.init(url: url) - - httpMethod = method.rawValue - allHTTPHeaderFields = headers?.dictionary - } -} diff --git a/Pods/Alamofire/Source/URLEncodedFormEncoder.swift b/Pods/Alamofire/Source/URLEncodedFormEncoder.swift deleted file mode 100644 index e5cc0c50..00000000 --- a/Pods/Alamofire/Source/URLEncodedFormEncoder.swift +++ /dev/null @@ -1,976 +0,0 @@ -// -// URLEncodedFormEncoder.swift -// -// Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -/// An object that encodes instances into URL-encoded query strings. -/// -/// There is no published specification for how to encode collection types. By default, the convention of appending -/// `[]` to the key for array values (`foo[]=1&foo[]=2`), and appending the key surrounded by square brackets for -/// nested dictionary values (`foo[bar]=baz`) is used. Optionally, `ArrayEncoding` can be used to omit the -/// square brackets appended to array keys. -/// -/// `BoolEncoding` can be used to configure how `Bool` values are encoded. The default behavior is to encode -/// `true` as 1 and `false` as 0. -/// -/// `DateEncoding` can be used to configure how `Date` values are encoded. By default, the `.deferredToDate` -/// strategy is used, which formats dates from their structure. -/// -/// `SpaceEncoding` can be used to configure how spaces are encoded. Modern encodings use percent replacement (`%20`), -/// while older encodings may expect spaces to be replaced with `+`. -/// -/// This type is largely based on Vapor's [`url-encoded-form`](https://github.com/vapor/url-encoded-form) project. -public final class URLEncodedFormEncoder { - /// Encoding to use for `Array` values. - public enum ArrayEncoding { - /// An empty set of square brackets ("[]") are appended to the key for every value. This is the default encoding. - case brackets - /// No brackets are appended to the key and the key is encoded as is. - case noBrackets - - /// Encodes the key according to the encoding. - /// - /// - Parameter key: The `key` to encode. - /// - Returns: The encoded key. - func encode(_ key: String) -> String { - switch self { - case .brackets: return "\(key)[]" - case .noBrackets: return key - } - } - } - - /// Encoding to use for `Bool` values. - public enum BoolEncoding { - /// Encodes `true` as `1`, `false` as `0`. - case numeric - /// Encodes `true` as "true", `false` as "false". This is the default encoding. - case literal - - /// Encodes the given `Bool` as a `String`. - /// - /// - Parameter value: The `Bool` to encode. - /// - /// - Returns: The encoded `String`. - func encode(_ value: Bool) -> String { - switch self { - case .numeric: return value ? "1" : "0" - case .literal: return value ? "true" : "false" - } - } - } - - /// Encoding to use for `Data` values. - public enum DataEncoding { - /// Defers encoding to the `Data` type. - case deferredToData - /// Encodes `Data` as a Base64-encoded string. This is the default encoding. - case base64 - /// Encode the `Data` as a custom value encoded by the given closure. - case custom((Data) throws -> String) - - /// Encodes `Data` according to the encoding. - /// - /// - Parameter data: The `Data` to encode. - /// - /// - Returns: The encoded `String`, or `nil` if the `Data` should be encoded according to its - /// `Encodable` implementation. - func encode(_ data: Data) throws -> String? { - switch self { - case .deferredToData: return nil - case .base64: return data.base64EncodedString() - case let .custom(encoding): return try encoding(data) - } - } - } - - /// Encoding to use for `Date` values. - public enum DateEncoding { - /// ISO8601 and RFC3339 formatter. - private static let iso8601Formatter: ISO8601DateFormatter = { - let formatter = ISO8601DateFormatter() - formatter.formatOptions = .withInternetDateTime - return formatter - }() - - /// Defers encoding to the `Date` type. This is the default encoding. - case deferredToDate - /// Encodes `Date`s as seconds since midnight UTC on January 1, 1970. - case secondsSince1970 - /// Encodes `Date`s as milliseconds since midnight UTC on January 1, 1970. - case millisecondsSince1970 - /// Encodes `Date`s according to the ISO8601 and RFC3339 standards. - case iso8601 - /// Encodes `Date`s using the given `DateFormatter`. - case formatted(DateFormatter) - /// Encodes `Date`s using the given closure. - case custom((Date) throws -> String) - - /// Encodes the date according to the encoding. - /// - /// - Parameter date: The `Date` to encode. - /// - /// - Returns: The encoded `String`, or `nil` if the `Date` should be encoded according to its - /// `Encodable` implementation. - func encode(_ date: Date) throws -> String? { - switch self { - case .deferredToDate: - return nil - case .secondsSince1970: - return String(date.timeIntervalSince1970) - case .millisecondsSince1970: - return String(date.timeIntervalSince1970 * 1000.0) - case .iso8601: - return DateEncoding.iso8601Formatter.string(from: date) - case let .formatted(formatter): - return formatter.string(from: date) - case let .custom(closure): - return try closure(date) - } - } - } - - /// Encoding to use for keys. - /// - /// This type is derived from [`JSONEncoder`'s `KeyEncodingStrategy`](https://github.com/apple/swift/blob/6aa313b8dd5f05135f7f878eccc1db6f9fbe34ff/stdlib/public/Darwin/Foundation/JSONEncoder.swift#L128) - /// and [`XMLEncoder`s `KeyEncodingStrategy`](https://github.com/MaxDesiatov/XMLCoder/blob/master/Sources/XMLCoder/Encoder/XMLEncoder.swift#L102). - public enum KeyEncoding { - /// Use the keys specified by each type. This is the default encoding. - case useDefaultKeys - /// Convert from "camelCaseKeys" to "snake_case_keys" before writing a key. - /// - /// Capital characters are determined by testing membership in - /// `CharacterSet.uppercaseLetters` and `CharacterSet.lowercaseLetters` - /// (Unicode General Categories Lu and Lt). - /// The conversion to lower case uses `Locale.system`, also known as - /// the ICU "root" locale. This means the result is consistent - /// regardless of the current user's locale and language preferences. - /// - /// Converting from camel case to snake case: - /// 1. Splits words at the boundary of lower-case to upper-case - /// 2. Inserts `_` between words - /// 3. Lowercases the entire string - /// 4. Preserves starting and ending `_`. - /// - /// For example, `oneTwoThree` becomes `one_two_three`. `_oneTwoThree_` becomes `_one_two_three_`. - /// - /// - Note: Using a key encoding strategy has a nominal performance cost, as each string key has to be converted. - case convertToSnakeCase - /// Same as convertToSnakeCase, but using `-` instead of `_`. - /// For example `oneTwoThree` becomes `one-two-three`. - case convertToKebabCase - /// Capitalize the first letter only. - /// For example `oneTwoThree` becomes `OneTwoThree`. - case capitalized - /// Uppercase all letters. - /// For example `oneTwoThree` becomes `ONETWOTHREE`. - case uppercased - /// Lowercase all letters. - /// For example `oneTwoThree` becomes `onetwothree`. - case lowercased - /// A custom encoding using the provided closure. - case custom((String) -> String) - - func encode(_ key: String) -> String { - switch self { - case .useDefaultKeys: return key - case .convertToSnakeCase: return convertToSnakeCase(key) - case .convertToKebabCase: return convertToKebabCase(key) - case .capitalized: return String(key.prefix(1).uppercased() + key.dropFirst()) - case .uppercased: return key.uppercased() - case .lowercased: return key.lowercased() - case let .custom(encoding): return encoding(key) - } - } - - private func convertToSnakeCase(_ key: String) -> String { - convert(key, usingSeparator: "_") - } - - private func convertToKebabCase(_ key: String) -> String { - convert(key, usingSeparator: "-") - } - - private func convert(_ key: String, usingSeparator separator: String) -> String { - guard !key.isEmpty else { return key } - - var words: [Range] = [] - // The general idea of this algorithm is to split words on - // transition from lower to upper case, then on transition of >1 - // upper case characters to lowercase - // - // myProperty -> my_property - // myURLProperty -> my_url_property - // - // It is assumed, per Swift naming conventions, that the first character of the key is lowercase. - var wordStart = key.startIndex - var searchRange = key.index(after: wordStart)..1 capital letters. Turn those into a word, stopping at the capital before the lower case character. - let beforeLowerIndex = key.index(before: lowerCaseRange.lowerBound) - words.append(upperCaseRange.lowerBound.. String { - switch self { - case .percentEscaped: return string.replacingOccurrences(of: " ", with: "%20") - case .plusReplaced: return string.replacingOccurrences(of: " ", with: "+") - } - } - } - - /// `URLEncodedFormEncoder` error. - public enum Error: Swift.Error { - /// An invalid root object was created by the encoder. Only keyed values are valid. - case invalidRootObject(String) - - var localizedDescription: String { - switch self { - case let .invalidRootObject(object): - return "URLEncodedFormEncoder requires keyed root object. Received \(object) instead." - } - } - } - - /// Whether or not to sort the encoded key value pairs. - /// - /// - Note: This setting ensures a consistent ordering for all encodings of the same parameters. When set to `false`, - /// encoded `Dictionary` values may have a different encoded order each time they're encoded due to - /// ` Dictionary`'s random storage order, but `Encodable` types will maintain their encoded order. - public let alphabetizeKeyValuePairs: Bool - /// The `ArrayEncoding` to use. - public let arrayEncoding: ArrayEncoding - /// The `BoolEncoding` to use. - public let boolEncoding: BoolEncoding - /// THe `DataEncoding` to use. - public let dataEncoding: DataEncoding - /// The `DateEncoding` to use. - public let dateEncoding: DateEncoding - /// The `KeyEncoding` to use. - public let keyEncoding: KeyEncoding - /// The `SpaceEncoding` to use. - public let spaceEncoding: SpaceEncoding - /// The `CharacterSet` of allowed (non-escaped) characters. - public var allowedCharacters: CharacterSet - - /// Creates an instance from the supplied parameters. - /// - /// - Parameters: - /// - alphabetizeKeyValuePairs: Whether or not to sort the encoded key value pairs. `true` by default. - /// - arrayEncoding: The `ArrayEncoding` to use. `.brackets` by default. - /// - boolEncoding: The `BoolEncoding` to use. `.numeric` by default. - /// - dataEncoding: The `DataEncoding` to use. `.base64` by default. - /// - dateEncoding: The `DateEncoding` to use. `.deferredToDate` by default. - /// - keyEncoding: The `KeyEncoding` to use. `.useDefaultKeys` by default. - /// - spaceEncoding: The `SpaceEncoding` to use. `.percentEscaped` by default. - /// - allowedCharacters: The `CharacterSet` of allowed (non-escaped) characters. `.afURLQueryAllowed` by - /// default. - public init(alphabetizeKeyValuePairs: Bool = true, - arrayEncoding: ArrayEncoding = .brackets, - boolEncoding: BoolEncoding = .numeric, - dataEncoding: DataEncoding = .base64, - dateEncoding: DateEncoding = .deferredToDate, - keyEncoding: KeyEncoding = .useDefaultKeys, - spaceEncoding: SpaceEncoding = .percentEscaped, - allowedCharacters: CharacterSet = .afURLQueryAllowed) { - self.alphabetizeKeyValuePairs = alphabetizeKeyValuePairs - self.arrayEncoding = arrayEncoding - self.boolEncoding = boolEncoding - self.dataEncoding = dataEncoding - self.dateEncoding = dateEncoding - self.keyEncoding = keyEncoding - self.spaceEncoding = spaceEncoding - self.allowedCharacters = allowedCharacters - } - - func encode(_ value: Encodable) throws -> URLEncodedFormComponent { - let context = URLEncodedFormContext(.object([])) - let encoder = _URLEncodedFormEncoder(context: context, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - try value.encode(to: encoder) - - return context.component - } - - /// Encodes the `value` as a URL form encoded `String`. - /// - /// - Parameter value: The `Encodable` value.` - /// - /// - Returns: The encoded `String`. - /// - Throws: An `Error` or `EncodingError` instance if encoding fails. - public func encode(_ value: Encodable) throws -> String { - let component: URLEncodedFormComponent = try encode(value) - - guard case let .object(object) = component else { - throw Error.invalidRootObject("\(component)") - } - - let serializer = URLEncodedFormSerializer(alphabetizeKeyValuePairs: alphabetizeKeyValuePairs, - arrayEncoding: arrayEncoding, - keyEncoding: keyEncoding, - spaceEncoding: spaceEncoding, - allowedCharacters: allowedCharacters) - let query = serializer.serialize(object) - - return query - } - - /// Encodes the value as `Data`. This is performed by first creating an encoded `String` and then returning the - /// `.utf8` data. - /// - /// - Parameter value: The `Encodable` value. - /// - /// - Returns: The encoded `Data`. - /// - /// - Throws: An `Error` or `EncodingError` instance if encoding fails. - public func encode(_ value: Encodable) throws -> Data { - let string: String = try encode(value) - - return Data(string.utf8) - } -} - -final class _URLEncodedFormEncoder { - var codingPath: [CodingKey] - // Returns an empty dictionary, as this encoder doesn't support userInfo. - var userInfo: [CodingUserInfoKey: Any] { [:] } - - let context: URLEncodedFormContext - - private let boolEncoding: URLEncodedFormEncoder.BoolEncoding - private let dataEncoding: URLEncodedFormEncoder.DataEncoding - private let dateEncoding: URLEncodedFormEncoder.DateEncoding - - init(context: URLEncodedFormContext, - codingPath: [CodingKey] = [], - boolEncoding: URLEncodedFormEncoder.BoolEncoding, - dataEncoding: URLEncodedFormEncoder.DataEncoding, - dateEncoding: URLEncodedFormEncoder.DateEncoding) { - self.context = context - self.codingPath = codingPath - self.boolEncoding = boolEncoding - self.dataEncoding = dataEncoding - self.dateEncoding = dateEncoding - } -} - -extension _URLEncodedFormEncoder: Encoder { - func container(keyedBy type: Key.Type) -> KeyedEncodingContainer where Key: CodingKey { - let container = _URLEncodedFormEncoder.KeyedContainer(context: context, - codingPath: codingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - return KeyedEncodingContainer(container) - } - - func unkeyedContainer() -> UnkeyedEncodingContainer { - _URLEncodedFormEncoder.UnkeyedContainer(context: context, - codingPath: codingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - } - - func singleValueContainer() -> SingleValueEncodingContainer { - _URLEncodedFormEncoder.SingleValueContainer(context: context, - codingPath: codingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - } -} - -final class URLEncodedFormContext { - var component: URLEncodedFormComponent - - init(_ component: URLEncodedFormComponent) { - self.component = component - } -} - -enum URLEncodedFormComponent { - typealias Object = [(key: String, value: URLEncodedFormComponent)] - - case string(String) - case array([URLEncodedFormComponent]) - case object(Object) - - /// Converts self to an `[URLEncodedFormData]` or returns `nil` if not convertible. - var array: [URLEncodedFormComponent]? { - switch self { - case let .array(array): return array - default: return nil - } - } - - /// Converts self to an `Object` or returns `nil` if not convertible. - var object: Object? { - switch self { - case let .object(object): return object - default: return nil - } - } - - /// Sets self to the supplied value at a given path. - /// - /// data.set(to: "hello", at: ["path", "to", "value"]) - /// - /// - parameters: - /// - value: Value of `Self` to set at the supplied path. - /// - path: `CodingKey` path to update with the supplied value. - public mutating func set(to value: URLEncodedFormComponent, at path: [CodingKey]) { - set(&self, to: value, at: path) - } - - /// Recursive backing method to `set(to:at:)`. - private func set(_ context: inout URLEncodedFormComponent, to value: URLEncodedFormComponent, at path: [CodingKey]) { - guard path.count >= 1 else { - context = value - return - } - - let end = path[0] - var child: URLEncodedFormComponent - switch path.count { - case 1: - child = value - case 2...: - if let index = end.intValue { - let array = context.array ?? [] - if array.count > index { - child = array[index] - } else { - child = .array([]) - } - set(&child, to: value, at: Array(path[1...])) - } else { - child = context.object?.first { $0.key == end.stringValue }?.value ?? .object(.init()) - set(&child, to: value, at: Array(path[1...])) - } - default: fatalError("Unreachable") - } - - if let index = end.intValue { - if var array = context.array { - if array.count > index { - array[index] = child - } else { - array.append(child) - } - context = .array(array) - } else { - context = .array([child]) - } - } else { - if var object = context.object { - if let index = object.firstIndex(where: { $0.key == end.stringValue }) { - object[index] = (key: end.stringValue, value: child) - } else { - object.append((key: end.stringValue, value: child)) - } - context = .object(object) - } else { - context = .object([(key: end.stringValue, value: child)]) - } - } - } -} - -struct AnyCodingKey: CodingKey, Hashable { - let stringValue: String - let intValue: Int? - - init?(stringValue: String) { - self.stringValue = stringValue - intValue = nil - } - - init?(intValue: Int) { - stringValue = "\(intValue)" - self.intValue = intValue - } - - init(_ base: Key) where Key: CodingKey { - if let intValue = base.intValue { - self.init(intValue: intValue)! - } else { - self.init(stringValue: base.stringValue)! - } - } -} - -extension _URLEncodedFormEncoder { - final class KeyedContainer where Key: CodingKey { - var codingPath: [CodingKey] - - private let context: URLEncodedFormContext - private let boolEncoding: URLEncodedFormEncoder.BoolEncoding - private let dataEncoding: URLEncodedFormEncoder.DataEncoding - private let dateEncoding: URLEncodedFormEncoder.DateEncoding - - init(context: URLEncodedFormContext, - codingPath: [CodingKey], - boolEncoding: URLEncodedFormEncoder.BoolEncoding, - dataEncoding: URLEncodedFormEncoder.DataEncoding, - dateEncoding: URLEncodedFormEncoder.DateEncoding) { - self.context = context - self.codingPath = codingPath - self.boolEncoding = boolEncoding - self.dataEncoding = dataEncoding - self.dateEncoding = dateEncoding - } - - private func nestedCodingPath(for key: CodingKey) -> [CodingKey] { - codingPath + [key] - } - } -} - -extension _URLEncodedFormEncoder.KeyedContainer: KeyedEncodingContainerProtocol { - func encodeNil(forKey key: Key) throws { - let context = EncodingError.Context(codingPath: codingPath, - debugDescription: "URLEncodedFormEncoder cannot encode nil values.") - throw EncodingError.invalidValue("\(key): nil", context) - } - - func encode(_ value: T, forKey key: Key) throws where T: Encodable { - var container = nestedSingleValueEncoder(for: key) - try container.encode(value) - } - - func nestedSingleValueEncoder(for key: Key) -> SingleValueEncodingContainer { - let container = _URLEncodedFormEncoder.SingleValueContainer(context: context, - codingPath: nestedCodingPath(for: key), - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - - return container - } - - func nestedUnkeyedContainer(forKey key: Key) -> UnkeyedEncodingContainer { - let container = _URLEncodedFormEncoder.UnkeyedContainer(context: context, - codingPath: nestedCodingPath(for: key), - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - - return container - } - - func nestedContainer(keyedBy keyType: NestedKey.Type, forKey key: Key) -> KeyedEncodingContainer where NestedKey: CodingKey { - let container = _URLEncodedFormEncoder.KeyedContainer(context: context, - codingPath: nestedCodingPath(for: key), - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - - return KeyedEncodingContainer(container) - } - - func superEncoder() -> Encoder { - _URLEncodedFormEncoder(context: context, - codingPath: codingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - } - - func superEncoder(forKey key: Key) -> Encoder { - _URLEncodedFormEncoder(context: context, - codingPath: nestedCodingPath(for: key), - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - } -} - -extension _URLEncodedFormEncoder { - final class SingleValueContainer { - var codingPath: [CodingKey] - - private var canEncodeNewValue = true - - private let context: URLEncodedFormContext - private let boolEncoding: URLEncodedFormEncoder.BoolEncoding - private let dataEncoding: URLEncodedFormEncoder.DataEncoding - private let dateEncoding: URLEncodedFormEncoder.DateEncoding - - init(context: URLEncodedFormContext, - codingPath: [CodingKey], - boolEncoding: URLEncodedFormEncoder.BoolEncoding, - dataEncoding: URLEncodedFormEncoder.DataEncoding, - dateEncoding: URLEncodedFormEncoder.DateEncoding) { - self.context = context - self.codingPath = codingPath - self.boolEncoding = boolEncoding - self.dataEncoding = dataEncoding - self.dateEncoding = dateEncoding - } - - private func checkCanEncode(value: Any?) throws { - guard canEncodeNewValue else { - let context = EncodingError.Context(codingPath: codingPath, - debugDescription: "Attempt to encode value through single value container when previously value already encoded.") - throw EncodingError.invalidValue(value as Any, context) - } - } - } -} - -extension _URLEncodedFormEncoder.SingleValueContainer: SingleValueEncodingContainer { - func encodeNil() throws { - try checkCanEncode(value: nil) - defer { canEncodeNewValue = false } - - let context = EncodingError.Context(codingPath: codingPath, - debugDescription: "URLEncodedFormEncoder cannot encode nil values.") - throw EncodingError.invalidValue("nil", context) - } - - func encode(_ value: Bool) throws { - try encode(value, as: String(boolEncoding.encode(value))) - } - - func encode(_ value: String) throws { - try encode(value, as: value) - } - - func encode(_ value: Double) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: Float) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: Int) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: Int8) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: Int16) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: Int32) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: Int64) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: UInt) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: UInt8) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: UInt16) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: UInt32) throws { - try encode(value, as: String(value)) - } - - func encode(_ value: UInt64) throws { - try encode(value, as: String(value)) - } - - private func encode(_ value: T, as string: String) throws where T: Encodable { - try checkCanEncode(value: value) - defer { canEncodeNewValue = false } - - context.component.set(to: .string(string), at: codingPath) - } - - func encode(_ value: T) throws where T: Encodable { - switch value { - case let date as Date: - guard let string = try dateEncoding.encode(date) else { - try attemptToEncode(value) - return - } - - try encode(value, as: string) - case let data as Data: - guard let string = try dataEncoding.encode(data) else { - try attemptToEncode(value) - return - } - - try encode(value, as: string) - case let decimal as Decimal: - // Decimal's `Encodable` implementation returns an object, not a single value, so override it. - try encode(value, as: String(describing: decimal)) - default: - try attemptToEncode(value) - } - } - - private func attemptToEncode(_ value: T) throws where T: Encodable { - try checkCanEncode(value: value) - defer { canEncodeNewValue = false } - - let encoder = _URLEncodedFormEncoder(context: context, - codingPath: codingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - try value.encode(to: encoder) - } -} - -extension _URLEncodedFormEncoder { - final class UnkeyedContainer { - var codingPath: [CodingKey] - - var count = 0 - var nestedCodingPath: [CodingKey] { - codingPath + [AnyCodingKey(intValue: count)!] - } - - private let context: URLEncodedFormContext - private let boolEncoding: URLEncodedFormEncoder.BoolEncoding - private let dataEncoding: URLEncodedFormEncoder.DataEncoding - private let dateEncoding: URLEncodedFormEncoder.DateEncoding - - init(context: URLEncodedFormContext, - codingPath: [CodingKey], - boolEncoding: URLEncodedFormEncoder.BoolEncoding, - dataEncoding: URLEncodedFormEncoder.DataEncoding, - dateEncoding: URLEncodedFormEncoder.DateEncoding) { - self.context = context - self.codingPath = codingPath - self.boolEncoding = boolEncoding - self.dataEncoding = dataEncoding - self.dateEncoding = dateEncoding - } - } -} - -extension _URLEncodedFormEncoder.UnkeyedContainer: UnkeyedEncodingContainer { - func encodeNil() throws { - let context = EncodingError.Context(codingPath: codingPath, - debugDescription: "URLEncodedFormEncoder cannot encode nil values.") - throw EncodingError.invalidValue("nil", context) - } - - func encode(_ value: T) throws where T: Encodable { - var container = nestedSingleValueContainer() - try container.encode(value) - } - - func nestedSingleValueContainer() -> SingleValueEncodingContainer { - defer { count += 1 } - - return _URLEncodedFormEncoder.SingleValueContainer(context: context, - codingPath: nestedCodingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - } - - func nestedContainer(keyedBy keyType: NestedKey.Type) -> KeyedEncodingContainer where NestedKey: CodingKey { - defer { count += 1 } - let container = _URLEncodedFormEncoder.KeyedContainer(context: context, - codingPath: nestedCodingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - - return KeyedEncodingContainer(container) - } - - func nestedUnkeyedContainer() -> UnkeyedEncodingContainer { - defer { count += 1 } - - return _URLEncodedFormEncoder.UnkeyedContainer(context: context, - codingPath: nestedCodingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - } - - func superEncoder() -> Encoder { - defer { count += 1 } - - return _URLEncodedFormEncoder(context: context, - codingPath: codingPath, - boolEncoding: boolEncoding, - dataEncoding: dataEncoding, - dateEncoding: dateEncoding) - } -} - -final class URLEncodedFormSerializer { - private let alphabetizeKeyValuePairs: Bool - private let arrayEncoding: URLEncodedFormEncoder.ArrayEncoding - private let keyEncoding: URLEncodedFormEncoder.KeyEncoding - private let spaceEncoding: URLEncodedFormEncoder.SpaceEncoding - private let allowedCharacters: CharacterSet - - init(alphabetizeKeyValuePairs: Bool, - arrayEncoding: URLEncodedFormEncoder.ArrayEncoding, - keyEncoding: URLEncodedFormEncoder.KeyEncoding, - spaceEncoding: URLEncodedFormEncoder.SpaceEncoding, - allowedCharacters: CharacterSet) { - self.alphabetizeKeyValuePairs = alphabetizeKeyValuePairs - self.arrayEncoding = arrayEncoding - self.keyEncoding = keyEncoding - self.spaceEncoding = spaceEncoding - self.allowedCharacters = allowedCharacters - } - - func serialize(_ object: URLEncodedFormComponent.Object) -> String { - var output: [String] = [] - for (key, component) in object { - let value = serialize(component, forKey: key) - output.append(value) - } - output = alphabetizeKeyValuePairs ? output.sorted() : output - - return output.joinedWithAmpersands() - } - - func serialize(_ component: URLEncodedFormComponent, forKey key: String) -> String { - switch component { - case let .string(string): return "\(escape(keyEncoding.encode(key)))=\(escape(string))" - case let .array(array): return serialize(array, forKey: key) - case let .object(object): return serialize(object, forKey: key) - } - } - - func serialize(_ object: URLEncodedFormComponent.Object, forKey key: String) -> String { - var segments: [String] = object.map { subKey, value in - let keyPath = "[\(subKey)]" - return serialize(value, forKey: key + keyPath) - } - segments = alphabetizeKeyValuePairs ? segments.sorted() : segments - - return segments.joinedWithAmpersands() - } - - func serialize(_ array: [URLEncodedFormComponent], forKey key: String) -> String { - var segments: [String] = array.map { component in - let keyPath = arrayEncoding.encode(key) - return serialize(component, forKey: keyPath) - } - segments = alphabetizeKeyValuePairs ? segments.sorted() : segments - - return segments.joinedWithAmpersands() - } - - func escape(_ query: String) -> String { - var allowedCharactersWithSpace = allowedCharacters - allowedCharactersWithSpace.insert(charactersIn: " ") - let escapedQuery = query.addingPercentEncoding(withAllowedCharacters: allowedCharactersWithSpace) ?? query - let spaceEncodedQuery = spaceEncoding.encode(escapedQuery) - - return spaceEncodedQuery - } -} - -extension Array where Element == String { - func joinedWithAmpersands() -> String { - joined(separator: "&") - } -} - -extension CharacterSet { - /// Creates a CharacterSet from RFC 3986 allowed characters. - /// - /// RFC 3986 states that the following characters are "reserved" characters. - /// - /// - General Delimiters: ":", "#", "[", "]", "@", "?", "/" - /// - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" - /// - /// In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow - /// query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" - /// should be percent-escaped in the query string. - public static let afURLQueryAllowed: CharacterSet = { - let generalDelimitersToEncode = ":#[]@" // does not include "?" or "/" due to RFC 3986 - Section 3.4 - let subDelimitersToEncode = "!$&'()*+,;=" - let encodableDelimiters = CharacterSet(charactersIn: "\(generalDelimitersToEncode)\(subDelimitersToEncode)") - - return CharacterSet.urlQueryAllowed.subtracting(encodableDelimiters) - }() -} diff --git a/Pods/Alamofire/Source/URLRequest+Alamofire.swift b/Pods/Alamofire/Source/URLRequest+Alamofire.swift deleted file mode 100644 index be27c8ed..00000000 --- a/Pods/Alamofire/Source/URLRequest+Alamofire.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// URLRequest+Alamofire.swift -// -// Copyright (c) 2019 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension URLRequest { - /// Returns the `httpMethod` as Alamofire's `HTTPMethod` type. - public var method: HTTPMethod? { - get { httpMethod.flatMap(HTTPMethod.init) } - set { httpMethod = newValue?.rawValue } - } - - public func validate() throws { - if method == .get, let bodyData = httpBody { - throw AFError.urlRequestValidationFailed(reason: .bodyDataInGETRequest(bodyData)) - } - } -} diff --git a/Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift b/Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift deleted file mode 100644 index de3e290a..00000000 --- a/Pods/Alamofire/Source/URLSessionConfiguration+Alamofire.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// URLSessionConfiguration+Alamofire.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension URLSessionConfiguration: AlamofireExtended {} -extension AlamofireExtension where ExtendedType: URLSessionConfiguration { - /// Alamofire's default configuration. Same as `URLSessionConfiguration.default` but adds Alamofire default - /// `Accept-Language`, `Accept-Encoding`, and `User-Agent` headers. - public static var `default`: URLSessionConfiguration { - let configuration = URLSessionConfiguration.default - configuration.headers = .default - - return configuration - } -} diff --git a/Pods/Alamofire/Source/Validation.swift b/Pods/Alamofire/Source/Validation.swift deleted file mode 100644 index bd2a2795..00000000 --- a/Pods/Alamofire/Source/Validation.swift +++ /dev/null @@ -1,302 +0,0 @@ -// -// Validation.swift -// -// Copyright (c) 2014-2018 Alamofire Software Foundation (http://alamofire.org/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -import Foundation - -extension Request { - // MARK: Helper Types - - fileprivate typealias ErrorReason = AFError.ResponseValidationFailureReason - - /// Used to represent whether a validation succeeded or failed. - public typealias ValidationResult = Result - - fileprivate struct MIMEType { - let type: String - let subtype: String - - var isWildcard: Bool { type == "*" && subtype == "*" } - - init?(_ string: String) { - let components: [String] = { - let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) - let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] - - return split.components(separatedBy: "/") - }() - - if let type = components.first, let subtype = components.last { - self.type = type - self.subtype = subtype - } else { - return nil - } - } - - func matches(_ mime: MIMEType) -> Bool { - switch (type, subtype) { - case (mime.type, mime.subtype), (mime.type, "*"), ("*", mime.subtype), ("*", "*"): - return true - default: - return false - } - } - } - - // MARK: Properties - - fileprivate var acceptableStatusCodes: Range { 200..<300 } - - fileprivate var acceptableContentTypes: [String] { - if let accept = request?.value(forHTTPHeaderField: "Accept") { - return accept.components(separatedBy: ",") - } - - return ["*/*"] - } - - // MARK: Status Code - - fileprivate func validate(statusCode acceptableStatusCodes: S, - response: HTTPURLResponse) - -> ValidationResult - where S.Iterator.Element == Int { - if acceptableStatusCodes.contains(response.statusCode) { - return .success(()) - } else { - let reason: ErrorReason = .unacceptableStatusCode(code: response.statusCode) - return .failure(AFError.responseValidationFailed(reason: reason)) - } - } - - // MARK: Content Type - - fileprivate func validate(contentType acceptableContentTypes: S, - response: HTTPURLResponse, - data: Data?) - -> ValidationResult - where S.Iterator.Element == String { - guard let data = data, !data.isEmpty else { return .success(()) } - - return validate(contentType: acceptableContentTypes, response: response) - } - - fileprivate func validate(contentType acceptableContentTypes: S, - response: HTTPURLResponse) - -> ValidationResult - where S.Iterator.Element == String { - guard - let responseContentType = response.mimeType, - let responseMIMEType = MIMEType(responseContentType) - else { - for contentType in acceptableContentTypes { - if let mimeType = MIMEType(contentType), mimeType.isWildcard { - return .success(()) - } - } - - let error: AFError = { - let reason: ErrorReason = .missingContentType(acceptableContentTypes: Array(acceptableContentTypes)) - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } - - for contentType in acceptableContentTypes { - if let acceptableMIMEType = MIMEType(contentType), acceptableMIMEType.matches(responseMIMEType) { - return .success(()) - } - } - - let error: AFError = { - let reason: ErrorReason = .unacceptableContentType(acceptableContentTypes: Array(acceptableContentTypes), - responseContentType: responseContentType) - - return AFError.responseValidationFailed(reason: reason) - }() - - return .failure(error) - } -} - -// MARK: - - -extension DataRequest { - /// A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the - /// request was valid. - public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter statusCode: `Sequence` of acceptable response status codes. - /// - /// - Returns: The instance. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - validate { [unowned self] _, response, _ in - self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { - validate { [unowned self] _, response, data in - self.validate(contentType: acceptableContentTypes(), response: response, data: data) - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes: () -> [String] = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} - -extension DataStreamRequest { - /// A closure used to validate a request that takes a `URLRequest` and `HTTPURLResponse` and returns whether the - /// request was valid. - public typealias Validation = (_ request: URLRequest?, _ response: HTTPURLResponse) -> ValidationResult - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter statusCode: `Sequence` of acceptable response status codes. - /// - /// - Returns: The instance. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - validate { [unowned self] _, response in - self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { - validate { [unowned self] _, response in - self.validate(contentType: acceptableContentTypes(), response: response) - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Returns: The instance. - @discardableResult - public func validate() -> Self { - let contentTypes: () -> [String] = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} - -// MARK: - - -extension DownloadRequest { - /// A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a - /// destination URL, and returns whether the request was valid. - public typealias Validation = (_ request: URLRequest?, - _ response: HTTPURLResponse, - _ fileURL: URL?) - -> ValidationResult - - /// Validates that the response has a status code in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - Parameter statusCode: `Sequence` of acceptable response status codes. - /// - /// - Returns: The instance. - @discardableResult - public func validate(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int { - validate { [unowned self] _, response, _ in - self.validate(statusCode: acceptableStatusCodes, response: response) - } - } - - /// Validates that the response has a content type in the specified sequence. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - parameter contentType: The acceptable content types, which may specify wildcard types and/or subtypes. - /// - /// - returns: The request. - @discardableResult - public func validate(contentType acceptableContentTypes: @escaping @autoclosure () -> S) -> Self where S.Iterator.Element == String { - validate { [unowned self] _, response, fileURL in - guard let validFileURL = fileURL else { - return .failure(AFError.responseValidationFailed(reason: .dataFileNil)) - } - - do { - let data = try Data(contentsOf: validFileURL) - return self.validate(contentType: acceptableContentTypes(), response: response, data: data) - } catch { - return .failure(AFError.responseValidationFailed(reason: .dataFileReadFailed(at: validFileURL))) - } - } - } - - /// Validates that the response has a status code in the default acceptable range of 200...299, and that the content - /// type matches any specified in the Accept HTTP header field. - /// - /// If validation fails, subsequent calls to response handlers will have an associated error. - /// - /// - returns: The request. - @discardableResult - public func validate() -> Self { - let contentTypes = { [unowned self] in - self.acceptableContentTypes - } - return validate(statusCode: acceptableStatusCodes).validate(contentType: contentTypes()) - } -} diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock deleted file mode 100644 index 7291d212..00000000 --- a/Pods/Manifest.lock +++ /dev/null @@ -1,30 +0,0 @@ -PODS: - - Alamofire (5.4.3) - - Moya (14.0.0): - - Moya/Core (= 14.0.0) - - Moya/Core (14.0.0): - - Alamofire (~> 5.0) - - SkeletonView (1.21.2) - - SwiftLint (0.43.1) - -DEPENDENCIES: - - Moya (~> 14.0) - - SkeletonView - - SwiftLint - -SPEC REPOS: - trunk: - - Alamofire - - Moya - - SkeletonView - - SwiftLint - -SPEC CHECKSUMS: - Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9 - Moya: 5b45dacb75adb009f97fde91c204c1e565d31916 - SkeletonView: a085533443fed0198309f1979780afb6e80eaedd - SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52 - -PODFILE CHECKSUM: b1e689d6b19d4b6aa66498bfb1b6700c63197564 - -COCOAPODS: 1.10.1 diff --git a/Pods/Moya/License.md b/Pods/Moya/License.md deleted file mode 100644 index 58ef14fc..00000000 --- a/Pods/Moya/License.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-present Artsy, Ash Furrow - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Pods/Moya/Readme.md b/Pods/Moya/Readme.md deleted file mode 100644 index 863e96aa..00000000 --- a/Pods/Moya/Readme.md +++ /dev/null @@ -1,328 +0,0 @@ -

- -

- -# Moya 14.0.0 - -[![CircleCI](https://img.shields.io/circleci/project/github/Moya/Moya/master.svg)](https://circleci.com/gh/Moya/Moya/tree/master) -[![codecov.io](https://codecov.io/github/Moya/Moya/coverage.svg?branch=master)](https://codecov.io/github/Moya/Moya?branch=master) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Accio supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio) -[![CocoaPods compatible](https://img.shields.io/cocoapods/v/Moya.svg)](https://cocoapods.org/pods/Moya) -[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) - -*A Chinese version of this document can be found [here](https://github.com/Moya/Moya/blob/master/Readme_CN.md).* - -You're a smart developer. You probably use [Alamofire](https://github.com/Alamofire/Alamofire) to abstract away access to -`URLSession` and all those nasty details you don't really care about. But then, -like lots of smart developers, you write ad hoc network abstraction layers. They -are probably called "APIManager" or "NetworkModel", and they always end in tears. - -![Moya Overview](web/diagram.png) - -Ad hoc network layers are common in iOS apps. They're bad for a few reasons: - -- Makes it hard to write new apps ("where do I begin?") -- Makes it hard to maintain existing apps ("oh my god, this mess...") -- Makes it hard to write unit tests ("how do I do this again?") - -So the basic idea of Moya is that we want some network abstraction layer that -sufficiently encapsulates actually calling Alamofire directly. It should be simple -enough that common things are easy, but comprehensive enough that complicated things -are also easy. - -> If you use Alamofire to abstract away `URLSession`, why not use something -to abstract away the nitty gritty of URLs, parameters, etc? - -Some awesome features of Moya: - -- Compile-time checking for correct API endpoint accesses. -- Lets you define a clear usage of different endpoints with associated enum values. -- Treats test stubs as first-class citizens so unit testing is super-easy. - -You can check out more about the project direction in the [vision document](https://github.com/Moya/Moya/blob/master/Vision.md). - -## Sample Projects - -We have provided two sample projects in the repository. To use it download the repo, run `carthage update` to download the required libraries and open [Moya.xcodeproj](https://github.com/Moya/Moya/tree/master/Moya.xcodeproj). You'll see two schemes: `Basic` and `Multi-Target` - select one and then build & run! Source files for these are in the `Examples` directory in project navigator. Have fun! - -## Project Status - -This project is actively under development, and is being used in [Artsy's -new auction app](https://github.com/Artsy/eidolon). We consider it -ready for production use. - -## Installation - -### Moya version vs Swift version. - -Below is a table that shows which version of Moya you should use for -your Swift version. - -| Swift | Moya | RxMoya | ReactiveMoya | -| ----- | -------------- |---------------- |--------------- | -| 5.X | >= 13.0.0 | >= 13.0.0 | >= 13.0.0 | -| 4.X | 9.0.0 - 12.0.1 | 10.0.0 - 12.0.1 | 9.0.0 - 12.0.1 | -| 3.X | 8.0.0 - 8.0.5 | 8.0.0 - 8.0.5 | 8.0.0 - 8.0.5 | -| 2.3 | 7.0.2 - 7.0.4 | 7.0.2 - 7.0.4 | 7.0.2 - 7.0.4 | -| 2.2 | <= 7.0.1 | <= 7.0.1 | <= 7.0.1 | - -_Note: If you are using Swift 4.2 in your project, but you are using Xcode 10.2, Moya 13 should work correctly even though we use Swift 5.0._ - -**Upgrading to a new major version of Moya? Check out our [migration guides](https://github.com/Moya/Moya/blob/master/docs/MigrationGuides).** - -### Swift Package Manager - -To integrate using Apple's Swift package manager, add the following as a dependency to your `Package.swift`: - -```swift -.package(url: "https://github.com/Moya/Moya.git", .upToNextMajor(from: "14.0.0")) -``` - -and then specify `"Moya"` as a dependency of the Target in which you wish to use Moya. -If you want to use reactive extensions, add also `"ReactiveMoya"` or `"RxMoya"` as your Target dependency respectively. -Here's an example `PackageDescription`: - -```swift -// swift-tools-version:5.0 -import PackageDescription - -let package = Package( - name: "MyPackage", - products: [ - .library( - name: "MyPackage", - targets: ["MyPackage"]), - ], - dependencies: [ - .package(url: "https://github.com/Moya/Moya.git", .upToNextMajor(from: "14.0.0")) - ], - targets: [ - .target( - name: "MyPackage", - dependencies: ["ReactiveMoya"]) - ] -) -``` - -Note: If you are using **ReactiveMoya**, we are using [our own fork of ReactiveSwift](https://github.com/Moya/ReactiveSwift). This fork adds 2 commits to remove testing dependencies on releases (starting 6.1.0). This is to prevent Xcode Previews on Xcode 11/11.1 to build testing dependencies (FB7316430). If you don't want to use our fork, you can just add another dependency to your SPM package list: `git@github.com:ReactiveCocoa/ReactiveSwift.git` and it should fetch the original repository. - -### Accio - -[Accio](https://github.com/JamitLabs/Accio) is a dependency manager based on SwiftPM which can build frameworks for iOS/macOS/tvOS/watchOS. Therefore the integration steps of Moya are exactly the same as described above. Once your `Package.swift` file is configured, run `accio update` instead of `swift package update`. - -### CocoaPods - -For Moya, use the following entry in your Podfile: - -```rb -pod 'Moya', '~> 14.0' - -# or - -pod 'Moya/RxSwift', '~> 14.0' - -# or - -pod 'Moya/ReactiveSwift', '~> 14.0' -``` - -Then run `pod install`. - -In any file you'd like to use Moya in, don't forget to -import the framework with `import Moya`. - -### Carthage - -Carthage users can point to this repository and use whichever -generated framework they'd like, `Moya`, `RxMoya`, or `ReactiveMoya`. - -Make the following entry in your Cartfile: - -``` -github "Moya/Moya" ~> 14.0 -``` - -Then run `carthage update`. - -If this is your first time using Carthage in the project, you'll need to go through some additional steps as explained [over at Carthage](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application). - -> NOTE: At this time, Carthage does not provide a way to build only specific repository submodules. All submodules and their dependencies will be built with the above command. However, you don't need to copy frameworks you aren't using into your project. For instance, if you aren't using `ReactiveSwift`, feel free to delete that framework along with `ReactiveMoya` from the Carthage Build directory after `carthage update` completes. Or if you are using `ReactiveSwift` but not `RxSwift`, then `RxMoya`, `RxTest`, `RxCocoa`, etc. can safely be deleted. - -### Manually - -- Open up Terminal, `cd` into your top-level project directory, and run the following command *if* your project is not initialized as a git repository: - -```bash -$ git init -``` - -- Add Alamofire, Result & Moya as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following commands: - -```bash -$ git submodule add https://github.com/Alamofire/Alamofire.git -$ git submodule add https://github.com/antitypical/Result.git -$ git submodule add https://github.com/Moya/Moya.git -``` - -- Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. Do the same with the `Result.xcodeproj` in the `Result` folder and `Moya.xcodeproj` in the `Moya` folder. - -> They should appear nested underneath your application's blue project icon. Whether it is above or below all the other Xcode groups does not matter. - -- Verify that the deployment targets of the `xcodeproj`s match that of your application target in the Project Navigator. -- Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar. -- In the tab bar at the top of that window, open the "General" panel. -- Click on the `+` button under the "Embedded Binaries" section. -- You will see two different `Alamofire.xcodeproj` folders each with two different versions of the `Alamofire.framework` nested inside a `Products` folder. - -> It does not matter which `Products` folder you choose from, but it does matter whether you choose the top or bottom `Alamofire.framework`. - -- Select the top `Alamofire.framework` for iOS and the bottom one for macOS. - -> You can verify which one you selected by inspecting the build log for your project. The build target for `Alamofire` will be listed as either `Alamofire iOS`, `Alamofire macOS`, `Alamofire tvOS` or `Alamofire watchOS`. - -- Click on the `+` button under "Embedded Binaries" again and add the build target you need for `Result`. -- Click on the `+` button again and add the correct build target for `Moya`. - -- And that's it! - -> The three frameworks are automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device. - -## Usage - -After [some setup](https://github.com/Moya/Moya/blob/master/docs/Examples/Basic.md), using Moya is really simple. You can access an API like this: - -```swift -provider = MoyaProvider() -provider.request(.zen) { result in - switch result { - case let .success(moyaResponse): - let data = moyaResponse.data - let statusCode = moyaResponse.statusCode - // do something with the response data or statusCode - case let .failure(error): - // this means there was a network failure - either the request - // wasn't sent (connectivity), or no response was received (server - // timed out). If the server responds with a 4xx or 5xx error, that - // will be sent as a ".success"-ful response. - } -} -``` - -That's a basic example. Many API requests need parameters. Moya encodes these -into the enum you use to access the endpoint, like this: - -```swift -provider = MoyaProvider() -provider.request(.userProfile("ashfurrow")) { result in - // do something with the result -} -``` - -No more typos in URLs. No more missing parameter values. No more messing with -parameter encoding. - -For more examples, see the [documentation](https://github.com/Moya/Moya/blob/master/docs/Examples). - -## Reactive Extensions - -Even cooler are the reactive extensions. Moya provides reactive extensions for -[ReactiveSwift](https://github.com/ReactiveCocoa/ReactiveSwift) and -[RxSwift](https://github.com/ReactiveX/RxSwift). - -### ReactiveSwift - -[`ReactiveSwift` extension](https://github.com/Moya/Moya/blob/master/docs/ReactiveSwift.md) provides both `reactive.request(:callbackQueue:)` and -`reactive.requestWithProgress(:callbackQueue:)` methods that immediately return -`SignalProducer`s that you can start, bind, map, or whatever you want to do. -To handle errors, for instance, we could do the following: - -```swift -provider = MoyaProvider() -provider.reactive.request(.userProfile("ashfurrow")).start { event in - switch event { - case let .value(response): - image = UIImage(data: response.data) - case let .failed(error): - print(error) - default: - break - } -} -``` - -### RxSwift - -[`RxSwift` extension](https://github.com/Moya/Moya/blob/master/docs/RxSwift.md) also provide both `rx.request(:callbackQueue:)` and -`rx.requestWithProgress(:callbackQueue:)` methods, but return type is -different for both. In case of a normal `rx.request(:callbackQueue)`, the -return type is `Single` which emits either single element or an -error. In case of a `rx.requestWithProgress(:callbackQueue:)`, the return -type is `Observable`, since we may get multiple events -from progress and one last event which is a response. - -To handle errors, for instance, we could do the following: - -```swift -provider = MoyaProvider() -provider.rx.request(.userProfile("ashfurrow")).subscribe { event in - switch event { - case let .success(response): - image = UIImage(data: response.data) - case let .error(error): - print(error) - } -} -``` - -In addition to the option of using signals instead of callback blocks, there are -also a series of signal operators for RxSwift and ReactiveSwift that will attempt -to map the data received from the network response into either an image, some JSON, -or a string, with `mapImage()`, `mapJSON()`, and `mapString()`, respectively. If the mapping is unsuccessful, you'll get an error on the signal. You also get handy methods -for filtering out certain status codes. This means that you can place your code for -handling API errors like 400's in the same places as code for handling invalid -responses. - -## Community Projects - -[Moya has a great community around it and some people have created some very helpful extensions](https://github.com/Moya/Moya/blob/master/docs/CommunityProjects.md). - -## Contributing - -Hey! Do you like Moya? Awesome! We could actually really use your help! - -Open source isn't just writing code. Moya could use your help with any of the -following: - -- Finding (and reporting!) bugs. -- New feature suggestions. -- Answering questions on issues. -- Documentation improvements. -- Reviewing pull requests. -- Helping to manage issue priorities. -- Fixing bugs/new features. - -If any of that sounds cool to you, send a pull request! After your first -contribution, we will add you as a member to the repo so you can merge pull -requests and help steer the ship :ship: You can read more details about that [in our contributor guidelines](https://github.com/Moya/Moya/blob/master/Contributing.md). - -Moya's community has a tremendous positive energy, and the maintainers are committed to keeping things awesome. Like [in the CocoaPods community](https://github.com/CocoaPods/CocoaPods/wiki/Communication-&-Design-Rules), always assume positive intent; even if a comment sounds mean-spirited, give the person the benefit of the doubt. - -Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by [its terms](https://github.com/Moya/Moya/blob/master/Code%20of%20Conduct.md). - -### Adding new source files - -If you add or remove a source file from Moya, a corresponding change needs to be made to the `Moya.xcodeproj` project at the root of this repository. This project is used for Carthage. Don't worry, you'll get an automated warning when submitting a pull request if you forget. - -### Help us improve Moya documentation -Whether you’re a core member or a user trying it out for the first time, you can make a valuable contribution to Moya by improving the documentation. Help us by: - -- sending us feedback about something you thought was confusing or simply missing -- suggesting better wording or ways of explaining certain topics -- sending us a pull request via GitHub -- improving the [Chinese documentation](https://github.com/Moya/Moya/blob/master/Readme_CN.md) - - -## License - -Moya is released under an MIT license. See [License.md](https://github.com/Moya/Moya/blob/master/License.md) for more information. diff --git a/Pods/Moya/Sources/Moya/AnyEncodable.swift b/Pods/Moya/Sources/Moya/AnyEncodable.swift deleted file mode 100644 index 15c7128e..00000000 --- a/Pods/Moya/Sources/Moya/AnyEncodable.swift +++ /dev/null @@ -1,14 +0,0 @@ -import Foundation - -struct AnyEncodable: Encodable { - - private let encodable: Encodable - - public init(_ encodable: Encodable) { - self.encodable = encodable - } - - func encode(to encoder: Encoder) throws { - try encodable.encode(to: encoder) - } -} diff --git a/Pods/Moya/Sources/Moya/Cancellable.swift b/Pods/Moya/Sources/Moya/Cancellable.swift deleted file mode 100644 index 9a9c783f..00000000 --- a/Pods/Moya/Sources/Moya/Cancellable.swift +++ /dev/null @@ -1,26 +0,0 @@ -/// Protocol to define the opaque type returned from a request. -public protocol Cancellable { - - /// A Boolean value stating whether a request is cancelled. - var isCancelled: Bool { get } - - /// Cancels the represented request. - func cancel() -} - -internal class CancellableWrapper: Cancellable { - internal var innerCancellable: Cancellable = SimpleCancellable() - - var isCancelled: Bool { return innerCancellable.isCancelled } - - internal func cancel() { - innerCancellable.cancel() - } -} - -internal class SimpleCancellable: Cancellable { - var isCancelled = false - func cancel() { - isCancelled = true - } -} diff --git a/Pods/Moya/Sources/Moya/Endpoint.swift b/Pods/Moya/Sources/Moya/Endpoint.swift deleted file mode 100755 index dae0504e..00000000 --- a/Pods/Moya/Sources/Moya/Endpoint.swift +++ /dev/null @@ -1,140 +0,0 @@ -import Foundation - -/// Used for stubbing responses. -public enum EndpointSampleResponse { - - /// The network returned a response, including status code and data. - case networkResponse(Int, Data) - - /// The network returned response which can be fully customized. - case response(HTTPURLResponse, Data) - - /// The network failed to send the request, or failed to retrieve a response (eg a timeout). - case networkError(NSError) -} - -/// Class for reifying a target of the `Target` enum unto a concrete `Endpoint`. -/// - Note: As of Moya 11.0.0 Endpoint is no longer generic. -/// Existing code should work as is after removing the generic. -/// See #1529 and #1524 for the discussion. -open class Endpoint { - public typealias SampleResponseClosure = () -> EndpointSampleResponse - - /// A string representation of the URL for the request. - public let url: String - - /// A closure responsible for returning an `EndpointSampleResponse`. - public let sampleResponseClosure: SampleResponseClosure - - /// The HTTP method for the request. - public let method: Moya.Method - - /// The `Task` for the request. - public let task: Task - - /// The HTTP header fields for the request. - public let httpHeaderFields: [String: String]? - - public init(url: String, - sampleResponseClosure: @escaping SampleResponseClosure, - method: Moya.Method, - task: Task, - httpHeaderFields: [String: String]?) { - - self.url = url - self.sampleResponseClosure = sampleResponseClosure - self.method = method - self.task = task - self.httpHeaderFields = httpHeaderFields - } - - /// Convenience method for creating a new `Endpoint` with the same properties as the receiver, but with added HTTP header fields. - open func adding(newHTTPHeaderFields: [String: String]) -> Endpoint { - return Endpoint(url: url, sampleResponseClosure: sampleResponseClosure, method: method, task: task, httpHeaderFields: add(httpHeaderFields: newHTTPHeaderFields)) - } - - /// Convenience method for creating a new `Endpoint` with the same properties as the receiver, but with replaced `task` parameter. - open func replacing(task: Task) -> Endpoint { - return Endpoint(url: url, sampleResponseClosure: sampleResponseClosure, method: method, task: task, httpHeaderFields: httpHeaderFields) - } - - fileprivate func add(httpHeaderFields headers: [String: String]?) -> [String: String]? { - guard let unwrappedHeaders = headers, unwrappedHeaders.isEmpty == false else { - return self.httpHeaderFields - } - - var newHTTPHeaderFields = self.httpHeaderFields ?? [:] - unwrappedHeaders.forEach { key, value in - newHTTPHeaderFields[key] = value - } - return newHTTPHeaderFields - } -} - -/// Extension for converting an `Endpoint` into a `URLRequest`. -public extension Endpoint { - // swiftlint:disable cyclomatic_complexity - /// Returns the `Endpoint` converted to a `URLRequest` if valid. Throws an error otherwise. - func urlRequest() throws -> URLRequest { - guard let requestURL = Foundation.URL(string: url) else { - throw MoyaError.requestMapping(url) - } - - var request = URLRequest(url: requestURL) - request.httpMethod = method.rawValue - request.allHTTPHeaderFields = httpHeaderFields - - switch task { - case .requestPlain, .uploadFile, .uploadMultipart, .downloadDestination: - return request - case .requestData(let data): - request.httpBody = data - return request - case let .requestJSONEncodable(encodable): - return try request.encoded(encodable: encodable) - case let .requestCustomJSONEncodable(encodable, encoder: encoder): - return try request.encoded(encodable: encodable, encoder: encoder) - case let .requestParameters(parameters, parameterEncoding): - return try request.encoded(parameters: parameters, parameterEncoding: parameterEncoding) - case let .uploadCompositeMultipart(_, urlParameters): - let parameterEncoding = URLEncoding(destination: .queryString) - return try request.encoded(parameters: urlParameters, parameterEncoding: parameterEncoding) - case let .downloadParameters(parameters, parameterEncoding, _): - return try request.encoded(parameters: parameters, parameterEncoding: parameterEncoding) - case let .requestCompositeData(bodyData: bodyData, urlParameters: urlParameters): - request.httpBody = bodyData - let parameterEncoding = URLEncoding(destination: .queryString) - return try request.encoded(parameters: urlParameters, parameterEncoding: parameterEncoding) - case let .requestCompositeParameters(bodyParameters: bodyParameters, bodyEncoding: bodyParameterEncoding, urlParameters: urlParameters): - if let bodyParameterEncoding = bodyParameterEncoding as? URLEncoding, bodyParameterEncoding.destination != .httpBody { - fatalError("Only URLEncoding that `bodyEncoding` accepts is URLEncoding.httpBody. Others like `default`, `queryString` or `methodDependent` are prohibited - if you want to use them, add your parameters to `urlParameters` instead.") - } - let bodyfulRequest = try request.encoded(parameters: bodyParameters, parameterEncoding: bodyParameterEncoding) - let urlEncoding = URLEncoding(destination: .queryString) - return try bodyfulRequest.encoded(parameters: urlParameters, parameterEncoding: urlEncoding) - } - } - // swiftlint:enable cyclomatic_complexity -} - -/// Required for using `Endpoint` as a key type in a `Dictionary`. -extension Endpoint: Equatable, Hashable { - public func hash(into hasher: inout Hasher) { - guard let request = try? urlRequest() else { - hasher.combine(url) - return - } - hasher.combine(request) - } - - /// Note: If both Endpoints fail to produce a URLRequest the comparison will - /// fall back to comparing each Endpoint's hashValue. - public static func == (lhs: Endpoint, rhs: Endpoint) -> Bool { - let lhsRequest = try? lhs.urlRequest() - let rhsRequest = try? rhs.urlRequest() - if lhsRequest != nil, rhsRequest == nil { return false } - if lhsRequest == nil, rhsRequest != nil { return false } - if lhsRequest == nil, rhsRequest == nil { return lhs.hashValue == rhs.hashValue } - return (lhsRequest == rhsRequest) - } -} diff --git a/Pods/Moya/Sources/Moya/Image.swift b/Pods/Moya/Sources/Moya/Image.swift deleted file mode 100644 index b57b472b..00000000 --- a/Pods/Moya/Sources/Moya/Image.swift +++ /dev/null @@ -1,10 +0,0 @@ -#if canImport(UIKit) - import UIKit.UIImage - public typealias ImageType = UIImage -#elseif canImport(AppKit) - import AppKit.NSImage - public typealias ImageType = NSImage -#endif - -/// An alias for the SDK's image type. -public typealias Image = ImageType diff --git a/Pods/Moya/Sources/Moya/Moya+Alamofire.swift b/Pods/Moya/Sources/Moya/Moya+Alamofire.swift deleted file mode 100644 index 93f0bd95..00000000 --- a/Pods/Moya/Sources/Moya/Moya+Alamofire.swift +++ /dev/null @@ -1,137 +0,0 @@ -import Foundation -import Alamofire - -public typealias Session = Alamofire.Session -internal typealias Request = Alamofire.Request -internal typealias DownloadRequest = Alamofire.DownloadRequest -internal typealias UploadRequest = Alamofire.UploadRequest -internal typealias DataRequest = Alamofire.DataRequest - -internal typealias URLRequestConvertible = Alamofire.URLRequestConvertible - -/// Represents an HTTP method. -public typealias Method = Alamofire.HTTPMethod - -/// Choice of parameter encoding. -public typealias ParameterEncoding = Alamofire.ParameterEncoding -public typealias JSONEncoding = Alamofire.JSONEncoding -public typealias URLEncoding = Alamofire.URLEncoding - -/// Multipart form. -public typealias RequestMultipartFormData = Alamofire.MultipartFormData - -/// Multipart form data encoding result. -public typealias DownloadDestination = Alamofire.DownloadRequest.Destination - -/// Make the Alamofire Request type conform to our type, to prevent leaking Alamofire to plugins. -extension Request: RequestType { - public var sessionHeaders: [String: String] { - return delegate?.sessionConfiguration.httpAdditionalHeaders as? [String: String] ?? [:] - } -} - -/// Represents Request interceptor type that can modify/act on Request -public typealias RequestInterceptor = Alamofire.RequestInterceptor - -/// Internal token that can be used to cancel requests -public final class CancellableToken: Cancellable, CustomDebugStringConvertible { - let cancelAction: () -> Void - let request: Request? - - public fileprivate(set) var isCancelled = false - - fileprivate var lock: DispatchSemaphore = DispatchSemaphore(value: 1) - - public func cancel() { - _ = lock.wait(timeout: DispatchTime.distantFuture) - defer { lock.signal() } - guard !isCancelled else { return } - isCancelled = true - cancelAction() - } - - public init(action: @escaping () -> Void) { - self.cancelAction = action - self.request = nil - } - - init(request: Request) { - self.request = request - self.cancelAction = { - request.cancel() - } - } - - /// A textual representation of this instance, suitable for debugging. - public var debugDescription: String { - guard let request = self.request else { - return "Empty Request" - } - return request.cURLDescription() - } - -} - -internal typealias RequestableCompletion = (HTTPURLResponse?, URLRequest?, Data?, Swift.Error?) -> Void - -internal protocol Requestable { - func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self -} - -extension DataRequest: Requestable { - internal func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self { - if let callbackQueue = callbackQueue { - return response(queue: callbackQueue) { handler in - completionHandler(handler.response, handler.request, handler.data, handler.error) - } - } else { - return response { handler in - completionHandler(handler.response, handler.request, handler.data, handler.error) - } - } - } -} - -extension DownloadRequest: Requestable { - internal func response(callbackQueue: DispatchQueue?, completionHandler: @escaping RequestableCompletion) -> Self { - if let callbackQueue = callbackQueue { - return response(queue: callbackQueue) { handler in - completionHandler(handler.response, handler.request, nil, handler.error) - } - } else { - return response { handler in - completionHandler(handler.response, handler.request, nil, handler.error) - } - } - } -} - -final class MoyaRequestInterceptor: RequestInterceptor { - private let lock: NSRecursiveLock = NSRecursiveLock() - - var prepare: ((URLRequest) -> URLRequest)? - private var internalWillSend: ((URLRequest) -> Void)? - - var willSend: ((URLRequest) -> Void)? { - get { - lock.lock(); defer { lock.unlock() } - return internalWillSend - } - - set { - lock.lock(); defer { lock.unlock() } - internalWillSend = newValue - } - } - - init(prepare: ((URLRequest) -> URLRequest)? = nil, willSend: ((URLRequest) -> Void)? = nil) { - self.prepare = prepare - self.willSend = willSend - } - - func adapt(_ urlRequest: URLRequest, for session: Alamofire.Session, completion: @escaping (Result) -> Void) { - let request = prepare?(urlRequest) ?? urlRequest - willSend?(request) - completion(.success(request)) - } -} diff --git a/Pods/Moya/Sources/Moya/MoyaError.swift b/Pods/Moya/Sources/Moya/MoyaError.swift deleted file mode 100644 index 4b16bd2c..00000000 --- a/Pods/Moya/Sources/Moya/MoyaError.swift +++ /dev/null @@ -1,102 +0,0 @@ -import Foundation - -/// A type representing possible errors Moya can throw. -public enum MoyaError: Swift.Error { - - /// Indicates a response failed to map to an image. - case imageMapping(Response) - - /// Indicates a response failed to map to a JSON structure. - case jsonMapping(Response) - - /// Indicates a response failed to map to a String. - case stringMapping(Response) - - /// Indicates a response failed to map to a Decodable object. - case objectMapping(Swift.Error, Response) - - /// Indicates that Encodable couldn't be encoded into Data - case encodableMapping(Swift.Error) - - /// Indicates a response failed with an invalid HTTP status code. - case statusCode(Response) - - /// Indicates a response failed due to an underlying `Error`. - case underlying(Swift.Error, Response?) - - /// Indicates that an `Endpoint` failed to map to a `URLRequest`. - case requestMapping(String) - - /// Indicates that an `Endpoint` failed to encode the parameters for the `URLRequest`. - case parameterEncoding(Swift.Error) -} - -public extension MoyaError { - /// Depending on error type, returns a `Response` object. - var response: Moya.Response? { - switch self { - case .imageMapping(let response): return response - case .jsonMapping(let response): return response - case .stringMapping(let response): return response - case .objectMapping(_, let response): return response - case .encodableMapping: return nil - case .statusCode(let response): return response - case .underlying(_, let response): return response - case .requestMapping: return nil - case .parameterEncoding: return nil - } - } - - /// Depending on error type, returns an underlying `Error`. - internal var underlyingError: Swift.Error? { - switch self { - case .imageMapping: return nil - case .jsonMapping: return nil - case .stringMapping: return nil - case .objectMapping(let error, _): return error - case .encodableMapping(let error): return error - case .statusCode: return nil - case .underlying(let error, _): return error - case .requestMapping: return nil - case .parameterEncoding(let error): return error - } - } -} - -// MARK: - Error Descriptions - -extension MoyaError: LocalizedError { - public var errorDescription: String? { - switch self { - case .imageMapping: - return "Failed to map data to an Image." - case .jsonMapping: - return "Failed to map data to JSON." - case .stringMapping: - return "Failed to map data to a String." - case .objectMapping: - return "Failed to map data to a Decodable object." - case .encodableMapping: - return "Failed to encode Encodable object into data." - case .statusCode: - return "Status code didn't fall within the given range." - case .underlying(let error, _): - return error.localizedDescription - case .requestMapping: - return "Failed to map Endpoint to a URLRequest." - case .parameterEncoding(let error): - return "Failed to encode parameters for URLRequest. \(error.localizedDescription)" - } - } -} - -// MARK: - Error User Info - -extension MoyaError: CustomNSError { - public var errorUserInfo: [String: Any] { - var userInfo: [String: Any] = [:] - userInfo[NSLocalizedDescriptionKey] = errorDescription - userInfo[NSUnderlyingErrorKey] = underlyingError - return userInfo - } -} diff --git a/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift b/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift deleted file mode 100644 index 0f97f69b..00000000 --- a/Pods/Moya/Sources/Moya/MoyaProvider+Defaults.swift +++ /dev/null @@ -1,34 +0,0 @@ -import Foundation - -/// These functions are default mappings to `MoyaProvider`'s properties: endpoints, requests, session etc. -public extension MoyaProvider { - final class func defaultEndpointMapping(for target: Target) -> Endpoint { - return Endpoint( - url: URL(target: target).absoluteString, - sampleResponseClosure: { .networkResponse(200, target.sampleData) }, - method: target.method, - task: target.task, - httpHeaderFields: target.headers - ) - } - - final class func defaultRequestMapping(for endpoint: Endpoint, closure: RequestResultClosure) { - do { - let urlRequest = try endpoint.urlRequest() - closure(.success(urlRequest)) - } catch MoyaError.requestMapping(let url) { - closure(.failure(MoyaError.requestMapping(url))) - } catch MoyaError.parameterEncoding(let error) { - closure(.failure(MoyaError.parameterEncoding(error))) - } catch { - closure(.failure(MoyaError.underlying(error, nil))) - } - } - - final class func defaultAlamofireSession() -> Session { - let configuration = URLSessionConfiguration.default - configuration.headers = .default - - return Session(configuration: configuration, startRequestsImmediately: false) - } -} diff --git a/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift b/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift deleted file mode 100644 index 212c9a0c..00000000 --- a/Pods/Moya/Sources/Moya/MoyaProvider+Internal.swift +++ /dev/null @@ -1,287 +0,0 @@ -import Foundation - -// MARK: - Method - -public extension Method { - /// A Boolean value determining whether the request supports multipart. - var supportsMultipart: Bool { - switch self { - case .post, .put, .patch, .connect: - return true - default: - return false - } - } -} - -// MARK: - MoyaProvider - -/// Internal extension to keep the inner-workings outside the main Moya.swift file. -public extension MoyaProvider { - /// Performs normal requests. - func requestNormal(_ target: Target, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> Cancellable { - let endpoint = self.endpoint(target) - let stubBehavior = self.stubClosure(target) - let cancellableToken = CancellableWrapper() - - // Allow plugins to modify response - let pluginsWithCompletion: Moya.Completion = { result in - let processedResult = self.plugins.reduce(result) { $1.process($0, target: target) } - completion(processedResult) - } - - if trackInflights { - lock.lock() - var inflightCompletionBlocks = self.inflightRequests[endpoint] - inflightCompletionBlocks?.append(pluginsWithCompletion) - self.inflightRequests[endpoint] = inflightCompletionBlocks - lock.unlock() - - if inflightCompletionBlocks != nil { - return cancellableToken - } else { - lock.lock() - self.inflightRequests[endpoint] = [pluginsWithCompletion] - lock.unlock() - } - } - - let performNetworking = { (requestResult: Result) in - if cancellableToken.isCancelled { - self.cancelCompletion(pluginsWithCompletion, target: target) - return - } - - var request: URLRequest! - - switch requestResult { - case .success(let urlRequest): - request = urlRequest - case .failure(let error): - pluginsWithCompletion(.failure(error)) - return - } - - let networkCompletion: Moya.Completion = { result in - if self.trackInflights { - self.inflightRequests[endpoint]?.forEach { $0(result) } - - self.lock.lock() - self.inflightRequests.removeValue(forKey: endpoint) - self.lock.unlock() - } else { - pluginsWithCompletion(result) - } - } - - cancellableToken.innerCancellable = self.performRequest(target, request: request, callbackQueue: callbackQueue, progress: progress, completion: networkCompletion, endpoint: endpoint, stubBehavior: stubBehavior) - } - - requestClosure(endpoint, performNetworking) - - return cancellableToken - } - - // swiftlint:disable:next function_parameter_count - private func performRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion, endpoint: Endpoint, stubBehavior: Moya.StubBehavior) -> Cancellable { - switch stubBehavior { - case .never: - switch endpoint.task { - case .requestPlain, .requestData, .requestJSONEncodable, .requestCustomJSONEncodable, .requestParameters, .requestCompositeData, .requestCompositeParameters: - return self.sendRequest(target, request: request, callbackQueue: callbackQueue, progress: progress, completion: completion) - case .uploadFile(let file): - return self.sendUploadFile(target, request: request, callbackQueue: callbackQueue, file: file, progress: progress, completion: completion) - case .uploadMultipart(let multipartBody), .uploadCompositeMultipart(let multipartBody, _): - guard !multipartBody.isEmpty && endpoint.method.supportsMultipart else { - fatalError("\(target) is not a multipart upload target.") - } - return self.sendUploadMultipart(target, request: request, callbackQueue: callbackQueue, multipartBody: multipartBody, progress: progress, completion: completion) - case .downloadDestination(let destination), .downloadParameters(_, _, let destination): - return self.sendDownloadRequest(target, request: request, callbackQueue: callbackQueue, destination: destination, progress: progress, completion: completion) - } - default: - return self.stubRequest(target, request: request, callbackQueue: callbackQueue, completion: completion, endpoint: endpoint, stubBehavior: stubBehavior) - } - } - - func cancelCompletion(_ completion: Moya.Completion, target: Target) { - let error = MoyaError.underlying(NSError(domain: NSURLErrorDomain, code: NSURLErrorCancelled, userInfo: nil), nil) - plugins.forEach { $0.didReceive(.failure(error), target: target) } - completion(.failure(error)) - } - - /// Creates a function which, when called, executes the appropriate stubbing behavior for the given parameters. - final func createStubFunction(_ token: CancellableToken, forTarget target: Target, withCompletion completion: @escaping Moya.Completion, endpoint: Endpoint, plugins: [PluginType], request: URLRequest) -> (() -> Void) { // swiftlint:disable:this function_parameter_count - return { - if token.isCancelled { - self.cancelCompletion(completion, target: target) - return - } - - let validate = { (response: Moya.Response) -> Result in - let validCodes = target.validationType.statusCodes - guard !validCodes.isEmpty else { return .success(response) } - if validCodes.contains(response.statusCode) { - return .success(response) - } else { - let statusError = MoyaError.statusCode(response) - let error = MoyaError.underlying(statusError, response) - return .failure(error) - } - } - - switch endpoint.sampleResponseClosure() { - case .networkResponse(let statusCode, let data): - let response = Moya.Response(statusCode: statusCode, data: data, request: request, response: nil) - let result = validate(response) - plugins.forEach { $0.didReceive(result, target: target) } - completion(result) - case .response(let customResponse, let data): - let response = Moya.Response(statusCode: customResponse.statusCode, data: data, request: request, response: customResponse) - let result = validate(response) - plugins.forEach { $0.didReceive(result, target: target) } - completion(result) - case .networkError(let error): - let error = MoyaError.underlying(error, nil) - plugins.forEach { $0.didReceive(.failure(error), target: target) } - completion(.failure(error)) - } - } - } - - /// Notify all plugins that a stub is about to be performed. You must call this if overriding `stubRequest`. - final func notifyPluginsOfImpendingStub(for request: URLRequest, target: Target) -> URLRequest { - let alamoRequest = session.request(request) - alamoRequest.cancel() - - let preparedRequest = plugins.reduce(request) { $1.prepare($0, target: target) } - - let stubbedAlamoRequest = RequestTypeWrapper(request: alamoRequest, urlRequest: preparedRequest) - plugins.forEach { $0.willSend(stubbedAlamoRequest, target: target) } - - return preparedRequest - } -} - -private extension MoyaProvider { - private func interceptor(target: Target) -> MoyaRequestInterceptor { - return MoyaRequestInterceptor(prepare: { [weak self] urlRequest in - return self?.plugins.reduce(urlRequest) { $1.prepare($0, target: target) } ?? urlRequest - }) - } - - private func setup(interceptor: MoyaRequestInterceptor, with target: Target, and request: Request) { - interceptor.willSend = { [weak self, weak request] urlRequest in - guard let self = self, let request = request else { return } - - let stubbedAlamoRequest = RequestTypeWrapper(request: request, urlRequest: urlRequest) - self.plugins.forEach { $0.willSend(stubbedAlamoRequest, target: target) } - } - } - - func sendUploadMultipart(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, multipartBody: [MultipartFormData], progress: Moya.ProgressBlock? = nil, completion: @escaping Moya.Completion) -> CancellableToken { - let formData = RequestMultipartFormData() - formData.applyMoyaMultipartFormData(multipartBody) - - let interceptor = self.interceptor(target: target) - let request = session.upload(multipartFormData: formData, with: request, interceptor: interceptor) - setup(interceptor: interceptor, with: target, and: request) - - let validationCodes = target.validationType.statusCodes - let validatedRequest = validationCodes.isEmpty ? request : request.validate(statusCode: validationCodes) - return sendAlamofireRequest(validatedRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - func sendUploadFile(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, file: URL, progress: ProgressBlock? = nil, completion: @escaping Completion) -> CancellableToken { - let interceptor = self.interceptor(target: target) - let uploadRequest = session.upload(file, with: request, interceptor: interceptor) - setup(interceptor: interceptor, with: target, and: uploadRequest) - - let validationCodes = target.validationType.statusCodes - let alamoRequest = validationCodes.isEmpty ? uploadRequest : uploadRequest.validate(statusCode: validationCodes) - return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - func sendDownloadRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, destination: @escaping DownloadDestination, progress: ProgressBlock? = nil, completion: @escaping Completion) -> CancellableToken { - let interceptor = self.interceptor(target: target) - let downloadRequest = session.download(request, interceptor: interceptor, to: destination) - setup(interceptor: interceptor, with: target, and: downloadRequest) - - let validationCodes = target.validationType.statusCodes - let alamoRequest = validationCodes.isEmpty ? downloadRequest : downloadRequest.validate(statusCode: validationCodes) - return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - func sendRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> CancellableToken { - let interceptor = self.interceptor(target: target) - let initialRequest = session.request(request, interceptor: interceptor) - setup(interceptor: interceptor, with: target, and: initialRequest) - - let validationCodes = target.validationType.statusCodes - let alamoRequest = validationCodes.isEmpty ? initialRequest : initialRequest.validate(statusCode: validationCodes) - return sendAlamofireRequest(alamoRequest, target: target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - // swiftlint:disable:next cyclomatic_complexity - func sendAlamofireRequest(_ alamoRequest: T, target: Target, callbackQueue: DispatchQueue?, progress progressCompletion: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> CancellableToken where T: Requestable, T: Request { - // Give plugins the chance to alter the outgoing request - let plugins = self.plugins - var progressAlamoRequest = alamoRequest - let progressClosure: (Progress) -> Void = { progress in - let sendProgress: () -> Void = { - progressCompletion?(ProgressResponse(progress: progress)) - } - - if let callbackQueue = callbackQueue { - callbackQueue.async(execute: sendProgress) - } else { - sendProgress() - } - } - - // Perform the actual request - if progressCompletion != nil { - switch progressAlamoRequest { - case let downloadRequest as DownloadRequest: - if let downloadRequest = downloadRequest.downloadProgress(closure: progressClosure) as? T { - progressAlamoRequest = downloadRequest - } - case let uploadRequest as UploadRequest: - if let uploadRequest = uploadRequest.uploadProgress(closure: progressClosure) as? T { - progressAlamoRequest = uploadRequest - } - case let dataRequest as DataRequest: - if let dataRequest = dataRequest.downloadProgress(closure: progressClosure) as? T { - progressAlamoRequest = dataRequest - } - default: break - } - } - - let completionHandler: RequestableCompletion = { response, request, data, error in - let result = convertResponseToResult(response, request: request, data: data, error: error) - // Inform all plugins about the response - plugins.forEach { $0.didReceive(result, target: target) } - if let progressCompletion = progressCompletion { - let value = try? result.get() - switch progressAlamoRequest { - case let downloadRequest as DownloadRequest: - progressCompletion(ProgressResponse(progress: downloadRequest.downloadProgress, response: value)) - case let uploadRequest as UploadRequest: - progressCompletion(ProgressResponse(progress: uploadRequest.uploadProgress, response: value)) - case let dataRequest as DataRequest: - progressCompletion(ProgressResponse(progress: dataRequest.downloadProgress, response: value)) - default: - progressCompletion(ProgressResponse(response: value)) - } - } - completion(result) - } - - progressAlamoRequest = progressAlamoRequest.response(callbackQueue: callbackQueue, completionHandler: completionHandler) - - progressAlamoRequest.resume() - - return CancellableToken(request: progressAlamoRequest) - } -} diff --git a/Pods/Moya/Sources/Moya/MoyaProvider.swift b/Pods/Moya/Sources/Moya/MoyaProvider.swift deleted file mode 100755 index 0c6381fe..00000000 --- a/Pods/Moya/Sources/Moya/MoyaProvider.swift +++ /dev/null @@ -1,215 +0,0 @@ -import Foundation - -/// Closure to be executed when a request has completed. -public typealias Completion = (_ result: Result) -> Void - -/// Closure to be executed when progress changes. -public typealias ProgressBlock = (_ progress: ProgressResponse) -> Void - -/// A type representing the progress of a request. -public struct ProgressResponse { - - /// The optional response of the request. - public let response: Response? - - /// An object that conveys ongoing progress for a given request. - public let progressObject: Progress? - - /// Initializes a `ProgressResponse`. - public init(progress: Progress? = nil, response: Response? = nil) { - self.progressObject = progress - self.response = response - } - - /// The fraction of the overall work completed by the progress object. - public var progress: Double { - if completed { - return 1.0 - } else if let progressObject = progressObject, progressObject.totalUnitCount > 0 { - // if the Content-Length is specified we can rely on `fractionCompleted` - return progressObject.fractionCompleted - } else { - // if the Content-Length is not specified, return progress 0.0 until it's completed - return 0.0 - } - } - - /// A Boolean value stating whether the request is completed. - public var completed: Bool { - return response != nil - } -} - -/// A protocol representing a minimal interface for a MoyaProvider. -/// Used by the reactive provider extensions. -public protocol MoyaProviderType: AnyObject { - - associatedtype Target: TargetType - - /// Designated request-making method. Returns a `Cancellable` token to cancel the request later. - func request(_ target: Target, callbackQueue: DispatchQueue?, progress: Moya.ProgressBlock?, completion: @escaping Moya.Completion) -> Cancellable -} - -/// Request provider class. Requests should be made through this class only. -open class MoyaProvider: MoyaProviderType { - - /// Closure that defines the endpoints for the provider. - public typealias EndpointClosure = (Target) -> Endpoint - - /// Closure that decides if and what request should be performed. - public typealias RequestResultClosure = (Result) -> Void - - /// Closure that resolves an `Endpoint` into a `RequestResult`. - public typealias RequestClosure = (Endpoint, @escaping RequestResultClosure) -> Void - - /// Closure that decides if/how a request should be stubbed. - public typealias StubClosure = (Target) -> Moya.StubBehavior - - /// A closure responsible for mapping a `TargetType` to an `EndPoint`. - public let endpointClosure: EndpointClosure - - /// A closure deciding if and what request should be performed. - public let requestClosure: RequestClosure - - /// A closure responsible for determining the stubbing behavior - /// of a request for a given `TargetType`. - public let stubClosure: StubClosure - - public let session: Session - - /// A list of plugins. - /// e.g. for logging, network activity indicator or credentials. - public let plugins: [PluginType] - - public let trackInflights: Bool - - open internal(set) var inflightRequests: [Endpoint: [Moya.Completion]] = [:] - - /// Propagated to Alamofire as callback queue. If nil - the Alamofire default (as of their API in 2017 - the main queue) will be used. - let callbackQueue: DispatchQueue? - - let lock: NSRecursiveLock = NSRecursiveLock() - - /// Initializes a provider. - public init(endpointClosure: @escaping EndpointClosure = MoyaProvider.defaultEndpointMapping, - requestClosure: @escaping RequestClosure = MoyaProvider.defaultRequestMapping, - stubClosure: @escaping StubClosure = MoyaProvider.neverStub, - callbackQueue: DispatchQueue? = nil, - session: Session = MoyaProvider.defaultAlamofireSession(), - plugins: [PluginType] = [], - trackInflights: Bool = false) { - - self.endpointClosure = endpointClosure - self.requestClosure = requestClosure - self.stubClosure = stubClosure - self.session = session - self.plugins = plugins - self.trackInflights = trackInflights - self.callbackQueue = callbackQueue - } - - /// Returns an `Endpoint` based on the token, method, and parameters by invoking the `endpointClosure`. - open func endpoint(_ token: Target) -> Endpoint { - return endpointClosure(token) - } - - /// Designated request-making method. Returns a `Cancellable` token to cancel the request later. - @discardableResult - open func request(_ target: Target, - callbackQueue: DispatchQueue? = .none, - progress: ProgressBlock? = .none, - completion: @escaping Completion) -> Cancellable { - - let callbackQueue = callbackQueue ?? self.callbackQueue - return requestNormal(target, callbackQueue: callbackQueue, progress: progress, completion: completion) - } - - // swiftlint:disable function_parameter_count - /// When overriding this method, call `notifyPluginsOfImpendingStub` to prepare your request - /// and then use the returned `URLRequest` in the `createStubFunction` method. - /// Note: this was previously in an extension, however it must be in the original class declaration to allow subclasses to override. - @discardableResult - open func stubRequest(_ target: Target, request: URLRequest, callbackQueue: DispatchQueue?, completion: @escaping Moya.Completion, endpoint: Endpoint, stubBehavior: Moya.StubBehavior) -> CancellableToken { - let callbackQueue = callbackQueue ?? self.callbackQueue - let cancellableToken = CancellableToken { } - let preparedRequest = notifyPluginsOfImpendingStub(for: request, target: target) - let plugins = self.plugins - let stub: () -> Void = createStubFunction(cancellableToken, forTarget: target, withCompletion: completion, endpoint: endpoint, plugins: plugins, request: preparedRequest) - switch stubBehavior { - case .immediate: - switch callbackQueue { - case .none: - stub() - case .some(let callbackQueue): - callbackQueue.async(execute: stub) - } - case .delayed(let delay): - let killTimeOffset = Int64(CDouble(delay) * CDouble(NSEC_PER_SEC)) - let killTime = DispatchTime.now() + Double(killTimeOffset) / Double(NSEC_PER_SEC) - (callbackQueue ?? DispatchQueue.main).asyncAfter(deadline: killTime) { - stub() - } - case .never: - fatalError("Method called to stub request when stubbing is disabled.") - } - - return cancellableToken - } - // swiftlint:enable function_parameter_count -} - -// MARK: Stubbing - -/// Controls how stub responses are returned. -public enum StubBehavior { - - /// Do not stub. - case never - - /// Return a response immediately. - case immediate - - /// Return a response after a delay. - case delayed(seconds: TimeInterval) -} - -public extension MoyaProvider { - - // Swift won't let us put the StubBehavior enum inside the provider class, so we'll - // at least add some class functions to allow easy access to common stubbing closures. - - /// Do not stub. - final class func neverStub(_: Target) -> Moya.StubBehavior { - return .never - } - - /// Return a response immediately. - final class func immediatelyStub(_: Target) -> Moya.StubBehavior { - return .immediate - } - - /// Return a response after a delay. - final class func delayedStub(_ seconds: TimeInterval) -> (Target) -> Moya.StubBehavior { - return { _ in return .delayed(seconds: seconds) } - } -} - -/// A public function responsible for converting the result of a `URLRequest` to a Result. -public func convertResponseToResult(_ response: HTTPURLResponse?, request: URLRequest?, data: Data?, error: Swift.Error?) -> - Result { - switch (response, data, error) { - case let (.some(response), data, .none): - let response = Moya.Response(statusCode: response.statusCode, data: data ?? Data(), request: request, response: response) - return .success(response) - case let (.some(response), _, .some(error)): - let response = Moya.Response(statusCode: response.statusCode, data: data ?? Data(), request: request, response: response) - let error = MoyaError.underlying(error, response) - return .failure(error) - case let (_, _, .some(error)): - let error = MoyaError.underlying(error, nil) - return .failure(error) - default: - let error = MoyaError.underlying(NSError(domain: NSURLErrorDomain, code: NSURLErrorUnknown, userInfo: nil), nil) - return .failure(error) - } -} diff --git a/Pods/Moya/Sources/Moya/MultiTarget.swift b/Pods/Moya/Sources/Moya/MultiTarget.swift deleted file mode 100644 index 19cb7014..00000000 --- a/Pods/Moya/Sources/Moya/MultiTarget.swift +++ /dev/null @@ -1,61 +0,0 @@ -import Foundation - -/// A `TargetType` used to enable `MoyaProvider` to process multiple `TargetType`s. -public enum MultiTarget: TargetType { - /// The embedded `TargetType`. - case target(TargetType) - - /// Initializes a `MultiTarget`. - public init(_ target: TargetType) { - self = MultiTarget.target(target) - } - - /// The embedded target's base `URL`. - public var path: String { - return target.path - } - - /// The baseURL of the embedded target. - public var baseURL: URL { - return target.baseURL - } - - /// The HTTP method of the embedded target. - public var method: Moya.Method { - return target.method - } - - /// The sampleData of the embedded target. - public var sampleData: Data { - return target.sampleData - } - - /// The `Task` of the embedded target. - public var task: Task { - return target.task - } - - /// The `ValidationType` of the embedded target. - public var validationType: ValidationType { - return target.validationType - } - - /// The headers of the embedded target. - public var headers: [String: String]? { - return target.headers - } - - /// The embedded `TargetType`. - public var target: TargetType { - switch self { - case .target(let target): return target - } - } -} - -extension MultiTarget: AccessTokenAuthorizable { - public var authorizationType: AuthorizationType? { - guard let authorizableTarget = target as? AccessTokenAuthorizable else { return nil } - return authorizableTarget.authorizationType - } -} diff --git a/Pods/Moya/Sources/Moya/MultipartFormData.swift b/Pods/Moya/Sources/Moya/MultipartFormData.swift deleted file mode 100644 index 28f86ae5..00000000 --- a/Pods/Moya/Sources/Moya/MultipartFormData.swift +++ /dev/null @@ -1,65 +0,0 @@ -import Foundation -import Alamofire - -/// Represents "multipart/form-data" for an upload. -public struct MultipartFormData { - - /// Method to provide the form data. - public enum FormDataProvider { - case data(Foundation.Data) - case file(URL) - case stream(InputStream, UInt64) - } - - public init(provider: FormDataProvider, name: String, fileName: String? = nil, mimeType: String? = nil) { - self.provider = provider - self.name = name - self.fileName = fileName - self.mimeType = mimeType - } - - /// The method being used for providing form data. - public let provider: FormDataProvider - - /// The name. - public let name: String - - /// The file name. - public let fileName: String? - - /// The MIME type - public let mimeType: String? - -} - -// MARK: RequestMultipartFormData appending -internal extension RequestMultipartFormData { - func append(data: Data, bodyPart: MultipartFormData) { - append(data, withName: bodyPart.name, fileName: bodyPart.fileName, mimeType: bodyPart.mimeType) - } - - func append(fileURL url: URL, bodyPart: MultipartFormData) { - if let fileName = bodyPart.fileName, let mimeType = bodyPart.mimeType { - append(url, withName: bodyPart.name, fileName: fileName, mimeType: mimeType) - } else { - append(url, withName: bodyPart.name) - } - } - - func append(stream: InputStream, length: UInt64, bodyPart: MultipartFormData) { - append(stream, withLength: length, name: bodyPart.name, fileName: bodyPart.fileName ?? "", mimeType: bodyPart.mimeType ?? "") - } - - func applyMoyaMultipartFormData(_ multipartBody: [Moya.MultipartFormData]) { - for bodyPart in multipartBody { - switch bodyPart.provider { - case .data(let data): - append(data: data, bodyPart: bodyPart) - case .file(let url): - append(fileURL: url, bodyPart: bodyPart) - case .stream(let stream, let length): - append(stream: stream, length: length, bodyPart: bodyPart) - } - } - } -} diff --git a/Pods/Moya/Sources/Moya/Plugin.swift b/Pods/Moya/Sources/Moya/Plugin.swift deleted file mode 100644 index e0705c6c..00000000 --- a/Pods/Moya/Sources/Moya/Plugin.swift +++ /dev/null @@ -1,54 +0,0 @@ -import Foundation - -/// A Moya Plugin receives callbacks to perform side effects wherever a request is sent or received. -/// -/// for example, a plugin may be used to -/// - log network requests -/// - hide and show a network activity indicator -/// - inject additional information into a request -public protocol PluginType { - /// Called to modify a request before sending. - func prepare(_ request: URLRequest, target: TargetType) -> URLRequest - - /// Called immediately before a request is sent over the network (or stubbed). - func willSend(_ request: RequestType, target: TargetType) - - /// Called after a response has been received, but before the MoyaProvider has invoked its completion handler. - func didReceive(_ result: Result, target: TargetType) - - /// Called to modify a result before completion. - func process(_ result: Result, target: TargetType) -> Result -} - -public extension PluginType { - func prepare(_ request: URLRequest, target: TargetType) -> URLRequest { return request } - func willSend(_ request: RequestType, target: TargetType) { } - func didReceive(_ result: Result, target: TargetType) { } - func process(_ result: Result, target: TargetType) -> Result { return result } -} - -/// Request type used by `willSend` plugin function. -public protocol RequestType { - - // Note: - // - // We use this protocol instead of the Alamofire request to avoid leaking that abstraction. - // A plugin should not know about Alamofire at all. - - /// Retrieve an `NSURLRequest` representation. - var request: URLRequest? { get } - - /// Additional headers appended to the request when added to the session. - var sessionHeaders: [String: String] { get } - - /// Authenticates the request with a username and password. - func authenticate(username: String, password: String, persistence: URLCredential.Persistence) -> Self - - /// Authenticates the request with an `NSURLCredential` instance. - func authenticate(with credential: URLCredential) -> Self - - /// cURL representation of the instance. - /// - /// - Returns: The cURL equivalent of the instance. - func cURLDescription(calling handler: @escaping (String) -> Void) -> Self -} diff --git a/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift b/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift deleted file mode 100644 index 88fca37f..00000000 --- a/Pods/Moya/Sources/Moya/Plugins/AccessTokenPlugin.swift +++ /dev/null @@ -1,101 +0,0 @@ -import Foundation - -// MARK: - AccessTokenAuthorizable - -/// A protocol for controlling the behavior of `AccessTokenPlugin`. -public protocol AccessTokenAuthorizable { - - /// Represents the authorization header to use for requests. - var authorizationType: AuthorizationType? { get } -} - -// MARK: - AuthorizationType - -/// An enum representing the header to use with an `AccessTokenPlugin` -public enum AuthorizationType { - - /// The `"Basic"` header. - case basic - - /// The `"Bearer"` header. - case bearer - - /// Custom header implementation. - case custom(String) - - public var value: String { - switch self { - case .basic: return "Basic" - case .bearer: return "Bearer" - case .custom(let customValue): return customValue - } - } -} - -extension AuthorizationType: Equatable { - public static func == (lhs: AuthorizationType, rhs: AuthorizationType) -> Bool { - switch (lhs, rhs) { - case (.basic, .basic), - (.bearer, .bearer): - return true - - case let (.custom(value1), .custom(value2)): - return value1 == value2 - - default: - return false - } - } -} - -// MARK: - AccessTokenPlugin - -/** - A plugin for adding basic or bearer-type authorization headers to requests. Example: - - ``` - Authorization: Basic - Authorization: Bearer - Authorization: <Сustom> - ``` - - */ -public struct AccessTokenPlugin: PluginType { - - public typealias TokenClosure = (AuthorizationType) -> String - - /// A closure returning the access token to be applied in the header. - public let tokenClosure: TokenClosure - - /** - Initialize a new `AccessTokenPlugin`. - - - parameters: - - tokenClosure: A closure returning the token to be applied in the pattern `Authorization: ` - */ - public init(tokenClosure: @escaping TokenClosure) { - self.tokenClosure = tokenClosure - } - - /** - Prepare a request by adding an authorization header if necessary. - - - parameters: - - request: The request to modify. - - target: The target of the request. - - returns: The modified `URLRequest`. - */ - public func prepare(_ request: URLRequest, target: TargetType) -> URLRequest { - - guard let authorizable = target as? AccessTokenAuthorizable, - let authorizationType = authorizable.authorizationType - else { return request } - - var request = request - - let authValue = authorizationType.value + " " + tokenClosure(authorizationType) - request.addValue(authValue, forHTTPHeaderField: "Authorization") - - return request - } -} diff --git a/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift b/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift deleted file mode 100644 index 88e1015d..00000000 --- a/Pods/Moya/Sources/Moya/Plugins/CredentialsPlugin.swift +++ /dev/null @@ -1,21 +0,0 @@ -import Foundation - -/// Provides each request with optional URLCredentials. -public final class CredentialsPlugin: PluginType { - - public typealias CredentialClosure = (TargetType) -> URLCredential? - let credentialsClosure: CredentialClosure - - /// Initializes a CredentialsPlugin. - public init(credentialsClosure: @escaping CredentialClosure) { - self.credentialsClosure = credentialsClosure - } - - // MARK: Plugin - - public func willSend(_ request: RequestType, target: TargetType) { - if let credentials = credentialsClosure(target) { - _ = request.authenticate(with: credentials) - } - } -} diff --git a/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift b/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift deleted file mode 100644 index 988e90f7..00000000 --- a/Pods/Moya/Sources/Moya/Plugins/NetworkActivityPlugin.swift +++ /dev/null @@ -1,30 +0,0 @@ -import Foundation - -/// Network activity change notification type. -public enum NetworkActivityChangeType { - case began, ended -} - -/// Notify a request's network activity changes (request begins or ends). -public final class NetworkActivityPlugin: PluginType { - - public typealias NetworkActivityClosure = (_ change: NetworkActivityChangeType, _ target: TargetType) -> Void - let networkActivityClosure: NetworkActivityClosure - - /// Initializes a NetworkActivityPlugin. - public init(networkActivityClosure: @escaping NetworkActivityClosure) { - self.networkActivityClosure = networkActivityClosure - } - - // MARK: Plugin - - /// Called by the provider as soon as the request is about to start - public func willSend(_ request: RequestType, target: TargetType) { - networkActivityClosure(.began, target) - } - - /// Called by the provider as soon as a response arrives, even if the request is canceled. - public func didReceive(_ result: Result, target: TargetType) { - networkActivityClosure(.ended, target) - } -} diff --git a/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift b/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift deleted file mode 100644 index 06099c9e..00000000 --- a/Pods/Moya/Sources/Moya/Plugins/NetworkLoggerPlugin.swift +++ /dev/null @@ -1,237 +0,0 @@ -import Foundation - -/// Logs network activity (outgoing requests and incoming responses). -public final class NetworkLoggerPlugin { - - public var configuration: Configuration - - /// Initializes a NetworkLoggerPlugin. - public init(configuration: Configuration = Configuration()) { - self.configuration = configuration - } -} - -// MARK: - PluginType -extension NetworkLoggerPlugin: PluginType { - public func willSend(_ request: RequestType, target: TargetType) { - logNetworkRequest(request, target: target) { [weak self] output in - self?.configuration.output(target, output) - } - } - - public func didReceive(_ result: Result, target: TargetType) { - switch result { - case .success(let response): - configuration.output(target, logNetworkResponse(response, target: target, isFromError: false)) - case let .failure(error): - configuration.output(target, logNetworkError(error, target: target)) - } - } -} - -// MARK: - Logging -private extension NetworkLoggerPlugin { - - func logNetworkRequest(_ request: RequestType, target: TargetType, completion: @escaping ([String]) -> Void) { - //cURL formatting - if configuration.logOptions.contains(.formatRequestAscURL) { - _ = request.cURLDescription { [weak self] output in - guard let self = self else { return } - - completion([self.configuration.formatter.entry("Request", output, target)]) - } - return - } - - //Request presence check - guard let httpRequest = request.request else { - completion([configuration.formatter.entry("Request", "(invalid request)", target)]) - return - } - - // Adding log entries for each given log option - var output = [String]() - - output.append(configuration.formatter.entry("Request", httpRequest.description, target)) - - if configuration.logOptions.contains(.requestHeaders) { - var allHeaders = request.sessionHeaders - if let httpRequestHeaders = httpRequest.allHTTPHeaderFields { - allHeaders.merge(httpRequestHeaders) { $1 } - } - output.append(configuration.formatter.entry("Request Headers", allHeaders.description, target)) - } - - if configuration.logOptions.contains(.requestBody) { - if let bodyStream = httpRequest.httpBodyStream { - output.append(configuration.formatter.entry("Request Body Stream", bodyStream.description, target)) - } - - if let body = httpRequest.httpBody { - let stringOutput = configuration.formatter.requestData(body) - output.append(configuration.formatter.entry("Request Body", stringOutput, target)) - } - } - - if configuration.logOptions.contains(.requestMethod), - let httpMethod = httpRequest.httpMethod { - output.append(configuration.formatter.entry("HTTP Request Method", httpMethod, target)) - } - - completion(output) - } - - func logNetworkResponse(_ response: Response, target: TargetType, isFromError: Bool) -> [String] { - // Adding log entries for each given log option - var output = [String]() - - //Response presence check - if let httpResponse = response.response { - output.append(configuration.formatter.entry("Response", httpResponse.description, target)) - } else { - output.append(configuration.formatter.entry("Response", "Received empty network response for \(target).", target)) - } - - if (isFromError && configuration.logOptions.contains(.errorResponseBody)) - || configuration.logOptions.contains(.successResponseBody) { - - let stringOutput = configuration.formatter.responseData(response.data) - output.append(configuration.formatter.entry("Response Body", stringOutput, target)) - } - - return output - } - - func logNetworkError(_ error: MoyaError, target: TargetType) -> [String] { - //Some errors will still have a response, like errors due to Alamofire's HTTP code validation. - if let moyaResponse = error.response { - return logNetworkResponse(moyaResponse, target: target, isFromError: true) - } - - //Errors without an HTTPURLResponse are those due to connectivity, time-out and such. - return [configuration.formatter.entry("Error", "Error calling \(target) : \(error)", target)] - } -} - -// MARK: - Configuration -public extension NetworkLoggerPlugin { - struct Configuration { - - // MARK: - Typealiases - // swiftlint:disable nesting - public typealias OutputType = (_ target: TargetType, _ items: [String]) -> Void - // swiftlint:enable nesting - - // MARK: - Properties - - public var formatter: Formatter - public var output: OutputType - public var logOptions: LogOptions - - /// The designated way to instanciate a Configuration. - /// - /// - Parameters: - /// - formatter: An object holding all formatter closures available for customization. - /// - output: A closure responsible for writing the given log entries into your log system. - /// The default value writes entries to the debug console. - /// - logOptions: A set of options you can use to customize which request component is logged. - public init(formatter: Formatter = Formatter(), - output: @escaping OutputType = defaultOutput, - logOptions: LogOptions = .default) { - self.formatter = formatter - self.output = output - self.logOptions = logOptions - } - - // MARK: - Defaults - - public static func defaultOutput(target: TargetType, items: [String]) { - for item in items { - print(item, separator: ",", terminator: "\n") - } - } - } -} - -public extension NetworkLoggerPlugin.Configuration { - struct LogOptions: OptionSet { - public let rawValue: Int - public init(rawValue: Int) { self.rawValue = rawValue } - - /// The request's method will be logged. - public static let requestMethod: LogOptions = LogOptions(rawValue: 1 << 0) - /// The request's body will be logged. - public static let requestBody: LogOptions = LogOptions(rawValue: 1 << 1) - /// The request's headers will be logged. - public static let requestHeaders: LogOptions = LogOptions(rawValue: 1 << 2) - /// The request will be logged in the cURL format. - /// - /// If this option is used, the following components will be logged regardless of their respective options being set: - /// - request's method - /// - request's headers - /// - request's body. - public static let formatRequestAscURL: LogOptions = LogOptions(rawValue: 1 << 3) - /// The body of a response that is a success will be logged. - public static let successResponseBody: LogOptions = LogOptions(rawValue: 1 << 4) - /// The body of a response that is an error will be logged. - public static let errorResponseBody: LogOptions = LogOptions(rawValue: 1 << 5) - - //Aggregate options - /// Only basic components will be logged. - public static let `default`: LogOptions = [requestMethod, requestHeaders] - /// All components will be logged. - public static let verbose: LogOptions = [requestMethod, requestHeaders, requestBody, - successResponseBody, errorResponseBody] - } -} - -public extension NetworkLoggerPlugin.Configuration { - struct Formatter { - - // MARK: Typealiases - // swiftlint:disable nesting - public typealias DataFormatterType = (Data) -> (String) - public typealias EntryFormatterType = (_ identifier: String, _ message: String, _ target: TargetType) -> String - // swiftlint:enable nesting - - // MARK: Properties - - public var entry: EntryFormatterType - public var requestData: DataFormatterType - public var responseData: DataFormatterType - - /// The designated way to instanciate a Formatter. - /// - /// - Parameters: - /// - entry: The closure formatting a message into a new log entry. - /// - requestData: The closure converting HTTP request's body into a String. - /// The default value assumes the body's data is an utf8 String. - /// - responseData: The closure converting HTTP response's body into a String. - /// The default value assumes the body's data is an utf8 String. - public init(entry: @escaping EntryFormatterType = defaultEntryFormatter, - requestData: @escaping DataFormatterType = defaultDataFormatter, - responseData: @escaping DataFormatterType = defaultDataFormatter) { - self.entry = entry - self.requestData = requestData - self.responseData = responseData - } - - // MARK: Defaults - - public static func defaultDataFormatter(_ data: Data) -> String { - return String(data: data, encoding: .utf8) ?? "## Cannot map data to String ##" - } - - public static func defaultEntryFormatter(identifier: String, message: String, target: TargetType) -> String { - let date = defaultEntryDateFormatter.string(from: Date()) - return "Moya_Logger: [\(date)] \(identifier): \(message)" - } - - static var defaultEntryDateFormatter: DateFormatter = { - let formatter = DateFormatter() - formatter.timeStyle = .short - formatter.dateStyle = .short - return formatter - }() - } -} diff --git a/Pods/Moya/Sources/Moya/RequestTypeWrapper.swift b/Pods/Moya/Sources/Moya/RequestTypeWrapper.swift deleted file mode 100644 index 192310b4..00000000 --- a/Pods/Moya/Sources/Moya/RequestTypeWrapper.swift +++ /dev/null @@ -1,36 +0,0 @@ -import Foundation - -// Workaround for new asynchronous handling of Alamofire's request creation. -struct RequestTypeWrapper: RequestType { - - var request: URLRequest? { - return _urlRequest - } - - var sessionHeaders: [String: String] { - return _request.sessionHeaders - } - - private var _request: Request - private var _urlRequest: URLRequest? - - init(request: Request, urlRequest: URLRequest?) { - self._request = request - self._urlRequest = urlRequest - } - - func authenticate(username: String, password: String, persistence: URLCredential.Persistence) -> RequestTypeWrapper { - let newRequest = _request.authenticate(username: username, password: password, persistence: persistence) - return RequestTypeWrapper(request: newRequest, urlRequest: _urlRequest) - } - - func authenticate(with credential: URLCredential) -> RequestTypeWrapper { - let newRequest = _request.authenticate(with: credential) - return RequestTypeWrapper(request: newRequest, urlRequest: _urlRequest) - } - - func cURLDescription(calling handler: @escaping (String) -> Void) -> RequestTypeWrapper { - _request.cURLDescription(calling: handler) - return self - } -} diff --git a/Pods/Moya/Sources/Moya/Response.swift b/Pods/Moya/Sources/Moya/Response.swift deleted file mode 100644 index df338cc2..00000000 --- a/Pods/Moya/Sources/Moya/Response.swift +++ /dev/null @@ -1,192 +0,0 @@ -import Foundation - -/// Represents a response to a `MoyaProvider.request`. -public final class Response: CustomDebugStringConvertible, Equatable { - - /// The status code of the response. - public let statusCode: Int - - /// The response data. - public let data: Data - - /// The original URLRequest for the response. - public let request: URLRequest? - - /// The HTTPURLResponse object. - public let response: HTTPURLResponse? - - public init(statusCode: Int, data: Data, request: URLRequest? = nil, response: HTTPURLResponse? = nil) { - self.statusCode = statusCode - self.data = data - self.request = request - self.response = response - } - - /// A text description of the `Response`. - public var description: String { - return "Status Code: \(statusCode), Data Length: \(data.count)" - } - - /// A text description of the `Response`. Suitable for debugging. - public var debugDescription: String { - return description - } - - public static func == (lhs: Response, rhs: Response) -> Bool { - return lhs.statusCode == rhs.statusCode - && lhs.data == rhs.data - && lhs.response == rhs.response - } -} - -public extension Response { - - /** - Returns the `Response` if the `statusCode` falls within the specified range. - - - parameters: - - statusCodes: The range of acceptable status codes. - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filter(statusCodes: R) throws -> Response where R.Bound == Int { - guard statusCodes.contains(statusCode) else { - throw MoyaError.statusCode(self) - } - return self - } - - /** - Returns the `Response` if it has the specified `statusCode`. - - - parameters: - - statusCode: The acceptable status code. - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filter(statusCode: Int) throws -> Response { - return try filter(statusCodes: statusCode...statusCode) - } - - /** - Returns the `Response` if the `statusCode` falls within the range 200 - 299. - - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filterSuccessfulStatusCodes() throws -> Response { - return try filter(statusCodes: 200...299) - } - - /** - Returns the `Response` if the `statusCode` falls within the range 200 - 399. - - - throws: `MoyaError.statusCode` when others are encountered. - */ - func filterSuccessfulStatusAndRedirectCodes() throws -> Response { - return try filter(statusCodes: 200...399) - } - - /// Maps data received from the signal into an Image. - func mapImage() throws -> Image { - guard let image = Image(data: data) else { - throw MoyaError.imageMapping(self) - } - return image - } - - /// Maps data received from the signal into a JSON object. - /// - /// - parameter failsOnEmptyData: A Boolean value determining - /// whether the mapping should fail if the data is empty. - func mapJSON(failsOnEmptyData: Bool = true) throws -> Any { - do { - return try JSONSerialization.jsonObject(with: data, options: .allowFragments) - } catch { - if data.count < 1 && !failsOnEmptyData { - return NSNull() - } - throw MoyaError.jsonMapping(self) - } - } - - /// Maps data received from the signal into a String. - /// - /// - parameter atKeyPath: Optional key path at which to parse string. - func mapString(atKeyPath keyPath: String? = nil) throws -> String { - if let keyPath = keyPath { - // Key path was provided, try to parse string at key path - guard let jsonDictionary = try mapJSON() as? NSDictionary, - let string = jsonDictionary.value(forKeyPath: keyPath) as? String else { - throw MoyaError.stringMapping(self) - } - return string - } else { - // Key path was not provided, parse entire response as string - guard let string = String(data: data, encoding: .utf8) else { - throw MoyaError.stringMapping(self) - } - return string - } - } - - /// Maps data received from the signal into a Decodable object. - /// - /// - parameter atKeyPath: Optional key path at which to parse object. - /// - parameter using: A `JSONDecoder` instance which is used to decode data to an object. - func map(_ type: D.Type, atKeyPath keyPath: String? = nil, using decoder: JSONDecoder = JSONDecoder(), failsOnEmptyData: Bool = true) throws -> D { - let serializeToData: (Any) throws -> Data? = { (jsonObject) in - guard JSONSerialization.isValidJSONObject(jsonObject) else { - return nil - } - do { - return try JSONSerialization.data(withJSONObject: jsonObject) - } catch { - throw MoyaError.jsonMapping(self) - } - } - let jsonData: Data - keyPathCheck: if let keyPath = keyPath { - guard let jsonObject = (try mapJSON(failsOnEmptyData: failsOnEmptyData) as? NSDictionary)?.value(forKeyPath: keyPath) else { - if failsOnEmptyData { - throw MoyaError.jsonMapping(self) - } else { - jsonData = data - break keyPathCheck - } - } - - if let data = try serializeToData(jsonObject) { - jsonData = data - } else { - let wrappedJsonObject = ["value": jsonObject] - let wrappedJsonData: Data - if let data = try serializeToData(wrappedJsonObject) { - wrappedJsonData = data - } else { - throw MoyaError.jsonMapping(self) - } - do { - return try decoder.decode(DecodableWrapper.self, from: wrappedJsonData).value - } catch let error { - throw MoyaError.objectMapping(error, self) - } - } - } else { - jsonData = data - } - do { - if jsonData.count < 1 && !failsOnEmptyData { - if let emptyJSONObjectData = "{}".data(using: .utf8), let emptyDecodableValue = try? decoder.decode(D.self, from: emptyJSONObjectData) { - return emptyDecodableValue - } else if let emptyJSONArrayData = "[{}]".data(using: .utf8), let emptyDecodableValue = try? decoder.decode(D.self, from: emptyJSONArrayData) { - return emptyDecodableValue - } - } - return try decoder.decode(D.self, from: jsonData) - } catch let error { - throw MoyaError.objectMapping(error, self) - } - } -} - -private struct DecodableWrapper: Decodable { - let value: T -} diff --git a/Pods/Moya/Sources/Moya/TargetType.swift b/Pods/Moya/Sources/Moya/TargetType.swift deleted file mode 100644 index d2474912..00000000 --- a/Pods/Moya/Sources/Moya/TargetType.swift +++ /dev/null @@ -1,34 +0,0 @@ -import Foundation - -/// The protocol used to define the specifications necessary for a `MoyaProvider`. -public protocol TargetType { - - /// The target's base `URL`. - var baseURL: URL { get } - - /// The path to be appended to `baseURL` to form the full `URL`. - var path: String { get } - - /// The HTTP method used in the request. - var method: Moya.Method { get } - - /// Provides stub data for use in testing. - var sampleData: Data { get } - - /// The type of HTTP task to be performed. - var task: Task { get } - - /// The type of validation to perform on the request. Default is `.none`. - var validationType: ValidationType { get } - - /// The headers to be used in the request. - var headers: [String: String]? { get } -} - -public extension TargetType { - - /// The type of validation to perform on the request. Default is `.none`. - var validationType: ValidationType { - return .none - } -} diff --git a/Pods/Moya/Sources/Moya/Task.swift b/Pods/Moya/Sources/Moya/Task.swift deleted file mode 100644 index 191e2593..00000000 --- a/Pods/Moya/Sources/Moya/Task.swift +++ /dev/null @@ -1,41 +0,0 @@ -import Foundation - -/// Represents an HTTP task. -public enum Task { - - /// A request with no additional data. - case requestPlain - - /// A requests body set with data. - case requestData(Data) - - /// A request body set with `Encodable` type - case requestJSONEncodable(Encodable) - - /// A request body set with `Encodable` type and custom encoder - case requestCustomJSONEncodable(Encodable, encoder: JSONEncoder) - - /// A requests body set with encoded parameters. - case requestParameters(parameters: [String: Any], encoding: ParameterEncoding) - - /// A requests body set with data, combined with url parameters. - case requestCompositeData(bodyData: Data, urlParameters: [String: Any]) - - /// A requests body set with encoded parameters combined with url parameters. - case requestCompositeParameters(bodyParameters: [String: Any], bodyEncoding: ParameterEncoding, urlParameters: [String: Any]) - - /// A file upload task. - case uploadFile(URL) - - /// A "multipart/form-data" upload task. - case uploadMultipart([MultipartFormData]) - - /// A "multipart/form-data" upload task combined with url parameters. - case uploadCompositeMultipart([MultipartFormData], urlParameters: [String: Any]) - - /// A file download task to a destination. - case downloadDestination(DownloadDestination) - - /// A file download task to a destination with extra parameters using the given encoding. - case downloadParameters(parameters: [String: Any], encoding: ParameterEncoding, destination: DownloadDestination) -} diff --git a/Pods/Moya/Sources/Moya/URL+Moya.swift b/Pods/Moya/Sources/Moya/URL+Moya.swift deleted file mode 100644 index 0c1303c2..00000000 --- a/Pods/Moya/Sources/Moya/URL+Moya.swift +++ /dev/null @@ -1,17 +0,0 @@ -import Foundation - -public extension URL { - - /// Initialize URL from Moya's `TargetType`. - init(target: T) { - // When a TargetType's path is empty, URL.appendingPathComponent may introduce trailing /, which may not be wanted in some cases - // See: https://github.com/Moya/Moya/pull/1053 - // And: https://github.com/Moya/Moya/issues/1049 - let targetPath = target.path - if targetPath.isEmpty { - self = target.baseURL - } else { - self = target.baseURL.appendingPathComponent(targetPath) - } - } -} diff --git a/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift b/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift deleted file mode 100644 index 232d86df..00000000 --- a/Pods/Moya/Sources/Moya/URLRequest+Encoding.swift +++ /dev/null @@ -1,28 +0,0 @@ -import Foundation - -internal extension URLRequest { - - mutating func encoded(encodable: Encodable, encoder: JSONEncoder = JSONEncoder()) throws -> URLRequest { - do { - let encodable = AnyEncodable(encodable) - httpBody = try encoder.encode(encodable) - - let contentTypeHeaderName = "Content-Type" - if value(forHTTPHeaderField: contentTypeHeaderName) == nil { - setValue("application/json", forHTTPHeaderField: contentTypeHeaderName) - } - - return self - } catch { - throw MoyaError.encodableMapping(error) - } - } - - func encoded(parameters: [String: Any], parameterEncoding: ParameterEncoding) throws -> URLRequest { - do { - return try parameterEncoding.encode(self, with: parameters) - } catch { - throw MoyaError.parameterEncoding(error) - } - } -} diff --git a/Pods/Moya/Sources/Moya/ValidationType.swift b/Pods/Moya/Sources/Moya/ValidationType.swift deleted file mode 100644 index ffc8d8f2..00000000 --- a/Pods/Moya/Sources/Moya/ValidationType.swift +++ /dev/null @@ -1,47 +0,0 @@ -import Foundation - -/// Represents the status codes to validate through Alamofire. -public enum ValidationType { - - /// No validation. - case none - - /// Validate success codes (only 2xx). - case successCodes - - /// Validate success codes and redirection codes (only 2xx and 3xx). - case successAndRedirectCodes - - /// Validate only the given status codes. - case customCodes([Int]) - - /// The list of HTTP status codes to validate. - var statusCodes: [Int] { - switch self { - case .successCodes: - return Array(200..<300) - case .successAndRedirectCodes: - return Array(200..<400) - case .customCodes(let codes): - return codes - case .none: - return [] - } - } -} - -extension ValidationType: Equatable { - - public static func == (lhs: ValidationType, rhs: ValidationType) -> Bool { - switch (lhs, rhs) { - case (.none, .none), - (.successCodes, .successCodes), - (.successAndRedirectCodes, .successAndRedirectCodes): - return true - case (.customCodes(let code1), .customCodes(let code2)): - return code1 == code2 - default: - return false - } - } -} diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index cbce1a1c..00000000 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1482 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXAggregateTarget section */ - 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */ = { - isa = PBXAggregateTarget; - buildConfigurationList = AE7B4FB01588B9E6DF09CB79FC7CE7BD /* Build configuration list for PBXAggregateTarget "SwiftLint" */; - buildPhases = ( - ); - dependencies = ( - ); - name = SwiftLint; - productName = SwiftLint; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 013BAC24F7AC722E59517CB110A9E685 /* HTTPMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 397907930B4FDB41999E645E9806255A /* HTTPMethod.swift */; }; - 01FEF30F6CF1A002DE5DA785CD28393D /* CALayer+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1716A32932B2416E7D4F968B748286C /* CALayer+Extensions.swift */; }; - 02EA3013E5947ED2EA63D18AEAEB802D /* Plugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1350BF8E7F51B75E3E7C9D400C585E6E /* Plugin.swift */; }; - 07FC2ADF722D80878095CDCBD927BC67 /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC4D12747948DCAF12E6C68273258C02 /* UIView+Extension.swift */; }; - 0995E3E9A52AFB6D9801ABB039FA8963 /* Recoverable.swift in Sources */ = {isa = PBXBuildFile; fileRef = FECA17748A10EA36F78E6C9C4DBB7852 /* Recoverable.swift */; }; - 0A1849775CF90D514963187D3A771CF8 /* Combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDDCAA76895966401577B068B5054590 /* Combine.swift */; }; - 0A900DF17E3B64F08AF673E9A0DDD697 /* OperationQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFB212A62855A85FADDB51462C234823 /* OperationQueue+Alamofire.swift */; }; - 1208E81DA8B532D0646D627B50290EB6 /* AFError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 718C3634AB07577042971F4EAE51AD03 /* AFError.swift */; }; - 173959124053EB4256FC64AD38DAC521 /* URL+Moya.swift in Sources */ = {isa = PBXBuildFile; fileRef = C58845975681DBD24FE4AE87DDCB1A3A /* URL+Moya.swift */; }; - 19D605A3233499828FB6B790869F3E9C /* NetworkReachabilityManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EFDB9D88C53581BD5C716FA97DA8EE4 /* NetworkReachabilityManager.swift */; }; - 1E11499FB66A92D1AE5E1F68CFCA41E6 /* RecursiveProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAB40232ED5B03B7240CEDCCE79F254 /* RecursiveProtocol.swift */; }; - 212EDC48B68107BEA9247F3464CE696E /* StringEncoding+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 616D06CB9C908C04173CE56236051BED /* StringEncoding+Alamofire.swift */; }; - 218C14EAE5AA31C30314AE0289B732A0 /* Protected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5ED8907A751F8AED5A2BC68BB3CB5003 /* Protected.swift */; }; - 225C81AF7B10A0E5F149AFD253FACA69 /* Moya-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = C3B120C98B829BEC318B0DDD7A1BC0B8 /* Moya-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 22EA0B74EE7190BBD94DAB298901DB11 /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18D790014D71812A27D8ED73FEF1EAAD /* MultipartFormData.swift */; }; - 27E59A11A2743B0595CDE3A08675EAE1 /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C93BED9460F38FD4DE5DD56E4D88742 /* DispatchQueue+Alamofire.swift */; }; - 2BFD4AA3D5BDC25F2E442B897E74B528 /* UILabel+Multiline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AB572AB38108B6CBB8698A7307A0D13 /* UILabel+Multiline.swift */; }; - 31F8B6897895035B807AE752FD933784 /* URLRequest+Encoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC2124C1A4873FE3626A425504F760E9 /* URLRequest+Encoding.swift */; }; - 320066283ACE51DA1282CBAF395D5977 /* SkeletonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 487FE73A8B5E7153BBDEE2EB7227C33E /* SkeletonView.swift */; }; - 330CABED0FC3EEDA02B09774D72E2472 /* RequestTypeWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A43B71B2FA9A20C24AFF7979C32EA61 /* RequestTypeWrapper.swift */; }; - 3606501F67419009E29D78CBFDC9ADC5 /* UICollectionView+CollectionSkeleton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FA6AC8D85A12F6977844631094C632 /* UICollectionView+CollectionSkeleton.swift */; }; - 3769F7577102C14C3591A59E730F506B /* UIView+Frame.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC6EFFF96DABD89D995DEA49843B39D /* UIView+Frame.swift */; }; - 381FF05F8B4F611EE9C2FDBE4457BB89 /* SessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 724BED3296509F797B5A45B2EE60281B /* SessionDelegate.swift */; }; - 3D75A9668E22EFC34CC72446A43806F0 /* UIView+UIApplicationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F070D00AB51F5B6250A8FC565325C83 /* UIView+UIApplicationDelegate.swift */; }; - 3D9BAF7BB8F6997DCF84BE270414B390 /* SkeletonGradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 071719E0F77DE7CAC5E3EE1E74812F1E /* SkeletonGradient.swift */; }; - 3DB366A803B0BE7848E93E9BB6B9500B /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0FF301302A2A77E95697F2B5692FA5E /* Alamofire.framework */; }; - 435BE404918D9422CD81EE41CC59494B /* SkeletonAnimationBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF14EDA4ADBABAC4537C2B7E9B44D5DA /* SkeletonAnimationBuilder.swift */; }; - 45B8CC1C61E7A0BB28CFA8CE7C12FEBC /* MultipartFormData.swift in Sources */ = {isa = PBXBuildFile; fileRef = B99201A0D7A3DD9DABCB92F149AD7A38 /* MultipartFormData.swift */; }; - 46B19592113934CCE9D240A9D6CA74D6 /* UIView+Transitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 665878DD26B0FCF5EB1DFB6D4A0D0722 /* UIView+Transitions.swift */; }; - 476D5F33E25386C60D6BD75C4FA97C67 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC44BC108255F6766BF5383BF088F46 /* Foundation.framework */; }; - 47FDBBBD2704901588C3A7C56BBC502D /* ServerTrustEvaluation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6F9264FC36066749790F3CC6D1FFEB9 /* ServerTrustEvaluation.swift */; }; - 48894B3EEDB9AFF70DB143648F9FAC63 /* Endpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF614ED0ED0DE7D66CB489FE4A68D628 /* Endpoint.swift */; }; - 48E765CDF02ABC4CBDBCEA7BC25D0743 /* SkeletonCollectionDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08151C6FBD44A3EC9FDFD1EE2F5EA1B4 /* SkeletonCollectionDataSource.swift */; }; - 4A3689BF00171A24F0A3C741F43033A9 /* SkeletonCollectionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CA0084953DFA5E14884A39CD47F46CB /* SkeletonCollectionDelegate.swift */; }; - 4AEC050FA7D5ED52FDA9DF50EA3560DF /* ParameterEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 546322D24AF6B0D28131B3ED2271E33C /* ParameterEncoder.swift */; }; - 4C67202604DBF149C8D99AFA89CDC247 /* SkeletonMultilineLayerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51C8538F724CCE218848729822212B95 /* SkeletonMultilineLayerBuilder.swift */; }; - 505DEC94E1FD88DD055D6542084D9973 /* SkeletonCollectionViewProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE71E942C120FCDA4983D5E5DBA2E01D /* SkeletonCollectionViewProtocols.swift */; }; - 508783EF3077382F85362930BA87EBFE /* MoyaError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D42ADD192C9C2A13814ED7862535EE91 /* MoyaError.swift */; }; - 522DB7B1FE8A14E82A35602C06303223 /* MoyaProvider+Internal.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCFCC5019F0A476DDA3C118E87FE29EA /* MoyaProvider+Internal.swift */; }; - 5454E93424F5DBBED188F26D7357317A /* Int+Whitespaces.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E613E7215F504969C899663EB28D9B3 /* Int+Whitespaces.swift */; }; - 599D1E6464DDED0DAAF45680E7C51EC5 /* NetworkActivityPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6BBE5387383F80AA78DE92CB46BB3C5 /* NetworkActivityPlugin.swift */; }; - 59E90FCB9AA180761439B1A0E43CC41A /* UITextView+Multiline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51750FEA4D400B1028E65505B5CD83FB /* UITextView+Multiline.swift */; }; - 5E13589E564DF35414E2D26F0D25B1F6 /* MultiTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA92B567A44285085934D5C496010D1C /* MultiTarget.swift */; }; - 603B8F08C54290B3EBD0F6EBCFCF2893 /* Swizzling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F208C2FBF4981B0D494DAC025025A5E /* Swizzling.swift */; }; - 6546D728B69398F93B506845141EBD61 /* EventMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5599709DA09B573AC784166D9BCCC0 /* EventMonitor.swift */; }; - 6651DE8BD5F1653C466C9CE4ED57568B /* ValidationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B42DB1CAB94FA4625078ADA35C9B748 /* ValidationType.swift */; }; - 666EC5C8356E6D4448A2FE7BEE77AD88 /* RedirectHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53385EA7EE3F65969AE2FC534FF724CF /* RedirectHandler.swift */; }; - 66B26C6CAE737EC21F4BA1F1851B69C5 /* Result+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = F57AD2FF8390132004D8A467DD0B9747 /* Result+Alamofire.swift */; }; - 6AE407A4FB6C3D6ADD862CC6E3067A17 /* Session.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69FF8592EB8CB327996FBABDC2B6E58D /* Session.swift */; }; - 6C08F6A77889651626583100F560153D /* RequestTaskMap.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2E8C44E2CEEF431E0AB5677127573F3 /* RequestTaskMap.swift */; }; - 6D3E5469839411AA3296E219167E9AAB /* SkeletonLayerBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F644E97A5871F851B6B34D59507CC45 /* SkeletonLayerBuilder.swift */; }; - 6E54F64E8DA73F4B0B46C216F9F93F63 /* RequestInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = B63B0E41362667BF5CA513C1AA88BEF0 /* RequestInterceptor.swift */; }; - 6E69092C92AF304383640614CE7F6B19 /* UIColor+Skeleton.swift in Sources */ = {isa = PBXBuildFile; fileRef = D992A03E39DC80FD477E320DC1324746 /* UIColor+Skeleton.swift */; }; - 7042121E5596C3258681A38843F44BA6 /* UIView+IBInspectable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62B3ECC720C8664A77BE074962F3342D /* UIView+IBInspectable.swift */; }; - 707CDC3C1F97310FE8D35B06D7697C26 /* SkeletonView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FC4814FDA9CB67B7D52B021B0BC7C62 /* SkeletonView-dummy.m */; }; - 70E5E9B6E8EBF205A502B8F32F18FB6E /* AssociationPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = E76B63BE155497B9A1C4EFD18EA6790A /* AssociationPolicy.swift */; }; - 72EC2712926E6D28B52360D9AC41668F /* AlamofireExtended.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E1F04AE2A1C674900D6CB363E5F4356 /* AlamofireExtended.swift */; }; - 72FB1F829DAA1BF28C84D67D603F33CE /* SkeletonLayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C956FFE8C2663EFFBFADED36F2428B6B /* SkeletonLayer.swift */; }; - 74A86BEF20B34699FD2F43A78DC8AF09 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC44BC108255F6766BF5383BF088F46 /* Foundation.framework */; }; - 74B47F84109C44A13D5A90A0751D195C /* Cancellable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 884BF147F42332B8B2D3D6666FDC3ECF /* Cancellable.swift */; }; - 7797EFE4F02AE03874050CD9B5FBB9E0 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94A9DD6F72C5899F6B86C18AE7AEF48A /* Response.swift */; }; - 7CE0911040FB99158182B6131E9BA60A /* MoyaProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC0E177E1F76CAF9C807BE95B04C0EB /* MoyaProvider.swift */; }; - 7D3DD4A8BB36733BA15868F7FB8C56CE /* Alamofire-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F390E7693ACA4F9383FFD1B5B20F01F /* Alamofire-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7FD95ABE3D7DBE42A5691B4A79389507 /* SkeletonFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2E6CBE226A1BE31603130E1E6198A4F /* SkeletonFlow.swift */; }; - 81BC0C6162FEE7F0EE45B1D6267330F5 /* SkeletonAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = B184CBDFDD43F73204FAF8F62B5F42D3 /* SkeletonAppearance.swift */; }; - 848FEA1EBB3D8ADF961000FF5AD1AABD /* RecoverableViewState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7276D4F36F13957421432246F6356FF3 /* RecoverableViewState.swift */; }; - 8AA937910F87915DE700CAB6C868689E /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2155D5EDB1A0137925E2C4E1E5B6B092 /* Notifications.swift */; }; - 8B4697A5ADBE7B6680E81E334D6753B2 /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01DE72FE53D92AC679F52B0CCA8BCACA /* NetworkLoggerPlugin.swift */; }; - 901BD3E04F3B57CC77D00B566B087400 /* UIView+CollectionSkeleton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86BD9634C63C356F1C1F5F8761E35222 /* UIView+CollectionSkeleton.swift */; }; - 9025F283B182AD7FD66B4F3BD1D52747 /* ContainsMultilineText.swift in Sources */ = {isa = PBXBuildFile; fileRef = C64E0C33ADEF187B01D734027594762A /* ContainsMultilineText.swift */; }; - 911448B2EDA2FF880108F77642797A88 /* ResponseSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CA266CA3A7A69D108C94746F3D5A34B /* ResponseSerialization.swift */; }; - 913AF10026C423A68E44620C29E5D2C9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC44BC108255F6766BF5383BF088F46 /* Foundation.framework */; }; - 91B837CE0DCD8EDB300FCDFFA1279162 /* HTTPHeaders.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E033DB72569B397707FC20BF3E4298 /* HTTPHeaders.swift */; }; - 9558C251165A9B17B3EBE2778ABAD04E /* Moya-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A16D84A3F92D6BCDC100323BC16AE8 /* Moya-dummy.m */; }; - 9A412A17A20B32F4DA6541A9690435DD /* TargetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0506E9B85EDACC5AE6A91787D31C7821 /* TargetType.swift */; }; - 9AA8337991A99D52AB4909F797F29319 /* MoyaProvider+Defaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1765B6DC08154DD77AE8E0ED8A68C34 /* MoyaProvider+Defaults.swift */; }; - 9B1D8A7798D8A6F518FC9AF9725431D0 /* URLConvertible+URLRequestConvertible.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94D9CCF22EDA50711103B0A8BF579014 /* URLConvertible+URLRequestConvertible.swift */; }; - 9B8F8D53D20BCCEAF53D12748D6FD531 /* UITableView+VisibleSections.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80EBB1F1271B7BADA6727D52DF2E16C /* UITableView+VisibleSections.swift */; }; - 9FED70D1E1FBFB80E974E999EF732258 /* RetryPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E63E2A36C373FB71A5AB9D9C0D00911 /* RetryPolicy.swift */; }; - A396FE0752A639E9274F640BF26F2A35 /* UITableView+CollectionSkeleton.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2F6CB286898E799926984D47C0C945B /* UITableView+CollectionSkeleton.swift */; }; - A67B68E7C029F70B0B8B0B201FC99C25 /* SkeletonView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D70C3BE02BF56A01AD7EE3D6B263945 /* SkeletonView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A9C7B29D4878F1690BBE3F8195CF0313 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1615E1FA68C09F9971FB26DF9B7D2BC /* CFNetwork.framework */; }; - AAC431B9EA605017153223586D0F63F6 /* AnyEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF7002D4F6C1714E77D4E1193386DE5 /* AnyEncodable.swift */; }; - ABA85887A41495358C83CE3F3030EDEA /* CachedResponseHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A3C0A84F5064A73A115F29F29EC84D6 /* CachedResponseHandler.swift */; }; - B23D398A673EB37907E01285D442C11B /* Pods-NADA-iOS-forRelease-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E90C6981AB7A1F39F209C09BB075374B /* Pods-NADA-iOS-forRelease-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B54EAAF9370E03F80E227C73141D487D /* CollectionSkeletonProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2508D084B43CA00BFF2FF3A5EBE6CFC /* CollectionSkeletonProtocol.swift */; }; - B75DDFBA4563633B823C8874C892482F /* PrepareForSkeletonProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85ACD9C1FB434598A36C8827D6692C9A /* PrepareForSkeletonProtocol.swift */; }; - BC9CCA7BB1EBCD10CB4A8AC67D7CD09D /* SubviewsSkeletonables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D8B000761B5D1096BDE9A6E11CC2A3 /* SubviewsSkeletonables.swift */; }; - BCA074BFC1E5CE7479B638F1BDF96B1E /* UIView+Autolayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69688D9AB671AD778F478842C27031D1 /* UIView+Autolayout.swift */; }; - BF16F08F7FBB7FEBFE27169B2DAED114 /* SkeletonTransitionStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A7E766E8075483B3F5E94903D6317AD /* SkeletonTransitionStyle.swift */; }; - BF35ED4A558BEC06D6A176C76129A4DD /* Moya+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = B71D7C68B8F3D65BEF9D07D312C46B33 /* Moya+Alamofire.swift */; }; - C0E740F8A83F7563F9265995778754E4 /* Pods-NADA-iOS-forRelease-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 36D03C2EF9C9F318F0B763F10E20A245 /* Pods-NADA-iOS-forRelease-dummy.m */; }; - C1C5B050B55C15103ABC81769551A283 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EB6619B85D17EBBBC88AD28A8703D80 /* Response.swift */; }; - C1D4716773A0DC8B18C351CE34E4F2C5 /* SkeletonTableViewProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9068E4D69943CD1A29C4A2BA5B433963 /* SkeletonTableViewProtocols.swift */; }; - C1F1DB6A9CBDE584D09BA1613AAD4F9D /* Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8ECAA70F3C032E3F9AF1B807E74D3B19 /* Alamofire.swift */; }; - C6D5A4B4028B2C43380C9FA58BD5C8CA /* Alamofire-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FBE92EA869D026AF0D4FF24E4ADB197 /* Alamofire-dummy.m */; }; - D00994BD11CDA991205AB64A685EED51 /* ProcessInfo+XCTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81C930D9B90E915C35F715E97E2DEFB9 /* ProcessInfo+XCTest.swift */; }; - D03F1F02DE8606E6057D57866611BEBF /* MultipartUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335A01EF0C72ECA18EFD96EAED7E5AB7 /* MultipartUpload.swift */; }; - D14066FAE94E304798E43651E5886D13 /* ParameterEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87F4F0F5E3EC8BB3B76CD08A584EBB83 /* ParameterEncoding.swift */; }; - D31FC7FDD450C4CDD633ECBAD27C6221 /* URLEncodedFormEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B698C2A46F6DAB6906470E8B4CBD19FF /* URLEncodedFormEncoder.swift */; }; - D5D1C997D9BCFBAC5ADE265762AEB6DF /* SkeletonReusableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 796623311DE94C2FE96BF451BA6E7FD9 /* SkeletonReusableCell.swift */; }; - D5EAAFB6FAD77A8F0699345149BA3CBB /* URLRequest+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5D8700F8FD01B1E0645E5E71F9B320D /* URLRequest+Alamofire.swift */; }; - DC627AFC5B585686898B014184AFCABD /* AuthenticationInterceptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2759B28423AAE54CFBD435E3AD54799A /* AuthenticationInterceptor.swift */; }; - DF7DDB302D2AD98DC36049179CFCEF08 /* SkeletonDebug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DBBEEB136F6A4D6406C08C99C691C93 /* SkeletonDebug.swift */; }; - E7ECC9D6F7370CE2339986E929006DC5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC44BC108255F6766BF5383BF088F46 /* Foundation.framework */; }; - EA72CC2DB9B653E1BA2DA123FF56C3BE /* CredentialsPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B4B3A39AD1DBE72B637495D047346E4 /* CredentialsPlugin.swift */; }; - EDC93BD7B9262119AE145E4C7A9D0212 /* Request.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D3053DC2FCE133E0377C7D4F065773 /* Request.swift */; }; - EECFAE6E50A1472E0E724B4C7240C0D0 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9A45C95D4F6EF1ADF5A8BEC432BCC3 /* Image.swift */; }; - F0F3224FF592F9BA2A044A2FC2BD4CCD /* Validation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 834CA758DB3661054357D5D233F8AFB1 /* Validation.swift */; }; - F318B9CAD0AE436906C5C809FAD01667 /* SkeletonConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D9CE072381B98F1DC8E3F914C7498A7 /* SkeletonConfig.swift */; }; - F36726220F4B923ACE3B8C58A2663428 /* Task.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47DDAD50AB7CCB6BF8EBA3DB8F8C64E7 /* Task.swift */; }; - F70EF854395CDE981A8336E4FF0310FE /* URLSessionConfiguration+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0308E81166FE5027630AD8EBDDBF23D9 /* URLSessionConfiguration+Alamofire.swift */; }; - F822D891CB3C55D332B7216047E3585F /* GenericCollectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE9F3659569AB8820BC1BBF713DB7A60 /* GenericCollectionView.swift */; }; - F965B8DF95392AE5AFB69A758F2328C0 /* AccessTokenPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 542BC752CEFA4A06F870A4E2A49C0B93 /* AccessTokenPlugin.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 06E69A6B3FF5BB145F2C7BB885087654 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 17F9141D333DA1A7BE5937F227221070; - remoteInfo = Moya; - }; - 4C03BE4337723B2ADA04A9654A843FB5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 52B60EC2A583F24ACBB69C113F5488B9; - remoteInfo = SwiftLint; - }; - 4C048BAD1551487470801B891F6BE675 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; - }; - 783225E73273DE80AD8F9C1D7232347A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 8CEEFD1CB630CA790F0396E2E24A4C8C; - remoteInfo = SkeletonView; - }; - 99D1B18C3F5E0308857E9AB04354F018 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = EAAA1AD3A8A1B59AB91319EE40752C6D; - remoteInfo = Alamofire; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 008C6D8CB7402A3B653D57AC3F209AC0 /* Alamofire.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.release.xcconfig; sourceTree = ""; }; - 01AFB4E8DE15F53ED959EE971F77A886 /* SwiftLint.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.release.xcconfig; sourceTree = ""; }; - 01DE72FE53D92AC679F52B0CCA8BCACA /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkLoggerPlugin.swift; path = Sources/Moya/Plugins/NetworkLoggerPlugin.swift; sourceTree = ""; }; - 0308E81166FE5027630AD8EBDDBF23D9 /* URLSessionConfiguration+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLSessionConfiguration+Alamofire.swift"; path = "Source/URLSessionConfiguration+Alamofire.swift"; sourceTree = ""; }; - 0506E9B85EDACC5AE6A91787D31C7821 /* TargetType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TargetType.swift; path = Sources/Moya/TargetType.swift; sourceTree = ""; }; - 071719E0F77DE7CAC5E3EE1E74812F1E /* SkeletonGradient.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonGradient.swift; path = Sources/SkeletonGradient.swift; sourceTree = ""; }; - 08151C6FBD44A3EC9FDFD1EE2F5EA1B4 /* SkeletonCollectionDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonCollectionDataSource.swift; path = Sources/Collections/SkeletonCollectionDataSource.swift; sourceTree = ""; }; - 0942A7198FFB33B3F13B9BF3E2D271ED /* SwiftLint.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftLint.debug.xcconfig; sourceTree = ""; }; - 0B42DB1CAB94FA4625078ADA35C9B748 /* ValidationType.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ValidationType.swift; path = Sources/Moya/ValidationType.swift; sourceTree = ""; }; - 0CF7002D4F6C1714E77D4E1193386DE5 /* AnyEncodable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnyEncodable.swift; path = Sources/Moya/AnyEncodable.swift; sourceTree = ""; }; - 0D9CE072381B98F1DC8E3F914C7498A7 /* SkeletonConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonConfig.swift; path = Sources/SkeletonConfig.swift; sourceTree = ""; }; - 0E63E2A36C373FB71A5AB9D9C0D00911 /* RetryPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RetryPolicy.swift; path = Source/RetryPolicy.swift; sourceTree = ""; }; - 0EFDB9D88C53581BD5C716FA97DA8EE4 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkReachabilityManager.swift; path = Source/NetworkReachabilityManager.swift; sourceTree = ""; }; - 0F644E97A5871F851B6B34D59507CC45 /* SkeletonLayerBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonLayerBuilder.swift; path = Sources/Builders/SkeletonLayerBuilder.swift; sourceTree = ""; }; - 12E5A6A506752A0961C3C9EA1DA4FB15 /* Pods-NADA-iOS-forRelease-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-NADA-iOS-forRelease-frameworks.sh"; sourceTree = ""; }; - 1350BF8E7F51B75E3E7C9D400C585E6E /* Plugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Plugin.swift; path = Sources/Moya/Plugin.swift; sourceTree = ""; }; - 18D790014D71812A27D8ED73FEF1EAAD /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Sources/Moya/MultipartFormData.swift; sourceTree = ""; }; - 1AC44BC108255F6766BF5383BF088F46 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 1E1F04AE2A1C674900D6CB363E5F4356 /* AlamofireExtended.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireExtended.swift; path = Source/AlamofireExtended.swift; sourceTree = ""; }; - 1FAB40232ED5B03B7240CEDCCE79F254 /* RecursiveProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecursiveProtocol.swift; path = Sources/Helpers/RecursiveProtocol.swift; sourceTree = ""; }; - 2155D5EDB1A0137925E2C4E1E5B6B092 /* Notifications.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Notifications.swift; path = Source/Notifications.swift; sourceTree = ""; }; - 2210E8F68B83B00DEA18F335FDCBCF71 /* Pods-NADA-iOS-forRelease-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-NADA-iOS-forRelease-Info.plist"; sourceTree = ""; }; - 2759B28423AAE54CFBD435E3AD54799A /* AuthenticationInterceptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AuthenticationInterceptor.swift; path = Source/AuthenticationInterceptor.swift; sourceTree = ""; }; - 27D3053DC2FCE133E0377C7D4F065773 /* Request.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Request.swift; path = Source/Request.swift; sourceTree = ""; }; - 2CB5F75C2C79B1E1AB2C3FE089150B5C /* Alamofire.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.debug.xcconfig; sourceTree = ""; }; - 2F390E7693ACA4F9383FFD1B5B20F01F /* Alamofire-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-umbrella.h"; sourceTree = ""; }; - 335A01EF0C72ECA18EFD96EAED7E5AB7 /* MultipartUpload.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartUpload.swift; path = Source/MultipartUpload.swift; sourceTree = ""; }; - 33B234B685EFB2438F6841A56FBAED3C /* Moya-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-prefix.pch"; sourceTree = ""; }; - 34A16D84A3F92D6BCDC100323BC16AE8 /* Moya-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Moya-dummy.m"; sourceTree = ""; }; - 34E033DB72569B397707FC20BF3E4298 /* HTTPHeaders.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPHeaders.swift; path = Source/HTTPHeaders.swift; sourceTree = ""; }; - 36D03C2EF9C9F318F0B763F10E20A245 /* Pods-NADA-iOS-forRelease-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-NADA-iOS-forRelease-dummy.m"; sourceTree = ""; }; - 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Moya.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 397907930B4FDB41999E645E9806255A /* HTTPMethod.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HTTPMethod.swift; path = Source/HTTPMethod.swift; sourceTree = ""; }; - 3CA266CA3A7A69D108C94746F3D5A34B /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = ""; }; - 420E35C3FCBD48BED7CAC20D5A22E981 /* Pods-NADA-iOS-forRelease.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-NADA-iOS-forRelease.release.xcconfig"; sourceTree = ""; }; - 46D8B000761B5D1096BDE9A6E11CC2A3 /* SubviewsSkeletonables.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubviewsSkeletonables.swift; path = Sources/SubviewsSkeletonables.swift; sourceTree = ""; }; - 47DDAD50AB7CCB6BF8EBA3DB8F8C64E7 /* Task.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Task.swift; path = Sources/Moya/Task.swift; sourceTree = ""; }; - 487FE73A8B5E7153BBDEE2EB7227C33E /* SkeletonView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonView.swift; path = Sources/SkeletonView.swift; sourceTree = ""; }; - 48BC2265DC376A73D756CE1B2B77306C /* Moya-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Moya-Info.plist"; sourceTree = ""; }; - 4A3C0A84F5064A73A115F29F29EC84D6 /* CachedResponseHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CachedResponseHandler.swift; path = Source/CachedResponseHandler.swift; sourceTree = ""; }; - 4D70C3BE02BF56A01AD7EE3D6B263945 /* SkeletonView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SkeletonView-umbrella.h"; sourceTree = ""; }; - 4F070D00AB51F5B6250A8FC565325C83 /* UIView+UIApplicationDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+UIApplicationDelegate.swift"; path = "Sources/Extensions/UIView+UIApplicationDelegate.swift"; sourceTree = ""; }; - 4FC4814FDA9CB67B7D52B021B0BC7C62 /* SkeletonView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SkeletonView-dummy.m"; sourceTree = ""; }; - 51750FEA4D400B1028E65505B5CD83FB /* UITextView+Multiline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITextView+Multiline.swift"; path = "Sources/Multilines/UITextView+Multiline.swift"; sourceTree = ""; }; - 5183F64F0CB82B2049B97A16612CA752 /* Pods_NADA_iOS_forRelease.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NADA_iOS_forRelease.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 51C8538F724CCE218848729822212B95 /* SkeletonMultilineLayerBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonMultilineLayerBuilder.swift; path = Sources/Builders/SkeletonMultilineLayerBuilder.swift; sourceTree = ""; }; - 52FA6AC8D85A12F6977844631094C632 /* UICollectionView+CollectionSkeleton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UICollectionView+CollectionSkeleton.swift"; path = "Sources/Collections/CollectionViews/UICollectionView+CollectionSkeleton.swift"; sourceTree = ""; }; - 53385EA7EE3F65969AE2FC534FF724CF /* RedirectHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RedirectHandler.swift; path = Source/RedirectHandler.swift; sourceTree = ""; }; - 542BC752CEFA4A06F870A4E2A49C0B93 /* AccessTokenPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AccessTokenPlugin.swift; path = Sources/Moya/Plugins/AccessTokenPlugin.swift; sourceTree = ""; }; - 546322D24AF6B0D28131B3ED2271E33C /* ParameterEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoder.swift; path = Source/ParameterEncoder.swift; sourceTree = ""; }; - 556FB634D740B22835DF52A0D987DDD6 /* Alamofire-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Alamofire-prefix.pch"; sourceTree = ""; }; - 5A7E766E8075483B3F5E94903D6317AD /* SkeletonTransitionStyle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonTransitionStyle.swift; path = Sources/Transitions/SkeletonTransitionStyle.swift; sourceTree = ""; }; - 5B4B3A39AD1DBE72B637495D047346E4 /* CredentialsPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CredentialsPlugin.swift; path = Sources/Moya/Plugins/CredentialsPlugin.swift; sourceTree = ""; }; - 5C57111ECFEC8037A512447C17843C43 /* Pods-NADA-iOS-forRelease-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-NADA-iOS-forRelease-acknowledgements.plist"; sourceTree = ""; }; - 5D228912AC368755752AA3FAA2515F4C /* Alamofire-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Alamofire-Info.plist"; sourceTree = ""; }; - 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5E77B546F8ABDDE70861710F6482E2A1 /* Pods-NADA-iOS-forRelease.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-NADA-iOS-forRelease.debug.xcconfig"; sourceTree = ""; }; - 5ED8907A751F8AED5A2BC68BB3CB5003 /* Protected.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Protected.swift; path = Source/Protected.swift; sourceTree = ""; }; - 616D06CB9C908C04173CE56236051BED /* StringEncoding+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "StringEncoding+Alamofire.swift"; path = "Source/StringEncoding+Alamofire.swift"; sourceTree = ""; }; - 62B3ECC720C8664A77BE074962F3342D /* UIView+IBInspectable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+IBInspectable.swift"; path = "Sources/Extensions/UIView+IBInspectable.swift"; sourceTree = ""; }; - 665878DD26B0FCF5EB1DFB6D4A0D0722 /* UIView+Transitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Transitions.swift"; path = "Sources/Transitions/UIView+Transitions.swift"; sourceTree = ""; }; - 69688D9AB671AD778F478842C27031D1 /* UIView+Autolayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Autolayout.swift"; path = "Sources/Extensions/UIView+Autolayout.swift"; sourceTree = ""; }; - 69FF8592EB8CB327996FBABDC2B6E58D /* Session.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Session.swift; path = Source/Session.swift; sourceTree = ""; }; - 6A43B71B2FA9A20C24AFF7979C32EA61 /* RequestTypeWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTypeWrapper.swift; path = Sources/Moya/RequestTypeWrapper.swift; sourceTree = ""; }; - 6C93BED9460F38FD4DE5DD56E4D88742 /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Alamofire.swift"; path = "Source/DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 6CC0E177E1F76CAF9C807BE95B04C0EB /* MoyaProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaProvider.swift; path = Sources/Moya/MoyaProvider.swift; sourceTree = ""; }; - 6F9A45C95D4F6EF1ADF5A8BEC432BCC3 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Moya/Image.swift; sourceTree = ""; }; - 718C3634AB07577042971F4EAE51AD03 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = ""; }; - 724BED3296509F797B5A45B2EE60281B /* SessionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionDelegate.swift; path = Source/SessionDelegate.swift; sourceTree = ""; }; - 7276D4F36F13957421432246F6356FF3 /* RecoverableViewState.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RecoverableViewState.swift; path = Sources/Recoverable/RecoverableViewState.swift; sourceTree = ""; }; - 796623311DE94C2FE96BF451BA6E7FD9 /* SkeletonReusableCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonReusableCell.swift; path = Sources/Collections/Generics/SkeletonReusableCell.swift; sourceTree = ""; }; - 7CA0084953DFA5E14884A39CD47F46CB /* SkeletonCollectionDelegate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonCollectionDelegate.swift; path = Sources/Collections/SkeletonCollectionDelegate.swift; sourceTree = ""; }; - 7E613E7215F504969C899663EB28D9B3 /* Int+Whitespaces.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Int+Whitespaces.swift"; path = "Sources/Extensions/Int+Whitespaces.swift"; sourceTree = ""; }; - 81C930D9B90E915C35F715E97E2DEFB9 /* ProcessInfo+XCTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ProcessInfo+XCTest.swift"; path = "Sources/Extensions/ProcessInfo+XCTest.swift"; sourceTree = ""; }; - 834CA758DB3661054357D5D233F8AFB1 /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = ""; }; - 85ACD9C1FB434598A36C8827D6692C9A /* PrepareForSkeletonProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PrepareForSkeletonProtocol.swift; path = Sources/Helpers/PrepareForSkeletonProtocol.swift; sourceTree = ""; }; - 86BD9634C63C356F1C1F5F8761E35222 /* UIView+CollectionSkeleton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+CollectionSkeleton.swift"; path = "Sources/Collections/UIView+CollectionSkeleton.swift"; sourceTree = ""; }; - 87F4F0F5E3EC8BB3B76CD08A584EBB83 /* ParameterEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ParameterEncoding.swift; path = Source/ParameterEncoding.swift; sourceTree = ""; }; - 87F765636EC9E2FAEC2130FA19BA5BEB /* SkeletonView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SkeletonView-Info.plist"; sourceTree = ""; }; - 884BF147F42332B8B2D3D6666FDC3ECF /* Cancellable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Cancellable.swift; path = Sources/Moya/Cancellable.swift; sourceTree = ""; }; - 8AB572AB38108B6CBB8698A7307A0D13 /* UILabel+Multiline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UILabel+Multiline.swift"; path = "Sources/Multilines/UILabel+Multiline.swift"; sourceTree = ""; }; - 8ECAA70F3C032E3F9AF1B807E74D3B19 /* Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Alamofire.swift; path = Source/Alamofire.swift; sourceTree = ""; }; - 9068E4D69943CD1A29C4A2BA5B433963 /* SkeletonTableViewProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonTableViewProtocols.swift; path = Sources/Collections/TableViews/SkeletonTableViewProtocols.swift; sourceTree = ""; }; - 94A9DD6F72C5899F6B86C18AE7AEF48A /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Sources/Moya/Response.swift; sourceTree = ""; }; - 94D9CCF22EDA50711103B0A8BF579014 /* URLConvertible+URLRequestConvertible.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLConvertible+URLRequestConvertible.swift"; path = "Source/URLConvertible+URLRequestConvertible.swift"; sourceTree = ""; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9DBBEEB136F6A4D6406C08C99C691C93 /* SkeletonDebug.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonDebug.swift; path = Sources/Debug/SkeletonDebug.swift; sourceTree = ""; }; - 9EB6619B85D17EBBBC88AD28A8703D80 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = ""; }; - 9F208C2FBF4981B0D494DAC025025A5E /* Swizzling.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Swizzling.swift; path = Sources/Helpers/Swizzling.swift; sourceTree = ""; }; - 9FBE92EA869D026AF0D4FF24E4ADB197 /* Alamofire-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Alamofire-dummy.m"; sourceTree = ""; }; - A1765B6DC08154DD77AE8E0ED8A68C34 /* MoyaProvider+Defaults.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Defaults.swift"; path = "Sources/Moya/MoyaProvider+Defaults.swift"; sourceTree = ""; }; - A4614EC1D75509F20D8BCA2BBFAD1107 /* SkeletonView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SkeletonView.release.xcconfig; sourceTree = ""; }; - A6BBE5387383F80AA78DE92CB46BB3C5 /* NetworkActivityPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NetworkActivityPlugin.swift; path = Sources/Moya/Plugins/NetworkActivityPlugin.swift; sourceTree = ""; }; - AA92B567A44285085934D5C496010D1C /* MultiTarget.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultiTarget.swift; path = Sources/Moya/MultiTarget.swift; sourceTree = ""; }; - B1716A32932B2416E7D4F968B748286C /* CALayer+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "CALayer+Extensions.swift"; path = "Sources/Extensions/CALayer+Extensions.swift"; sourceTree = ""; }; - B184CBDFDD43F73204FAF8F62B5F42D3 /* SkeletonAppearance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonAppearance.swift; path = Sources/Appearance/SkeletonAppearance.swift; sourceTree = ""; }; - B2E6CBE226A1BE31603130E1E6198A4F /* SkeletonFlow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonFlow.swift; path = Sources/SkeletonFlow.swift; sourceTree = ""; }; - B63B0E41362667BF5CA513C1AA88BEF0 /* RequestInterceptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestInterceptor.swift; path = Source/RequestInterceptor.swift; sourceTree = ""; }; - B698C2A46F6DAB6906470E8B4CBD19FF /* URLEncodedFormEncoder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = URLEncodedFormEncoder.swift; path = Source/URLEncodedFormEncoder.swift; sourceTree = ""; }; - B6F9264FC36066749790F3CC6D1FFEB9 /* ServerTrustEvaluation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerTrustEvaluation.swift; path = Source/ServerTrustEvaluation.swift; sourceTree = ""; }; - B71D7C68B8F3D65BEF9D07D312C46B33 /* Moya+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Moya+Alamofire.swift"; path = "Sources/Moya/Moya+Alamofire.swift"; sourceTree = ""; }; - B99201A0D7A3DD9DABCB92F149AD7A38 /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = ""; }; - C1615E1FA68C09F9971FB26DF9B7D2BC /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - C3B120C98B829BEC318B0DDD7A1BC0B8 /* Moya-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Moya-umbrella.h"; sourceTree = ""; }; - C58845975681DBD24FE4AE87DDCB1A3A /* URL+Moya.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+Moya.swift"; path = "Sources/Moya/URL+Moya.swift"; sourceTree = ""; }; - C5D8700F8FD01B1E0645E5E71F9B320D /* URLRequest+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Alamofire.swift"; path = "Source/URLRequest+Alamofire.swift"; sourceTree = ""; }; - C64E0C33ADEF187B01D734027594762A /* ContainsMultilineText.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainsMultilineText.swift; path = Sources/Multilines/ContainsMultilineText.swift; sourceTree = ""; }; - C80EBB1F1271B7BADA6727D52DF2E16C /* UITableView+VisibleSections.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITableView+VisibleSections.swift"; path = "Sources/Extensions/UITableView+VisibleSections.swift"; sourceTree = ""; }; - C956FFE8C2663EFFBFADED36F2428B6B /* SkeletonLayer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonLayer.swift; path = Sources/SkeletonLayer.swift; sourceTree = ""; }; - CC1C9484D8C1A9CD4C507D0FC5D15502 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Alamofire.modulemap; sourceTree = ""; }; - CDC8C1E54D1F3A8B5CAC89FFFF6A3F80 /* SkeletonView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SkeletonView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CE71E942C120FCDA4983D5E5DBA2E01D /* SkeletonCollectionViewProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonCollectionViewProtocols.swift; path = Sources/Collections/CollectionViews/SkeletonCollectionViewProtocols.swift; sourceTree = ""; }; - CFACA269D99E1CD4511195DDB6CC5BE3 /* Pods-NADA-iOS-forRelease-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-NADA-iOS-forRelease-acknowledgements.markdown"; sourceTree = ""; }; - D0CE3AB43BBFA420E693E531EA0D1C85 /* Moya.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Moya.modulemap; sourceTree = ""; }; - D0FF301302A2A77E95697F2B5692FA5E /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D2508D084B43CA00BFF2FF3A5EBE6CFC /* CollectionSkeletonProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CollectionSkeletonProtocol.swift; path = Sources/Collections/CollectionSkeletonProtocol.swift; sourceTree = ""; }; - D42ADD192C9C2A13814ED7862535EE91 /* MoyaError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MoyaError.swift; path = Sources/Moya/MoyaError.swift; sourceTree = ""; }; - D992A03E39DC80FD477E320DC1324746 /* UIColor+Skeleton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIColor+Skeleton.swift"; path = "Sources/Extensions/UIColor+Skeleton.swift"; sourceTree = ""; }; - DB870A8059BF2C21A79B9FA1BC60F5C2 /* Moya.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.debug.xcconfig; sourceTree = ""; }; - DC2124C1A4873FE3626A425504F760E9 /* URLRequest+Encoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URLRequest+Encoding.swift"; path = "Sources/Moya/URLRequest+Encoding.swift"; sourceTree = ""; }; - DC3A6DDA3973D13CB8E5D02372E8B528 /* Pods-NADA-iOS-forRelease.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-NADA-iOS-forRelease.modulemap"; sourceTree = ""; }; - DDAD042A7FCC7B66B65D91D3DC137ADC /* SkeletonView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SkeletonView.modulemap; sourceTree = ""; }; - DF14EDA4ADBABAC4537C2B7E9B44D5DA /* SkeletonAnimationBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SkeletonAnimationBuilder.swift; path = Sources/SkeletonAnimationBuilder.swift; sourceTree = ""; }; - DF5599709DA09B573AC784166D9BCCC0 /* EventMonitor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EventMonitor.swift; path = Source/EventMonitor.swift; sourceTree = ""; }; - DFB212A62855A85FADDB51462C234823 /* OperationQueue+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "OperationQueue+Alamofire.swift"; path = "Source/OperationQueue+Alamofire.swift"; sourceTree = ""; }; - E2E8C44E2CEEF431E0AB5677127573F3 /* RequestTaskMap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestTaskMap.swift; path = Source/RequestTaskMap.swift; sourceTree = ""; }; - E2F6CB286898E799926984D47C0C945B /* UITableView+CollectionSkeleton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UITableView+CollectionSkeleton.swift"; path = "Sources/Collections/TableViews/UITableView+CollectionSkeleton.swift"; sourceTree = ""; }; - E394B29FC670C3B63588FAE4E2FED3E2 /* SkeletonView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SkeletonView.debug.xcconfig; sourceTree = ""; }; - E76B63BE155497B9A1C4EFD18EA6790A /* AssociationPolicy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssociationPolicy.swift; path = Sources/Helpers/AssociationPolicy.swift; sourceTree = ""; }; - E90C6981AB7A1F39F209C09BB075374B /* Pods-NADA-iOS-forRelease-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-NADA-iOS-forRelease-umbrella.h"; sourceTree = ""; }; - E98E6EC8912C89EA73EABCAD2E798794 /* SkeletonView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SkeletonView-prefix.pch"; sourceTree = ""; }; - EC4D12747948DCAF12E6C68273258C02 /* UIView+Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Extension.swift"; path = "Sources/Extensions/UIView+Extension.swift"; sourceTree = ""; }; - EDDCAA76895966401577B068B5054590 /* Combine.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Combine.swift; path = Source/Combine.swift; sourceTree = ""; }; - EF614ED0ED0DE7D66CB489FE4A68D628 /* Endpoint.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Endpoint.swift; path = Sources/Moya/Endpoint.swift; sourceTree = ""; }; - EFA42ADAE9BAB1F83A8908CD234A32E5 /* Moya.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Moya.release.xcconfig; sourceTree = ""; }; - F57AD2FF8390132004D8A467DD0B9747 /* Result+Alamofire.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Result+Alamofire.swift"; path = "Source/Result+Alamofire.swift"; sourceTree = ""; }; - FAC6EFFF96DABD89D995DEA49843B39D /* UIView+Frame.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+Frame.swift"; path = "Sources/Extensions/UIView+Frame.swift"; sourceTree = ""; }; - FCFCC5019F0A476DDA3C118E87FE29EA /* MoyaProvider+Internal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "MoyaProvider+Internal.swift"; path = "Sources/Moya/MoyaProvider+Internal.swift"; sourceTree = ""; }; - FE9F3659569AB8820BC1BBF713DB7A60 /* GenericCollectionView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = GenericCollectionView.swift; path = Sources/Collections/Generics/GenericCollectionView.swift; sourceTree = ""; }; - FECA17748A10EA36F78E6C9C4DBB7852 /* Recoverable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Recoverable.swift; path = Sources/Recoverable/Recoverable.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 396E01AFCFF764500C3133E1E3E548F7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - E7ECC9D6F7370CE2339986E929006DC5 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 418ACE2E3AB9F6D35E8E21C11232AAD9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3DB366A803B0BE7848E93E9BB6B9500B /* Alamofire.framework in Frameworks */, - 74A86BEF20B34699FD2F43A78DC8AF09 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9590D3FE7A79CD7CBEE3F346E8C19D4D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A9C7B29D4878F1690BBE3F8195CF0313 /* CFNetwork.framework in Frameworks */, - 476D5F33E25386C60D6BD75C4FA97C67 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9EEAEF7F3824B0C6128BC5530ED58DE0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 913AF10026C423A68E44620C29E5D2C9 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 0511D3B7F5001F3A47AF144BCFFAEEF2 /* Support Files */ = { - isa = PBXGroup; - children = ( - CC1C9484D8C1A9CD4C507D0FC5D15502 /* Alamofire.modulemap */, - 9FBE92EA869D026AF0D4FF24E4ADB197 /* Alamofire-dummy.m */, - 5D228912AC368755752AA3FAA2515F4C /* Alamofire-Info.plist */, - 556FB634D740B22835DF52A0D987DDD6 /* Alamofire-prefix.pch */, - 2F390E7693ACA4F9383FFD1B5B20F01F /* Alamofire-umbrella.h */, - 2CB5F75C2C79B1E1AB2C3FE089150B5C /* Alamofire.debug.xcconfig */, - 008C6D8CB7402A3B653D57AC3F209AC0 /* Alamofire.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/Alamofire"; - sourceTree = ""; - }; - 09CED10CA37B01EB25D017D8D487B072 /* Support Files */ = { - isa = PBXGroup; - children = ( - 0942A7198FFB33B3F13B9BF3E2D271ED /* SwiftLint.debug.xcconfig */, - 01AFB4E8DE15F53ED959EE971F77A886 /* SwiftLint.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/SwiftLint"; - sourceTree = ""; - }; - 27857492FB2FFEB73524174A5029B928 /* Pods-NADA-iOS-forRelease */ = { - isa = PBXGroup; - children = ( - DC3A6DDA3973D13CB8E5D02372E8B528 /* Pods-NADA-iOS-forRelease.modulemap */, - CFACA269D99E1CD4511195DDB6CC5BE3 /* Pods-NADA-iOS-forRelease-acknowledgements.markdown */, - 5C57111ECFEC8037A512447C17843C43 /* Pods-NADA-iOS-forRelease-acknowledgements.plist */, - 36D03C2EF9C9F318F0B763F10E20A245 /* Pods-NADA-iOS-forRelease-dummy.m */, - 12E5A6A506752A0961C3C9EA1DA4FB15 /* Pods-NADA-iOS-forRelease-frameworks.sh */, - 2210E8F68B83B00DEA18F335FDCBCF71 /* Pods-NADA-iOS-forRelease-Info.plist */, - E90C6981AB7A1F39F209C09BB075374B /* Pods-NADA-iOS-forRelease-umbrella.h */, - 5E77B546F8ABDDE70861710F6482E2A1 /* Pods-NADA-iOS-forRelease.debug.xcconfig */, - 420E35C3FCBD48BED7CAC20D5A22E981 /* Pods-NADA-iOS-forRelease.release.xcconfig */, - ); - name = "Pods-NADA-iOS-forRelease"; - path = "Target Support Files/Pods-NADA-iOS-forRelease"; - sourceTree = ""; - }; - 27E045A85BF2855A1B2A2641593B9D82 /* Alamofire */ = { - isa = PBXGroup; - children = ( - 718C3634AB07577042971F4EAE51AD03 /* AFError.swift */, - 8ECAA70F3C032E3F9AF1B807E74D3B19 /* Alamofire.swift */, - 1E1F04AE2A1C674900D6CB363E5F4356 /* AlamofireExtended.swift */, - 2759B28423AAE54CFBD435E3AD54799A /* AuthenticationInterceptor.swift */, - 4A3C0A84F5064A73A115F29F29EC84D6 /* CachedResponseHandler.swift */, - EDDCAA76895966401577B068B5054590 /* Combine.swift */, - 6C93BED9460F38FD4DE5DD56E4D88742 /* DispatchQueue+Alamofire.swift */, - DF5599709DA09B573AC784166D9BCCC0 /* EventMonitor.swift */, - 34E033DB72569B397707FC20BF3E4298 /* HTTPHeaders.swift */, - 397907930B4FDB41999E645E9806255A /* HTTPMethod.swift */, - B99201A0D7A3DD9DABCB92F149AD7A38 /* MultipartFormData.swift */, - 335A01EF0C72ECA18EFD96EAED7E5AB7 /* MultipartUpload.swift */, - 0EFDB9D88C53581BD5C716FA97DA8EE4 /* NetworkReachabilityManager.swift */, - 2155D5EDB1A0137925E2C4E1E5B6B092 /* Notifications.swift */, - DFB212A62855A85FADDB51462C234823 /* OperationQueue+Alamofire.swift */, - 546322D24AF6B0D28131B3ED2271E33C /* ParameterEncoder.swift */, - 87F4F0F5E3EC8BB3B76CD08A584EBB83 /* ParameterEncoding.swift */, - 5ED8907A751F8AED5A2BC68BB3CB5003 /* Protected.swift */, - 53385EA7EE3F65969AE2FC534FF724CF /* RedirectHandler.swift */, - 27D3053DC2FCE133E0377C7D4F065773 /* Request.swift */, - B63B0E41362667BF5CA513C1AA88BEF0 /* RequestInterceptor.swift */, - E2E8C44E2CEEF431E0AB5677127573F3 /* RequestTaskMap.swift */, - 9EB6619B85D17EBBBC88AD28A8703D80 /* Response.swift */, - 3CA266CA3A7A69D108C94746F3D5A34B /* ResponseSerialization.swift */, - F57AD2FF8390132004D8A467DD0B9747 /* Result+Alamofire.swift */, - 0E63E2A36C373FB71A5AB9D9C0D00911 /* RetryPolicy.swift */, - B6F9264FC36066749790F3CC6D1FFEB9 /* ServerTrustEvaluation.swift */, - 69FF8592EB8CB327996FBABDC2B6E58D /* Session.swift */, - 724BED3296509F797B5A45B2EE60281B /* SessionDelegate.swift */, - 616D06CB9C908C04173CE56236051BED /* StringEncoding+Alamofire.swift */, - 94D9CCF22EDA50711103B0A8BF579014 /* URLConvertible+URLRequestConvertible.swift */, - B698C2A46F6DAB6906470E8B4CBD19FF /* URLEncodedFormEncoder.swift */, - C5D8700F8FD01B1E0645E5E71F9B320D /* URLRequest+Alamofire.swift */, - 0308E81166FE5027630AD8EBDDBF23D9 /* URLSessionConfiguration+Alamofire.swift */, - 834CA758DB3661054357D5D233F8AFB1 /* Validation.swift */, - 0511D3B7F5001F3A47AF144BCFFAEEF2 /* Support Files */, - ); - path = Alamofire; - sourceTree = ""; - }; - 4B86A6912813618A20D9263A56BF822B /* Support Files */ = { - isa = PBXGroup; - children = ( - D0CE3AB43BBFA420E693E531EA0D1C85 /* Moya.modulemap */, - 34A16D84A3F92D6BCDC100323BC16AE8 /* Moya-dummy.m */, - 48BC2265DC376A73D756CE1B2B77306C /* Moya-Info.plist */, - 33B234B685EFB2438F6841A56FBAED3C /* Moya-prefix.pch */, - C3B120C98B829BEC318B0DDD7A1BC0B8 /* Moya-umbrella.h */, - DB870A8059BF2C21A79B9FA1BC60F5C2 /* Moya.debug.xcconfig */, - EFA42ADAE9BAB1F83A8908CD234A32E5 /* Moya.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/Moya"; - sourceTree = ""; - }; - 635EF97E0A804D1E74D3D853CAA14D98 /* SkeletonView */ = { - isa = PBXGroup; - children = ( - E76B63BE155497B9A1C4EFD18EA6790A /* AssociationPolicy.swift */, - B1716A32932B2416E7D4F968B748286C /* CALayer+Extensions.swift */, - D2508D084B43CA00BFF2FF3A5EBE6CFC /* CollectionSkeletonProtocol.swift */, - C64E0C33ADEF187B01D734027594762A /* ContainsMultilineText.swift */, - FE9F3659569AB8820BC1BBF713DB7A60 /* GenericCollectionView.swift */, - 7E613E7215F504969C899663EB28D9B3 /* Int+Whitespaces.swift */, - 85ACD9C1FB434598A36C8827D6692C9A /* PrepareForSkeletonProtocol.swift */, - 81C930D9B90E915C35F715E97E2DEFB9 /* ProcessInfo+XCTest.swift */, - FECA17748A10EA36F78E6C9C4DBB7852 /* Recoverable.swift */, - 7276D4F36F13957421432246F6356FF3 /* RecoverableViewState.swift */, - 1FAB40232ED5B03B7240CEDCCE79F254 /* RecursiveProtocol.swift */, - DF14EDA4ADBABAC4537C2B7E9B44D5DA /* SkeletonAnimationBuilder.swift */, - B184CBDFDD43F73204FAF8F62B5F42D3 /* SkeletonAppearance.swift */, - 08151C6FBD44A3EC9FDFD1EE2F5EA1B4 /* SkeletonCollectionDataSource.swift */, - 7CA0084953DFA5E14884A39CD47F46CB /* SkeletonCollectionDelegate.swift */, - CE71E942C120FCDA4983D5E5DBA2E01D /* SkeletonCollectionViewProtocols.swift */, - 0D9CE072381B98F1DC8E3F914C7498A7 /* SkeletonConfig.swift */, - 9DBBEEB136F6A4D6406C08C99C691C93 /* SkeletonDebug.swift */, - B2E6CBE226A1BE31603130E1E6198A4F /* SkeletonFlow.swift */, - 071719E0F77DE7CAC5E3EE1E74812F1E /* SkeletonGradient.swift */, - C956FFE8C2663EFFBFADED36F2428B6B /* SkeletonLayer.swift */, - 0F644E97A5871F851B6B34D59507CC45 /* SkeletonLayerBuilder.swift */, - 51C8538F724CCE218848729822212B95 /* SkeletonMultilineLayerBuilder.swift */, - 796623311DE94C2FE96BF451BA6E7FD9 /* SkeletonReusableCell.swift */, - 9068E4D69943CD1A29C4A2BA5B433963 /* SkeletonTableViewProtocols.swift */, - 5A7E766E8075483B3F5E94903D6317AD /* SkeletonTransitionStyle.swift */, - 487FE73A8B5E7153BBDEE2EB7227C33E /* SkeletonView.swift */, - 46D8B000761B5D1096BDE9A6E11CC2A3 /* SubviewsSkeletonables.swift */, - 9F208C2FBF4981B0D494DAC025025A5E /* Swizzling.swift */, - 52FA6AC8D85A12F6977844631094C632 /* UICollectionView+CollectionSkeleton.swift */, - D992A03E39DC80FD477E320DC1324746 /* UIColor+Skeleton.swift */, - 8AB572AB38108B6CBB8698A7307A0D13 /* UILabel+Multiline.swift */, - E2F6CB286898E799926984D47C0C945B /* UITableView+CollectionSkeleton.swift */, - C80EBB1F1271B7BADA6727D52DF2E16C /* UITableView+VisibleSections.swift */, - 51750FEA4D400B1028E65505B5CD83FB /* UITextView+Multiline.swift */, - 69688D9AB671AD778F478842C27031D1 /* UIView+Autolayout.swift */, - 86BD9634C63C356F1C1F5F8761E35222 /* UIView+CollectionSkeleton.swift */, - EC4D12747948DCAF12E6C68273258C02 /* UIView+Extension.swift */, - FAC6EFFF96DABD89D995DEA49843B39D /* UIView+Frame.swift */, - 62B3ECC720C8664A77BE074962F3342D /* UIView+IBInspectable.swift */, - 665878DD26B0FCF5EB1DFB6D4A0D0722 /* UIView+Transitions.swift */, - 4F070D00AB51F5B6250A8FC565325C83 /* UIView+UIApplicationDelegate.swift */, - D0B786218CE7D65CB19CC37A54AD1723 /* Support Files */, - ); - path = SkeletonView; - sourceTree = ""; - }; - 72CBF387F504524AD5DF151F99E6AC4A /* Moya */ = { - isa = PBXGroup; - children = ( - A75DBD414C0483E130EB98A819E76C69 /* Core */, - 4B86A6912813618A20D9263A56BF822B /* Support Files */, - ); - path = Moya; - sourceTree = ""; - }; - 8B7A79262BFE6D94671D449787F3AAA9 /* Frameworks */ = { - isa = PBXGroup; - children = ( - D0FF301302A2A77E95697F2B5692FA5E /* Alamofire.framework */, - C5DA6AFE22B4BD7F9A7902BFAC53F976 /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - A75DBD414C0483E130EB98A819E76C69 /* Core */ = { - isa = PBXGroup; - children = ( - 542BC752CEFA4A06F870A4E2A49C0B93 /* AccessTokenPlugin.swift */, - 0CF7002D4F6C1714E77D4E1193386DE5 /* AnyEncodable.swift */, - 884BF147F42332B8B2D3D6666FDC3ECF /* Cancellable.swift */, - 5B4B3A39AD1DBE72B637495D047346E4 /* CredentialsPlugin.swift */, - EF614ED0ED0DE7D66CB489FE4A68D628 /* Endpoint.swift */, - 6F9A45C95D4F6EF1ADF5A8BEC432BCC3 /* Image.swift */, - B71D7C68B8F3D65BEF9D07D312C46B33 /* Moya+Alamofire.swift */, - D42ADD192C9C2A13814ED7862535EE91 /* MoyaError.swift */, - 6CC0E177E1F76CAF9C807BE95B04C0EB /* MoyaProvider.swift */, - A1765B6DC08154DD77AE8E0ED8A68C34 /* MoyaProvider+Defaults.swift */, - FCFCC5019F0A476DDA3C118E87FE29EA /* MoyaProvider+Internal.swift */, - 18D790014D71812A27D8ED73FEF1EAAD /* MultipartFormData.swift */, - AA92B567A44285085934D5C496010D1C /* MultiTarget.swift */, - A6BBE5387383F80AA78DE92CB46BB3C5 /* NetworkActivityPlugin.swift */, - 01DE72FE53D92AC679F52B0CCA8BCACA /* NetworkLoggerPlugin.swift */, - 1350BF8E7F51B75E3E7C9D400C585E6E /* Plugin.swift */, - 6A43B71B2FA9A20C24AFF7979C32EA61 /* RequestTypeWrapper.swift */, - 94A9DD6F72C5899F6B86C18AE7AEF48A /* Response.swift */, - 0506E9B85EDACC5AE6A91787D31C7821 /* TargetType.swift */, - 47DDAD50AB7CCB6BF8EBA3DB8F8C64E7 /* Task.swift */, - C58845975681DBD24FE4AE87DDCB1A3A /* URL+Moya.swift */, - DC2124C1A4873FE3626A425504F760E9 /* URLRequest+Encoding.swift */, - 0B42DB1CAB94FA4625078ADA35C9B748 /* ValidationType.swift */, - ); - name = Core; - sourceTree = ""; - }; - C1753FB080EF787D199FC0D6F0E4FBED /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 27857492FB2FFEB73524174A5029B928 /* Pods-NADA-iOS-forRelease */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - C5DA6AFE22B4BD7F9A7902BFAC53F976 /* iOS */ = { - isa = PBXGroup; - children = ( - C1615E1FA68C09F9971FB26DF9B7D2BC /* CFNetwork.framework */, - 1AC44BC108255F6766BF5383BF088F46 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; - C9BFDE51678952E152B07C71AE07F078 /* Products */ = { - isa = PBXGroup; - children = ( - 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */, - 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */, - 5183F64F0CB82B2049B97A16612CA752 /* Pods_NADA_iOS_forRelease.framework */, - CDC8C1E54D1F3A8B5CAC89FFFF6A3F80 /* SkeletonView.framework */, - ); - name = Products; - sourceTree = ""; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 8B7A79262BFE6D94671D449787F3AAA9 /* Frameworks */, - E359A431C08783A3845BE0BB2CD342AF /* Pods */, - C9BFDE51678952E152B07C71AE07F078 /* Products */, - C1753FB080EF787D199FC0D6F0E4FBED /* Targets Support Files */, - ); - sourceTree = ""; - }; - D0B786218CE7D65CB19CC37A54AD1723 /* Support Files */ = { - isa = PBXGroup; - children = ( - DDAD042A7FCC7B66B65D91D3DC137ADC /* SkeletonView.modulemap */, - 4FC4814FDA9CB67B7D52B021B0BC7C62 /* SkeletonView-dummy.m */, - 87F765636EC9E2FAEC2130FA19BA5BEB /* SkeletonView-Info.plist */, - E98E6EC8912C89EA73EABCAD2E798794 /* SkeletonView-prefix.pch */, - 4D70C3BE02BF56A01AD7EE3D6B263945 /* SkeletonView-umbrella.h */, - E394B29FC670C3B63588FAE4E2FED3E2 /* SkeletonView.debug.xcconfig */, - A4614EC1D75509F20D8BCA2BBFAD1107 /* SkeletonView.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/SkeletonView"; - sourceTree = ""; - }; - D25B6C37445155518745CF786D8E6275 /* SwiftLint */ = { - isa = PBXGroup; - children = ( - 09CED10CA37B01EB25D017D8D487B072 /* Support Files */, - ); - path = SwiftLint; - sourceTree = ""; - }; - E359A431C08783A3845BE0BB2CD342AF /* Pods */ = { - isa = PBXGroup; - children = ( - 27E045A85BF2855A1B2A2641593B9D82 /* Alamofire */, - 72CBF387F504524AD5DF151F99E6AC4A /* Moya */, - 635EF97E0A804D1E74D3D853CAA14D98 /* SkeletonView */, - D25B6C37445155518745CF786D8E6275 /* SwiftLint */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 36E239BCA83FBA0FAA48F3D68E0AADBA /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A67B68E7C029F70B0B8B0B201FC99C25 /* SkeletonView-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 5D4D8F2316E3B388EA66319DAE9C862F /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 225C81AF7B10A0E5F149AFD253FACA69 /* Moya-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8070B01910C64B9AFD0DB550EDE38D6B /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 7D3DD4A8BB36733BA15868F7FB8C56CE /* Alamofire-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A0FA0E24B3C17F4B4B7DBAEA6A835DFD /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B23D398A673EB37907E01285D442C11B /* Pods-NADA-iOS-forRelease-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 17F9141D333DA1A7BE5937F227221070 /* Moya */ = { - isa = PBXNativeTarget; - buildConfigurationList = CFCE48AA201128F104DC8AD658EE12B6 /* Build configuration list for PBXNativeTarget "Moya" */; - buildPhases = ( - 5D4D8F2316E3B388EA66319DAE9C862F /* Headers */, - F543DD072EC55754F4B0A9154EEE19E0 /* Sources */, - 418ACE2E3AB9F6D35E8E21C11232AAD9 /* Frameworks */, - 6EBF51D6092A5CC8E29D04F25E51E962 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - FE2EF6FD6A249167D11FD4173B31F633 /* PBXTargetDependency */, - ); - name = Moya; - productName = Moya; - productReference = 3756A9BBE41ABEE8DCBF5BCA6972C4DA /* Moya.framework */; - productType = "com.apple.product-type.framework"; - }; - 8473F894E0985DE23CDA4C1345E05BD1 /* Pods-NADA-iOS-forRelease */ = { - isa = PBXNativeTarget; - buildConfigurationList = 47F0127035329B7BD7E67CF956961AB1 /* Build configuration list for PBXNativeTarget "Pods-NADA-iOS-forRelease" */; - buildPhases = ( - A0FA0E24B3C17F4B4B7DBAEA6A835DFD /* Headers */, - 601F65528057CD13037364C50FA260FB /* Sources */, - 396E01AFCFF764500C3133E1E3E548F7 /* Frameworks */, - CCA33FB69F022EF57665ED4D25A67B37 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - C118E94FD8F41EE75EC24974E9733EE9 /* PBXTargetDependency */, - 8FFF1CC08872F8E6578E7189E750666D /* PBXTargetDependency */, - A7E301990FB4AB2EFF285F5AF2DA5E27 /* PBXTargetDependency */, - 1492FC6B7411F5AFAC1E85F0650148F3 /* PBXTargetDependency */, - ); - name = "Pods-NADA-iOS-forRelease"; - productName = "Pods-NADA-iOS-forRelease"; - productReference = 5183F64F0CB82B2049B97A16612CA752 /* Pods_NADA_iOS_forRelease.framework */; - productType = "com.apple.product-type.framework"; - }; - 8CEEFD1CB630CA790F0396E2E24A4C8C /* SkeletonView */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5DB01351F919581242EE4AD62914B15E /* Build configuration list for PBXNativeTarget "SkeletonView" */; - buildPhases = ( - 36E239BCA83FBA0FAA48F3D68E0AADBA /* Headers */, - 89BCE565BC796CDAB159B58EFACA3718 /* Sources */, - 9EEAEF7F3824B0C6128BC5530ED58DE0 /* Frameworks */, - F97D9F63E6571D16CC9440304FFC196E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SkeletonView; - productName = SkeletonView; - productReference = CDC8C1E54D1F3A8B5CAC89FFFF6A3F80 /* SkeletonView.framework */; - productType = "com.apple.product-type.framework"; - }; - EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */ = { - isa = PBXNativeTarget; - buildConfigurationList = 78E219AC01CD5AFED663C9AB28280801 /* Build configuration list for PBXNativeTarget "Alamofire" */; - buildPhases = ( - 8070B01910C64B9AFD0DB550EDE38D6B /* Headers */, - 2C8326877F6A9617C2FBE9BD15D95B59 /* Sources */, - 9590D3FE7A79CD7CBEE3F346E8C19D4D /* Frameworks */, - 9BCA7D105D531AE5DAF34FB86A2E623A /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Alamofire; - productName = Alamofire; - productReference = 5D797E9A5C5782CE845840781FA1CC81 /* Alamofire.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1250; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 10.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = C9BFDE51678952E152B07C71AE07F078 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */, - 17F9141D333DA1A7BE5937F227221070 /* Moya */, - 8473F894E0985DE23CDA4C1345E05BD1 /* Pods-NADA-iOS-forRelease */, - 8CEEFD1CB630CA790F0396E2E24A4C8C /* SkeletonView */, - 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 6EBF51D6092A5CC8E29D04F25E51E962 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 9BCA7D105D531AE5DAF34FB86A2E623A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - CCA33FB69F022EF57665ED4D25A67B37 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F97D9F63E6571D16CC9440304FFC196E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 2C8326877F6A9617C2FBE9BD15D95B59 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1208E81DA8B532D0646D627B50290EB6 /* AFError.swift in Sources */, - C6D5A4B4028B2C43380C9FA58BD5C8CA /* Alamofire-dummy.m in Sources */, - C1F1DB6A9CBDE584D09BA1613AAD4F9D /* Alamofire.swift in Sources */, - 72EC2712926E6D28B52360D9AC41668F /* AlamofireExtended.swift in Sources */, - DC627AFC5B585686898B014184AFCABD /* AuthenticationInterceptor.swift in Sources */, - ABA85887A41495358C83CE3F3030EDEA /* CachedResponseHandler.swift in Sources */, - 0A1849775CF90D514963187D3A771CF8 /* Combine.swift in Sources */, - 27E59A11A2743B0595CDE3A08675EAE1 /* DispatchQueue+Alamofire.swift in Sources */, - 6546D728B69398F93B506845141EBD61 /* EventMonitor.swift in Sources */, - 91B837CE0DCD8EDB300FCDFFA1279162 /* HTTPHeaders.swift in Sources */, - 013BAC24F7AC722E59517CB110A9E685 /* HTTPMethod.swift in Sources */, - 45B8CC1C61E7A0BB28CFA8CE7C12FEBC /* MultipartFormData.swift in Sources */, - D03F1F02DE8606E6057D57866611BEBF /* MultipartUpload.swift in Sources */, - 19D605A3233499828FB6B790869F3E9C /* NetworkReachabilityManager.swift in Sources */, - 8AA937910F87915DE700CAB6C868689E /* Notifications.swift in Sources */, - 0A900DF17E3B64F08AF673E9A0DDD697 /* OperationQueue+Alamofire.swift in Sources */, - 4AEC050FA7D5ED52FDA9DF50EA3560DF /* ParameterEncoder.swift in Sources */, - D14066FAE94E304798E43651E5886D13 /* ParameterEncoding.swift in Sources */, - 218C14EAE5AA31C30314AE0289B732A0 /* Protected.swift in Sources */, - 666EC5C8356E6D4448A2FE7BEE77AD88 /* RedirectHandler.swift in Sources */, - EDC93BD7B9262119AE145E4C7A9D0212 /* Request.swift in Sources */, - 6E54F64E8DA73F4B0B46C216F9F93F63 /* RequestInterceptor.swift in Sources */, - 6C08F6A77889651626583100F560153D /* RequestTaskMap.swift in Sources */, - C1C5B050B55C15103ABC81769551A283 /* Response.swift in Sources */, - 911448B2EDA2FF880108F77642797A88 /* ResponseSerialization.swift in Sources */, - 66B26C6CAE737EC21F4BA1F1851B69C5 /* Result+Alamofire.swift in Sources */, - 9FED70D1E1FBFB80E974E999EF732258 /* RetryPolicy.swift in Sources */, - 47FDBBBD2704901588C3A7C56BBC502D /* ServerTrustEvaluation.swift in Sources */, - 6AE407A4FB6C3D6ADD862CC6E3067A17 /* Session.swift in Sources */, - 381FF05F8B4F611EE9C2FDBE4457BB89 /* SessionDelegate.swift in Sources */, - 212EDC48B68107BEA9247F3464CE696E /* StringEncoding+Alamofire.swift in Sources */, - 9B1D8A7798D8A6F518FC9AF9725431D0 /* URLConvertible+URLRequestConvertible.swift in Sources */, - D31FC7FDD450C4CDD633ECBAD27C6221 /* URLEncodedFormEncoder.swift in Sources */, - D5EAAFB6FAD77A8F0699345149BA3CBB /* URLRequest+Alamofire.swift in Sources */, - F70EF854395CDE981A8336E4FF0310FE /* URLSessionConfiguration+Alamofire.swift in Sources */, - F0F3224FF592F9BA2A044A2FC2BD4CCD /* Validation.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 601F65528057CD13037364C50FA260FB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C0E740F8A83F7563F9265995778754E4 /* Pods-NADA-iOS-forRelease-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 89BCE565BC796CDAB159B58EFACA3718 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 70E5E9B6E8EBF205A502B8F32F18FB6E /* AssociationPolicy.swift in Sources */, - 01FEF30F6CF1A002DE5DA785CD28393D /* CALayer+Extensions.swift in Sources */, - B54EAAF9370E03F80E227C73141D487D /* CollectionSkeletonProtocol.swift in Sources */, - 9025F283B182AD7FD66B4F3BD1D52747 /* ContainsMultilineText.swift in Sources */, - F822D891CB3C55D332B7216047E3585F /* GenericCollectionView.swift in Sources */, - 5454E93424F5DBBED188F26D7357317A /* Int+Whitespaces.swift in Sources */, - B75DDFBA4563633B823C8874C892482F /* PrepareForSkeletonProtocol.swift in Sources */, - D00994BD11CDA991205AB64A685EED51 /* ProcessInfo+XCTest.swift in Sources */, - 0995E3E9A52AFB6D9801ABB039FA8963 /* Recoverable.swift in Sources */, - 848FEA1EBB3D8ADF961000FF5AD1AABD /* RecoverableViewState.swift in Sources */, - 1E11499FB66A92D1AE5E1F68CFCA41E6 /* RecursiveProtocol.swift in Sources */, - 435BE404918D9422CD81EE41CC59494B /* SkeletonAnimationBuilder.swift in Sources */, - 81BC0C6162FEE7F0EE45B1D6267330F5 /* SkeletonAppearance.swift in Sources */, - 48E765CDF02ABC4CBDBCEA7BC25D0743 /* SkeletonCollectionDataSource.swift in Sources */, - 4A3689BF00171A24F0A3C741F43033A9 /* SkeletonCollectionDelegate.swift in Sources */, - 505DEC94E1FD88DD055D6542084D9973 /* SkeletonCollectionViewProtocols.swift in Sources */, - F318B9CAD0AE436906C5C809FAD01667 /* SkeletonConfig.swift in Sources */, - DF7DDB302D2AD98DC36049179CFCEF08 /* SkeletonDebug.swift in Sources */, - 7FD95ABE3D7DBE42A5691B4A79389507 /* SkeletonFlow.swift in Sources */, - 3D9BAF7BB8F6997DCF84BE270414B390 /* SkeletonGradient.swift in Sources */, - 72FB1F829DAA1BF28C84D67D603F33CE /* SkeletonLayer.swift in Sources */, - 6D3E5469839411AA3296E219167E9AAB /* SkeletonLayerBuilder.swift in Sources */, - 4C67202604DBF149C8D99AFA89CDC247 /* SkeletonMultilineLayerBuilder.swift in Sources */, - D5D1C997D9BCFBAC5ADE265762AEB6DF /* SkeletonReusableCell.swift in Sources */, - C1D4716773A0DC8B18C351CE34E4F2C5 /* SkeletonTableViewProtocols.swift in Sources */, - BF16F08F7FBB7FEBFE27169B2DAED114 /* SkeletonTransitionStyle.swift in Sources */, - 707CDC3C1F97310FE8D35B06D7697C26 /* SkeletonView-dummy.m in Sources */, - 320066283ACE51DA1282CBAF395D5977 /* SkeletonView.swift in Sources */, - BC9CCA7BB1EBCD10CB4A8AC67D7CD09D /* SubviewsSkeletonables.swift in Sources */, - 603B8F08C54290B3EBD0F6EBCFCF2893 /* Swizzling.swift in Sources */, - 3606501F67419009E29D78CBFDC9ADC5 /* UICollectionView+CollectionSkeleton.swift in Sources */, - 6E69092C92AF304383640614CE7F6B19 /* UIColor+Skeleton.swift in Sources */, - 2BFD4AA3D5BDC25F2E442B897E74B528 /* UILabel+Multiline.swift in Sources */, - A396FE0752A639E9274F640BF26F2A35 /* UITableView+CollectionSkeleton.swift in Sources */, - 9B8F8D53D20BCCEAF53D12748D6FD531 /* UITableView+VisibleSections.swift in Sources */, - 59E90FCB9AA180761439B1A0E43CC41A /* UITextView+Multiline.swift in Sources */, - BCA074BFC1E5CE7479B638F1BDF96B1E /* UIView+Autolayout.swift in Sources */, - 901BD3E04F3B57CC77D00B566B087400 /* UIView+CollectionSkeleton.swift in Sources */, - 07FC2ADF722D80878095CDCBD927BC67 /* UIView+Extension.swift in Sources */, - 3769F7577102C14C3591A59E730F506B /* UIView+Frame.swift in Sources */, - 7042121E5596C3258681A38843F44BA6 /* UIView+IBInspectable.swift in Sources */, - 46B19592113934CCE9D240A9D6CA74D6 /* UIView+Transitions.swift in Sources */, - 3D75A9668E22EFC34CC72446A43806F0 /* UIView+UIApplicationDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F543DD072EC55754F4B0A9154EEE19E0 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F965B8DF95392AE5AFB69A758F2328C0 /* AccessTokenPlugin.swift in Sources */, - AAC431B9EA605017153223586D0F63F6 /* AnyEncodable.swift in Sources */, - 74B47F84109C44A13D5A90A0751D195C /* Cancellable.swift in Sources */, - EA72CC2DB9B653E1BA2DA123FF56C3BE /* CredentialsPlugin.swift in Sources */, - 48894B3EEDB9AFF70DB143648F9FAC63 /* Endpoint.swift in Sources */, - EECFAE6E50A1472E0E724B4C7240C0D0 /* Image.swift in Sources */, - BF35ED4A558BEC06D6A176C76129A4DD /* Moya+Alamofire.swift in Sources */, - 9558C251165A9B17B3EBE2778ABAD04E /* Moya-dummy.m in Sources */, - 508783EF3077382F85362930BA87EBFE /* MoyaError.swift in Sources */, - 9AA8337991A99D52AB4909F797F29319 /* MoyaProvider+Defaults.swift in Sources */, - 522DB7B1FE8A14E82A35602C06303223 /* MoyaProvider+Internal.swift in Sources */, - 7CE0911040FB99158182B6131E9BA60A /* MoyaProvider.swift in Sources */, - 22EA0B74EE7190BBD94DAB298901DB11 /* MultipartFormData.swift in Sources */, - 5E13589E564DF35414E2D26F0D25B1F6 /* MultiTarget.swift in Sources */, - 599D1E6464DDED0DAAF45680E7C51EC5 /* NetworkActivityPlugin.swift in Sources */, - 8B4697A5ADBE7B6680E81E334D6753B2 /* NetworkLoggerPlugin.swift in Sources */, - 02EA3013E5947ED2EA63D18AEAEB802D /* Plugin.swift in Sources */, - 330CABED0FC3EEDA02B09774D72E2472 /* RequestTypeWrapper.swift in Sources */, - 7797EFE4F02AE03874050CD9B5FBB9E0 /* Response.swift in Sources */, - 9A412A17A20B32F4DA6541A9690435DD /* TargetType.swift in Sources */, - F36726220F4B923ACE3B8C58A2663428 /* Task.swift in Sources */, - 173959124053EB4256FC64AD38DAC521 /* URL+Moya.swift in Sources */, - 31F8B6897895035B807AE752FD933784 /* URLRequest+Encoding.swift in Sources */, - 6651DE8BD5F1653C466C9CE4ED57568B /* ValidationType.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1492FC6B7411F5AFAC1E85F0650148F3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftLint; - target = 52B60EC2A583F24ACBB69C113F5488B9 /* SwiftLint */; - targetProxy = 4C03BE4337723B2ADA04A9654A843FB5 /* PBXContainerItemProxy */; - }; - 8FFF1CC08872F8E6578E7189E750666D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Moya; - target = 17F9141D333DA1A7BE5937F227221070 /* Moya */; - targetProxy = 06E69A6B3FF5BB145F2C7BB885087654 /* PBXContainerItemProxy */; - }; - A7E301990FB4AB2EFF285F5AF2DA5E27 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SkeletonView; - target = 8CEEFD1CB630CA790F0396E2E24A4C8C /* SkeletonView */; - targetProxy = 783225E73273DE80AD8F9C1D7232347A /* PBXContainerItemProxy */; - }; - C118E94FD8F41EE75EC24974E9733EE9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; - targetProxy = 99D1B18C3F5E0308857E9AB04354F018 /* PBXContainerItemProxy */; - }; - FE2EF6FD6A249167D11FD4173B31F633 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - target = EAAA1AD3A8A1B59AB91319EE40752C6D /* Alamofire */; - targetProxy = 4C048BAD1551487470801B891F6BE675 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 0252DEDE8FF1D063AA2CEF7385BBC52E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EFA42ADAE9BAB1F83A8908CD234A32E5 /* Moya.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; - PRODUCT_MODULE_NAME = Moya; - PRODUCT_NAME = Moya; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 0947A8B352398617D947D895180E9A81 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E394B29FC670C3B63588FAE4E2FED3E2 /* SkeletonView.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SkeletonView/SkeletonView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SkeletonView/SkeletonView-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/SkeletonView/SkeletonView.modulemap"; - PRODUCT_MODULE_NAME = SkeletonView; - PRODUCT_NAME = SkeletonView; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 2444D36F2CB5FF3F9469EF5F6322EA10 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 2CB5F75C2C79B1E1AB2C3FE089150B5C /* Alamofire.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.3; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 37738B29ABC14854C5583822FE826935 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = DB870A8059BF2C21A79B9FA1BC60F5C2 /* Moya.debug.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Moya/Moya-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Moya/Moya-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/Moya/Moya.modulemap"; - PRODUCT_MODULE_NAME = Moya; - PRODUCT_NAME = Moya; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 4B51AFEEB351C25BBAF9C85FD469B96B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A4614EC1D75509F20D8BCA2BBFAD1107 /* SkeletonView.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SkeletonView/SkeletonView-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SkeletonView/SkeletonView-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/SkeletonView/SkeletonView.modulemap"; - PRODUCT_MODULE_NAME = SkeletonView; - PRODUCT_NAME = SkeletonView; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 9B66E952E27F29569285AB82461A2F34 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 008C6D8CB7402A3B653D57AC3F209AC0 /* Alamofire.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Alamofire/Alamofire-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Alamofire/Alamofire-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/Alamofire/Alamofire.modulemap"; - PRODUCT_MODULE_NAME = Alamofire; - PRODUCT_NAME = Alamofire; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.3; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - AD81E62ACCB0B7A923FC8AA288F9921E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 01AFB4E8DE15F53ED959EE971F77A886 /* SwiftLint.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - BC01E0B73776AF6B58DC318A9BE988D7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - 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 = ( - "POD_CONFIGURATION_DEBUG=1", - "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 = 14.5; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - C605C363CC9F26F9FF97DBB1D5C6E25C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - 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_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=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 = 14.5; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - D9972D8B6EAE21EEC465CA8FE1DB0903 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 420E35C3FCBD48BED7CAC20D5A22E981 /* Pods-NADA-iOS-forRelease.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - DF84DB9BB95734605967EF3017183509 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5E77B546F8ABDDE70861710F6482E2A1 /* Pods-NADA-iOS-forRelease.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - EADD1F50ABC8096A0D6CB18822BB4EE4 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0942A7198FFB33B3F13B9BF3E2D271ED /* SwiftLint.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 47F0127035329B7BD7E67CF956961AB1 /* Build configuration list for PBXNativeTarget "Pods-NADA-iOS-forRelease" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DF84DB9BB95734605967EF3017183509 /* Debug */, - D9972D8B6EAE21EEC465CA8FE1DB0903 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - BC01E0B73776AF6B58DC318A9BE988D7 /* Debug */, - C605C363CC9F26F9FF97DBB1D5C6E25C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5DB01351F919581242EE4AD62914B15E /* Build configuration list for PBXNativeTarget "SkeletonView" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 0947A8B352398617D947D895180E9A81 /* Debug */, - 4B51AFEEB351C25BBAF9C85FD469B96B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 78E219AC01CD5AFED663C9AB28280801 /* Build configuration list for PBXNativeTarget "Alamofire" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2444D36F2CB5FF3F9469EF5F6322EA10 /* Debug */, - 9B66E952E27F29569285AB82461A2F34 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - AE7B4FB01588B9E6DF09CB79FC7CE7BD /* Build configuration list for PBXAggregateTarget "SwiftLint" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - EADD1F50ABC8096A0D6CB18822BB4EE4 /* Debug */, - AD81E62ACCB0B7A923FC8AA288F9921E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - CFCE48AA201128F104DC8AD658EE12B6 /* Build configuration list for PBXNativeTarget "Moya" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 37738B29ABC14854C5583822FE826935 /* Debug */, - 0252DEDE8FF1D063AA2CEF7385BBC52E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/Pods/SkeletonView/LICENSE b/Pods/SkeletonView/LICENSE deleted file mode 100644 index 4fe21190..00000000 --- a/Pods/SkeletonView/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Juanpe Catalán - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Pods/SkeletonView/README.md b/Pods/SkeletonView/README.md deleted file mode 100755 index be997804..00000000 --- a/Pods/SkeletonView/README.md +++ /dev/null @@ -1,636 +0,0 @@ -![](Assets/header2.jpg) - -

- - - - codebeat badge - - - - - SkeletonView Playground -

- -

- Features - • Guides - • Installation - • Usage - • Miscellaneous - • Contributing -

- -**🌎 README is available in other languages: [🇪🇸](https://github.com/Juanpe/SkeletonView/blob/main/README_es.md) . [🇨🇳](https://github.com/Juanpe/SkeletonView/blob/master/README_zh.md) . [🇧🇷](https://github.com/Juanpe/SkeletonView/blob/master/README_pt-br.md) . [🇰🇷](https://github.com/Juanpe/SkeletonView/blob/master/README_ko.md) . [🇫🇷](https://github.com/Juanpe/SkeletonView/blob/master/README_fr.md)** - -Today almost all apps have async processes, such as API requests, long running processes, etc. While the processes are working, usually developers place a loading view to show users that something is going on. - -**SkeletonView** has been conceived to address this need, an elegant way to show users that something is happening and also prepare them for which contents are waiting. - -Enjoy it! 🙂 - - -## -- [🌟 Features](#-features) -- [🎬 Guides](#-guides) -- [📲 Installation](#-installation) -- [🐒 Usage](#-usage) - - [🌿 Collections](#-collections) - - [🔠 Texts](#-texts) - - [🦋 Appearance](#-appearance) - - [🎨 Custom colors](#-custom-colors) - - [🏃‍♀️ Animations](#️-animations) - - [🏄 Transitions](#-transitions) -- [✨ Miscellaneous](#-miscellaneous) -- [❤️ Contributing](#️-contributing) -- [📢 Mentions](#-mentions) -- [🏆 Sponsors](#-sponsors) -- [👨🏻‍💻 Author](#-author) -- [👮🏻 License](#-license) - - - -## 🌟 Features - -* Easy to use -* All UIViews are skeletonables -* Fully customizable -* Universal (iPhone & iPad) -* Interface Builder friendly -* Simple Swift syntax -* Lightweight readable codebase - - -## 🎬 Guides - -| [![](https://img.youtube.com/vi/75kgOhWsPNA/maxresdefault.jpg)](https://youtu.be/75kgOhWsPNA)|[![](https://img.youtube.com/vi/MVCiM_VdxVA/maxresdefault.jpg)](https://youtu.be/MVCiM_VdxVA)|[![](https://img.youtube.com/vi/Qq3Evspeea8/maxresdefault.jpg)](https://youtu.be/Qq3Evspeea8)|[![](https://img.youtube.com/vi/ZOoPtBwDRT0/maxresdefault.jpg)](https://youtu.be/ZOoPtBwDRT0)|[![](https://img.youtube.com/vi/Zx1Pg1gPfxA/maxresdefault.jpg)](https://www.youtube.com/watch?v=Zx1Pg1gPfxA) -|:---: | :---: |:---: | :---: | :---: -|[**SkeletonView Guides - Getting started**](https://youtu.be/75kgOhWsPNA)|[**How to Create Loading View with Skeleton View in Swift 5.2**](https://youtu.be/MVCiM_VdxVA) by iKh4ever Studio|[**Create Skeleton Loading View in App (Swift 5) - Xcode 11, 2020**](https://youtu.be/Qq3Evspeea8) by iOS Academy| [**Add An Elegant Loading Animation in Swift***](https://youtu.be/ZOoPtBwDRT0) by Gary Tokman| [**Cómo crear una ANIMACIÓN de CARGA de DATOS en iOS**](https://www.youtube.com/watch?v=Zx1Pg1gPfxA) by MoureDev - - -## 📲 Installation - -* [CocoaPods](https://guides.cocoapods.org/using/using-cocoapods.html): - -```ruby -pod 'SkeletonView' -``` - -* [Carthage](https://github.com/Carthage/Carthage): - -```ruby -github "Juanpe/SkeletonView" -``` - -* [Swift Package Manager](https://swift.org/package-manager/): - -```swift -dependencies: [ - .package(url: "https://github.com/Juanpe/SkeletonView.git", from: "1.7.0") -] -``` - - -## 🐒 Usage - -Only **3** steps needed to use `SkeletonView`: - -1️⃣ Import SkeletonView in proper place. -```swift -import SkeletonView -``` - -2️⃣ Now, set which views will be `skeletonables`. You achieve this in two ways: - -**Using code:** -```swift -avatarImageView.isSkeletonable = true -``` -**Using IB/Storyboards:** - -![](Assets/storyboard.png) - -3️⃣ Once you've set the views, you can show the **skeleton**. To do so, you have **4** choices: - -```swift -(1) view.showSkeleton() // Solid -(2) view.showGradientSkeleton() // Gradient -(3) view.showAnimatedSkeleton() // Solid animated -(4) view.showAnimatedGradientSkeleton() // Gradient animated -``` - -**Preview** - - - - - - - - - - - - - - -
-
Solid
-
-
Gradient
-
-
Solid Animated
-
-
Gradient Animated
-
- - - - - - - -
- - -> 📣 **IMPORTANT!** -> -> `SkeletonView` is recursive, so if you want show the skeleton in all skeletonable views, you only need to call the show method in the main container view. For example, with `UIViewControllers`. - - - - -### 🌿 Collections - -```SkeletonView``` is compatible with ```UITableView``` and ```UICollectionView```. - - -**UITableView** - -If you want to show the skeleton in a ```UITableView```, you need to conform to ```SkeletonTableViewDataSource``` protocol. - -``` swift -public protocol SkeletonTableViewDataSource: UITableViewDataSource { - func numSections(in collectionSkeletonView: UITableView) -> Int // Default: 1 - func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int - func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier - func collectionSkeletonView(_ skeletonView: UITableView, skeletonCellForRowAt indexPath: IndexPath) -> UITableViewCell? // Default: nil - func collectionSkeletonView(_ skeletonView: UITableView, prepareCellForSkeleton cell: UITableViewCell, at indexPath: IndexPath) -} -``` -As you can see, this protocol inherits from ```UITableViewDataSource```, so you can replace this protocol with the skeleton protocol. - -This protocol has a default implementation for some methods. For example, the number of rows for each section is calculated in runtime: - -``` swift -func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int -// Default: -// It calculates how many cells need to populate whole tableview -``` - -> 📣 **IMPORTANT!** -> -> If you return `UITableView.automaticNumberOfSkeletonRows` in the above method, it acts like the default behavior (i.e. it calculates how many cells needed to populate the whole tableview). - -There is only one method you need to implement to let Skeleton know the cell identifier. This method doesn't have default implementation: - ``` swift - func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier { - return "CellIdentifier" -} - ``` - - By default, the library dequeues the cells from each indexPath, but you can also do this if you want to make some changes before the skeleton appears: - ``` swift - func collectionSkeletonView(_ skeletonView: UITableView, skeletonCellForRowAt indexPath: IndexPath) -> UITableViewCell? { - let cell = skeletonView.dequeueReusableCell(withIdentifier: "CellIdentifier", for: indexPath) as? Cell - cell?.textField.isHidden = indexPath.row == 0 - return cell - } - ``` - -If you prefer to leave the deque part to the library you can configure the cell using this method: - ``` swift - func collectionSkeletonView(_ skeletonView: UITableView, prepareCellForSkeleton cell: UITableViewCell, at indexPath: IndexPath) { - let cell = cell as? Cell - cell?.textField.isHidden = indexPath.row == 0 - } - ``` - - -Besides, you can skeletonize both the headers and footers. You need to conform to `SkeletonTableViewDelegate` protocol. - -```swift -public protocol SkeletonTableViewDelegate: UITableViewDelegate { - func collectionSkeletonView(_ skeletonView: UITableView, identifierForHeaderInSection section: Int) -> ReusableHeaderFooterIdentifier? // default: nil - func collectionSkeletonView(_ skeletonView: UITableView, identifierForFooterInSection section: Int) -> ReusableHeaderFooterIdentifier? // default: nil -} -``` - -> 📣 **IMPORTANT!** -> -> 1️⃣ If you are using resizable cells (**`tableView.rowHeight = UITableViewAutomaticDimension`**), it's mandatory define the **`estimatedRowHeight`**. -> -> 2️⃣ When you add elements in a **`UITableViewCell`** you should add it to **`contentView`** and not to the cell directly. -> ```swift -> self.contentView.addSubview(titleLabel) ✅ -> self.addSubview(titleLabel) ❌ -> ``` - - - -**UICollectionView** - -For `UICollectionView`, you need to conform to `SkeletonCollectionViewDataSource` protocol. - -``` swift -public protocol SkeletonCollectionViewDataSource: UICollectionViewDataSource { - func numSections(in collectionSkeletonView: UICollectionView) -> Int // default: 1 - func collectionSkeletonView(_ skeletonView: UICollectionView, numberOfItemsInSection section: Int) -> Int - func collectionSkeletonView(_ skeletonView: UICollectionView, cellIdentifierForItemAt indexPath: IndexPath) -> ReusableCellIdentifier - func collectionSkeletonView(_ skeletonView: UICollectionView, supplementaryViewIdentifierOfKind: String, at indexPath: IndexPath) -> ReusableCellIdentifier? // default: nil - func collectionSkeletonView(_ skeletonView: UICollectionView, skeletonCellForItemAt indexPath: IndexPath) -> UICollectionViewCell? // default: nil - func collectionSkeletonView(_ skeletonView: UICollectionView, prepareCellForSkeleton cell: UICollectionViewCell, at indexPath: IndexPath) -} -``` - -The rest of the process is the same as ```UITableView``` - - -### 🔠 Texts - -![](Assets/multilines2.png) - -When using elements with text, ```SkeletonView``` draws lines to simulate text. -Besides, you can decide how many lines you want. If ```numberOfLines``` is set to zero, it will calculate how many lines needed to populate the whole skeleton and it will be drawn. Instead, if you set it to one, two or any number greater than zero, it will only draw this number of lines. - -You can set some properties for multilines elements. - - -| Property | Values | Default | Preview -| ------- | ------- |------- | ------- -| **Filling percent** of the last line. | `0...100` | `70%` | ![](Assets/multiline_lastline.png) -| **Corner radius** of lines. (**NEW**) | `0...10` | `0` | ![](Assets/multiline_corner.png) - - - -To modify the percent or radius **using code**, set the properties: -```swift -descriptionTextView.lastLineFillPercent = 50 -descriptionTextView.linesCornerRadius = 5 -``` - -Or, if you prefer use **IB/Storyboard**: - -![](Assets/multiline_customize.png) - - -### 🦋 Appearance - -The skeletons have a default appearance. So, when you don't specify the color, gradient or multilines properties, `SkeletonView` uses the default values. - -Default values: -- **tintColor**: UIColor - - *default: `.skeletonDefault` (same as `.clouds` but adaptive to dark mode)* -- **gradient**: SkeletonGradient - - *default: `SkeletonGradient(baseColor: .skeletonDefault)`* -- **multilineHeight**: CGFloat - - *default: 15* -- **multilineSpacing**: CGFloat - - *default: 10* -- **multilineLastLineFillPercent**: Int - - *default: 70* -- **multilineCornerRadius**: Int - - *default: 0* -- **skeletonCornerRadius**: CGFloat (IBInspectable) (Make your skeleton view with corner) - - *default: 0* - -To get these default values you can use `SkeletonAppearance.default`. Using this property you can set the values as well: -```swift -SkeletonAppearance.default.multilineHeight = 20 -SkeletonAppearance.default.tintColor = .green -``` - -You can also specifiy these line appearance properties on a per-label basis: -- **lastLineFillPercent**: Int -- **linesCornerRadius**: Int -- **skeletonLineSpacing**: CGFloat -- **skeletonPaddingInsets**: UIEdgeInsets - - -### 🎨 Custom colors - -You can decide which color the skeleton is tinted with. You only need to pass as a parameter the color or gradient you want. - -**Using solid colors** -```swift -view.showSkeleton(usingColor: UIColor.gray) // Solid -// or -view.showSkeleton(usingColor: UIColor(red: 25.0, green: 30.0, blue: 255.0, alpha: 1.0)) -``` -**Using gradients** -``` swift -let gradient = SkeletonGradient(baseColor: UIColor.midnightBlue) -view.showGradientSkeleton(usingGradient: gradient) // Gradient -``` - -Besides, **SkeletonView** features 20 flat colors 🤙🏼 - -```UIColor.turquoise, UIColor.greenSea, UIColor.sunFlower, UIColor.flatOrange ...``` - -![](Assets/flatcolors.png) -###### Image captured from website [https://flatuicolors.com](https://flatuicolors.com) - - -### 🏃‍♀️ Animations - -**SkeletonView** has two built-in animations, *pulse* for solid skeletons and *sliding* for gradients. - -Besides, if you want to do your own skeleton animation, it's really easy. - - -Skeleton provides the `showAnimatedSkeleton` function which has a ```SkeletonLayerAnimation``` closure where you can define your custom animation. - -```swift -public typealias SkeletonLayerAnimation = (CALayer) -> CAAnimation -``` - -You can call the function like this: - -```swift -view.showAnimatedSkeleton { (layer) -> CAAnimation in - let animation = CAAnimation() - // Customize here your animation - - return animation -} -``` - -It's available ```SkeletonAnimationBuilder```. It's a builder to make ```SkeletonLayerAnimation```. - -Today, you can create **sliding animations** for gradients, deciding the **direction** and setting the **duration** of the animation (default = 1.5s). - -```swift -// func makeSlidingAnimation(withDirection direction: GradientDirection, duration: CFTimeInterval = 1.5) -> SkeletonLayerAnimation - -let animation = SkeletonAnimationBuilder().makeSlidingAnimation(withDirection: .leftToRight) -view.showAnimatedGradientSkeleton(usingGradient: gradient, animation: animation) - -``` - -```GradientDirection``` is an enum, with theses cases: - -| Direction | Preview -|------- | ------- -| .leftRight | ![](Assets/sliding_left_to_right.gif) -| .rightLeft | ![](Assets/sliding_right_to_left.gif) -| .topBottom | ![](Assets/sliding_top_to_bottom.gif) -| .bottomTop | ![](Assets/sliding_bottom_to_top.gif) -| .topLeftBottomRight | ![](Assets/sliding_topLeft_to_bottomRight.gif) -| .bottomRightTopLeft | ![](Assets/sliding_bottomRight_to_topLeft.gif) - -> **😉 TRICK!** -> -> Exist another way to create sliding animations, just using this shortcut: -> ```swift -> let animation = GradientDirection.leftToRight.slidingAnimation() -> ``` - - - -### 🏄 Transitions - -**SkeletonView** has built-in transitions to **show** or **hide** the skeletons in a *smoother* way 🤙 - -To use the transition, simply add the ```transition``` parameter to your ```showSkeleton()``` or ```hideSkeleton()``` function with the transition time, like this: - -```swift -view.showSkeleton(transition: .crossDissolve(0.25)) //Show skeleton cross dissolve transition with 0.25 seconds fade time -view.hideSkeleton(transition: .crossDissolve(0.25)) //Hide skeleton cross dissolve transition with 0.25 seconds fade time - -``` - -The default value is `crossDissolve(0.25)` - -**Preview** - - - - - - - - - - -
-
None
-
-
Cross dissolve
-
- - - -
- - -## ✨ Miscellaneous - - - -**Hierarchy** - -Since ```SkeletonView``` is recursive, and we want skeleton to be very efficient, we want to stop recursion as soon as possible. For this reason, you must set the container view as `Skeletonable`, because Skeleton will stop looking for `skeletonable` subviews as soon as a view is not Skeletonable, breaking then the recursion. - -Because an image is worth a thousand words: - -In this example we have a `UIViewController` with a `ContainerView` and a `UITableView`. When the view is ready, we show the skeleton using this method: -``` -view.showSkeleton() -``` - -> ```isSkeletonable```= ☠️ - -| Configuration | Result| -|:-------:|:-------:| -| | | -| | | -| | | -|| | -| | | -| | | - - - -**Hierarchy in collections** - -Here is an illustration that shows how you should specify which elements are skeletonables when you are using an `UITableView`: - - - -As you can see, we have to make skeletonable the tableview, the cell and the UI elements, but we don't need to set as skeletonable the `contentView` - - - -**Skeleton views layout** - -Sometimes skeleton layout may not fit your layout because the parent view bounds have changed. ~For example, rotating the device.~ - -You can relayout the skeleton views like so: - -```swift -override func viewDidLayoutSubviews() { - view.layoutSkeletonIfNeeded() -} -``` - -> 📣 **IMPORTANT!** -> -> You shouldn't call this method. From **version 1.8.1** you don't need to call this method, the library does automatically. So, you can use this method **ONLY** in the cases when you need to update the layout of the skeleton manually. - - - - -**Update skeleton** - -You can change the skeleton configuration at any time like its colour, animation, etc. with the following methods: - -```swift -(1) view.updateSkeleton() // Solid -(2) view.updateGradientSkeleton() // Gradient -(3) view.updateAnimatedSkeleton() // Solid animated -(4) view.updateAnimatedGradientSkeleton() // Gradient animated -``` - -**Hiding views when the animation starts** - -Sometimes you wanna hide some view when the animation starts, so there is a quick property that you can use to make this happen: - -```swift -view.isHiddenWhenSkeletonIsActive = true // This works only when isSkeletonable = true -``` - -**Don't modify user interaction when the skeleton is active** - - -By default, the user interaction is disabled for skeletonized items, but if you don't want to modify the user interaction indicator when skeleton is active, you can use the `isUserInteractionDisabledWhenSkeletonIsActive` property: - -```swift -view.isUserInteractionDisabledWhenSkeletonIsActive = false // The view will be active when the skeleton will be active. -``` - -**Delayed show skeleton** - -You can delay the presentation of the skeleton if the views update quickly. - -```swift -func showSkeleton(usingColor: UIColor, - animated: Bool, - delay: TimeInterval, - transition: SkeletonTransitionStyle) -``` - -```swift -func showGradientSkeleton(usingGradient: SkeletonGradient, - animated: Bool, - delay: TimeInterval, - transition: SkeletonTransitionStyle) -``` - -**Debug** - -To facilitate the debug tasks when something is not working fine. **`SkeletonView`** has some new tools. - -First, `UIView` has available a new property with his skeleton info: -```swift -var skeletonDescription: String - -``` -The skeleton representation looks like this: - -![](Assets/debug_description.png) - -Besides, you can activate the new **debug mode**. You just add the environment variable `SKELETON_DEBUG` and activate it. - -![](Assets/debug_mode.png) - -Then, when the skeleton appears, you can see the view hierarchy in the Xcode console. - -
-Open to see an output example - -
- - -**Supported OS & SDK Versions** - -* iOS 9.0+ -* tvOS 9.0+ -* Swift 5.3 - -## ❤️ Contributing -This is an open source project, so feel free to contribute. How? - -- Open an [issue](https://github.com/Juanpe/SkeletonView/issues/new). -- Send feedback via [email](mailto://juanpecatalan.com). -- Propose your own fixes, suggestions and open a pull request with the changes. - -See [all contributors](https://github.com/Juanpe/SkeletonView/graphs/contributors) - -For more information, please read the [contributing guidelines](https://github.com/Juanpe/SkeletonView/blob/main/CONTRIBUTING.md). - - -## 📢 Mentions - -- [iOS Dev Weekly #327](https://iosdevweekly.com/issues/327#start) -- [Hacking with Swift Articles](https://www.hackingwithswift.com/articles/40/skeletonview-makes-loading-content-beautiful) -- [Top 10 Swift Articles November](https://medium.mybridge.co/swift-top-10-articles-for-the-past-month-v-nov-2017-dfed7861cd65) -- [30 Amazing iOS Swift Libraries (v2018)](https://medium.mybridge.co/30-amazing-ios-swift-libraries-for-the-past-year-v-2018-7cf15027eee9) -- [AppCoda Weekly #44](http://digest.appcoda.com/issues/appcoda-weekly-issue-44-81899) -- [iOS Cookies Newsletter #103](https://us11.campaign-archive.com/?u=cd1f3ed33c6527331d82107ba&id=48131a516d) -- [Swift Developments Newsletter #113](https://andybargh.com/swiftdevelopments-113/) -- [iOS Goodies #204](http://ios-goodies.com/post/167557280951/week-204) -- [Swift Weekly #96](http://digest.swiftweekly.com/issues/swift-weekly-issue-96-81759) -- [CocoaControls](https://www.cocoacontrols.com/controls/skeletonview) -- [Awesome iOS Newsletter #74](https://ios.libhunt.com/newsletter/74) -- [Swift News #36](https://www.youtube.com/watch?v=mAGpsQiy6so) -- [Best iOS articles, new tools & more](https://medium.com/flawless-app-stories/best-ios-articles-new-tools-more-fcbe673e10d) - -## 🏆 Sponsors - -Open-source projects cannot live long without your help. If you find **SkeletonView** is useful, please consider supporting this -project by becoming a sponsor. - -Become a sponsor through [GitHub Sponsors](https://github.com/sponsors/Juanpe) :heart: - -## 👨🏻‍💻 Author - -[Juanpe Catalán](http://www.twitter.com/JuanpeCatalan) - -Buy me a coffee - - -## 👮🏻 License - -``` -MIT License - -Copyright (c) 2017 Juanpe Catalán - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` diff --git a/Pods/SkeletonView/Sources/Appearance/SkeletonAppearance.swift b/Pods/SkeletonView/Sources/Appearance/SkeletonAppearance.swift deleted file mode 100644 index 94f6e0b3..00000000 --- a/Pods/SkeletonView/Sources/Appearance/SkeletonAppearance.swift +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright © 2017 SkeletonView. All rights reserved. - -import UIKit - -public protocol Appearance { - var tintColor: UIColor { get set } - var gradient: SkeletonGradient { get set } - var multilineHeight: CGFloat { get set } - var multilineSpacing: CGFloat { get set } - var multilineLastLineFillPercent: Int { get set } - var multilineCornerRadius: Int { get set } - var renderSingleLineAsView: Bool { get set } -} - -public enum SkeletonAppearance { - public static var `default`: Appearance = SkeletonViewAppearance.shared -} - -// codebeat:disable[TOO_MANY_IVARS] -class SkeletonViewAppearance: Appearance { - static var shared = SkeletonViewAppearance() - - var tintColor: UIColor = .skeletonDefault - - var gradient = SkeletonGradient(baseColor: .skeletonDefault) - - var multilineHeight: CGFloat = 15 - - var multilineSpacing: CGFloat = 10 - - var multilineLastLineFillPercent: Int = 70 - - var multilineCornerRadius: Int = 0 - - var renderSingleLineAsView: Bool = false -} -// codebeat:enable[TOO_MANY_IVARS] diff --git a/Pods/SkeletonView/Sources/Builders/SkeletonLayerBuilder.swift b/Pods/SkeletonView/Sources/Builders/SkeletonLayerBuilder.swift deleted file mode 100644 index b4e155db..00000000 --- a/Pods/SkeletonView/Sources/Builders/SkeletonLayerBuilder.swift +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -/// Object that facilitates the creation of skeleton layers, -/// based on the builder pattern -class SkeletonLayerBuilder { - var skeletonType: SkeletonType? - var colors: [UIColor] = [] - var holder: UIView? - - @discardableResult - func setSkeletonType(_ type: SkeletonType) -> SkeletonLayerBuilder { - self.skeletonType = type - return self - } - - @discardableResult - func addColor(_ color: UIColor) -> SkeletonLayerBuilder { - return addColors([color]) - } - - @discardableResult - func addColors(_ colors: [UIColor]) -> SkeletonLayerBuilder { - self.colors.append(contentsOf: colors) - return self - } - - @discardableResult - func setHolder(_ holder: UIView) -> SkeletonLayerBuilder { - self.holder = holder - return self - } - - @discardableResult - func build() -> SkeletonLayer? { - guard let type = skeletonType, - let holder = holder - else { return nil } - - return SkeletonLayer(type: type, - colors: colors, - skeletonHolder: holder) - } -} diff --git a/Pods/SkeletonView/Sources/Builders/SkeletonMultilineLayerBuilder.swift b/Pods/SkeletonView/Sources/Builders/SkeletonMultilineLayerBuilder.swift deleted file mode 100644 index c92b0bdc..00000000 --- a/Pods/SkeletonView/Sources/Builders/SkeletonMultilineLayerBuilder.swift +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -/// Object that facilitates the creation of skeleton layers for multiline -/// elements, based on the builder pattern -class SkeletonMultilineLayerBuilder { - var skeletonType: SkeletonType? - var index: Int? - var height: CGFloat? - var width: CGFloat? - var cornerRadius: Int? - var multilineSpacing: CGFloat = SkeletonAppearance.default.multilineSpacing - var paddingInsets: UIEdgeInsets = .zero - var isRTL: Bool = false - - @discardableResult - func setSkeletonType(_ type: SkeletonType) -> SkeletonMultilineLayerBuilder { - self.skeletonType = type - return self - } - - @discardableResult - func setIndex(_ index: Int) -> SkeletonMultilineLayerBuilder { - self.index = index - return self - } - - @discardableResult - func setHeight(_ height: CGFloat) -> SkeletonMultilineLayerBuilder { - self.height = height - return self - } - - @discardableResult - func setWidth(_ width: CGFloat) -> SkeletonMultilineLayerBuilder { - self.width = width - return self - } - - @discardableResult - func setCornerRadius(_ radius: Int) -> SkeletonMultilineLayerBuilder { - self.cornerRadius = radius - return self - } - - @discardableResult - func setMultilineSpacing(_ spacing: CGFloat) -> SkeletonMultilineLayerBuilder { - self.multilineSpacing = spacing - return self - } - - @discardableResult - func setPadding(_ insets: UIEdgeInsets) -> SkeletonMultilineLayerBuilder { - self.paddingInsets = insets - return self - } - - @discardableResult - func setIsRTL(_ isRTL: Bool) -> SkeletonMultilineLayerBuilder { - self.isRTL = isRTL - return self - } - - func build() -> CALayer? { - guard let type = skeletonType, - let index = index, - let width = width, - let height = height, - let radius = cornerRadius - else { return nil } - - let layer = type.layer - layer.anchorPoint = .zero - layer.name = CALayer.skeletonSubLayersName - layer.updateLayerFrame(for: index, - size: CGSize(width: width, height: height), - multilineSpacing: multilineSpacing, - paddingInsets: paddingInsets, - isRTL: isRTL) - - layer.cornerRadius = CGFloat(radius) - layer.masksToBounds = true - - return layer - } -} diff --git a/Pods/SkeletonView/Sources/Collections/CollectionSkeletonProtocol.swift b/Pods/SkeletonView/Sources/Collections/CollectionSkeletonProtocol.swift deleted file mode 100644 index 9aff9706..00000000 --- a/Pods/SkeletonView/Sources/Collections/CollectionSkeletonProtocol.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// CollectionSkeleton.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 02/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -enum CollectionAssociatedKeys { - static var dummyDataSource = "dummyDataSource" - static var dummyDelegate = "dummyDelegate" -} - -protocol CollectionSkeleton { - var skeletonDataSource: SkeletonCollectionDataSource? { get set } - var skeletonDelegate: SkeletonCollectionDelegate? { get set } - var estimatedNumberOfRows: Int { get } - - func addDummyDataSource() - func updateDummyDataSource() - func removeDummyDataSource(reloadAfter: Bool) - func disableUserInteraction() - func enableUserInteraction() -} - -extension CollectionSkeleton where Self: UIScrollView { - var estimatedNumberOfRows: Int { return 0 } - func addDummyDataSource() {} - func removeDummyDataSource(reloadAfter: Bool) {} - - func disableUserInteraction() { - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = false - isScrollEnabled = false - } - } - - func enableUserInteraction() { - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = true - isScrollEnabled = true - } - } -} diff --git a/Pods/SkeletonView/Sources/Collections/CollectionViews/SkeletonCollectionViewProtocols.swift b/Pods/SkeletonView/Sources/Collections/CollectionViews/SkeletonCollectionViewProtocols.swift deleted file mode 100644 index a8953eb6..00000000 --- a/Pods/SkeletonView/Sources/Collections/CollectionViews/SkeletonCollectionViewProtocols.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// SkeletonCollectionViewProtocols.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 06/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -public protocol SkeletonCollectionViewDataSource: UICollectionViewDataSource { - func numSections(in collectionSkeletonView: UICollectionView) -> Int - func collectionSkeletonView(_ skeletonView: UICollectionView, numberOfItemsInSection section: Int) -> Int - func collectionSkeletonView(_ skeletonView: UICollectionView, cellIdentifierForItemAt indexPath: IndexPath) -> ReusableCellIdentifier - func collectionSkeletonView(_ skeletonView: UICollectionView, supplementaryViewIdentifierOfKind: String, at indexPath: IndexPath) -> ReusableCellIdentifier? - func collectionSkeletonView(_ skeletonView: UICollectionView, skeletonCellForItemAt indexPath: IndexPath) -> UICollectionViewCell? - func collectionSkeletonView(_ skeletonView: UICollectionView, prepareCellForSkeleton cell: UICollectionViewCell, at indexPath: IndexPath) -} - -public extension SkeletonCollectionViewDataSource { - func collectionSkeletonView(_ skeletonView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - UICollectionView.automaticNumberOfSkeletonItems - } - - func collectionSkeletonView(_ skeletonView: UICollectionView, supplementaryViewIdentifierOfKind: String, at indexPath: IndexPath) -> ReusableCellIdentifier? { - nil - } - - func numSections(in collectionSkeletonView: UICollectionView) -> Int { - 1 - } - - func collectionSkeletonView(_ skeletonView: UICollectionView, skeletonCellForItemAt indexPath: IndexPath) -> UICollectionViewCell? { - nil - } - - func collectionSkeletonView(_ skeletonView: UICollectionView, prepareCellForSkeleton cell: UICollectionViewCell, at indexPath: IndexPath) { } -} - -public protocol SkeletonCollectionViewDelegate: UICollectionViewDelegate { } diff --git a/Pods/SkeletonView/Sources/Collections/CollectionViews/UICollectionView+CollectionSkeleton.swift b/Pods/SkeletonView/Sources/Collections/CollectionViews/UICollectionView+CollectionSkeleton.swift deleted file mode 100644 index 701185d7..00000000 --- a/Pods/SkeletonView/Sources/Collections/CollectionViews/UICollectionView+CollectionSkeleton.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// UICollectionView+CollectionSkeleton.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 02/02/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -extension UICollectionView: CollectionSkeleton { - public static let automaticNumberOfSkeletonItems = -1 - - var estimatedNumberOfRows: Int { - guard let flowlayout = collectionViewLayout as? UICollectionViewFlowLayout else { return 0 } - switch flowlayout.scrollDirection { - case .vertical: - return Int(ceil(frame.height / flowlayout.itemSize.height)) - case .horizontal: - return Int(ceil(frame.width / flowlayout.itemSize.width)) - default: - return 0 - } - } - - var skeletonDataSource: SkeletonCollectionDataSource? { - get { return ao_get(pkey: &CollectionAssociatedKeys.dummyDataSource) as? SkeletonCollectionDataSource } - set { - ao_setOptional(newValue, pkey: &CollectionAssociatedKeys.dummyDataSource) - self.dataSource = newValue - } - } - - var skeletonDelegate: SkeletonCollectionDelegate? { - get { return ao_get(pkey: &CollectionAssociatedKeys.dummyDelegate) as? SkeletonCollectionDelegate } - set { - ao_setOptional(newValue, pkey: &CollectionAssociatedKeys.dummyDelegate) - self.delegate = newValue - } - } - - func addDummyDataSource() { - guard let originalDataSource = self.dataSource as? SkeletonCollectionViewDataSource, - !(originalDataSource is SkeletonCollectionDataSource) - else { return } - - let dataSource = SkeletonCollectionDataSource(collectionViewDataSource: originalDataSource) - self.skeletonDataSource = dataSource - reloadData() - } - - func updateDummyDataSource() { - if (dataSource as? SkeletonCollectionDataSource) != nil { - reloadData() - } else { - addDummyDataSource() - } - } - - func removeDummyDataSource(reloadAfter: Bool) { - guard let dataSource = self.dataSource as? SkeletonCollectionDataSource else { return } - self.skeletonDataSource = nil - self.dataSource = dataSource.originalCollectionViewDataSource - if reloadAfter { self.reloadData() } - } -} - -extension UICollectionView: GenericCollectionView { - var scrollView: UIScrollView { return self } -} - -public extension UICollectionView { - func prepareSkeleton(completion: @escaping (Bool) -> Void) { - guard let originalDataSource = self.dataSource as? SkeletonCollectionViewDataSource, - !(originalDataSource is SkeletonCollectionDataSource) - else { return } - - let dataSource = SkeletonCollectionDataSource(collectionViewDataSource: originalDataSource, rowHeight: 0.0) - self.skeletonDataSource = dataSource - performBatchUpdates({ - self.reloadData() - }) { done in - completion(done) - - } - } -} diff --git a/Pods/SkeletonView/Sources/Collections/Generics/GenericCollectionView.swift b/Pods/SkeletonView/Sources/Collections/Generics/GenericCollectionView.swift deleted file mode 100644 index 23682cbe..00000000 --- a/Pods/SkeletonView/Sources/Collections/Generics/GenericCollectionView.swift +++ /dev/null @@ -1,13 +0,0 @@ -// -// GenericCollectionView.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 30/03/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -protocol GenericCollectionView { - var scrollView: UIScrollView { get } -} diff --git a/Pods/SkeletonView/Sources/Collections/Generics/SkeletonReusableCell.swift b/Pods/SkeletonView/Sources/Collections/Generics/SkeletonReusableCell.swift deleted file mode 100644 index c2eff142..00000000 --- a/Pods/SkeletonView/Sources/Collections/Generics/SkeletonReusableCell.swift +++ /dev/null @@ -1,15 +0,0 @@ -// -// SkeletonReusableCell.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 30/03/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -public protocol SkeletonReusableCell { } - -extension UITableViewCell: SkeletonReusableCell { } - -extension UICollectionViewCell: SkeletonReusableCell { } diff --git a/Pods/SkeletonView/Sources/Collections/SkeletonCollectionDataSource.swift b/Pods/SkeletonView/Sources/Collections/SkeletonCollectionDataSource.swift deleted file mode 100644 index dc86feb1..00000000 --- a/Pods/SkeletonView/Sources/Collections/SkeletonCollectionDataSource.swift +++ /dev/null @@ -1,124 +0,0 @@ -// -// SkeletonCollectionDataSource.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 02/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -public typealias ReusableCellIdentifier = String - -class SkeletonCollectionDataSource: NSObject { - weak var originalTableViewDataSource: SkeletonTableViewDataSource? - weak var originalCollectionViewDataSource: SkeletonCollectionViewDataSource? - var rowHeight: CGFloat = 0.0 - var originalRowHeight: CGFloat = 0.0 - - convenience init(tableViewDataSource: SkeletonTableViewDataSource? = nil, collectionViewDataSource: SkeletonCollectionViewDataSource? = nil, rowHeight: CGFloat = 0.0, originalRowHeight: CGFloat = 0.0) { - self.init() - self.originalTableViewDataSource = tableViewDataSource - self.originalCollectionViewDataSource = collectionViewDataSource - self.rowHeight = rowHeight - self.originalRowHeight = originalRowHeight - } -} - -// MARK: - UITableViewDataSource -extension SkeletonCollectionDataSource: UITableViewDataSource { - func numberOfSections(in tableView: UITableView) -> Int { - originalTableViewDataSource?.numSections(in: tableView) ?? 0 - } - - func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - guard let originalTableViewDataSource = originalTableViewDataSource else { - return 0 - } - - let numberOfRows = originalTableViewDataSource.collectionSkeletonView(tableView, numberOfRowsInSection: section) - - if numberOfRows == UITableView.automaticNumberOfSkeletonRows { - return tableView.estimatedNumberOfRows - } else { - return numberOfRows - } - } - - func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - guard let cell = originalTableViewDataSource?.collectionSkeletonView(tableView, skeletonCellForRowAt: indexPath) else { - let cellIdentifier = originalTableViewDataSource?.collectionSkeletonView(tableView, cellIdentifierForRowAt: indexPath) ?? "" - let fakeCell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) - - originalTableViewDataSource?.collectionSkeletonView(tableView, prepareCellForSkeleton: fakeCell, at: indexPath) - skeletonViewIfContainerSkeletonIsActive(container: tableView, view: fakeCell) - - return fakeCell - } - - originalTableViewDataSource?.collectionSkeletonView(tableView, prepareCellForSkeleton: cell, at: indexPath) - skeletonViewIfContainerSkeletonIsActive(container: tableView, view: cell) - return cell - } -} - -// MARK: - UICollectionViewDataSource -extension SkeletonCollectionDataSource: UICollectionViewDataSource { - func numberOfSections(in collectionView: UICollectionView) -> Int { - originalCollectionViewDataSource?.numSections(in: collectionView) ?? 0 - } - - func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - guard let originalCollectionViewDataSource = originalCollectionViewDataSource else { - return 0 - } - - let numberOfItems = originalCollectionViewDataSource.collectionSkeletonView(collectionView, numberOfItemsInSection: section) - - if numberOfItems == UICollectionView.automaticNumberOfSkeletonItems { - return collectionView.estimatedNumberOfRows - } else { - return numberOfItems - } - } - - func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - guard let cell = originalCollectionViewDataSource?.collectionSkeletonView(collectionView, skeletonCellForItemAt: indexPath) else { - let cellIdentifier = originalCollectionViewDataSource?.collectionSkeletonView(collectionView, cellIdentifierForItemAt: indexPath) ?? "" - let fakeCell = collectionView.dequeueReusableCell(withReuseIdentifier: cellIdentifier, for: indexPath) - - originalCollectionViewDataSource?.collectionSkeletonView(collectionView, prepareCellForSkeleton: fakeCell, at: indexPath) - skeletonViewIfContainerSkeletonIsActive(container: collectionView, view: fakeCell) - - return fakeCell - } - - originalCollectionViewDataSource?.collectionSkeletonView(collectionView, prepareCellForSkeleton: cell, at: indexPath) - skeletonViewIfContainerSkeletonIsActive(container: collectionView, view: cell) - return cell - } - - func collectionView(_ collectionView: UICollectionView, - viewForSupplementaryElementOfKind kind: String, - at indexPath: IndexPath) -> UICollectionReusableView { - if let viewIdentifier = originalCollectionViewDataSource?.collectionSkeletonView(collectionView, supplementaryViewIdentifierOfKind: kind, at: indexPath) { - let view = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: viewIdentifier, for: indexPath) - skeletonViewIfContainerSkeletonIsActive(container: collectionView, view: view) - return view - } - - return originalCollectionViewDataSource?.collectionView?(collectionView, viewForSupplementaryElementOfKind: kind, at: indexPath) ?? UICollectionReusableView() - } - -} - -extension SkeletonCollectionDataSource { - private func skeletonViewIfContainerSkeletonIsActive(container: UIView, view: UIView) { - guard container.isSkeletonActive, - let skeletonConfig = container.currentSkeletonConfig else { - return - } - - view.showSkeleton(skeletonConfig: skeletonConfig) - } -} diff --git a/Pods/SkeletonView/Sources/Collections/SkeletonCollectionDelegate.swift b/Pods/SkeletonView/Sources/Collections/SkeletonCollectionDelegate.swift deleted file mode 100644 index c9a02c54..00000000 --- a/Pods/SkeletonView/Sources/Collections/SkeletonCollectionDelegate.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// SkeletonCollectionDelegate.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 30/03/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -class SkeletonCollectionDelegate: NSObject { - weak var originalTableViewDelegate: SkeletonTableViewDelegate? - weak var originalCollectionViewDelegate: SkeletonCollectionViewDelegate? - - init(tableViewDelegate: SkeletonTableViewDelegate? = nil, collectionViewDelegate: SkeletonCollectionViewDelegate? = nil) { - self.originalTableViewDelegate = tableViewDelegate - self.originalCollectionViewDelegate = collectionViewDelegate - } -} - -// MARK: - UITableViewDelegate -extension SkeletonCollectionDelegate: UITableViewDelegate { - func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { - headerOrFooterView(tableView, for: originalTableViewDelegate?.collectionSkeletonView(tableView, identifierForHeaderInSection: section)) - } - - func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { - headerOrFooterView(tableView, for: originalTableViewDelegate?.collectionSkeletonView(tableView, identifierForFooterInSection: section)) - } - - func tableView(_ tableView: UITableView, didEndDisplayingHeaderView view: UIView, forSection section: Int) { - view.hideSkeleton() - originalTableViewDelegate?.tableView?(tableView, didEndDisplayingHeaderView: view, forSection: section) - } - - func tableView(_ tableView: UITableView, didEndDisplayingFooterView view: UIView, forSection section: Int) { - view.hideSkeleton() - originalTableViewDelegate?.tableView?(tableView, didEndDisplayingFooterView: view, forSection: section) - } - - func tableView(_ tableView: UITableView, didEndDisplaying cell: UITableViewCell, forRowAt indexPath: IndexPath) { - cell.hideSkeleton() - originalTableViewDelegate?.tableView?(tableView, didEndDisplaying: cell, forRowAt: indexPath) - } - - private func headerOrFooterView(_ tableView: UITableView, for viewIdentifier: String? ) -> UIView? { - guard let viewIdentifier = viewIdentifier, let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: viewIdentifier) else { return nil } - skeletonViewIfContainerSkeletonIsActive(container: tableView, view: header) - return header - } -} - -// MARK: - UICollectionViewDelegate -extension SkeletonCollectionDelegate: UICollectionViewDelegate { } - -extension SkeletonCollectionDelegate { - private func skeletonViewIfContainerSkeletonIsActive(container: UIView, view: UIView) { - guard container.isSkeletonActive, - let skeletonConfig = container.currentSkeletonConfig else { - return - } - - view.showSkeleton(skeletonConfig: skeletonConfig) - } -} diff --git a/Pods/SkeletonView/Sources/Collections/TableViews/SkeletonTableViewProtocols.swift b/Pods/SkeletonView/Sources/Collections/TableViews/SkeletonTableViewProtocols.swift deleted file mode 100644 index c7e8648a..00000000 --- a/Pods/SkeletonView/Sources/Collections/TableViews/SkeletonTableViewProtocols.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// SkeletonTableViewProtocols.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 06/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -public protocol SkeletonTableViewDataSource: UITableViewDataSource { - func numSections(in collectionSkeletonView: UITableView) -> Int - func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int - func collectionSkeletonView(_ skeletonView: UITableView, cellIdentifierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier - func collectionSkeletonView(_ skeletonView: UITableView, skeletonCellForRowAt indexPath: IndexPath) -> UITableViewCell? - func collectionSkeletonView(_ skeletonView: UITableView, prepareCellForSkeleton cell: UITableViewCell, at indexPath: IndexPath) -} - -public extension SkeletonTableViewDataSource { - func collectionSkeletonView(_ skeletonView: UITableView, numberOfRowsInSection section: Int) -> Int { - return UITableView.automaticNumberOfSkeletonRows - } - - func numSections(in collectionSkeletonView: UITableView) -> Int { return 1 } - - /// Keeping the misspelled version around until it can be deprecated - /// Right now, it just calls the new correctly spelled method and returns its result - @available(*, deprecated, renamed: "collectionSkeletonView(_:cellIdentifierForRowAt:)") - func collectionSkeletonView(_ skeletonView: UITableView, cellIdenfierForRowAt indexPath: IndexPath) -> ReusableCellIdentifier { - return collectionSkeletonView(skeletonView, cellIdentifierForRowAt: indexPath) - } - - func collectionSkeletonView(_ skeletonView: UITableView, skeletonCellForRowAt indexPath: IndexPath) -> UITableViewCell? { - nil - } - - func collectionSkeletonView(_ skeletonView: UITableView, prepareCellForSkeleton cell: UITableViewCell, at indexPath: IndexPath) { } -} - -public protocol SkeletonTableViewDelegate: UITableViewDelegate { - func collectionSkeletonView(_ skeletonView: UITableView, identifierForHeaderInSection section: Int) -> ReusableHeaderFooterIdentifier? - func collectionSkeletonView(_ skeletonView: UITableView, identifierForFooterInSection section: Int) -> ReusableHeaderFooterIdentifier? -} - -public extension SkeletonTableViewDelegate { - func collectionSkeletonView(_ skeletonView: UITableView, identifierForHeaderInSection section: Int) -> ReusableHeaderFooterIdentifier? { - return nil - } - - func collectionSkeletonView(_ skeletonView: UITableView, identifierForFooterInSection section: Int) -> ReusableHeaderFooterIdentifier? { - return nil - } -} diff --git a/Pods/SkeletonView/Sources/Collections/TableViews/UITableView+CollectionSkeleton.swift b/Pods/SkeletonView/Sources/Collections/TableViews/UITableView+CollectionSkeleton.swift deleted file mode 100644 index ea280db0..00000000 --- a/Pods/SkeletonView/Sources/Collections/TableViews/UITableView+CollectionSkeleton.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// UITableView+CollectionSkeleton.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 02/02/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -public typealias ReusableHeaderFooterIdentifier = String - -extension UITableView: CollectionSkeleton { - public static let automaticNumberOfSkeletonRows = -1 - - var estimatedNumberOfRows: Int { - return Int(ceil(frame.height / rowHeight)) - } - - var skeletonDataSource: SkeletonCollectionDataSource? { - get { return ao_get(pkey: &CollectionAssociatedKeys.dummyDataSource) as? SkeletonCollectionDataSource } - set { - ao_setOptional(newValue, pkey: &CollectionAssociatedKeys.dummyDataSource) - self.dataSource = newValue - } - } - - var skeletonDelegate: SkeletonCollectionDelegate? { - get { return ao_get(pkey: &CollectionAssociatedKeys.dummyDelegate) as? SkeletonCollectionDelegate } - set { - ao_setOptional(newValue, pkey: &CollectionAssociatedKeys.dummyDelegate) - self.delegate = newValue - } - } - - func addDummyDataSource() { - guard let originalDataSource = self.dataSource as? SkeletonTableViewDataSource, - !(originalDataSource is SkeletonCollectionDataSource) - else { return } - let calculatedRowHeight = calculateRowHeight() - let dataSource = SkeletonCollectionDataSource(tableViewDataSource: originalDataSource, - rowHeight: rowHeight, - originalRowHeight: self.rowHeight) - rowHeight = calculatedRowHeight - self.skeletonDataSource = dataSource - - if let originalDelegate = self.delegate as? SkeletonTableViewDelegate, - !(originalDelegate is SkeletonCollectionDelegate) { - let delegate = SkeletonCollectionDelegate(tableViewDelegate: originalDelegate) - self.skeletonDelegate = delegate - } - - reloadData() - } - - func updateDummyDataSource() { - if (dataSource as? SkeletonCollectionDataSource) != nil { - reloadData() - } else { - addDummyDataSource() - } - } - - func removeDummyDataSource(reloadAfter: Bool) { - guard let dataSource = self.dataSource as? SkeletonCollectionDataSource else { return } - restoreRowHeight() - self.skeletonDataSource = nil - self.dataSource = dataSource.originalTableViewDataSource - - if let delegate = self.delegate as? SkeletonCollectionDelegate { - self.skeletonDelegate = nil - self.delegate = delegate.originalTableViewDelegate - } - - if reloadAfter { self.reloadData() } - } - - private func restoreRowHeight() { - guard let dataSource = self.dataSource as? SkeletonCollectionDataSource else { return } - rowHeight = dataSource.originalRowHeight - } - - private func calculateRowHeight() -> CGFloat { - guard rowHeight == UITableView.automaticDimension else { return rowHeight } - return estimatedRowHeight - } -} diff --git a/Pods/SkeletonView/Sources/Collections/UIView+CollectionSkeleton.swift b/Pods/SkeletonView/Sources/Collections/UIView+CollectionSkeleton.swift deleted file mode 100644 index 42fe9599..00000000 --- a/Pods/SkeletonView/Sources/Collections/UIView+CollectionSkeleton.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// UIView+CollectionSkeleton.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 02/02/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -extension UIView { - func addDummyDataSourceIfNeeded() { - guard let collection = self as? CollectionSkeleton, - !ProcessInfo.isRunningXCTest else { return } - status = .on - collection.addDummyDataSource() - collection.disableUserInteraction() - } - - func updateDummyDataSourceIfNeeded() { - guard let collection = self as? CollectionSkeleton, - !ProcessInfo.isRunningXCTest else { return } - collection.updateDummyDataSource() - } - - func removeDummyDataSourceIfNeeded(reloadAfter reload: Bool = true) { - guard let collection = self as? CollectionSkeleton, - !ProcessInfo.isRunningXCTest else { return } - status = .off - collection.removeDummyDataSource(reloadAfter: reload) - collection.enableUserInteraction() - } -} diff --git a/Pods/SkeletonView/Sources/Debug/SkeletonDebug.swift b/Pods/SkeletonView/Sources/Debug/SkeletonDebug.swift deleted file mode 100644 index 192867e4..00000000 --- a/Pods/SkeletonView/Sources/Debug/SkeletonDebug.swift +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import Foundation -import UIKit - -enum SkeletonEnvironmentKey: String { - case debugMode = "SKELETON_DEBUG" -} - -extension Dictionary { - subscript (_ key: SkeletonEnvironmentKey) -> Value? { - // swiftlint:disable:next force_cast - return self[key.rawValue as! Key] - } -} - -func printSkeletonHierarchy(in view: UIView) { - skeletonLog(view.skeletonHierarchy()) -} - -func skeletonLog(_ message: String) { - if ProcessInfo.processInfo.environment[.debugMode] != nil { - print(message) - } -} - -extension UIView { - public var skeletonDescription: String { - var description = "<\(type(of: self)): \(Unmanaged.passUnretained(self).toOpaque())" - let subSkeletons = subviewsSkeletonables - if !subSkeletons.isEmpty { - description += " | (\(subSkeletons.count)) subSkeletons" - } - if isSkeletonable { - description += " | ☠️ " - } - return description + ">" - } - - public func skeletonHierarchy(index: Int = 0) -> String { - var description = index == 0 ? "\n ⬇⬇ ☠️ Root view hierarchy with Skeletons ⬇⬇ \n" : "" - description += "\(index == 0 ? "\n" : 3.whitespaces) \(skeletonDescription) \n" - subviewsToSkeleton.forEach { - description += (index + 2).whitespaces - description += $0.skeletonHierarchy(index: index + 1) - } - return description - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/CALayer+Extensions.swift b/Pods/SkeletonView/Sources/Extensions/CALayer+Extensions.swift deleted file mode 100644 index 7fa88c05..00000000 --- a/Pods/SkeletonView/Sources/Extensions/CALayer+Extensions.swift +++ /dev/null @@ -1,202 +0,0 @@ -// -// SkeletonLayer+Animations.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 03/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -extension CALayer { - @objc func tint(withColors colors: [UIColor]) { - skeletonSublayers.recursiveSearch(leafBlock: { - backgroundColor = colors.first?.cgColor - }) { - $0.tint(withColors: colors) - } - } -} - -extension CAGradientLayer { - override func tint(withColors colors: [UIColor]) { - skeletonSublayers.recursiveSearch(leafBlock: { - self.colors = colors.map { $0.cgColor } - }) { - $0.tint(withColors: colors) - } - } -} - -struct SkeletonMultilinesLayerConfig { - var lines: Int - var lineHeight: CGFloat - var type: SkeletonType - var lastLineFillPercent: Int - var multilineCornerRadius: Int - var multilineSpacing: CGFloat - var paddingInsets: UIEdgeInsets - var isRTL: Bool - - /// Returns padding insets taking into account if the RTL is activated - var calculatedPaddingInsets: UIEdgeInsets { - UIEdgeInsets(top: paddingInsets.top, - left: isRTL ? paddingInsets.right : paddingInsets.left, - bottom: paddingInsets.bottom, - right: isRTL ? paddingInsets.left : paddingInsets.right) - } -} - -// MARK: Skeleton sublayers -extension CALayer { - static let skeletonSubLayersName = "SkeletonSubLayersName" - - var skeletonSublayers: [CALayer] { - return sublayers?.filter { $0.name == CALayer.skeletonSubLayersName } ?? [CALayer]() - } - - func addMultilinesLayers(for config: SkeletonMultilinesLayerConfig) { - let numberOfSublayers = config.lines > 0 ? config.lines : calculateNumLines(for: config) - var height = config.lineHeight - - if numberOfSublayers == 1 && SkeletonAppearance.default.renderSingleLineAsView { - height = bounds.height - } - - let layerBuilder = SkeletonMultilineLayerBuilder() - .setSkeletonType(config.type) - .setCornerRadius(config.multilineCornerRadius) - .setMultilineSpacing(config.multilineSpacing) - .setPadding(config.paddingInsets) - .setHeight(height) - .setIsRTL(config.isRTL) - - (0.. CGFloat { - var width = bounds.width - paddingInsets.left - paddingInsets.right - if index == totalLines - 1 && totalLines != 1 { - width = width * CGFloat(lastLineFillPercent) / 100 - } - return width - } - - func updateLayerFrame(for index: Int, size: CGSize, multilineSpacing: CGFloat, paddingInsets: UIEdgeInsets, isRTL: Bool) { - let spaceRequiredForEachLine = size.height + multilineSpacing - let newFrame = CGRect(x: paddingInsets.left, - y: CGFloat(index) * spaceRequiredForEachLine + paddingInsets.top, - width: size.width, - height: size.height) - - frame = flipRectForRTLIfNeeded(newFrame, isRTL: isRTL) - } - - private func calculateNumLines(for config: SkeletonMultilinesLayerConfig) -> Int { - let definedNumberOfLines = config.lines - let requiredSpaceForEachLine = config.lineHeight + config.multilineSpacing - let neededLines = round(CGFloat(bounds.height - config.paddingInsets.top - config.paddingInsets.bottom) / CGFloat(requiredSpaceForEachLine)) - guard neededLines.isNormal else { - return 0 - } - - let calculatedNumberOfLines = Int(neededLines) - guard calculatedNumberOfLines > 0 else { - return 1 - } - - if definedNumberOfLines > 0, definedNumberOfLines <= calculatedNumberOfLines { - return definedNumberOfLines - } - - return calculatedNumberOfLines - } - - private func flipRectForRTLIfNeeded(_ rect: CGRect, isRTL: Bool) -> CGRect { - var newRect = rect - if isRTL { - newRect.origin.x = (superlayer?.bounds.width ?? 0) - rect.origin.x - rect.width - } - return newRect - } -} - -// MARK: Animations -public extension CALayer { - var pulse: CAAnimation { - let pulseAnimation = CABasicAnimation(keyPath: #keyPath(CALayer.backgroundColor)) - pulseAnimation.fromValue = backgroundColor - - // swiftlint:disable:next force_unwrapping - pulseAnimation.toValue = UIColor(cgColor: backgroundColor!).complementaryColor.cgColor - pulseAnimation.duration = 1 - pulseAnimation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut) - pulseAnimation.autoreverses = true - pulseAnimation.repeatCount = .infinity - pulseAnimation.isRemovedOnCompletion = false - return pulseAnimation - } - - func playAnimation(_ anim: SkeletonLayerAnimation, key: String, completion: (() -> Void)? = nil) { - skeletonSublayers.recursiveSearch(leafBlock: { - DispatchQueue.main.async { CATransaction.begin() } - DispatchQueue.main.async { CATransaction.setCompletionBlock(completion) } - add(anim(self), forKey: key) - DispatchQueue.main.async { CATransaction.commit() } - }) { - $0.playAnimation(anim, key: key, completion: completion) - } - } - - func stopAnimation(forKey key: String) { - skeletonSublayers.recursiveSearch(leafBlock: { - removeAnimation(forKey: key) - }) { - $0.stopAnimation(forKey: key) - } - } -} - -extension CALayer { - func setOpacity(from: Int, to: Int, duration: TimeInterval, completion: (() -> Void)?) { - DispatchQueue.main.async { CATransaction.begin() } - let animation = CABasicAnimation(keyPath: #keyPath(CALayer.opacity)) - animation.fromValue = from - animation.toValue = to - animation.duration = duration - animation.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut) - DispatchQueue.main.async { CATransaction.setCompletionBlock(completion) } - add(animation, forKey: "setOpacityAnimation") - DispatchQueue.main.async { CATransaction.commit() } - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/Int+Whitespaces.swift b/Pods/SkeletonView/Sources/Extensions/Int+Whitespaces.swift deleted file mode 100644 index 86d2c67c..00000000 --- a/Pods/SkeletonView/Sources/Extensions/Int+Whitespaces.swift +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import Foundation - -extension Int { - var whitespace: String { - whitespaces - } - - var whitespaces: String { - String(repeating: " ", count: self) - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/ProcessInfo+XCTest.swift b/Pods/SkeletonView/Sources/Extensions/ProcessInfo+XCTest.swift deleted file mode 100644 index d5c6166b..00000000 --- a/Pods/SkeletonView/Sources/Extensions/ProcessInfo+XCTest.swift +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright © 2020 SkeletonView. All rights reserved. - -import Foundation - -extension ProcessInfo { - enum Constants { - static let testConfigurationFilePathKey = "XCTestConfigurationFilePath" - } - - static var isRunningXCTest: Bool { - return processInfo.environment[Constants.testConfigurationFilePathKey] != nil - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/UIColor+Skeleton.swift b/Pods/SkeletonView/Sources/Extensions/UIColor+Skeleton.swift deleted file mode 100644 index 4a4f2c10..00000000 --- a/Pods/SkeletonView/Sources/Extensions/UIColor+Skeleton.swift +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright © 2017 SkeletonView. All rights reserved. - -import UIKit - -// codebeat:disable[TOO_MANY_IVARS] -extension UIColor { - convenience init(_ hex: UInt) { - self.init( - red: CGFloat((hex & 0xFF0000) >> 16) / 255.0, - green: CGFloat((hex & 0x00FF00) >> 8) / 255.0, - blue: CGFloat(hex & 0x0000FF) / 255.0, - alpha: CGFloat(1.0) - ) - } - - func isLight() -> Bool { - guard let components = cgColor.components, - components.count >= 3 else { return false } - let brightness = ((components[0] * 299) + (components[1] * 587) + (components[2] * 114)) / 1000 - return !(brightness < 0.5) - } - - public var complementaryColor: UIColor { - if #available(iOS 13, tvOS 13, *) { - return UIColor { _ in - return self.isLight() ? self.darker : self.lighter - } - } else { - return isLight() ? darker : lighter - } - } - - public var lighter: UIColor { - adjust(by: 1.35) - } - - public var darker: UIColor { - adjust(by: 0.94) - } - - func adjust(by percent: CGFloat) -> UIColor { - var h: CGFloat = 0, s: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0 - getHue(&h, saturation: &s, brightness: &b, alpha: &a) - return UIColor(hue: h, saturation: s, brightness: b * percent, alpha: a) - } - - func makeGradient() -> [UIColor] { - [self, self.complementaryColor, self] - } -} - -public extension UIColor { - // swiftlint:disable operator_usage_whitespace - static var greenSea = UIColor(0x16a085) - static var turquoise = UIColor(0x1abc9c) - static var emerald = UIColor(0x2ecc71) - static var peterRiver = UIColor(0x3498db) - static var amethyst = UIColor(0x9b59b6) - static var wetAsphalt = UIColor(0x34495e) - static var nephritis = UIColor(0x27ae60) - static var belizeHole = UIColor(0x2980b9) - static var wisteria = UIColor(0x8e44ad) - static var midnightBlue = UIColor(0x2c3e50) - static var sunFlower = UIColor(0xf1c40f) - static var carrot = UIColor(0xe67e22) - static var alizarin = UIColor(0xe74c3c) - static var clouds = UIColor(0xecf0f1) - static var darkClouds = UIColor(0x1c2325) - static var concrete = UIColor(0x95a5a6) - static var flatOrange = UIColor(0xf39c12) - static var pumpkin = UIColor(0xd35400) - static var pomegranate = UIColor(0xc0392b) - static var silver = UIColor(0xbdc3c7) - static var asbestos = UIColor(0x7f8c8d) - // swiftlint:enable operator_usage_whitespace - - static var skeletonDefault: UIColor { - if #available(iOS 13, tvOS 13, *) { - return UIColor { traitCollection in - switch traitCollection.userInterfaceStyle { - case .dark: - return .darkClouds - default: - return .clouds - } - } - } else { - return .clouds - } - } -} -// codebeat:enable[TOO_MANY_IVARS] diff --git a/Pods/SkeletonView/Sources/Extensions/UITableView+VisibleSections.swift b/Pods/SkeletonView/Sources/Extensions/UITableView+VisibleSections.swift deleted file mode 100644 index 3cb3ce83..00000000 --- a/Pods/SkeletonView/Sources/Extensions/UITableView+VisibleSections.swift +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright © 2020 SkeletonView. All rights reserved. - -import UIKit - -extension UITableView { - var indexesOfVisibleSections: [Int] { - (0.. NSLayoutConstraint { - let heightConstraint = heightAnchor.constraint(equalToConstant: constant) - heightConstraint.identifier = "SkeletonView.Constraint.Height.\(constant)" - NSLayoutConstraint.activate([heightConstraint]) - return heightConstraint - } - - var nonContentSizeLayoutConstraints: [NSLayoutConstraint] { - constraints.filter({ "\(type(of: $0))" != "NSContentSizeLayoutConstraint" }) - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/UIView+Extension.swift b/Pods/SkeletonView/Sources/Extensions/UIView+Extension.swift deleted file mode 100644 index d33f6296..00000000 --- a/Pods/SkeletonView/Sources/Extensions/UIView+Extension.swift +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -// codebeat:disable[TOO_MANY_IVARS] -enum ViewAssociatedKeys { - static var skeletonable = "skeletonable" - static var hiddenWhenSkeletonIsActive = "hiddenWhenSkeletonIsActive" - static var status = "status" - static var skeletonLayer = "layer" - static var flowDelegate = "flowDelegate" - static var isSkeletonAnimated = "isSkeletonAnimated" - static var viewState = "viewState" - static var labelViewState = "labelViewState" - static var imageViewState = "imageViewState" - static var buttonViewState = "buttonViewState" - static var headerFooterViewState = "headerFooterViewState" - static var currentSkeletonConfig = "currentSkeletonConfig" - static var skeletonCornerRadius = "skeletonCornerRadius" - static var disabledWhenSkeletonIsActive = "disabledWhenSkeletonIsActive" - static var delayedShowSkeletonWorkItem = "delayedShowSkeletonWorkItem" -} -// codebeat:enable[TOO_MANY_IVARS] - -extension UIView { - enum Status { - case on - case off - } - - var flowDelegate: SkeletonFlowDelegate? { - get { return ao_get(pkey: &ViewAssociatedKeys.flowDelegate) as? SkeletonFlowDelegate } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.flowDelegate) } - } - - var skeletonLayer: SkeletonLayer? { - get { return ao_get(pkey: &ViewAssociatedKeys.skeletonLayer) as? SkeletonLayer } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.skeletonLayer) } - } - - var currentSkeletonConfig: SkeletonConfig? { - get { return ao_get(pkey: &ViewAssociatedKeys.currentSkeletonConfig) as? SkeletonConfig } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.currentSkeletonConfig) } - } - - var status: Status { - get { return ao_get(pkey: &ViewAssociatedKeys.status) as? Status ?? .off } - set { ao_set(newValue, pkey: &ViewAssociatedKeys.status) } - } - - var isSkeletonAnimated: Bool { - get { return ao_get(pkey: &ViewAssociatedKeys.isSkeletonAnimated) as? Bool ?? false } - set { ao_set(newValue, pkey: &ViewAssociatedKeys.isSkeletonAnimated) } - } - - var isSuperviewAStackView: Bool { - superview is UIStackView - } - - var delayedShowSkeletonWorkItem: DispatchWorkItem? { - get { return ao_get(pkey: &ViewAssociatedKeys.delayedShowSkeletonWorkItem) as? DispatchWorkItem } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.delayedShowSkeletonWorkItem) } - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/UIView+Frame.swift b/Pods/SkeletonView/Sources/Extensions/UIView+Frame.swift deleted file mode 100644 index 323e6555..00000000 --- a/Pods/SkeletonView/Sources/Extensions/UIView+Frame.swift +++ /dev/null @@ -1,55 +0,0 @@ -// -// UIView+Frame.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 06/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -// MARK: Frame -extension UIView { - var definedMaxBounds: CGRect { - if let parentStackView = (superview as? UIStackView) { - var origin: CGPoint = .zero - switch parentStackView.alignment { - case .trailing: - origin.x = definedMaxWidth - default: - break - } - return CGRect(origin: origin, size: definedMaxSize) - } - return CGRect(origin: .zero, size: definedMaxSize) - } - - var definedMaxSize: CGSize { - CGSize(width: definedMaxWidth, height: definedMaxHeight) - } - - var definedMaxWidth: CGFloat { - max(between: frame.size.width, andContantsOf: widthConstraints) - } - - var definedMaxHeight: CGFloat { - max(between: frame.size.height, andContantsOf: heightConstraints) - } - - var isRTL: Bool { - if #available(iOS 10.0, *), #available(tvOS 10.0, *) { - return effectiveUserInterfaceLayoutDirection == .rightToLeft - } else { - return false - } - } - - private func max(between value: CGFloat, andContantsOf constraints: [NSLayoutConstraint]) -> CGFloat { - let max = constraints.reduce(value, { max, constraint in - var tempMax = max - if constraint.constant > tempMax { tempMax = constraint.constant } - return tempMax - }) - return max - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/UIView+IBInspectable.swift b/Pods/SkeletonView/Sources/Extensions/UIView+IBInspectable.swift deleted file mode 100644 index 989a4d2d..00000000 --- a/Pods/SkeletonView/Sources/Extensions/UIView+IBInspectable.swift +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright © 2017 SkeletonView. All rights reserved. - -import UIKit - -public extension UIView { - @IBInspectable - var isSkeletonable: Bool { - get { return skeletonable } - set { skeletonable = newValue } - } - - @IBInspectable - var isHiddenWhenSkeletonIsActive: Bool { - get { return hiddenWhenSkeletonIsActive } - set { hiddenWhenSkeletonIsActive = newValue } - } - - @IBInspectable - var isUserInteractionDisabledWhenSkeletonIsActive: Bool { - get { return disabledWhenSkeletonIsActive } - set { disabledWhenSkeletonIsActive = newValue } - } - - @IBInspectable - var skeletonCornerRadius: Float { - get { return skeletonableCornerRadius } - set { skeletonableCornerRadius = newValue } - } - - var isSkeletonActive: Bool { - return status == .on || subviewsSkeletonables.contains(where: { $0.isSkeletonActive }) - } - - private var skeletonable: Bool { - get { return ao_get(pkey: &ViewAssociatedKeys.skeletonable) as? Bool ?? false } - set { ao_set(newValue, pkey: &ViewAssociatedKeys.skeletonable) } - } - - private var hiddenWhenSkeletonIsActive: Bool { - get { return ao_get(pkey: &ViewAssociatedKeys.hiddenWhenSkeletonIsActive) as? Bool ?? false } - set { ao_set(newValue, pkey: &ViewAssociatedKeys.hiddenWhenSkeletonIsActive) } - } - - private var disabledWhenSkeletonIsActive: Bool { - get { return ao_get(pkey: &ViewAssociatedKeys.disabledWhenSkeletonIsActive) as? Bool ?? true } - set { ao_set(newValue, pkey: &ViewAssociatedKeys.disabledWhenSkeletonIsActive) } - } - - private var skeletonableCornerRadius: Float { - get { return ao_get(pkey: &ViewAssociatedKeys.skeletonCornerRadius) as? Float ?? 0.0 } - set { ao_set(newValue, pkey: &ViewAssociatedKeys.skeletonCornerRadius) } - } -} diff --git a/Pods/SkeletonView/Sources/Extensions/UIView+UIApplicationDelegate.swift b/Pods/SkeletonView/Sources/Extensions/UIView+UIApplicationDelegate.swift deleted file mode 100644 index cdb1fdd4..00000000 --- a/Pods/SkeletonView/Sources/Extensions/UIView+UIApplicationDelegate.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// UIView+UIApplicationDelegate.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 08/02/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -extension UIView { - enum Constants { - static let becomeActiveNotification = UIApplication.didBecomeActiveNotification - static let enterForegroundNotification = UIApplication.didEnterBackgroundNotification - static let willTerminateNotification = UIApplication.willTerminateNotification - static let needAnimatedSkeletonKey = "needAnimateSkeleton" - } - - func addAppNotificationsObservers() { - NotificationCenter.default.addObserver(self, selector: #selector(appDidBecomeActive), name: Constants.becomeActiveNotification, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(appDidEnterBackground), name: Constants.enterForegroundNotification, object: nil) - NotificationCenter.default.addObserver(self, selector: #selector(willTerminateNotification), name: Constants.enterForegroundNotification, object: nil) - } - - func removeAppNoticationsObserver() { - NotificationCenter.default.removeObserver(self, name: Constants.becomeActiveNotification, object: nil) - NotificationCenter.default.removeObserver(self, name: Constants.enterForegroundNotification, object: nil) - } - - @objc func appDidBecomeActive() { - if UserDefaults.standard.bool(forKey: Constants.needAnimatedSkeletonKey) { - startSkeletonAnimation() - } - } - - @objc func appDidEnterBackground() { - UserDefaults.standard.set((isSkeletonActive && isSkeletonAnimated), forKey: Constants.needAnimatedSkeletonKey) - } - - @objc func willTerminateNotification() { - UserDefaults.standard.set(false, forKey: Constants.needAnimatedSkeletonKey) - } -} diff --git a/Pods/SkeletonView/Sources/Helpers/AssociationPolicy.swift b/Pods/SkeletonView/Sources/Helpers/AssociationPolicy.swift deleted file mode 100644 index 6d6323f0..00000000 --- a/Pods/SkeletonView/Sources/Helpers/AssociationPolicy.swift +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright © 2017 SkeletonView. All rights reserved. - -import Foundation - -// Partially copy/pasted from https://github.com/jameslintaylor/AssociatedObjects/blob/master/AssociatedObjects/AssociatedObjects.swift -enum AssociationPolicy: UInt { - // raw values map to objc_AssociationPolicy's raw values - case assign = 0 - case copy = 771 - case copyNonatomic = 3 - case retain = 769 - case retainNonatomic = 1 - - var objc: objc_AssociationPolicy { - // swiftlint:disable:next force_unwrapping - return objc_AssociationPolicy(rawValue: rawValue)! - } -} - -protocol AssociatedObjects: AnyObject { } - -// transparent wrappers -extension AssociatedObjects { - /// wrapper around `objc_getAssociatedObject` - func ao_get(pkey: UnsafeRawPointer) -> Any? { - return objc_getAssociatedObject(self, pkey) - } - - /// wrapper around `objc_setAssociatedObject` - func ao_setOptional(_ value: Any?, pkey: UnsafeRawPointer, policy: AssociationPolicy = .retainNonatomic) { - guard let value = value else { return } - objc_setAssociatedObject(self, pkey, value, policy.objc) - } - - /// wrapper around `objc_setAssociatedObject` - func ao_set(_ value: Any, pkey: UnsafeRawPointer, policy: AssociationPolicy = .retainNonatomic) { - objc_setAssociatedObject(self, pkey, value, policy.objc) - } - - /// wrapper around 'objc_removeAssociatedObjects' - func ao_removeAll() { - objc_removeAssociatedObjects(self) - } -} - -extension NSObject: AssociatedObjects { } diff --git a/Pods/SkeletonView/Sources/Helpers/PrepareForSkeletonProtocol.swift b/Pods/SkeletonView/Sources/Helpers/PrepareForSkeletonProtocol.swift deleted file mode 100755 index 643c1790..00000000 --- a/Pods/SkeletonView/Sources/Helpers/PrepareForSkeletonProtocol.swift +++ /dev/null @@ -1,133 +0,0 @@ -// -// PrepareForSkeleton.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 04/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -extension UIView { - @objc func prepareViewForSkeleton() { - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = false - } - - startTransition { [weak self] in - self?.backgroundColor = .clear - } - } -} - -extension UILabel { - var desiredHeightBasedOnNumberOfLines: CGFloat { - let spaceNeededForEachLine = lineHeight * CGFloat(numberOfLines) - let spaceNeededForSpaces = skeletonLineSpacing * CGFloat(numberOfLines - 1) - let padding = paddingInsets.top + paddingInsets.bottom - - return spaceNeededForEachLine + spaceNeededForSpaces + padding - } - - func updateHeightConstraintsIfNeeded() { - guard numberOfLines > 1 || numberOfLines == 0 else { return } - - // Workaround to simulate content when the label is contained in a `UIStackView`. - if isSuperviewAStackView, bounds.height == 0 { - // This is a placeholder text to simulate content because it's contained in a stack view in order to prevent that the content size will be zero. - text = " " - } - - let desiredHeight = desiredHeightBasedOnNumberOfLines - if desiredHeight > definedMaxHeight { - backupHeightConstraints = heightConstraints - NSLayoutConstraint.deactivate(heightConstraints) - setHeight(equalToConstant: desiredHeight) - } - } - - func restoreBackupHeightConstraintsIfNeeded() { - guard !backupHeightConstraints.isEmpty else { return } - NSLayoutConstraint.activate(backupHeightConstraints) - backupHeightConstraints.removeAll() - } - - override func prepareViewForSkeleton() { - backgroundColor = .clear - - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = false - } - - resignFirstResponder() - startTransition { [weak self] in - self?.updateHeightConstraintsIfNeeded() - self?.textColor = .clear - } - } -} - -extension UITextView { - override func prepareViewForSkeleton() { - backgroundColor = .clear - - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = false - } - - resignFirstResponder() - startTransition { [weak self] in - self?.textColor = .clear - } - } -} - -extension UITextField { - override func prepareViewForSkeleton() { - backgroundColor = .clear - resignFirstResponder() - - startTransition { [weak self] in - self?.textColor = .clear - self?.placeholder = nil - } - } -} - -extension UIImageView { - override func prepareViewForSkeleton() { - backgroundColor = .clear - - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = false - } - - startTransition { [weak self] in - self?.image = nil - } - } -} - -extension UIButton { - override func prepareViewForSkeleton() { - backgroundColor = .clear - - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = false - } - - startTransition { [weak self] in - self?.setTitle(nil, for: .normal) - } - } -} - -extension UITableViewHeaderFooterView { - override func prepareViewForSkeleton() { - backgroundView?.backgroundColor = .clear - - if isUserInteractionDisabledWhenSkeletonIsActive { - isUserInteractionEnabled = false - } - } -} diff --git a/Pods/SkeletonView/Sources/Helpers/RecursiveProtocol.swift b/Pods/SkeletonView/Sources/Helpers/RecursiveProtocol.swift deleted file mode 100644 index 0cd1fce3..00000000 --- a/Pods/SkeletonView/Sources/Helpers/RecursiveProtocol.swift +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright © 2017 SkeletonView. All rights reserved. - -import UIKit - -typealias VoidBlock = () -> Void -typealias RecursiveBlock = (T) -> Void - -protocol IterableElement {} -extension UIView: IterableElement {} -extension CALayer: IterableElement {} - -// MARK: Recursive -protocol Recursive { - associatedtype Element: IterableElement - func recursiveSearch(leafBlock: VoidBlock, recursiveBlock: RecursiveBlock) -} - -extension Array: Recursive where Element: IterableElement { - func recursiveSearch(leafBlock: VoidBlock, recursiveBlock: RecursiveBlock) { - guard !isEmpty else { - leafBlock() - return - } - forEach { recursiveBlock($0) } - } -} diff --git a/Pods/SkeletonView/Sources/Helpers/Swizzling.swift b/Pods/SkeletonView/Sources/Helpers/Swizzling.swift deleted file mode 100644 index 76d0e322..00000000 --- a/Pods/SkeletonView/Sources/Helpers/Swizzling.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © 2019 SkeletonView. All rights reserved. - -import Foundation - -extension DispatchQueue { - private static var _onceTracker = [String]() - - class func once(token: String, block: () -> Void) { - objc_sync_enter(self); defer { objc_sync_exit(self) } - guard !_onceTracker.contains(token) else { return } - - _onceTracker.append(token) - block() - } - - class func removeOnce(token: String, block: () -> Void) { - objc_sync_enter(self); defer { objc_sync_exit(self) } - guard let index = _onceTracker.firstIndex(of: token) else { return } - _onceTracker.remove(at: index) - block() - } -} - -func swizzle(selector originalSelector: Selector, with swizzledSelector: Selector, inClass: AnyClass, usingClass: AnyClass) { - guard let originalMethod = class_getInstanceMethod(inClass, originalSelector), - let swizzledMethod = class_getInstanceMethod(usingClass, swizzledSelector) - else { return } - - if class_addMethod(inClass, swizzledSelector, method_getImplementation(originalMethod), method_getTypeEncoding(originalMethod)) { - class_replaceMethod(inClass, originalSelector, method_getImplementation(swizzledMethod), method_getTypeEncoding(swizzledMethod)) - } else { - method_exchangeImplementations(originalMethod, swizzledMethod) - } -} diff --git a/Pods/SkeletonView/Sources/Multilines/ContainsMultilineText.swift b/Pods/SkeletonView/Sources/Multilines/ContainsMultilineText.swift deleted file mode 100644 index 1c82b031..00000000 --- a/Pods/SkeletonView/Sources/Multilines/ContainsMultilineText.swift +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright © 2017 SkeletonView. All rights reserved. - -import UIKit - -enum MultilineAssociatedKeys { - static var lastLineFillingPercent = "lastLineFillingPercent" - static var multilineCornerRadius = "multilineCornerRadius" - static var multilineSpacing = "multilineSpacing" - static var paddingInsets = "paddingInsets" - static var backupHeightConstraints = "backupHeightConstraints" -} - -protocol ContainsMultilineText { - var lineHeight: CGFloat { get } - var numberOfLines: Int { get } - var lastLineFillingPercent: Int { get } - var multilineCornerRadius: Int { get } - var multilineSpacing: CGFloat { get } - var paddingInsets: UIEdgeInsets { get } -} diff --git a/Pods/SkeletonView/Sources/Multilines/UILabel+Multiline.swift b/Pods/SkeletonView/Sources/Multilines/UILabel+Multiline.swift deleted file mode 100644 index 5a750650..00000000 --- a/Pods/SkeletonView/Sources/Multilines/UILabel+Multiline.swift +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -public extension UILabel { - @IBInspectable - var lastLineFillPercent: Int { - get { return lastLineFillingPercent } - set { lastLineFillingPercent = min(newValue, 100) } - } - - @IBInspectable - var linesCornerRadius: Int { - get { return multilineCornerRadius } - set { multilineCornerRadius = newValue } - } - - @IBInspectable - var skeletonLineSpacing: CGFloat { - get { return multilineSpacing } - set { multilineSpacing = newValue } - } - - var skeletonPaddingInsets: UIEdgeInsets { - get { return paddingInsets } - set { paddingInsets = newValue } - } -} - -extension UILabel: ContainsMultilineText { - var lineHeight: CGFloat { - backupHeightConstraints.first?.constant ?? SkeletonAppearance.default.multilineHeight - } - - var lastLineFillingPercent: Int { - get { return ao_get(pkey: &MultilineAssociatedKeys.lastLineFillingPercent) as? Int ?? SkeletonAppearance.default.multilineLastLineFillPercent } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.lastLineFillingPercent) } - } - - var multilineCornerRadius: Int { - get { return ao_get(pkey: &MultilineAssociatedKeys.multilineCornerRadius) as? Int ?? SkeletonAppearance.default.multilineCornerRadius } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.multilineCornerRadius) } - } - - var multilineSpacing: CGFloat { - get { return ao_get(pkey: &MultilineAssociatedKeys.multilineSpacing) as? CGFloat ?? SkeletonAppearance.default.multilineSpacing } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.multilineSpacing) } - } - - var paddingInsets: UIEdgeInsets { - get { return ao_get(pkey: &MultilineAssociatedKeys.paddingInsets) as? UIEdgeInsets ?? .zero } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.paddingInsets) } - } - - var backupHeightConstraints: [NSLayoutConstraint] { - get { return ao_get(pkey: &MultilineAssociatedKeys.backupHeightConstraints) as? [NSLayoutConstraint] ?? [] } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.backupHeightConstraints) } - } -} diff --git a/Pods/SkeletonView/Sources/Multilines/UITextView+Multiline.swift b/Pods/SkeletonView/Sources/Multilines/UITextView+Multiline.swift deleted file mode 100644 index c4058371..00000000 --- a/Pods/SkeletonView/Sources/Multilines/UITextView+Multiline.swift +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -public extension UITextView { - @IBInspectable - var lastLineFillPercent: Int { - get { return lastLineFillingPercent } - set { lastLineFillingPercent = min(newValue, 100) } - } - - @IBInspectable - var linesCornerRadius: Int { - get { return multilineCornerRadius } - set { multilineCornerRadius = newValue } - } - - @IBInspectable - var skeletonLineSpacing: CGFloat { - get { return multilineSpacing } - set { multilineSpacing = newValue } - } - - var skeletonPaddingInsets: UIEdgeInsets { - get { return paddingInsets } - set { paddingInsets = newValue } - } -} - -extension UITextView: ContainsMultilineText { - var lineHeight: CGFloat { - if let fontLineHeight = font?.lineHeight { - if let heightConstraints = heightConstraints.first?.constant { - return (fontLineHeight > heightConstraints) ? heightConstraints : fontLineHeight - } - - return fontLineHeight - } - - return SkeletonAppearance.default.multilineHeight - } - - var numberOfLines: Int { - -1 - } - - var lastLineFillingPercent: Int { - get { - let defaultValue = SkeletonAppearance.default.multilineLastLineFillPercent - return ao_get(pkey: &MultilineAssociatedKeys.lastLineFillingPercent) as? Int ?? defaultValue - } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.lastLineFillingPercent) } - } - - var multilineCornerRadius: Int { - get { - let defaultValue = SkeletonAppearance.default.multilineCornerRadius - return ao_get(pkey: &MultilineAssociatedKeys.multilineCornerRadius) as? Int ?? defaultValue - } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.multilineCornerRadius) } - } - - var multilineSpacing: CGFloat { - get { return ao_get(pkey: &MultilineAssociatedKeys.multilineSpacing) as? CGFloat ?? SkeletonAppearance.default.multilineSpacing } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.multilineSpacing) } - } - - var paddingInsets: UIEdgeInsets { - get { return ao_get(pkey: &MultilineAssociatedKeys.paddingInsets) as? UIEdgeInsets ?? .zero } - set { ao_set(newValue, pkey: &MultilineAssociatedKeys.paddingInsets) } - } -} diff --git a/Pods/SkeletonView/Sources/Recoverable/Recoverable.swift b/Pods/SkeletonView/Sources/Recoverable/Recoverable.swift deleted file mode 100644 index 0890aecc..00000000 --- a/Pods/SkeletonView/Sources/Recoverable/Recoverable.swift +++ /dev/null @@ -1,182 +0,0 @@ -// -// Recoverable.swift -// SkeletonView -// -// Created by Juanpe Catalán on 13/05/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -protocol Recoverable { - func saveViewState() - func recoverViewState(forced: Bool) -} - -extension UIView: Recoverable { - var viewState: RecoverableViewState? { - get { return ao_get(pkey: &ViewAssociatedKeys.viewState) as? RecoverableViewState } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.viewState) } - } - - @objc func saveViewState() { - viewState = RecoverableViewState(view: self) - } - - @objc func recoverViewState(forced: Bool) { - guard let storedViewState = viewState else { return } - - startTransition { [weak self] in - guard let self = self else { return } - - self.layer.cornerRadius = storedViewState.cornerRadius - self.layer.masksToBounds = storedViewState.clipToBounds - - if self.isUserInteractionDisabledWhenSkeletonIsActive { - self.isUserInteractionEnabled = storedViewState.isUserInteractionsEnabled - } - - if self.backgroundColor == .clear || forced { - self.backgroundColor = storedViewState.backgroundColor - } - } - } -} - -extension UILabel { - var labelState: RecoverableTextViewState? { - get { return ao_get(pkey: &ViewAssociatedKeys.labelViewState) as? RecoverableTextViewState } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.labelViewState) } - } - - override func saveViewState() { - super.saveViewState() - labelState = RecoverableTextViewState(view: self) - } - - override func recoverViewState(forced: Bool) { - super.recoverViewState(forced: forced) - startTransition { [weak self] in - guard let self = self, - let storedLabelState = self.labelState else { - return - } - - NSLayoutConstraint.deactivate(self.skeletonHeightConstraints) - self.restoreBackupHeightConstraintsIfNeeded() - - if self.textColor == .clear || forced { - self.textColor = storedLabelState.textColor - } - } - } -} - -extension UITextView { - var textState: RecoverableTextViewState? { - get { return ao_get(pkey: &ViewAssociatedKeys.labelViewState) as? RecoverableTextViewState } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.labelViewState) } - } - - override func saveViewState() { - super.saveViewState() - textState = RecoverableTextViewState(view: self) - } - - override func recoverViewState(forced: Bool) { - super.recoverViewState(forced: forced) - startTransition { [weak self] in - guard let storedLabelState = self?.textState else { return } - - if self?.textColor == .clear || forced { - self?.textColor = storedLabelState.textColor - } - } - } -} - -extension UITextField { - var textState: RecoverableTextFieldState? { - get { return ao_get(pkey: &ViewAssociatedKeys.labelViewState) as? RecoverableTextFieldState } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.labelViewState) } - } - - override func saveViewState() { - super.saveViewState() - textState = RecoverableTextFieldState(view: self) - } - - override func recoverViewState(forced: Bool) { - super.recoverViewState(forced: forced) - startTransition { [weak self] in - guard let storedLabelState = self?.textState else { return } - - if self?.textColor == .clear || forced { - self?.textColor = storedLabelState.textColor - } - - if self?.placeholder == nil || forced { - self?.placeholder = storedLabelState.placeholder - } - } - } -} - -extension UIImageView { - var imageState: RecoverableImageViewState? { - get { return ao_get(pkey: &ViewAssociatedKeys.imageViewState) as? RecoverableImageViewState } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.imageViewState) } - } - - override func saveViewState() { - super.saveViewState() - imageState = RecoverableImageViewState(view: self) - } - - override func recoverViewState(forced: Bool) { - super.recoverViewState(forced: forced) - startTransition { [weak self] in - self?.image = self?.image == nil || forced ? self?.imageState?.image : self?.image - } - } -} - -extension UIButton { - var buttonState: RecoverableButtonViewState? { - get { return ao_get(pkey: &ViewAssociatedKeys.buttonViewState) as? RecoverableButtonViewState } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.buttonViewState) } - } - - override func saveViewState() { - super.saveViewState() - buttonState = RecoverableButtonViewState(view: self) - } - - override func recoverViewState(forced: Bool) { - super.recoverViewState(forced: forced) - startTransition { [weak self] in - if self?.title(for: .normal) == nil { - self?.setTitle(self?.buttonState?.title, for: .normal) - } - } - } -} - -extension UITableViewHeaderFooterView { - var headerFooterState: RecoverableTableViewHeaderFooterViewState? { - get { return ao_get(pkey: &ViewAssociatedKeys.headerFooterViewState) as? RecoverableTableViewHeaderFooterViewState } - set { ao_setOptional(newValue, pkey: &ViewAssociatedKeys.headerFooterViewState) } - } - - override func saveViewState() { - super.saveViewState() - headerFooterState = RecoverableTableViewHeaderFooterViewState(view: self) - } - - override func recoverViewState(forced: Bool) { - super.recoverViewState(forced: forced) - startTransition { [weak self] in - self?.backgroundView?.backgroundColor = self?.headerFooterState?.backgroundViewColor - } - } -} diff --git a/Pods/SkeletonView/Sources/Recoverable/RecoverableViewState.swift b/Pods/SkeletonView/Sources/Recoverable/RecoverableViewState.swift deleted file mode 100644 index 70358af2..00000000 --- a/Pods/SkeletonView/Sources/Recoverable/RecoverableViewState.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// RecoverableViewState.swift -// SkeletonView -// -// Created by Juanpe Catalán on 13/05/2018. -// Copyright © 2018 SkeletonView. All rights reserved. -// - -import UIKit - -struct RecoverableViewState { - var backgroundColor: UIColor? - var cornerRadius: CGFloat - var clipToBounds: Bool - var isUserInteractionsEnabled: Bool - - init(view: UIView) { - self.backgroundColor = view.backgroundColor - self.clipToBounds = view.layer.masksToBounds - self.cornerRadius = view.layer.cornerRadius - self.isUserInteractionsEnabled = view.isUserInteractionEnabled - } -} - -struct RecoverableTextViewState { - var textColor: UIColor? - - init(view: UILabel) { - self.textColor = view.textColor - } - - init(view: UITextView) { - self.textColor = view.textColor - } -} - -struct RecoverableTextFieldState { - var textColor: UIColor? - var placeholder: String? - - init(view: UITextField) { - self.textColor = view.textColor - self.placeholder = view.placeholder - } -} - -struct RecoverableImageViewState { - var image: UIImage? - - init(view: UIImageView) { - self.image = view.image - } -} - -struct RecoverableButtonViewState { - var title: String? - - init(view: UIButton) { - self.title = view.titleLabel?.text - } -} - -struct RecoverableTableViewHeaderFooterViewState { - var backgroundViewColor: UIColor? - - init(view: UITableViewHeaderFooterView) { - self.backgroundViewColor = view.backgroundView?.backgroundColor - } -} diff --git a/Pods/SkeletonView/Sources/SkeletonAnimationBuilder.swift b/Pods/SkeletonView/Sources/SkeletonAnimationBuilder.swift deleted file mode 100644 index e23863e5..00000000 --- a/Pods/SkeletonView/Sources/SkeletonAnimationBuilder.swift +++ /dev/null @@ -1,86 +0,0 @@ -// -// SkeletonAnimationBuilder.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 17/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -typealias GradientAnimationPoint = (from: CGPoint, to: CGPoint) - -public enum GradientDirection { - case leftRight - case rightLeft - case topBottom - case bottomTop - case topLeftBottomRight - case bottomRightTopLeft - - public func slidingAnimation(duration: CFTimeInterval = 1.5, autoreverses: Bool = false) -> SkeletonLayerAnimation { - return SkeletonAnimationBuilder().makeSlidingAnimation(withDirection: self, duration: duration, autoreverses: autoreverses) - } - - // codebeat:disable[ABC] - var startPoint: GradientAnimationPoint { - switch self { - case .leftRight: - return (from: CGPoint(x: -1, y: 0.5), to: CGPoint(x: 1, y: 0.5)) - case .rightLeft: - return (from: CGPoint(x: 1, y: 0.5), to: CGPoint(x: -1, y: 0.5)) - case .topBottom: - return (from: CGPoint(x: 0.5, y: -1), to: CGPoint(x: 0.5, y: 1)) - case .bottomTop: - return (from: CGPoint(x: 0.5, y: 1), to: CGPoint(x: 0.5, y: -1)) - case .topLeftBottomRight: - return (from: CGPoint(x: -1, y: -1), to: CGPoint(x: 1, y: 1)) - case .bottomRightTopLeft: - return (from: CGPoint(x: 1, y: 1), to: CGPoint(x: -1, y: -1)) - } - } - - var endPoint: GradientAnimationPoint { - switch self { - case .leftRight: - return (from: CGPoint(x: 0, y: 0.5), to: CGPoint(x: 2, y: 0.5)) - case .rightLeft: - return ( from: CGPoint(x: 2, y: 0.5), to: CGPoint(x: 0, y: 0.5)) - case .topBottom: - return ( from: CGPoint(x: 0.5, y: 0), to: CGPoint(x: 0.5, y: 2)) - case .bottomTop: - return ( from: CGPoint(x: 0.5, y: 2), to: CGPoint(x: 0.5, y: 0)) - case .topLeftBottomRight: - return ( from: CGPoint(x: 0, y: 0), to: CGPoint(x: 2, y: 2)) - case .bottomRightTopLeft: - return ( from: CGPoint(x: 2, y: 2), to: CGPoint(x: 0, y: 0)) - } - } - // codebeat:enable[ABC] -} - -public class SkeletonAnimationBuilder { - public init() { } - - public func makeSlidingAnimation(withDirection direction: GradientDirection, duration: CFTimeInterval = 1.5, autoreverses: Bool = false) -> SkeletonLayerAnimation { - return { _ in - let startPointAnim = CABasicAnimation(keyPath: #keyPath(CAGradientLayer.startPoint)) - startPointAnim.fromValue = direction.startPoint.from - startPointAnim.toValue = direction.startPoint.to - - let endPointAnim = CABasicAnimation(keyPath: #keyPath(CAGradientLayer.endPoint)) - endPointAnim.fromValue = direction.endPoint.from - endPointAnim.toValue = direction.endPoint.to - - let animGroup = CAAnimationGroup() - animGroup.animations = [startPointAnim, endPointAnim] - animGroup.duration = duration - animGroup.timingFunction = CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeIn) - animGroup.repeatCount = .infinity - animGroup.autoreverses = autoreverses - animGroup.isRemovedOnCompletion = false - - return animGroup - } - } -} diff --git a/Pods/SkeletonView/Sources/SkeletonConfig.swift b/Pods/SkeletonView/Sources/SkeletonConfig.swift deleted file mode 100644 index e467aa27..00000000 --- a/Pods/SkeletonView/Sources/SkeletonConfig.swift +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -/// Used to store all config needed to activate the skeleton layer. -struct SkeletonConfig { - /// Type of skeleton layer - let type: SkeletonType - - /// Colors used in skeleton layer - let colors: [UIColor] - - /// If type is gradient, which gradient direction - let gradientDirection: GradientDirection? - - /// Specify if skeleton is animated or not - let animated: Bool - - /// Used to execute a custom animation - let animation: SkeletonLayerAnimation? - - /// Transition style - var transition: SkeletonTransitionStyle - - init(type: SkeletonType, - colors: [UIColor], - gradientDirection: GradientDirection? = nil, - animated: Bool = false, - animation: SkeletonLayerAnimation? = nil, - transition: SkeletonTransitionStyle = .crossDissolve(0.25)) { - self.type = type - self.colors = colors - self.gradientDirection = gradientDirection - self.animated = animated - self.animation = animation - self.transition = transition - } -} diff --git a/Pods/SkeletonView/Sources/SkeletonFlow.swift b/Pods/SkeletonView/Sources/SkeletonFlow.swift deleted file mode 100644 index 84fafd17..00000000 --- a/Pods/SkeletonView/Sources/SkeletonFlow.swift +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -protocol SkeletonFlowDelegate: AnyObject { - func willBeginShowingSkeletons(rootView: UIView) - func didShowSkeletons(rootView: UIView) - func willBeginUpdatingSkeletons(rootView: UIView) - func didUpdateSkeletons(rootView: UIView) - func willBeginLayingSkeletonsIfNeeded(rootView: UIView) - func didLayoutSkeletonsIfNeeded(rootView: UIView) - func willBeginHidingSkeletons(rootView: UIView) - func didHideSkeletons(rootView: UIView) -} - -class SkeletonFlowHandler: SkeletonFlowDelegate { - func willBeginShowingSkeletons(rootView: UIView) { - NotificationCenter.default.post(name: .willBeginShowingSkeletons, object: rootView, userInfo: nil) - rootView.addAppNotificationsObservers() - } - - func didShowSkeletons(rootView: UIView) { - printSkeletonHierarchy(in: rootView) - NotificationCenter.default.post(name: .didShowSkeletons, object: rootView, userInfo: nil) - } - - func willBeginUpdatingSkeletons(rootView: UIView) { - NotificationCenter.default.post(name: .willBeginUpdatingSkeletons, object: rootView, userInfo: nil) - } - - func didUpdateSkeletons(rootView: UIView) { - NotificationCenter.default.post(name: .didUpdateSkeletons, object: rootView, userInfo: nil) - } - - func willBeginLayingSkeletonsIfNeeded(rootView: UIView) { - } - - func didLayoutSkeletonsIfNeeded(rootView: UIView) { - } - - func willBeginHidingSkeletons(rootView: UIView) { - NotificationCenter.default.post(name: .willBeginHidingSkeletons, object: rootView, userInfo: nil) - rootView.removeAppNoticationsObserver() - } - - func didHideSkeletons(rootView: UIView) { - rootView.flowDelegate = nil - NotificationCenter.default.post(name: .didHideSkeletons, object: rootView, userInfo: nil) - } -} - -public extension Notification.Name { - static let willBeginShowingSkeletons = Notification.Name("willBeginShowingSkeletons") - static let didShowSkeletons = Notification.Name("didShowSkeletons") - static let willBeginUpdatingSkeletons = Notification.Name("willBeginUpdatingSkeletons") - static let didUpdateSkeletons = Notification.Name("didUpdateSkeletons") - static let willBeginHidingSkeletons = Notification.Name("willBeginHidingSkeletons") - static let didHideSkeletons = Notification.Name("didHideSkeletons") -} diff --git a/Pods/SkeletonView/Sources/SkeletonGradient.swift b/Pods/SkeletonView/Sources/SkeletonGradient.swift deleted file mode 100644 index e75c33d3..00000000 --- a/Pods/SkeletonView/Sources/SkeletonGradient.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// SkeletonGradient.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 05/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -public struct SkeletonGradient { - private let gradientColors: [UIColor] - - public var colors: [UIColor] { - return gradientColors - } - - public init(baseColor: UIColor, secondaryColor: UIColor? = nil) { - if let secondary = secondaryColor { - self.gradientColors = [baseColor, secondary, baseColor] - } else { - self.gradientColors = baseColor.makeGradient() - } - } -} diff --git a/Pods/SkeletonView/Sources/SkeletonLayer.swift b/Pods/SkeletonView/Sources/SkeletonLayer.swift deleted file mode 100755 index f451b88d..00000000 --- a/Pods/SkeletonView/Sources/SkeletonLayer.swift +++ /dev/null @@ -1,130 +0,0 @@ -// -// SkeletonLayer.swift -// SkeletonView-iOS -// -// Created by Juanpe Catalán on 02/11/2017. -// Copyright © 2017 SkeletonView. All rights reserved. -// - -import UIKit - -public typealias SkeletonLayerAnimation = (CALayer) -> CAAnimation - -public enum SkeletonType { - case solid - case gradient - - var layer: CALayer { - switch self { - case .solid: - return CALayer() - case .gradient: - return CAGradientLayer() - } - } - - func defaultLayerAnimation(isRTL: Bool) -> SkeletonLayerAnimation { - switch self { - case .solid: - return { $0.pulse } - case .gradient: - return { SkeletonAnimationBuilder().makeSlidingAnimation(withDirection: isRTL ? .rightLeft : .leftRight) }() - } - } -} - -struct SkeletonLayer { - private var maskLayer: CALayer - private weak var holder: UIView? - - var type: SkeletonType { - return maskLayer is CAGradientLayer ? .gradient : .solid - } - - var contentLayer: CALayer { - return maskLayer - } - - init(type: SkeletonType, colors: [UIColor], skeletonHolder holder: UIView) { - self.holder = holder - self.maskLayer = type.layer - self.maskLayer.anchorPoint = .zero - self.maskLayer.bounds = holder.definedMaxBounds - self.maskLayer.cornerRadius = CGFloat(holder.skeletonCornerRadius) - addTextLinesIfNeeded() - self.maskLayer.tint(withColors: colors) - } - - func update(usingColors colors: [UIColor]) { - layoutIfNeeded() - maskLayer.tint(withColors: colors) - } - - func layoutIfNeeded() { - if let bounds = holder?.definedMaxBounds { - maskLayer.bounds = bounds - } - updateLinesIfNeeded() - } - - func removeLayer(transition: SkeletonTransitionStyle, completion: (() -> Void)? = nil) { - switch transition { - case .none: - maskLayer.removeFromSuperlayer() - completion?() - case .crossDissolve(let duration): - maskLayer.setOpacity(from: 1, to: 0, duration: duration) { - self.maskLayer.removeFromSuperlayer() - completion?() - } - } - } - - /// If there is more than one line, or custom preferences have been set for a single line, draw custom layers - func addTextLinesIfNeeded() { - guard let textView = holderAsTextView else { return } - let config = SkeletonMultilinesLayerConfig(lines: textView.numberOfLines, - lineHeight: textView.lineHeight, - type: type, - lastLineFillPercent: textView.lastLineFillingPercent, - multilineCornerRadius: textView.multilineCornerRadius, - multilineSpacing: textView.multilineSpacing, - paddingInsets: textView.paddingInsets, - isRTL: holder?.isRTL ?? false) - - maskLayer.addMultilinesLayers(for: config) - } - - func updateLinesIfNeeded() { - guard let textView = holderAsTextView else { return } - let config = SkeletonMultilinesLayerConfig(lines: textView.numberOfLines, - lineHeight: textView.lineHeight, - type: type, - lastLineFillPercent: textView.lastLineFillingPercent, - multilineCornerRadius: textView.multilineCornerRadius, - multilineSpacing: textView.multilineSpacing, - paddingInsets: textView.paddingInsets, - isRTL: holder?.isRTL ?? false) - - maskLayer.updateMultilinesLayers(for: config) - } - - var holderAsTextView: ContainsMultilineText? { - guard let textView = holder as? ContainsMultilineText, - (textView.numberOfLines == -1 || textView.numberOfLines == 0 || textView.numberOfLines > 1 || textView.numberOfLines == 1 && !SkeletonAppearance.default.renderSingleLineAsView) else { - return nil - } - return textView - } -} - -extension SkeletonLayer { - func start(_ anim: SkeletonLayerAnimation? = nil, completion: (() -> Void)? = nil) { - let animation = anim ?? type.defaultLayerAnimation(isRTL: holder?.isRTL ?? false) - contentLayer.playAnimation(animation, key: "skeletonAnimation", completion: completion) - } - - func stopAnimation() { - contentLayer.stopAnimation(forKey: "skeletonAnimation") - } -} diff --git a/Pods/SkeletonView/Sources/SkeletonView.swift b/Pods/SkeletonView/Sources/SkeletonView.swift deleted file mode 100755 index d028a95d..00000000 --- a/Pods/SkeletonView/Sources/SkeletonView.swift +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright © 2017 SkeletonView. All rights reserved. - -import UIKit - -public extension UIView { - /// Shows the skeleton without animation using the view that calls this method as root view. - /// - /// - Parameters: - /// - color: The color of the skeleton. Defaults to `SkeletonAppearance.default.tintColor`. - /// - transition: The style of the transition when the skeleton appears. Defaults to `.crossDissolve(0.25)`. - func showSkeleton(usingColor color: UIColor = SkeletonAppearance.default.tintColor, transition: SkeletonTransitionStyle = .crossDissolve(0.25)) { - delayedShowSkeletonWorkItem?.cancel() - let config = SkeletonConfig(type: .solid, colors: [color], transition: transition) - showSkeleton(skeletonConfig: config) - } - - /// Shows the skeleton using the view that calls this method as root view. - /// - /// - Parameters: - /// - color: The color of the skeleton. Defaults to `SkeletonAppearance.default.tintColor`. - /// - animated: If the skeleton is animated or not. Defaults to `true`. - /// - delay: The amount of time (measured in seconds) to wait before show the skeleton. - /// - transition: The style of the transition when the skeleton appears. Defaults to `.crossDissolve(0.25)`. - func showSkeleton(usingColor color: UIColor = SkeletonAppearance.default.tintColor, animated: Bool = true, delay: TimeInterval, transition: SkeletonTransitionStyle = .crossDissolve(0.25)) { - delayedShowSkeletonWorkItem?.cancel() - - delayedShowSkeletonWorkItem = DispatchWorkItem { [weak self] in - let config = SkeletonConfig(type: .solid, colors: [color], animated: animated, transition: transition) - self?.showSkeleton(skeletonConfig: config) - } - - DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: delayedShowSkeletonWorkItem!) - } - - /// Shows the gradient skeleton without animation using the view that calls this method as root view. - /// - /// - Parameters: - /// - gradient: The gradient of the skeleton. Defaults to `SkeletonAppearance.default.gradient`. - /// - transition: The style of the transition when the skeleton appears. Defaults to `.crossDissolve(0.25)`. - func showGradientSkeleton(usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient, transition: SkeletonTransitionStyle = .crossDissolve(0.25)) { - delayedShowSkeletonWorkItem?.cancel() - let config = SkeletonConfig(type: .gradient, colors: gradient.colors, transition: transition) - showSkeleton(skeletonConfig: config) - } - - /// Shows the gradient skeleton using the view that calls this method as root view. - /// - /// - Parameters: - /// - gradient: The gradient of the skeleton. Defaults to `SkeletonAppearance.default.gradient`. - /// - animated: If the skeleton is animated or not. Defaults to `true`. - /// - delay: The amount of time (measured in seconds) to wait before show the skeleton. - /// - transition: The style of the transition when the skeleton appears. Defaults to `.crossDissolve(0.25)`. - func showGradientSkeleton( - usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient, - animated: Bool = true, - delay: TimeInterval, - transition: SkeletonTransitionStyle = .crossDissolve(0.25) - ) { - delayedShowSkeletonWorkItem?.cancel() - - delayedShowSkeletonWorkItem = DispatchWorkItem { [weak self] in - let config = SkeletonConfig(type: .gradient, colors: gradient.colors, animated: animated, transition: transition) - self?.showSkeleton(skeletonConfig: config) - } - - DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: delayedShowSkeletonWorkItem!) - } - - /// Shows the animated skeleton using the view that calls this method as root view. - /// - /// If animation is nil, sliding animation will be used, with direction left to right. - /// - /// - Parameters: - /// - color: The color of skeleton. Defaults to `SkeletonAppearance.default.tintColor`. - /// - animation: The animation of the skeleton. Defaults to `nil`. - /// - transition: The style of the transition when the skeleton appears. Defaults to `.crossDissolve(0.25)`. - func showAnimatedSkeleton(usingColor color: UIColor = SkeletonAppearance.default.tintColor, animation: SkeletonLayerAnimation? = nil, transition: SkeletonTransitionStyle = .crossDissolve(0.25)) { - delayedShowSkeletonWorkItem?.cancel() - let config = SkeletonConfig(type: .solid, colors: [color], animated: true, animation: animation, transition: transition) - showSkeleton(skeletonConfig: config) - } - - /// Shows the gradient skeleton without animation using the view that calls this method as root view. - /// - /// If animation is nil, sliding animation will be used, with direction left to right. - /// - /// - Parameters: - /// - gradient: The gradient of the skeleton. Defaults to `SkeletonAppearance.default.gradient`. - /// - animation: The animation of the skeleton. Defaults to `nil`. - /// - transition: The style of the transition when the skeleton appears. Defaults to `.crossDissolve(0.25)`. - func showAnimatedGradientSkeleton(usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient, animation: SkeletonLayerAnimation? = nil, transition: SkeletonTransitionStyle = .crossDissolve(0.25)) { - delayedShowSkeletonWorkItem?.cancel() - let config = SkeletonConfig(type: .gradient, colors: gradient.colors, animated: true, animation: animation, transition: transition) - showSkeleton(skeletonConfig: config) - } - - func updateSkeleton(usingColor color: UIColor = SkeletonAppearance.default.tintColor) { - let config = SkeletonConfig(type: .solid, colors: [color]) - updateSkeleton(skeletonConfig: config) - } - - func updateGradientSkeleton(usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient) { - let config = SkeletonConfig(type: .gradient, colors: gradient.colors) - updateSkeleton(skeletonConfig: config) - } - - func updateAnimatedSkeleton(usingColor color: UIColor = SkeletonAppearance.default.tintColor, animation: SkeletonLayerAnimation? = nil) { - let config = SkeletonConfig(type: .solid, colors: [color], animated: true, animation: animation) - updateSkeleton(skeletonConfig: config) - } - - func updateAnimatedGradientSkeleton(usingGradient gradient: SkeletonGradient = SkeletonAppearance.default.gradient, animation: SkeletonLayerAnimation? = nil) { - let config = SkeletonConfig(type: .gradient, colors: gradient.colors, animated: true, animation: animation) - updateSkeleton(skeletonConfig: config) - } - - func layoutSkeletonIfNeeded() { - flowDelegate?.willBeginLayingSkeletonsIfNeeded(rootView: self) - recursiveLayoutSkeletonIfNeeded(root: self) - } - - func hideSkeleton(reloadDataAfter reload: Bool = true, transition: SkeletonTransitionStyle = .crossDissolve(0.25)) { - delayedShowSkeletonWorkItem?.cancel() - flowDelegate?.willBeginHidingSkeletons(rootView: self) - recursiveHideSkeleton(reloadDataAfter: reload, transition: transition, root: self) - } - - func startSkeletonAnimation(_ anim: SkeletonLayerAnimation? = nil) { - subviewsSkeletonables.recursiveSearch(leafBlock: startSkeletonLayerAnimationBlock(anim)) { subview in - subview.startSkeletonAnimation(anim) - } - } - - func stopSkeletonAnimation() { - subviewsSkeletonables.recursiveSearch(leafBlock: stopSkeletonLayerAnimationBlock) { subview in - subview.stopSkeletonAnimation() - } - } -} - -extension UIView { - @objc func skeletonLayoutSubviews() { - guard Thread.isMainThread else { return } - skeletonLayoutSubviews() - guard isSkeletonActive else { return } - layoutSkeletonIfNeeded() - } - - @objc func skeletonTraitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { - skeletonTraitCollectionDidChange(previousTraitCollection) - guard isSkeletonable, isSkeletonActive, let config = currentSkeletonConfig else { return } - updateSkeleton(skeletonConfig: config) - } - - func showSkeleton(skeletonConfig config: SkeletonConfig) { - isSkeletonAnimated = config.animated - flowDelegate = SkeletonFlowHandler() - flowDelegate?.willBeginShowingSkeletons(rootView: self) - recursiveShowSkeleton(skeletonConfig: config, root: self) - } - - private func recursiveShowSkeleton(skeletonConfig config: SkeletonConfig, root: UIView? = nil) { - if isHiddenWhenSkeletonIsActive { - isHidden = true - } - guard isSkeletonable && !isSkeletonActive else { return } - currentSkeletonConfig = config - swizzleLayoutSubviews() - swizzleTraitCollectionDidChange() - addDummyDataSourceIfNeeded() - subviewsSkeletonables.recursiveSearch(leafBlock: { - showSkeletonIfNotActive(skeletonConfig: config) - }) { subview in - subview.recursiveShowSkeleton(skeletonConfig: config) - } - - if let root = root { - flowDelegate?.didShowSkeletons(rootView: root) - } - } - - private func showSkeletonIfNotActive(skeletonConfig config: SkeletonConfig) { - guard !isSkeletonActive else { return } - saveViewState() - - prepareViewForSkeleton() - addSkeletonLayer(skeletonConfig: config) - } - - func updateSkeleton(skeletonConfig config: SkeletonConfig) { - isSkeletonAnimated = config.animated - flowDelegate?.willBeginUpdatingSkeletons(rootView: self) - recursiveUpdateSkeleton(skeletonConfig: config, root: self) - } - - private func recursiveUpdateSkeleton(skeletonConfig config: SkeletonConfig, root: UIView? = nil) { - guard isSkeletonActive else { return } - currentSkeletonConfig = config - updateDummyDataSourceIfNeeded() - subviewsSkeletonables.recursiveSearch(leafBlock: { - if let skeletonLayer = skeletonLayer, - skeletonLayer.type != config.type { - removeSkeletonLayer() - addSkeletonLayer(skeletonConfig: config) - } else { - updateSkeletonLayer(skeletonConfig: config) - } - }) { subview in - subview.recursiveUpdateSkeleton(skeletonConfig: config) - } - - if let root = root { - flowDelegate?.didUpdateSkeletons(rootView: root) - } - } - - private func recursiveLayoutSkeletonIfNeeded(root: UIView? = nil) { - subviewsSkeletonables.recursiveSearch(leafBlock: { - guard isSkeletonable, isSkeletonActive else { return } - layoutSkeletonLayerIfNeeded() - if let config = currentSkeletonConfig, config.animated, !isSkeletonAnimated { - startSkeletonAnimation(config.animation) - } - }) { subview in - subview.recursiveLayoutSkeletonIfNeeded() - } - - if let root = root { - flowDelegate?.didLayoutSkeletonsIfNeeded(rootView: root) - } - } - - private func recursiveHideSkeleton(reloadDataAfter reload: Bool, transition: SkeletonTransitionStyle, root: UIView? = nil) { - guard isSkeletonActive else { return } - if isHiddenWhenSkeletonIsActive { - isHidden = false - } - currentSkeletonConfig?.transition = transition - unSwizzleLayoutSubviews() - unSwizzleTraitCollectionDidChange() - removeDummyDataSourceIfNeeded(reloadAfter: reload) - subviewsSkeletonables.recursiveSearch(leafBlock: { - recoverViewState(forced: false) - removeSkeletonLayer() - }) { subview in - subview.recursiveHideSkeleton(reloadDataAfter: reload, transition: transition) - } - - if let root = root { - flowDelegate?.didHideSkeletons(rootView: root) - } - } - - private func startSkeletonLayerAnimationBlock(_ anim: SkeletonLayerAnimation? = nil) -> VoidBlock { - return { - self.isSkeletonAnimated = true - guard let layer = self.skeletonLayer else { return } - layer.start(anim) { [weak self] in - self?.isSkeletonAnimated = false - } - } - } - - private var stopSkeletonLayerAnimationBlock: VoidBlock { - return { - self.isSkeletonAnimated = false - guard let layer = self.skeletonLayer else { return } - layer.stopAnimation() - } - } - - private func swizzleLayoutSubviews() { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) { - DispatchQueue.once(token: "UIView.SkeletonView.swizzleLayoutSubviews") { - swizzle(selector: #selector(UIView.layoutSubviews), - with: #selector(UIView.skeletonLayoutSubviews), - inClass: UIView.self, - usingClass: UIView.self) - self.layoutSkeletonIfNeeded() - } - } - } - - private func unSwizzleLayoutSubviews() { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) { - DispatchQueue.removeOnce(token: "UIView.SkeletonView.swizzleLayoutSubviews") { - swizzle(selector: #selector(UIView.skeletonLayoutSubviews), - with: #selector(UIView.layoutSubviews), - inClass: UIView.self, - usingClass: UIView.self) - } - } - } - - private func swizzleTraitCollectionDidChange() { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) { - DispatchQueue.once(token: "UIView.SkeletonView.swizzleTraitCollectionDidChange") { - swizzle(selector: #selector(UIView.traitCollectionDidChange(_:)), - with: #selector(UIView.skeletonTraitCollectionDidChange(_:)), - inClass: UIView.self, - usingClass: UIView.self) - } - } - } - - private func unSwizzleTraitCollectionDidChange() { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) { - DispatchQueue.removeOnce(token: "UIView.SkeletonView.swizzleTraitCollectionDidChange") { - swizzle(selector: #selector(UIView.skeletonTraitCollectionDidChange(_:)), - with: #selector(UIView.traitCollectionDidChange(_:)), - inClass: UIView.self, - usingClass: UIView.self) - } - } - } -} - -extension UIView { - func addSkeletonLayer(skeletonConfig config: SkeletonConfig) { - guard let skeletonLayer = SkeletonLayerBuilder() - .setSkeletonType(config.type) - .addColors(config.colors) - .setHolder(self) - .build() - else { return } - - self.skeletonLayer = skeletonLayer - layer.insertSkeletonLayer( - skeletonLayer, - atIndex: UInt32.max, - transition: config.transition - ) { [weak self] in - guard let self = self else { return } - - /// Workaround to fix the problem when inserting a sublayer and - /// the content offset is modified by the system. - (self as? UITextView)?.setContentOffset(.zero, animated: false) - - if config.animated { - self.startSkeletonAnimation(config.animation) - } - } - status = .on - } - - func updateSkeletonLayer(skeletonConfig config: SkeletonConfig) { - guard let skeletonLayer = skeletonLayer else { return } - skeletonLayer.update(usingColors: config.colors) - if config.animated { - startSkeletonAnimation(config.animation) - } else { - skeletonLayer.stopAnimation() - } - } - - func layoutSkeletonLayerIfNeeded() { - guard let skeletonLayer = skeletonLayer else { return } - skeletonLayer.layoutIfNeeded() - } - - func removeSkeletonLayer() { - guard isSkeletonActive, - let skeletonLayer = skeletonLayer, - let transitionStyle = currentSkeletonConfig?.transition else { return } - skeletonLayer.stopAnimation() - status = .off - skeletonLayer.removeLayer(transition: transitionStyle) { - self.skeletonLayer = nil - self.currentSkeletonConfig = nil - } - } -} diff --git a/Pods/SkeletonView/Sources/SubviewsSkeletonables.swift b/Pods/SkeletonView/Sources/SubviewsSkeletonables.swift deleted file mode 100644 index d7acba02..00000000 --- a/Pods/SkeletonView/Sources/SubviewsSkeletonables.swift +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright © 2018 SkeletonView. All rights reserved. - -import UIKit - -extension UIView { - @objc var subviewsSkeletonables: [UIView] { - subviewsToSkeleton.filter { $0.isSkeletonable } - } - - @objc var subviewsToSkeleton: [UIView] { - subviews - } -} - -extension UITableView { - override var subviewsToSkeleton: [UIView] { - // on `UIViewController'S onViewDidLoad`, the window is still nil. - // Some developer trying to call `view.showAnimatedSkeleton()` - // when the request or data is loading which sometimes happens before the ViewDidAppear - guard window != nil else { return [] } - return subviews - } -} - -extension UITableViewCell { - override var subviewsToSkeleton: [UIView] { - contentView.subviews - } -} - -extension UITableViewHeaderFooterView { - override var subviewsToSkeleton: [UIView] { - contentView.subviews - } -} - -extension UICollectionView { - override var subviewsToSkeleton: [UIView] { - subviews - } -} - -extension UICollectionViewCell { - override var subviewsToSkeleton: [UIView] { - contentView.subviews - } -} - -extension UIStackView { - override var subviewsToSkeleton: [UIView] { - arrangedSubviews - } -} diff --git a/Pods/SkeletonView/Sources/Transitions/SkeletonTransitionStyle.swift b/Pods/SkeletonView/Sources/Transitions/SkeletonTransitionStyle.swift deleted file mode 100644 index bca16871..00000000 --- a/Pods/SkeletonView/Sources/Transitions/SkeletonTransitionStyle.swift +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright © 2019 SkeletonView. All rights reserved. - -import UIKit - -public enum SkeletonTransitionStyle: Equatable { - case none - case crossDissolve(TimeInterval) -} diff --git a/Pods/SkeletonView/Sources/Transitions/UIView+Transitions.swift b/Pods/SkeletonView/Sources/Transitions/UIView+Transitions.swift deleted file mode 100644 index 2c8f8495..00000000 --- a/Pods/SkeletonView/Sources/Transitions/UIView+Transitions.swift +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright © 2019 SkeletonView. All rights reserved. - -import UIKit - -extension CALayer { - func insertSkeletonLayer(_ sublayer: SkeletonLayer, atIndex index: UInt32, transition: SkeletonTransitionStyle, completion: (() -> Void)? = nil) { - insertSublayer(sublayer.contentLayer, at: index) - switch transition { - case .none: - completion?() - case .crossDissolve(let duration): - sublayer.contentLayer.setOpacity(from: 0, to: 1, duration: duration, completion: completion) - } - } -} - -extension UIView { - func startTransition(transitionBlock: @escaping () -> Void) { - guard let transitionStyle = currentSkeletonConfig?.transition, - transitionStyle != .none - else { - transitionBlock() - return - } - - if case let .crossDissolve(duration) = transitionStyle { - UIView.transition(with: self, - duration: duration, - options: .transitionCrossDissolve, - animations: transitionBlock, - completion: nil) - } - } -} diff --git a/Pods/SwiftLint/LICENSE b/Pods/SwiftLint/LICENSE deleted file mode 100644 index 04203762..00000000 --- a/Pods/SwiftLint/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2020 Realm Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Pods/Target Support Files/Alamofire/Alamofire-Info.plist b/Pods/Target Support Files/Alamofire/Alamofire-Info.plist deleted file mode 100644 index f6f37a1a..00000000 --- a/Pods/Target Support Files/Alamofire/Alamofire-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 5.4.3 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Alamofire/Alamofire-dummy.m b/Pods/Target Support Files/Alamofire/Alamofire-dummy.m deleted file mode 100644 index a6c45942..00000000 --- a/Pods/Target Support Files/Alamofire/Alamofire-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Alamofire : NSObject -@end -@implementation PodsDummy_Alamofire -@end diff --git a/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch b/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Pods/Target Support Files/Alamofire/Alamofire-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h b/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h deleted file mode 100644 index 00014e3c..00000000 --- a/Pods/Target Support Files/Alamofire/Alamofire-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double AlamofireVersionNumber; -FOUNDATION_EXPORT const unsigned char AlamofireVersionString[]; - diff --git a/Pods/Target Support Files/Alamofire/Alamofire.debug.xcconfig b/Pods/Target Support Files/Alamofire/Alamofire.debug.xcconfig deleted file mode 100644 index 9cd6be9b..00000000 --- a/Pods/Target Support Files/Alamofire/Alamofire.debug.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -framework "CFNetwork" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Alamofire/Alamofire.modulemap b/Pods/Target Support Files/Alamofire/Alamofire.modulemap deleted file mode 100644 index d1f125fa..00000000 --- a/Pods/Target Support Files/Alamofire/Alamofire.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Alamofire { - umbrella header "Alamofire-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Alamofire/Alamofire.release.xcconfig b/Pods/Target Support Files/Alamofire/Alamofire.release.xcconfig deleted file mode 100644 index 9cd6be9b..00000000 --- a/Pods/Target Support Files/Alamofire/Alamofire.release.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -framework "CFNetwork" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Alamofire -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Moya/Moya-Info.plist b/Pods/Target Support Files/Moya/Moya-Info.plist deleted file mode 100644 index 7f41e092..00000000 --- a/Pods/Target Support Files/Moya/Moya-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 14.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Moya/Moya-dummy.m b/Pods/Target Support Files/Moya/Moya-dummy.m deleted file mode 100644 index 260473f2..00000000 --- a/Pods/Target Support Files/Moya/Moya-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Moya : NSObject -@end -@implementation PodsDummy_Moya -@end diff --git a/Pods/Target Support Files/Moya/Moya-prefix.pch b/Pods/Target Support Files/Moya/Moya-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Pods/Target Support Files/Moya/Moya-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/Moya/Moya-umbrella.h b/Pods/Target Support Files/Moya/Moya-umbrella.h deleted file mode 100644 index 8d810473..00000000 --- a/Pods/Target Support Files/Moya/Moya-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double MoyaVersionNumber; -FOUNDATION_EXPORT const unsigned char MoyaVersionString[]; - diff --git a/Pods/Target Support Files/Moya/Moya.debug.xcconfig b/Pods/Target Support Files/Moya/Moya.debug.xcconfig deleted file mode 100644 index f0f2d061..00000000 --- a/Pods/Target Support Files/Moya/Moya.debug.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Moya -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Moya -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Moya/Moya.modulemap b/Pods/Target Support Files/Moya/Moya.modulemap deleted file mode 100644 index 7b84cdb9..00000000 --- a/Pods/Target Support Files/Moya/Moya.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Moya { - umbrella header "Moya-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Moya/Moya.release.xcconfig b/Pods/Target Support Files/Moya/Moya.release.xcconfig deleted file mode 100644 index f0f2d061..00000000 --- a/Pods/Target Support Files/Moya/Moya.release.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Moya -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_LDFLAGS = $(inherited) -framework "Foundation" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Moya -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-Info.plist b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-Info.plist deleted file mode 100644 index 2243fe6e..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-acknowledgements.markdown b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-acknowledgements.markdown deleted file mode 100644 index 1fb7b265..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-acknowledgements.markdown +++ /dev/null @@ -1,102 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## Alamofire - -Copyright (c) 2014-2021 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -## Moya - -The MIT License (MIT) - -Copyright (c) 2014-present Artsy, Ash Furrow - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -## SkeletonView - -The MIT License (MIT) - -Copyright (c) 2017 Juanpe Catalán - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - -## SwiftLint - -The MIT License (MIT) - -Copyright (c) 2020 Realm Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -Generated by CocoaPods - https://cocoapods.org diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-acknowledgements.plist b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-acknowledgements.plist deleted file mode 100644 index 3ffe4dd1..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-acknowledgements.plist +++ /dev/null @@ -1,152 +0,0 @@ - - - - - PreferenceSpecifiers - - - FooterText - This application makes use of the following third party libraries: - Title - Acknowledgements - Type - PSGroupSpecifier - - - FooterText - Copyright (c) 2014-2021 Alamofire Software Foundation (http://alamofire.org/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - License - MIT - Title - Alamofire - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2014-present Artsy, Ash Furrow - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - Moya - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2017 Juanpe Catalán - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - - License - MIT - Title - SkeletonView - Type - PSGroupSpecifier - - - FooterText - The MIT License (MIT) - -Copyright (c) 2020 Realm Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - License - MIT - Title - SwiftLint - Type - PSGroupSpecifier - - - FooterText - Generated by CocoaPods - https://cocoapods.org - Title - - Type - PSGroupSpecifier - - - StringsTable - Acknowledgements - Title - Acknowledgements - - diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-dummy.m b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-dummy.m deleted file mode 100644 index e884e185..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_NADA_iOS_forRelease : NSObject -@end -@implementation PodsDummy_Pods_NADA_iOS_forRelease -@end diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Debug-input-files.xcfilelist deleted file mode 100644 index 2a06b2b1..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Debug-input-files.xcfilelist +++ /dev/null @@ -1,4 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks.sh -${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework -${BUILT_PRODUCTS_DIR}/Moya/Moya.framework -${BUILT_PRODUCTS_DIR}/SkeletonView/SkeletonView.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Debug-output-files.xcfilelist deleted file mode 100644 index 0bc0ab0b..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Debug-output-files.xcfilelist +++ /dev/null @@ -1,3 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Moya.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SkeletonView.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Release-input-files.xcfilelist deleted file mode 100644 index 2a06b2b1..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Release-input-files.xcfilelist +++ /dev/null @@ -1,4 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks.sh -${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework -${BUILT_PRODUCTS_DIR}/Moya/Moya.framework -${BUILT_PRODUCTS_DIR}/SkeletonView/SkeletonView.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Release-output-files.xcfilelist deleted file mode 100644 index 0bc0ab0b..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks-Release-output-files.xcfilelist +++ /dev/null @@ -1,3 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Moya.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SkeletonView.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks.sh b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks.sh deleted file mode 100755 index 4ee30219..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-frameworks.sh +++ /dev/null @@ -1,189 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -function on_error { - echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" -} -trap 'on_error $LINENO' ERR - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" -BCSYMBOLMAP_DIR="BCSymbolMaps" - - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then - # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied - find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do - echo "Installing $f" - install_bcsymbolmap "$f" "$destination" - rm "$f" - done - rmdir "${source}/${BCSYMBOLMAP_DIR}" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - elif [ -L "${binary}" ]; then - echo "Destination binary is symlinked..." - dirname="$(dirname "${binary}")" - binary="${dirname}/$(readlink "${binary}")" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - warn_missing_arch=${2:-true} - if [ -r "$source" ]; then - # Copy the dSYM into the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .dSYM "$source")" - binary_name="$(ls "$source/Contents/Resources/DWARF")" - binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" - - # Strip invalid architectures from the dSYM. - if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then - strip_invalid_archs "$binary" "$warn_missing_arch" - fi - if [[ $STRIP_BINARY_RETVAL == 0 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" - fi - fi -} - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - warn_missing_arch=${2:-true} - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - if [[ "$warn_missing_arch" == "true" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - fi - STRIP_BINARY_RETVAL=1 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=0 -} - -# Copies the bcsymbolmap files of a vendored framework -install_bcsymbolmap() { - local bcsymbolmap_path="$1" - local destination="${BUILT_PRODUCTS_DIR}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identity - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework" - install_framework "${BUILT_PRODUCTS_DIR}/SkeletonView/SkeletonView.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework" - install_framework "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework" - install_framework "${BUILT_PRODUCTS_DIR}/SkeletonView/SkeletonView.framework" -fi -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-umbrella.h b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-umbrella.h deleted file mode 100644 index b9f835a0..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double Pods_NADA_iOS_forReleaseVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_NADA_iOS_forReleaseVersionString[]; - diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.debug.xcconfig b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.debug.xcconfig deleted file mode 100644 index d546dd07..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.debug.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView/SkeletonView.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "Foundation" -framework "Moya" -framework "SkeletonView" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.modulemap b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.modulemap deleted file mode 100644 index 531bf2b1..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_NADA_iOS_forRelease { - umbrella header "Pods-NADA-iOS-forRelease-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.release.xcconfig b/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.release.xcconfig deleted file mode 100644 index d546dd07..00000000 --- a/Pods/Target Support Files/Pods-NADA-iOS-forRelease/Pods-NADA-iOS-forRelease.release.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView/SkeletonView.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "Foundation" -framework "Moya" -framework "SkeletonView" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SkeletonView/SkeletonView-Info.plist b/Pods/Target Support Files/SkeletonView/SkeletonView-Info.plist deleted file mode 100644 index f171974b..00000000 --- a/Pods/Target Support Files/SkeletonView/SkeletonView-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.21.2 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/Pods/Target Support Files/SkeletonView/SkeletonView-dummy.m b/Pods/Target Support Files/SkeletonView/SkeletonView-dummy.m deleted file mode 100644 index 324c44c3..00000000 --- a/Pods/Target Support Files/SkeletonView/SkeletonView-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_SkeletonView : NSObject -@end -@implementation PodsDummy_SkeletonView -@end diff --git a/Pods/Target Support Files/SkeletonView/SkeletonView-prefix.pch b/Pods/Target Support Files/SkeletonView/SkeletonView-prefix.pch deleted file mode 100644 index beb2a244..00000000 --- a/Pods/Target Support Files/SkeletonView/SkeletonView-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/Pods/Target Support Files/SkeletonView/SkeletonView-umbrella.h b/Pods/Target Support Files/SkeletonView/SkeletonView-umbrella.h deleted file mode 100644 index 2f6e096a..00000000 --- a/Pods/Target Support Files/SkeletonView/SkeletonView-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double SkeletonViewVersionNumber; -FOUNDATION_EXPORT const unsigned char SkeletonViewVersionString[]; - diff --git a/Pods/Target Support Files/SkeletonView/SkeletonView.debug.xcconfig b/Pods/Target Support Files/SkeletonView/SkeletonView.debug.xcconfig deleted file mode 100644 index 7c132cb2..00000000 --- a/Pods/Target Support Files/SkeletonView/SkeletonView.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SkeletonView -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SkeletonView/SkeletonView.modulemap b/Pods/Target Support Files/SkeletonView/SkeletonView.modulemap deleted file mode 100644 index 6f2c1fc6..00000000 --- a/Pods/Target Support Files/SkeletonView/SkeletonView.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SkeletonView { - umbrella header "SkeletonView-umbrella.h" - - export * - module * { export * } -} diff --git a/Pods/Target Support Files/SkeletonView/SkeletonView.release.xcconfig b/Pods/Target Support Files/SkeletonView/SkeletonView.release.xcconfig deleted file mode 100644 index 7c132cb2..00000000 --- a/Pods/Target Support Files/SkeletonView/SkeletonView.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SkeletonView -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SkeletonView -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig b/Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig deleted file mode 100644 index 003a1f43..00000000 --- a/Pods/Target Support Files/SwiftLint/SwiftLint.debug.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/SwiftLint/SwiftLint.release.xcconfig b/Pods/Target Support Files/SwiftLint/SwiftLint.release.xcconfig deleted file mode 100644 index 003a1f43..00000000 --- a/Pods/Target Support Files/SwiftLint/SwiftLint.release.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftLint -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftLint -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES