diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..40f47b1 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,7 @@ + \ No newline at end of file diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/Podfile b/Example/Podfile index 221214f..ec14281 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -29,7 +29,7 @@ def rx_swift_pods end target 'iamport-ios_Example' do - pod 'iamport-ios', :path => '../' + # pod 'iamport-ios', :path => '../' # pod 'iamport-ios', '~> 1.0.0-dev.8' use_frameworks! @@ -37,7 +37,7 @@ target 'iamport-ios_Example' do di_pods network_pods util_pods - rx_swift_pods + # rx_swift_pods target 'iamport-ios_Tests' do inherit! :search_paths @@ -54,4 +54,4 @@ post_install do |installer| config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' end end -end \ No newline at end of file +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 73d4218..e8d1897 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,46 +1,17 @@ PODS: - Alamofire (5.4.3) - - iamport-ios (1.0.0-dev.11): - - Alamofire (~> 5.1) - - RxBus (~> 1.3.1) - - RxCocoa - - RxOptional - - RxRelay - - RxSwift - - RxViewController - - Swinject - - Then - - RxBlocking (5.1.1): - - RxSwift (~> 5) - - RxBus (1.3.1): - - RxSwift (~> 5.0) - - RxCocoa (5.1.1): - - RxRelay (~> 5) - - RxSwift (~> 5) - - RxOptional (4.1.0): - - RxCocoa (~> 5) - - RxSwift (~> 5) - - RxRelay (5.1.1): - - RxSwift (~> 5) - - RxSwift (5.1.2) - - RxTest (5.1.2): - - RxSwift (~> 5) - - RxViewController (1.0.0): - - RxCocoa (~> 5.0) - - RxSwift (~> 5.0) - - Swinject (2.7.1) + - RxBlocking (6.2.0): + - RxSwift (= 6.2.0) + - RxSwift (6.2.0) + - RxTest (6.2.0): + - RxSwift (= 6.2.0) + - Swinject (2.8.0) - Then (2.7.0) DEPENDENCIES: - Alamofire - - iamport-ios (from `../`) - RxBlocking - - RxCocoa - - RxOptional - - RxRelay - - RxSwift - RxTest - - RxViewController - Swinject - Then @@ -48,34 +19,19 @@ SPEC REPOS: trunk: - Alamofire - RxBlocking - - RxBus - - RxCocoa - - RxOptional - - RxRelay - RxSwift - RxTest - - RxViewController - Swinject - Then -EXTERNAL SOURCES: - iamport-ios: - :path: "../" - SPEC CHECKSUMS: Alamofire: e447a2774a40c996748296fa2c55112fdbbc42f9 - iamport-ios: cbbaa6e38858a4a01750593347d7947225e7051e - RxBlocking: 5f700a78cad61ce253ebd37c9a39b5ccc76477b4 - RxBus: ee5cb413fe4e0853712144c9ed20705d9e8e03cd - RxCocoa: 32065309a38d29b5b0db858819b5bf9ef038b601 - RxOptional: b1fcd60856807a564c0215c2184b8d33e7826dc2 - RxRelay: d77f7d771495f43c556cbc43eebd1bb54d01e8e9 - RxSwift: 1e2e1f9570186967f617e49128ed26ccf1bafc8e - RxTest: 274549b747dca56f47c52c8991ec5cf797ecfe40 - RxViewController: 7330a46e5c31cd680db169da4c9fc8676e975a81 - Swinject: ddf78b8486dd9b71a667b852cad919ab4484478e + RxBlocking: 0b29f7d2079109a8de49c411381bed7c33ef1eeb + RxSwift: d356ab7bee873611322f134c5f9ef379fa183d8f + RxTest: 0c692fa672b694373ba86d2b00033595297a2831 + Swinject: db795b8d6d78559b25fbebb0170d2635be1176e2 Then: acfe0be7e98221c6204e12f8161459606d5d822d -PODFILE CHECKSUM: b199e5098079af6793f2cfb3624d14044aa8c87c +PODFILE CHECKSUM: b15f5ddffb449cc870af7888354135d13c7c9081 COCOAPODS: 1.10.1 diff --git a/Example/iamport-ios.xcodeproj/project.pbxproj b/Example/iamport-ios.xcodeproj/project.pbxproj index 94bb324..11e17dd 100644 --- a/Example/iamport-ios.xcodeproj/project.pbxproj +++ b/Example/iamport-ios.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ @@ -23,6 +23,8 @@ 38303D111C23D0AD1F787411 /* PaymentWebViewModeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38303449BF3F9738025BEDE9 /* PaymentWebViewModeView.swift */; }; 38303F45CA84E61D146E9F1F /* PaymentResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 38303BD589C1362D777B0527 /* PaymentResultViewController.swift */; }; 481ACCF4268B1A0C004A74C6 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 481ACCF3268B1A0C004A74C6 /* SceneDelegate.swift */; }; + 48480F5126DF175800544729 /* iamport-ios in Resources */ = {isa = PBXBuildFile; fileRef = 48480F5026DF175800544729 /* iamport-ios */; }; + 48C8844326DF80D200D0E1F3 /* iamport-ios in Frameworks */ = {isa = PBXBuildFile; productRef = 48C8844226DF80D200D0E1F3 /* iamport-ios */; }; 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; @@ -60,6 +62,9 @@ 38303E153A4F346B16BD779E /* Cert.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Cert.swift; sourceTree = ""; }; 38303FD24C053EF24C2D63CF /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 481ACCF3268B1A0C004A74C6 /* SceneDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + 48480F4826DF13D700544729 /* iamport-ios */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "iamport-ios"; path = ..; sourceTree = ""; }; + 48480F5026DF175800544729 /* iamport-ios */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "iamport-ios"; path = ..; sourceTree = ""; }; + 48480F5426DF185500544729 /* RxBus-swift */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "RxBus-swift"; path = "/Users/bingbong/Library/Developer/Xcode/DerivedData/iamport-ios-gpozheyhpvspvbfurvhzboghldej/SourcePackages/checkouts/RxBus-swift"; sourceTree = ""; }; 607FACD01AFB9204008FA782 /* iamport-ios_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iamport-ios_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -75,7 +80,7 @@ AE6AB4CDCBAEE3FF2DEAE0D8 /* Pods-iamport-ios_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iamport-ios_Tests.release.xcconfig"; path = "Target Support Files/Pods-iamport-ios_Tests/Pods-iamport-ios_Tests.release.xcconfig"; sourceTree = ""; }; B512228E67DB6516AA34A458 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; C5D2384CF3E87A54AE0BEA0E /* Pods-iamport-ios_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-iamport-ios_Example.release.xcconfig"; path = "Target Support Files/Pods-iamport-ios_Example/Pods-iamport-ios_Example.release.xcconfig"; sourceTree = ""; }; - E43CD40D3CAF1047B48244CB /* iamport-ios.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "iamport-ios.podspec"; path = "../iamport-ios.podspec"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + E43CD40D3CAF1047B48244CB /* iamport-ios.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = "iamport-ios.podspec"; path = "../iamport-ios.podspec"; sourceTree = ""; }; F7A18D80D66312537941CE29 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; /* End PBXFileReference section */ @@ -85,6 +90,7 @@ buildActionMask = 2147483647; files = ( A9FA86725F829DBF79343B6C /* Pods_iamport_ios_Example.framework in Frameworks */, + 48C8844326DF80D200D0E1F3 /* iamport-ios in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -109,6 +115,13 @@ path = Model; sourceTree = ""; }; + 3830375999B918CF0DA527FE /* Resources */ = { + isa = PBXGroup; + children = ( + ); + path = Resources; + sourceTree = ""; + }; 38303E9BE57B937968661804 /* View */ = { isa = PBXGroup; children = ( @@ -128,6 +141,7 @@ 607FACC71AFB9204008FA782 = { isa = PBXGroup; children = ( + 48480F5026DF175800544729 /* iamport-ios */, 607FACF51AFB993E008FA782 /* Podspec Metadata */, 607FACD21AFB9204008FA782 /* Example for iamport-ios */, 607FACE81AFB9204008FA782 /* Tests */, @@ -214,8 +228,11 @@ 77C13C9CED810C9DA90C9787 /* Frameworks */ = { isa = PBXGroup; children = ( + 48480F4826DF13D700544729 /* iamport-ios */, + 48480F5426DF185500544729 /* RxBus-swift */, ACA0A7EA7CB8536688E80C99 /* Pods_iamport_ios_Example.framework */, A4F783463114142EA9E673A2 /* Pods_iamport_ios_Tests.framework */, + 3830375999B918CF0DA527FE /* Resources */, ); name = Frameworks; sourceTree = ""; @@ -238,6 +255,9 @@ dependencies = ( ); name = "iamport-ios_Example"; + packageProductDependencies = ( + 48C8844226DF80D200D0E1F3 /* iamport-ios */, + ); productName = "iamport-ios"; productReference = 607FACD01AFB9204008FA782 /* iamport-ios_Example.app */; productType = "com.apple.product-type.application"; @@ -295,6 +315,9 @@ Base, ); mainGroup = 607FACC71AFB9204008FA782; + packageReferences = ( + 48C8843C26DF4B2300D0E1F3 /* XCRemoteSwiftPackageReference "iamport-ios" */, + ); productRefGroup = 607FACD11AFB9204008FA782 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -313,6 +336,7 @@ 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, + 48480F5126DF175800544729 /* iamport-ios in Resources */, 383030A05FF34E8E3A9463B3 /* mobileweb.html in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -334,14 +358,14 @@ ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-iamport-ios_Tests/Pods-iamport-ios_Tests-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", "${BUILT_PRODUCTS_DIR}/RxBlocking/RxBlocking.framework", + "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", "${BUILT_PRODUCTS_DIR}/RxTest/RxTest.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxBlocking.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxTest.framework", ); runOnlyForDeploymentPostprocessing = 0; @@ -401,28 +425,14 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-iamport-ios_Example/Pods-iamport-ios_Example-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework", - "${BUILT_PRODUCTS_DIR}/RxBus/RxBus.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxOptional/RxOptional.framework", - "${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework", - "${BUILT_PRODUCTS_DIR}/RxViewController/RxViewController.framework", "${BUILT_PRODUCTS_DIR}/Swinject/Swinject.framework", "${BUILT_PRODUCTS_DIR}/Then/Then.framework", - "${BUILT_PRODUCTS_DIR}/iamport-ios/iamport_ios.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxBus.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxOptional.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxViewController.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Swinject.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Then.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/iamport_ios.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -587,7 +597,8 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -600,7 +611,10 @@ DEVELOPMENT_TEAM = 79DQDD2784; INFOPLIST_FILE = "iamport-ios/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.iamport-ios-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -618,7 +632,10 @@ DEVELOPMENT_TEAM = 79DQDD2784; INFOPLIST_FILE = "iamport-ios/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.iamport-ios-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -643,7 +660,11 @@ "$(inherited)", ); INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; @@ -663,7 +684,11 @@ "$(inherited)", ); INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; @@ -703,6 +728,24 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + 48C8843C26DF4B2300D0E1F3 /* XCRemoteSwiftPackageReference "iamport-ios" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/iamport/iamport-ios.git"; + requirement = { + branch = feat/spm; + kind = branch; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 48C8844226DF80D200D0E1F3 /* iamport-ios */ = { + isa = XCSwiftPackageProductDependency; + productName = "iamport-ios"; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 607FACC81AFB9204008FA782 /* Project object */; } diff --git a/Example/iamport-ios.xcodeproj/xcshareddata/xcschemes/iamport-ios-Example.xcscheme b/Example/iamport-ios.xcodeproj/xcshareddata/xcschemes/iamport-ios-Example.xcscheme index 539c68c..fa7d6df 100644 --- a/Example/iamport-ios.xcodeproj/xcshareddata/xcschemes/iamport-ios-Example.xcscheme +++ b/Example/iamport-ios.xcodeproj/xcshareddata/xcschemes/iamport-ios-Example.xcscheme @@ -1,10 +1,16 @@ - + + buildForTesting = "YES" + buildForRunning = "YES" + buildForProfiling = "YES" + buildForArchiving = "YES" + buildForAnalyzing = "YES"> + + + + - + + + + + + + diff --git a/Example/iamport-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Example/iamport-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..4c580fa --- /dev/null +++ b/Example/iamport-ios.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,52 @@ +{ + "object": { + "pins": [ + { + "package": "Alamofire", + "repositoryURL": "https://github.com/Alamofire/Alamofire.git", + "state": { + "branch": null, + "revision": "f96b619bcb2383b43d898402283924b80e2c4bae", + "version": "5.4.3" + } + }, + { + "package": "iamport-ios", + "repositoryURL": "https://github.com/iamport/iamport-ios.git", + "state": { + "branch": "feat/spm", + "revision": "fce8f3193b3a0653cf385a4ef00d726808988dcc", + "version": null + } + }, + { + "package": "RxBus", + "repositoryURL": "https://github.com/ridi/RxBus-swift", + "state": { + "branch": null, + "revision": "b154da5fffb4c5d0d17b7f46e9cd38f382e298e4", + "version": "1.3.2" + } + }, + { + "package": "RxSwift", + "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", + "state": { + "branch": null, + "revision": "7c17a6ccca06b5c107cfa4284e634562ddaf5951", + "version": "6.2.0" + } + }, + { + "package": "Then", + "repositoryURL": "https://github.com/devxoul/Then.git", + "state": { + "branch": null, + "revision": "e421a7b3440a271834337694e6050133a3958bc7", + "version": "2.7.0" + } + } + ] + }, + "version": 1 +} diff --git a/Example/iamport-ios/View/PaymentResultViewController.swift b/Example/iamport-ios/View/PaymentResultViewController.swift index d47e46e..06b1a9a 100644 --- a/Example/iamport-ios/View/PaymentResultViewController.swift +++ b/Example/iamport-ios/View/PaymentResultViewController.swift @@ -12,7 +12,6 @@ import Then import iamport_ios import RxCocoa import RxSwift -import RxViewController // TODO: UIKit 용 // 결과 화면 diff --git a/Example/iamport-ios/View/ViewController.swift b/Example/iamport-ios/View/ViewController.swift index 7349eac..ae682d0 100644 --- a/Example/iamport-ios/View/ViewController.swift +++ b/Example/iamport-ios/View/ViewController.swift @@ -12,7 +12,7 @@ import Then import iamport_ios import RxCocoa import RxSwift -import RxViewController + // TODO: UIKit 용 class ViewController: UIViewController, UIGestureRecognizerDelegate { diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..86634b2 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,43 @@ +{ + "object": { + "pins": [ + { + "package": "Alamofire", + "repositoryURL": "https://github.com/Alamofire/Alamofire.git", + "state": { + "branch": null, + "revision": "f96b619bcb2383b43d898402283924b80e2c4bae", + "version": "5.4.3" + } + }, + { + "package": "RxBus", + "repositoryURL": "https://github.com/ridi/RxBus-swift", + "state": { + "branch": null, + "revision": "b154da5fffb4c5d0d17b7f46e9cd38f382e298e4", + "version": "1.3.2" + } + }, + { + "package": "RxSwift", + "repositoryURL": "https://github.com/ReactiveX/RxSwift.git", + "state": { + "branch": null, + "revision": "7c17a6ccca06b5c107cfa4284e634562ddaf5951", + "version": "6.2.0" + } + }, + { + "package": "Then", + "repositoryURL": "https://github.com/devxoul/Then.git", + "state": { + "branch": null, + "revision": "e421a7b3440a271834337694e6050133a3958bc7", + "version": "2.7.0" + } + } + ] + }, + "version": 1 +} diff --git a/Package.swift b/Package.swift index 9780e5e..421e04a 100644 --- a/Package.swift +++ b/Package.swift @@ -5,6 +5,10 @@ import PackageDescription let package = Package( name: "iamport-ios", + platforms: [ + .macOS(.v10_12), + .iOS(.v10), + ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( @@ -14,15 +18,22 @@ let package = Package( dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), + .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.0.0")), + .package(name: "RxBus", url: "https://github.com/ridi/RxBus-swift", .upToNextMajor(from: "1.3.2")), + .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.4.0")), + .package(url: "https://github.com/devxoul/Then.git", .upToNextMajor(from: "2.7.0")), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. - .target( - name: "iamport-ios", - dependencies: []), - .testTarget( - name: "iamport-iosTests", - dependencies: ["iamport-ios"]), + .target(name: "iamport-ios", + dependencies: ["RxSwift", + "RxBus", + "Alamofire", + "Then", + .product(name: "RxCocoa",package: "RxSwift"), + ], + resources: [.process("Assets")] + ) ] ) diff --git a/iamport-ios/Classes/.gitkeep b/Sources/iamport-ios/Assets/.gitkeep similarity index 100% rename from iamport-ios/Classes/.gitkeep rename to Sources/iamport-ios/Assets/.gitkeep diff --git a/iamport-ios/Assets/iamportcdn.html b/Sources/iamport-ios/Assets/iamportcdn.html similarity index 100% rename from iamport-ios/Assets/iamportcdn.html rename to Sources/iamport-ios/Assets/iamportcdn.html diff --git a/Sources/iamport-ios/Classes/.gitkeep b/Sources/iamport-ios/Classes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/iamport-ios/Classes/Data/Approve.swift b/Sources/iamport-ios/Classes/Data/Approve.swift similarity index 100% rename from iamport-ios/Classes/Data/Approve.swift rename to Sources/iamport-ios/Classes/Data/Approve.swift diff --git a/iamport-ios/Classes/Data/BankPayResultCode.swift b/Sources/iamport-ios/Classes/Data/BankPayResultCode.swift similarity index 100% rename from iamport-ios/Classes/Data/BankPayResultCode.swift rename to Sources/iamport-ios/Classes/Data/BankPayResultCode.swift diff --git a/iamport-ios/Classes/Data/CHAI.swift b/Sources/iamport-ios/Classes/Data/CHAI.swift similarity index 100% rename from iamport-ios/Classes/Data/CHAI.swift rename to Sources/iamport-ios/Classes/Data/CHAI.swift diff --git a/iamport-ios/Classes/Data/CardQuota.swift b/Sources/iamport-ios/Classes/Data/CardQuota.swift similarity index 100% rename from iamport-ios/Classes/Data/CardQuota.swift rename to Sources/iamport-ios/Classes/Data/CardQuota.swift diff --git a/iamport-ios/Classes/Data/ChaiPayment.swift b/Sources/iamport-ios/Classes/Data/ChaiPayment.swift similarity index 100% rename from iamport-ios/Classes/Data/ChaiPayment.swift rename to Sources/iamport-ios/Classes/Data/ChaiPayment.swift diff --git a/iamport-ios/Classes/Data/ChaiPaymentStatus.swift b/Sources/iamport-ios/Classes/Data/ChaiPaymentStatus.swift similarity index 100% rename from iamport-ios/Classes/Data/ChaiPaymentStatus.swift rename to Sources/iamport-ios/Classes/Data/ChaiPaymentStatus.swift diff --git a/iamport-ios/Classes/Data/ChaiPaymentSubscription.swift b/Sources/iamport-ios/Classes/Data/ChaiPaymentSubscription.swift similarity index 100% rename from iamport-ios/Classes/Data/ChaiPaymentSubscription.swift rename to Sources/iamport-ios/Classes/Data/ChaiPaymentSubscription.swift diff --git a/iamport-ios/Classes/Data/Currency.swift b/Sources/iamport-ios/Classes/Data/Currency.swift similarity index 100% rename from iamport-ios/Classes/Data/Currency.swift rename to Sources/iamport-ios/Classes/Data/Currency.swift diff --git a/iamport-ios/Classes/Data/Extra.swift b/Sources/iamport-ios/Classes/Data/Extra.swift similarity index 100% rename from iamport-ios/Classes/Data/Extra.swift rename to Sources/iamport-ios/Classes/Data/Extra.swift diff --git a/iamport-ios/Classes/Data/IamPortApprove.swift b/Sources/iamport-ios/Classes/Data/IamPortApprove.swift similarity index 100% rename from iamport-ios/Classes/Data/IamPortApprove.swift rename to Sources/iamport-ios/Classes/Data/IamPortApprove.swift diff --git a/iamport-ios/Classes/Data/IamPortCertification.swift b/Sources/iamport-ios/Classes/Data/IamPortCertification.swift similarity index 100% rename from iamport-ios/Classes/Data/IamPortCertification.swift rename to Sources/iamport-ios/Classes/Data/IamPortCertification.swift diff --git a/iamport-ios/Classes/Data/IamPortRequest.swift b/Sources/iamport-ios/Classes/Data/IamPortRequest.swift similarity index 100% rename from iamport-ios/Classes/Data/IamPortRequest.swift rename to Sources/iamport-ios/Classes/Data/IamPortRequest.swift diff --git a/iamport-ios/Classes/Data/IamPortResponse.swift b/Sources/iamport-ios/Classes/Data/IamPortResponse.swift similarity index 100% rename from iamport-ios/Classes/Data/IamPortResponse.swift rename to Sources/iamport-ios/Classes/Data/IamPortResponse.swift diff --git a/iamport-ios/Classes/Data/NaverInterface.swift b/Sources/iamport-ios/Classes/Data/NaverInterface.swift similarity index 100% rename from iamport-ios/Classes/Data/NaverInterface.swift rename to Sources/iamport-ios/Classes/Data/NaverInterface.swift diff --git a/iamport-ios/Classes/Data/NiceBankpay.swift b/Sources/iamport-ios/Classes/Data/NiceBankpay.swift similarity index 100% rename from iamport-ios/Classes/Data/NiceBankpay.swift rename to Sources/iamport-ios/Classes/Data/NiceBankpay.swift diff --git a/iamport-ios/Classes/Data/PG.swift b/Sources/iamport-ios/Classes/Data/PG.swift similarity index 100% rename from iamport-ios/Classes/Data/PG.swift rename to Sources/iamport-ios/Classes/Data/PG.swift diff --git a/iamport-ios/Classes/Data/PayMethod.swift b/Sources/iamport-ios/Classes/Data/PayMethod.swift similarity index 100% rename from iamport-ios/Classes/Data/PayMethod.swift rename to Sources/iamport-ios/Classes/Data/PayMethod.swift diff --git a/iamport-ios/Classes/Data/Payment.swift b/Sources/iamport-ios/Classes/Data/Payment.swift similarity index 100% rename from iamport-ios/Classes/Data/Payment.swift rename to Sources/iamport-ios/Classes/Data/Payment.swift diff --git a/iamport-ios/Classes/Data/Platform.swift b/Sources/iamport-ios/Classes/Data/Platform.swift similarity index 100% rename from iamport-ios/Classes/Data/Platform.swift rename to Sources/iamport-ios/Classes/Data/Platform.swift diff --git a/iamport-ios/Classes/Data/Prepare.swift b/Sources/iamport-ios/Classes/Data/Prepare.swift similarity index 100% rename from iamport-ios/Classes/Data/Prepare.swift rename to Sources/iamport-ios/Classes/Data/Prepare.swift diff --git a/iamport-ios/Classes/Data/PrepareData.swift b/Sources/iamport-ios/Classes/Data/PrepareData.swift similarity index 100% rename from iamport-ios/Classes/Data/PrepareData.swift rename to Sources/iamport-ios/Classes/Data/PrepareData.swift diff --git a/iamport-ios/Classes/Data/PrepareRequest.swift b/Sources/iamport-ios/Classes/Data/PrepareRequest.swift similarity index 100% rename from iamport-ios/Classes/Data/PrepareRequest.swift rename to Sources/iamport-ios/Classes/Data/PrepareRequest.swift diff --git a/iamport-ios/Classes/Data/ProductItem.swift b/Sources/iamport-ios/Classes/Data/ProductItem.swift similarity index 100% rename from iamport-ios/Classes/Data/ProductItem.swift rename to Sources/iamport-ios/Classes/Data/ProductItem.swift diff --git a/iamport-ios/Classes/Data/ProvidePgScheme.swift b/Sources/iamport-ios/Classes/Data/ProvidePgScheme.swift similarity index 100% rename from iamport-ios/Classes/Data/ProvidePgScheme.swift rename to Sources/iamport-ios/Classes/Data/ProvidePgScheme.swift diff --git a/iamport-ios/Classes/Data/UserData.swift b/Sources/iamport-ios/Classes/Data/UserData.swift similarity index 100% rename from iamport-ios/Classes/Data/UserData.swift rename to Sources/iamport-ios/Classes/Data/UserData.swift diff --git a/iamport-ios/Classes/Data/Users.swift b/Sources/iamport-ios/Classes/Data/Users.swift similarity index 100% rename from iamport-ios/Classes/Data/Users.swift rename to Sources/iamport-ios/Classes/Data/Users.swift diff --git a/iamport-ios/Classes/Domain/Iamport.swift b/Sources/iamport-ios/Classes/Domain/Iamport.swift similarity index 100% rename from iamport-ios/Classes/Domain/Iamport.swift rename to Sources/iamport-ios/Classes/Domain/Iamport.swift diff --git a/iamport-ios/Classes/Domain/StrategyRepository.swift b/Sources/iamport-ios/Classes/Domain/StrategyRepository.swift similarity index 100% rename from iamport-ios/Classes/Domain/StrategyRepository.swift rename to Sources/iamport-ios/Classes/Domain/StrategyRepository.swift diff --git a/iamport-ios/Classes/Domain/Utils/AppScheme.swift b/Sources/iamport-ios/Classes/Domain/Utils/AppScheme.swift similarity index 100% rename from iamport-ios/Classes/Domain/Utils/AppScheme.swift rename to Sources/iamport-ios/Classes/Domain/Utils/AppScheme.swift diff --git a/iamport-ios/Classes/Domain/Utils/CONST.swift b/Sources/iamport-ios/Classes/Domain/Utils/CONST.swift similarity index 100% rename from iamport-ios/Classes/Domain/Utils/CONST.swift rename to Sources/iamport-ios/Classes/Domain/Utils/CONST.swift diff --git a/iamport-ios/Classes/Domain/Utils/CompletionHandlerWrapper.swift b/Sources/iamport-ios/Classes/Domain/Utils/CompletionHandlerWrapper.swift similarity index 100% rename from iamport-ios/Classes/Domain/Utils/CompletionHandlerWrapper.swift rename to Sources/iamport-ios/Classes/Domain/Utils/CompletionHandlerWrapper.swift diff --git a/iamport-ios/Classes/Domain/Utils/DictionaryEncodable.swift b/Sources/iamport-ios/Classes/Domain/Utils/DictionaryEncodable.swift similarity index 100% rename from iamport-ios/Classes/Domain/Utils/DictionaryEncodable.swift rename to Sources/iamport-ios/Classes/Domain/Utils/DictionaryEncodable.swift diff --git a/iamport-ios/Classes/Domain/Utils/EventBus.swift b/Sources/iamport-ios/Classes/Domain/Utils/EventBus.swift similarity index 100% rename from iamport-ios/Classes/Domain/Utils/EventBus.swift rename to Sources/iamport-ios/Classes/Domain/Utils/EventBus.swift diff --git a/iamport-ios/Classes/Domain/Utils/Network.swift b/Sources/iamport-ios/Classes/Domain/Utils/Network.swift similarity index 100% rename from iamport-ios/Classes/Domain/Utils/Network.swift rename to Sources/iamport-ios/Classes/Domain/Utils/Network.swift diff --git a/iamport-ios/Classes/Domain/Utils/Utils.swift b/Sources/iamport-ios/Classes/Domain/Utils/Utils.swift similarity index 99% rename from iamport-ios/Classes/Domain/Utils/Utils.swift rename to Sources/iamport-ios/Classes/Domain/Utils/Utils.swift index 1190759..f1d55b3 100644 --- a/iamport-ios/Classes/Domain/Utils/Utils.swift +++ b/Sources/iamport-ios/Classes/Domain/Utils/Utils.swift @@ -3,6 +3,7 @@ // import Foundation +import UIKit import RxSwift import SystemConfiguration diff --git a/iamport-ios/Classes/Domain/strategy/BaseStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/BaseStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/BaseStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/BaseStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/BaseWebViewStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/BaseWebViewStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/BaseWebViewStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/BaseWebViewStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/CertificationWebViewStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/CertificationWebViewStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/CertificationWebViewStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/CertificationWebViewStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/ChaiStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/ChaiStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/ChaiStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/ChaiStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/IStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/IStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/IStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/IStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/InicisTransWebViewStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/InicisTransWebViewStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/InicisTransWebViewStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/InicisTransWebViewStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/JudgeStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/JudgeStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/JudgeStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/JudgeStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/NiceTransWebViewStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/NiceTransWebViewStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/NiceTransWebViewStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/NiceTransWebViewStrategy.swift diff --git a/iamport-ios/Classes/Domain/strategy/WebViewStrategy.swift b/Sources/iamport-ios/Classes/Domain/strategy/WebViewStrategy.swift similarity index 100% rename from iamport-ios/Classes/Domain/strategy/WebViewStrategy.swift rename to Sources/iamport-ios/Classes/Domain/strategy/WebViewStrategy.swift diff --git a/iamport-ios/Classes/Presentation/IamPortMobileWebMode.swift b/Sources/iamport-ios/Classes/Presentation/IamPortMobileWebMode.swift similarity index 100% rename from iamport-ios/Classes/Presentation/IamPortMobileWebMode.swift rename to Sources/iamport-ios/Classes/Presentation/IamPortMobileWebMode.swift diff --git a/iamport-ios/Classes/Presentation/IamPortWKWebViewDelegate.swift b/Sources/iamport-ios/Classes/Presentation/IamPortWKWebViewDelegate.swift similarity index 100% rename from iamport-ios/Classes/Presentation/IamPortWKWebViewDelegate.swift rename to Sources/iamport-ios/Classes/Presentation/IamPortWKWebViewDelegate.swift diff --git a/iamport-ios/Classes/Presentation/IamPortWebViewMode.swift b/Sources/iamport-ios/Classes/Presentation/IamPortWebViewMode.swift similarity index 96% rename from iamport-ios/Classes/Presentation/IamPortWebViewMode.swift rename to Sources/iamport-ios/Classes/Presentation/IamPortWebViewMode.swift index a9b4dc6..47c13c2 100644 --- a/iamport-ios/Classes/Presentation/IamPortWebViewMode.swift +++ b/Sources/iamport-ios/Classes/Presentation/IamPortWebViewMode.swift @@ -304,7 +304,15 @@ class IamPortWebViewMode: UIView, WKUIDelegate { dlog("오픈! 웹뷰 webview mode") let myPG = payment?.iamPortRequest?.pgEnum - let bundle = Bundle(for: type(of: self)) + + func bundle() -> Bundle { + let spmBundle = Bundle.module // spm 에서 리소스 가져오는 방법임, 에러처럼 보이지만 xcode 빌드시 정상 동작(cmd + b) + guard let _ = spmBundle.url(forResource: CONST.CDN_FILE_NAME, withExtension: CONST.CDN_FILE_EXTENSION) else { + return Bundle(for: type(of: self)) // use for cocoapods + } + return spmBundle // use for swift package manager + } + let bundle = bundle() var urlRequest: URLRequest? = nil // for webView load var htmlContents: String? = nil // for webView loadHtml(smilepay 자동 로그인) diff --git a/iamport-ios/Classes/Presentation/IamportSdk.swift b/Sources/iamport-ios/Classes/Presentation/IamportSdk.swift similarity index 100% rename from iamport-ios/Classes/Presentation/IamportSdk.swift rename to Sources/iamport-ios/Classes/Presentation/IamportSdk.swift diff --git a/iamport-ios/Classes/Presentation/MainViewModel.swift b/Sources/iamport-ios/Classes/Presentation/MainViewModel.swift similarity index 100% rename from iamport-ios/Classes/Presentation/MainViewModel.swift rename to Sources/iamport-ios/Classes/Presentation/MainViewModel.swift diff --git a/iamport-ios/Classes/Presentation/WebViewController.swift b/Sources/iamport-ios/Classes/Presentation/WebViewController.swift similarity index 97% rename from iamport-ios/Classes/Presentation/WebViewController.swift rename to Sources/iamport-ios/Classes/Presentation/WebViewController.swift index feb6071..c876450 100644 --- a/iamport-ios/Classes/Presentation/WebViewController.swift +++ b/Sources/iamport-ios/Classes/Presentation/WebViewController.swift @@ -387,8 +387,17 @@ class WebViewController: UIViewController, WKUIDelegate, UINavigationBarDelegate print("오픈! 웹뷰 vc") let myPG = payment?.iamPortRequest?.pgEnum - let bundle = Bundle(for: type(of: self)) +// let bundle = Bundle(for: type(of: self)) + func bundle() -> Bundle { + let spmBundle = Bundle.module // spm 에서 리소스 가져오는 방법임, 에러처럼 보이지만 xcode 빌드시 정상 동작(cmd + b) + guard let _ = spmBundle.url(forResource: CONST.CDN_FILE_NAME, withExtension: CONST.CDN_FILE_EXTENSION) else { + return Bundle(for: type(of: self)) // use for cocoapods + } + return spmBundle // use for swift package manager + } + + let bundle = bundle() var urlRequest: URLRequest? = nil // for webView load var htmlContents: String? = nil // for webView loadHtml(smilepay 자동 로그인) @@ -627,4 +636,4 @@ extension WebViewController: WKScriptMessageHandler { // } } - */ \ No newline at end of file + */ diff --git a/iamport-ios/Classes/Presentation/WebViewModel.swift b/Sources/iamport-ios/Classes/Presentation/WebViewModel.swift similarity index 100% rename from iamport-ios/Classes/Presentation/WebViewModel.swift rename to Sources/iamport-ios/Classes/Presentation/WebViewModel.swift diff --git a/Sources/iamport-ios/iamport_ios.swift b/Sources/iamport-ios/iamport_ios.swift deleted file mode 100644 index bbc2961..0000000 --- a/Sources/iamport-ios/iamport_ios.swift +++ /dev/null @@ -1,3 +0,0 @@ -struct iamport_ios { - var text = "Hello, World!" -} diff --git a/iamport-ios.podspec b/iamport-ios.podspec index 37c9e3a..5a58f7e 100644 --- a/iamport-ios.podspec +++ b/iamport-ios.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'iamport-ios' - s.version = '1.0.0' + s.version = '1.1.0-dev.01' s.summary = 'iamport-ios will help develop for your iOS App payments' # This description is used to generate tags and improve search results. @@ -32,24 +32,24 @@ Pod::Spec.new do |s| s.swift_versions = '5.0' s.ios.deployment_target = '10.0' - s.source_files = 'iamport-ios/Classes/**/*' + s.source_files = 'Sources/iamport-ios/Classes/**/*' # s.resource_bundles = { -# 'iamport-ios' => ['iamport-ios/Assets/**/*'] +# 'iamport-ios' => ['Sources/iamport-ios/Assets/**/*'] # } - s.resources = "iamport-ios/Assets/**/*" + s.resources = "Sources/iamport-ios/Assets/**/*" # s.public_header_files = 'Pod/Classes/**/*.h' # s.frameworks = 'UIKit', 'MapKit' # s.dependency 'AFNetworking', '~> 2.3' - s.dependency 'Then' +# s.dependency 'Then' - s.dependency 'Swinject' +# s.dependency 'Swinject' # 대표적인 네트워크 라이브러리입니다. - s.dependency 'Alamofire', '~> 5.1' +# s.dependency 'Alamofire', '~> 5.1' # Alamofire를 사용할 때 상단 상태 바에 통신중일때 기본 인디케이터가 나타나도록 합니다. # s.dependency 'AlamofireNetworkActivityIndicator', '~> 3.1' # Alamofire를 이용할 때 로그를 쉽게 볼수 있습니다. @@ -57,11 +57,11 @@ Pod::Spec.new do |s| # Pods for RxSwift+MVVM # 최신 1.3.2 대응 고민 - s.dependency 'RxBus', '~> 1.3.1' - s.dependency 'RxSwift' - s.dependency 'RxCocoa' - s.dependency 'RxRelay' - s.dependency 'RxOptional' - s.dependency 'RxViewController' +# s.dependency 'RxBus', '~> 1.3.1' +# s.dependency 'RxSwift' +# s.dependency 'RxCocoa' +# s.dependency 'RxRelay' +# s.dependency 'RxOptional' +# s.dependency 'RxViewController' end