diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e949122 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + # Check for updates to GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + + # Maintain dependencies for Composer + - package-ecosystem: "swift" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f6dbbcf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: Build + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + name: ${{ matrix.platform }} on ${{ matrix.os }} + runs-on: macos-15 + env: + scheme: AlamofireSwiftyJSON + strategy: + fail-fast: false + matrix: + include: + - platform: iPhone 16 Pro + os: 18.1 + - platform: iPhone 16 Pro + os: 18.2 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Run Build on ${{ matrix.platform }} (iOS ${{ matrix.os }}) + run: | + xcodebuild build \ + -scheme $scheme \ + -destination 'platform=iOS Simulator,name=${{ matrix.platform }},OS=${{ matrix.os }}' diff --git a/.gitignore b/.gitignore index a3cd143..622c06a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,12 @@ -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate +# OS X +.DS_Store -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -# Pods/ +# Swift Package Manager +.build +build +Package.resolved + +# Xcode user settings +xcuserdata/ + +.idea \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index a8f67ba..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +0,0 @@ -[submodule "SwiftyJSON"] - path = SwiftyJSON - url = https://github.com/SwiftyJSON/SwiftyJSON.git -[submodule "Alamofire"] - path = Alamofire - url = https://github.com/Alamofire/Alamofire.git diff --git a/.swift-version b/.swift-version index 9f55b2c..ef425ca 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -3.0 +5.2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index de64906..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: objective-c -osx_image: xcode9 -xcode_sdk: iphonesimulator10.0 -env: - - PLATFORM="ios" SCHEME="AlamofireSwiftyJSON" DESTINATION="platform=iOS Simulator,name=iPhone SE,OS=10.0" -script: - - set -o pipefail && xcodebuild -project Alamofire-SwiftyJSON.xcodeproj -scheme $SCHEME -destination "$DESTINATION" build-for-testing test | xcpretty diff --git a/Alamofire b/Alamofire deleted file mode 160000 index 7fe7b91..0000000 --- a/Alamofire +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7fe7b918b746fbb4b7a7c2146bef7a88c7ddc54e diff --git a/Alamofire-SwiftyJSON.podspec b/Alamofire-SwiftyJSON.podspec deleted file mode 100644 index 5447dc7..0000000 --- a/Alamofire-SwiftyJSON.podspec +++ /dev/null @@ -1,16 +0,0 @@ -Pod::Spec.new do |s| - s.name = "Alamofire-SwiftyJSON" - s.version = "3.0.0" - s.summary = "Alamofire extension for serialize NSData to SwiftyJSON " - s.homepage = "https://github.com/SwiftyJSON/Alamofire-SwiftyJSON" - s.license = { :type => "MIT" } - s.authors = { "tangplin" => "tangplin@gmail.com" } - - s.requires_arc = true - s.osx.deployment_target = "10.11" - s.ios.deployment_target = "9.0" - s.source = { :git => "https://github.com/SwiftyJSON/Alamofire-SwiftyJSON.git", :tag => s.version } - s.source_files = "Source/*.swift" - s.dependency 'Alamofire', '~> 4.5' - s.dependency 'SwiftyJSON', '~> 4.0.0' -end diff --git a/Alamofire-SwiftyJSON.xcodeproj/project.pbxproj b/Alamofire-SwiftyJSON.xcodeproj/project.pbxproj deleted file mode 100644 index e703136..0000000 --- a/Alamofire-SwiftyJSON.xcodeproj/project.pbxproj +++ /dev/null @@ -1,767 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - A8A2DBBA1A23292000AF9EFC /* Alamofire.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A8AFB75A19D14A5C0070765E /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A8A2DBBB1A23292000AF9EFC /* SwiftyJSON.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A8AFB76519D14A670070765E /* SwiftyJSON.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A8A2DBC31A2329E700AF9EFC /* Alamofire.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A8AFB75A19D14A5C0070765E /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A8A2DBC41A2329E700AF9EFC /* SwiftyJSON.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A8AFB76519D14A670070765E /* SwiftyJSON.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A8A2DBC51A2329E700AF9EFC /* AlamofireSwiftyJSON.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = A8AFB70F19D1401D0070765E /* AlamofireSwiftyJSON.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - A8AFB71519D1401D0070765E /* Alamofire-SwiftyJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = A8AFB71419D1401D0070765E /* Alamofire-SwiftyJSON.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A8AFB71F19D1401D0070765E /* Alamofire_SwiftyJSONTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8AFB71E19D1401D0070765E /* Alamofire_SwiftyJSONTests.swift */; }; - A8AFB72919D140BD0070765E /* Alamofire-SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8AFB72819D140BD0070765E /* Alamofire-SwiftyJSON.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 4BC5E9F91BB7E15600A393DD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 4DD67C0B1A5C55C900ED2280; - remoteInfo = "Alamofire OSX"; - }; - 4BC5E9FB1BB7E15600A393DD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = E4202FE01B667AA100C997FB; - remoteInfo = "Alamofire watchOS"; - }; - 4BC5E9FD1BB7E15600A393DD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = F829C6B21A7A94F100A2CD59; - remoteInfo = "Alamofire OSX Tests"; - }; - 4BC5EA031BB7E15600A393DD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 9C7DFC5B1A9102BD005AA3F7; - remoteInfo = "SwiftyJSON OSX"; - }; - 4BC5EA051BB7E15600A393DD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 9C7DFC651A9102BD005AA3F7; - remoteInfo = "SwiftyJSON OSX Tests"; - }; - 4BC5EA071BB7E15600A393DD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = E4D7CCE81B9465A700EE7221; - remoteInfo = "SwiftyJSON watchOS"; - }; - A81D16431E59E90500C62C5F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 4CF626EF1BA7CB3E0011A099; - remoteInfo = "Alamofire tvOS"; - }; - A81D16451E59E90500C62C5F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 4CF626F81BA7CB3E0011A099; - remoteInfo = "Alamofire tvOS Tests"; - }; - A81D164D1E59E90500C62C5F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 7236B4F61BAC14150020529B; - remoteInfo = "SwiftyJSON tvOS"; - }; - A81D164F1E59E90500C62C5F /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A8580F741BCF5C5B00DA927B; - remoteInfo = "SwiftyJSON tvOS Tests"; - }; - A8A2DBB61A23290100AF9EFC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = F8111E3219A95C8B0040E7D1; - remoteInfo = Alamofire; - }; - A8A2DBB81A23290100AF9EFC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 2E4FEFDA19575BE100351305; - remoteInfo = SwiftyJSON; - }; - A8A2DBBC1A2329BD00AF9EFC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB70619D1401D0070765E /* Project object */; - proxyType = 1; - remoteGlobalIDString = A8AFB70E19D1401D0070765E; - remoteInfo = AlamofireSwiftyJSON; - }; - A8A2DBBE1A2329BD00AF9EFC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = F8111E3219A95C8B0040E7D1; - remoteInfo = Alamofire; - }; - A8A2DBC01A2329BD00AF9EFC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 2E4FEFDA19575BE100351305; - remoteInfo = SwiftyJSON; - }; - A8AFB75919D14A5C0070765E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = F8111E3319A95C8B0040E7D1; - remoteInfo = Alamofire; - }; - A8AFB75B19D14A5C0070765E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = F8111E3E19A95C8B0040E7D1; - remoteInfo = AlamofireTests; - }; - A8AFB76419D14A670070765E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2E4FEFDB19575BE100351305; - remoteInfo = SwiftyJSON; - }; - A8AFB76619D14A670070765E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 2E4FEFE619575BE100351305; - remoteInfo = SwiftyJSONTests; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - A82ED83919ED37D300A502B1 /* Copy Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - A8A2DBBA1A23292000AF9EFC /* Alamofire.framework in Copy Frameworks */, - A8A2DBBB1A23292000AF9EFC /* SwiftyJSON.framework in Copy Frameworks */, - ); - name = "Copy Frameworks"; - runOnlyForDeploymentPostprocessing = 1; - }; - A8A2DBC21A2329CE00AF9EFC /* Copy Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 12; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - A8A2DBC31A2329E700AF9EFC /* Alamofire.framework in Copy Frameworks */, - A8A2DBC41A2329E700AF9EFC /* SwiftyJSON.framework in Copy Frameworks */, - A8A2DBC51A2329E700AF9EFC /* AlamofireSwiftyJSON.framework in Copy Frameworks */, - ); - name = "Copy Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - A8AFB70F19D1401D0070765E /* AlamofireSwiftyJSON.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AlamofireSwiftyJSON.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A8AFB71319D1401D0070765E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A8AFB71419D1401D0070765E /* Alamofire-SwiftyJSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Alamofire-SwiftyJSON.h"; sourceTree = ""; }; - A8AFB71A19D1401D0070765E /* AlamofireSwiftyJSONTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AlamofireSwiftyJSONTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - A8AFB71D19D1401D0070765E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A8AFB71E19D1401D0070765E /* Alamofire_SwiftyJSONTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Alamofire_SwiftyJSONTests.swift; sourceTree = ""; }; - A8AFB72819D140BD0070765E /* Alamofire-SwiftyJSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Alamofire-SwiftyJSON.swift"; sourceTree = ""; }; - A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Alamofire.xcodeproj; path = Alamofire/Alamofire.xcodeproj; sourceTree = ""; }; - A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SwiftyJSON.xcodeproj; path = SwiftyJSON/SwiftyJSON.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - A8AFB70B19D1401D0070765E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A8AFB71719D1401D0070765E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - A8AFB70519D1401D0070765E = { - isa = PBXGroup; - children = ( - A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */, - A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */, - A8AFB71119D1401D0070765E /* Source */, - A8AFB71B19D1401D0070765E /* Tests */, - A8AFB71019D1401D0070765E /* Products */, - ); - sourceTree = ""; - }; - A8AFB71019D1401D0070765E /* Products */ = { - isa = PBXGroup; - children = ( - A8AFB70F19D1401D0070765E /* AlamofireSwiftyJSON.framework */, - A8AFB71A19D1401D0070765E /* AlamofireSwiftyJSONTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - A8AFB71119D1401D0070765E /* Source */ = { - isa = PBXGroup; - children = ( - A8AFB71419D1401D0070765E /* Alamofire-SwiftyJSON.h */, - A8AFB72819D140BD0070765E /* Alamofire-SwiftyJSON.swift */, - A8AFB71219D1401D0070765E /* Supporting Files */, - ); - path = Source; - sourceTree = ""; - }; - A8AFB71219D1401D0070765E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - A8AFB71319D1401D0070765E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - A8AFB71B19D1401D0070765E /* Tests */ = { - isa = PBXGroup; - children = ( - A8AFB71E19D1401D0070765E /* Alamofire_SwiftyJSONTests.swift */, - A8AFB71C19D1401D0070765E /* Supporting Files */, - ); - path = Tests; - sourceTree = ""; - }; - A8AFB71C19D1401D0070765E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - A8AFB71D19D1401D0070765E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - A8AFB75519D14A5C0070765E /* Products */ = { - isa = PBXGroup; - children = ( - A8AFB75A19D14A5C0070765E /* Alamofire.framework */, - A8AFB75C19D14A5C0070765E /* Alamofire iOS Tests.xctest */, - 4BC5E9FA1BB7E15600A393DD /* Alamofire.framework */, - 4BC5E9FE1BB7E15600A393DD /* Alamofire macOS Tests.xctest */, - A81D16441E59E90500C62C5F /* Alamofire.framework */, - A81D16461E59E90500C62C5F /* Alamofire tvOS Tests.xctest */, - 4BC5E9FC1BB7E15600A393DD /* Alamofire.framework */, - ); - name = Products; - sourceTree = ""; - }; - A8AFB75E19D14A670070765E /* Products */ = { - isa = PBXGroup; - children = ( - A8AFB76519D14A670070765E /* SwiftyJSON.framework */, - A8AFB76719D14A670070765E /* SwiftyJSON iOS Tests.xctest */, - 4BC5EA041BB7E15600A393DD /* SwiftyJSON.framework */, - 4BC5EA061BB7E15600A393DD /* SwiftyJSON OSX Tests.xctest */, - 4BC5EA081BB7E15600A393DD /* SwiftyJSON.framework */, - A81D164E1E59E90500C62C5F /* SwiftyJSON.framework */, - A81D16501E59E90500C62C5F /* SwiftyJSON tvOS Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - A8AFB70C19D1401D0070765E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - A8AFB71519D1401D0070765E /* Alamofire-SwiftyJSON.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - A8AFB70E19D1401D0070765E /* AlamofireSwiftyJSON */ = { - isa = PBXNativeTarget; - buildConfigurationList = A8AFB72219D1401D0070765E /* Build configuration list for PBXNativeTarget "AlamofireSwiftyJSON" */; - buildPhases = ( - A8AFB70A19D1401D0070765E /* Sources */, - A8AFB70B19D1401D0070765E /* Frameworks */, - A8AFB70C19D1401D0070765E /* Headers */, - A8AFB70D19D1401D0070765E /* Resources */, - A82ED83919ED37D300A502B1 /* Copy Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - A8A2DBB71A23290100AF9EFC /* PBXTargetDependency */, - A8A2DBB91A23290100AF9EFC /* PBXTargetDependency */, - ); - name = AlamofireSwiftyJSON; - productName = "Alamofire-SwiftyJSON"; - productReference = A8AFB70F19D1401D0070765E /* AlamofireSwiftyJSON.framework */; - productType = "com.apple.product-type.framework"; - }; - A8AFB71919D1401D0070765E /* AlamofireSwiftyJSONTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = A8AFB72519D1401D0070765E /* Build configuration list for PBXNativeTarget "AlamofireSwiftyJSONTests" */; - buildPhases = ( - A8AFB71619D1401D0070765E /* Sources */, - A8AFB71719D1401D0070765E /* Frameworks */, - A8AFB71819D1401D0070765E /* Resources */, - A8A2DBC21A2329CE00AF9EFC /* Copy Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - A8A2DBBD1A2329BD00AF9EFC /* PBXTargetDependency */, - A8A2DBBF1A2329BD00AF9EFC /* PBXTargetDependency */, - A8A2DBC11A2329BD00AF9EFC /* PBXTargetDependency */, - ); - name = AlamofireSwiftyJSONTests; - productName = "Alamofire-SwiftyJSONTests"; - productReference = A8AFB71A19D1401D0070765E /* AlamofireSwiftyJSONTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A8AFB70619D1401D0070765E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0900; - ORGANIZATIONNAME = SwiftJSON; - TargetAttributes = { - A8AFB70E19D1401D0070765E = { - CreatedOnToolsVersion = 6.0.1; - LastSwiftMigration = 0820; - }; - A8AFB71919D1401D0070765E = { - CreatedOnToolsVersion = 6.0.1; - LastSwiftMigration = 0820; - }; - }; - }; - buildConfigurationList = A8AFB70919D1401D0070765E /* Build configuration list for PBXProject "Alamofire-SwiftyJSON" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = A8AFB70519D1401D0070765E; - productRefGroup = A8AFB71019D1401D0070765E /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = A8AFB75519D14A5C0070765E /* Products */; - ProjectRef = A8AFB75419D14A5C0070765E /* Alamofire.xcodeproj */; - }, - { - ProductGroup = A8AFB75E19D14A670070765E /* Products */; - ProjectRef = A8AFB75D19D14A670070765E /* SwiftyJSON.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - A8AFB70E19D1401D0070765E /* AlamofireSwiftyJSON */, - A8AFB71919D1401D0070765E /* AlamofireSwiftyJSONTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 4BC5E9FA1BB7E15600A393DD /* Alamofire.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = Alamofire.framework; - remoteRef = 4BC5E9F91BB7E15600A393DD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 4BC5E9FC1BB7E15600A393DD /* Alamofire.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = Alamofire.framework; - remoteRef = 4BC5E9FB1BB7E15600A393DD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 4BC5E9FE1BB7E15600A393DD /* Alamofire macOS Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "Alamofire macOS Tests.xctest"; - remoteRef = 4BC5E9FD1BB7E15600A393DD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 4BC5EA041BB7E15600A393DD /* SwiftyJSON.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SwiftyJSON.framework; - remoteRef = 4BC5EA031BB7E15600A393DD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 4BC5EA061BB7E15600A393DD /* SwiftyJSON OSX Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "SwiftyJSON OSX Tests.xctest"; - remoteRef = 4BC5EA051BB7E15600A393DD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 4BC5EA081BB7E15600A393DD /* SwiftyJSON.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SwiftyJSON.framework; - remoteRef = 4BC5EA071BB7E15600A393DD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A81D16441E59E90500C62C5F /* Alamofire.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = Alamofire.framework; - remoteRef = A81D16431E59E90500C62C5F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A81D16461E59E90500C62C5F /* Alamofire tvOS Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "Alamofire tvOS Tests.xctest"; - remoteRef = A81D16451E59E90500C62C5F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A81D164E1E59E90500C62C5F /* SwiftyJSON.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SwiftyJSON.framework; - remoteRef = A81D164D1E59E90500C62C5F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A81D16501E59E90500C62C5F /* SwiftyJSON tvOS Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "SwiftyJSON tvOS Tests.xctest"; - remoteRef = A81D164F1E59E90500C62C5F /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A8AFB75A19D14A5C0070765E /* Alamofire.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = Alamofire.framework; - remoteRef = A8AFB75919D14A5C0070765E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A8AFB75C19D14A5C0070765E /* Alamofire iOS Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "Alamofire iOS Tests.xctest"; - remoteRef = A8AFB75B19D14A5C0070765E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A8AFB76519D14A670070765E /* SwiftyJSON.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = SwiftyJSON.framework; - remoteRef = A8AFB76419D14A670070765E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - A8AFB76719D14A670070765E /* SwiftyJSON iOS Tests.xctest */ = { - isa = PBXReferenceProxy; - fileType = wrapper.cfbundle; - path = "SwiftyJSON iOS Tests.xctest"; - remoteRef = A8AFB76619D14A670070765E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - A8AFB70D19D1401D0070765E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A8AFB71819D1401D0070765E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - A8AFB70A19D1401D0070765E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A8AFB72919D140BD0070765E /* Alamofire-SwiftyJSON.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A8AFB71619D1401D0070765E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A8AFB71F19D1401D0070765E /* Alamofire_SwiftyJSONTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - A8A2DBB71A23290100AF9EFC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - targetProxy = A8A2DBB61A23290100AF9EFC /* PBXContainerItemProxy */; - }; - A8A2DBB91A23290100AF9EFC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftyJSON; - targetProxy = A8A2DBB81A23290100AF9EFC /* PBXContainerItemProxy */; - }; - A8A2DBBD1A2329BD00AF9EFC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = A8AFB70E19D1401D0070765E /* AlamofireSwiftyJSON */; - targetProxy = A8A2DBBC1A2329BD00AF9EFC /* PBXContainerItemProxy */; - }; - A8A2DBBF1A2329BD00AF9EFC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Alamofire; - targetProxy = A8A2DBBE1A2329BD00AF9EFC /* PBXContainerItemProxy */; - }; - A8A2DBC11A2329BD00AF9EFC /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = SwiftyJSON; - targetProxy = A8A2DBC01A2329BD00AF9EFC /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - A8AFB72019D1401D0070765E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - 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 = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - A8AFB72119D1401D0070765E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - 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_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 1; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A8AFB72319D1401D0070765E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.swiftjson.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - A8AFB72419D1401D0070765E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.swiftjson.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; - A8AFB72619D1401D0070765E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.swiftjson.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Debug; - }; - A8AFB72719D1401D0070765E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.swiftjson.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - A8AFB70919D1401D0070765E /* Build configuration list for PBXProject "Alamofire-SwiftyJSON" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A8AFB72019D1401D0070765E /* Debug */, - A8AFB72119D1401D0070765E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A8AFB72219D1401D0070765E /* Build configuration list for PBXNativeTarget "AlamofireSwiftyJSON" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A8AFB72319D1401D0070765E /* Debug */, - A8AFB72419D1401D0070765E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A8AFB72519D1401D0070765E /* Build configuration list for PBXNativeTarget "AlamofireSwiftyJSONTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A8AFB72619D1401D0070765E /* Debug */, - A8AFB72719D1401D0070765E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A8AFB70619D1401D0070765E /* Project object */; -} diff --git a/Alamofire-SwiftyJSON.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Alamofire-SwiftyJSON.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 80f599f..0000000 --- a/Alamofire-SwiftyJSON.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Alamofire-SwiftyJSON.xcodeproj/project.xcworkspace/xcshareddata/Alamofire-SwiftyJSON.xcscmblueprint b/Alamofire-SwiftyJSON.xcodeproj/project.xcworkspace/xcshareddata/Alamofire-SwiftyJSON.xcscmblueprint deleted file mode 100644 index 817d609..0000000 --- a/Alamofire-SwiftyJSON.xcodeproj/project.xcworkspace/xcshareddata/Alamofire-SwiftyJSON.xcscmblueprint +++ /dev/null @@ -1,37 +0,0 @@ -{ - "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "79EA0C4F360E98830418AFAE1A03A39D646B0106", - "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { - - }, - "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { - "67620B5EFA902936DF04070AF595B76AB0333747" : 0, - "C861FC00CEE0F6A6BE81FCFF6785FAA78C58EBB3" : 0, - "79EA0C4F360E98830418AFAE1A03A39D646B0106" : 0 - }, - "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "91EDE7D1-24DF-4EB3-99E3-20EFE55617CE", - "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { - "67620B5EFA902936DF04070AF595B76AB0333747" : "Alamofire-SwiftyJSON\/Alamofire\/", - "C861FC00CEE0F6A6BE81FCFF6785FAA78C58EBB3" : "Alamofire-SwiftyJSON\/SwiftyJSON\/", - "79EA0C4F360E98830418AFAE1A03A39D646B0106" : "Alamofire-SwiftyJSON\/" - }, - "DVTSourceControlWorkspaceBlueprintNameKey" : "Alamofire-SwiftyJSON", - "DVTSourceControlWorkspaceBlueprintVersion" : 204, - "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Alamofire-SwiftyJSON.xcodeproj", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Alamofire\/Alamofire.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "67620B5EFA902936DF04070AF595B76AB0333747" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/jregnauld\/Alamofire-SwiftyJSON.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "79EA0C4F360E98830418AFAE1A03A39D646B0106" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/SwiftyJSON\/SwiftyJSON.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "C861FC00CEE0F6A6BE81FCFF6785FAA78C58EBB3" - } - ] -} \ No newline at end of file diff --git a/Alamofire-SwiftyJSON.xcodeproj/xcshareddata/xcschemes/AlamofireSwiftyJSON.xcscheme b/Alamofire-SwiftyJSON.xcodeproj/xcshareddata/xcschemes/AlamofireSwiftyJSON.xcscheme deleted file mode 100644 index 45076c5..0000000 --- a/Alamofire-SwiftyJSON.xcodeproj/xcshareddata/xcschemes/AlamofireSwiftyJSON.xcscheme +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..97ec3d3 --- /dev/null +++ b/Package.swift @@ -0,0 +1,34 @@ +// swift-tools-version:5.9 + +import PackageDescription + +let package = Package( + name: "AlamofireSwiftyJSON", + platforms: [ + .iOS(.v17), + .tvOS(.v13), + .macOS(.v12), + ], + products: [ + .library( + name: "AlamofireSwiftyJSON", + targets: ["AlamofireSwiftyJSON"] + ), + ], + dependencies: [ + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.0.0"), + .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "5.0.0") + + ], + targets: [ + .target( + name: "AlamofireSwiftyJSON", + dependencies: ["Alamofire", "SwiftyJSON"] + ), + .testTarget( + name: "AlamofireSwiftyJSONTests", + dependencies: ["AlamofireSwiftyJSON"] + ) + ], + swiftLanguageVersions: [.v5] +) diff --git a/README.md b/README.md index 4a17848..de4dc1c 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,50 @@ -# Alamofire-SwiftyJSON ![](https://travis-ci.org/SwiftyJSON/Alamofire-SwiftyJSON.svg?branch=master) +# AlamofireSwiftyJSON -An extension to make serializing [Alamofire](https://github.com/Alamofire/Alamofire)'s response with [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) easily. +An extension that simplifies using [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON) with [Alamofire](https://github.com/Alamofire/Alamofire). Easily parse JSON responses into `SwiftyJSON.JSON` objects. -⚠️ **To use with Swift 3.x please ensure you are using >= `2.0.0`** ⚠️ +[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Faporat%2FAlamofireSwiftSoup%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/aporat/AlamofireSwiftSoup) +[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Faporat%2FAlamofireSwiftSoup%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/aporat/AlamofireSwiftSoup) +![GitHub Actions Workflow Status](https://github.com/aporat/AlamofireSwiftSoup/actions/workflows/ci.yml/badge.svg) -⚠️ **To use with Swift 4.x please ensure you are using >= `3.0.0`** ⚠️ +[![codecov](https://codecov.io/gh/aporat/AlamofireSwiftyJSON/graph/badge.svg?token=YYQOZL6W2K)](https://codecov.io/gh/aporat/AlamofireSwiftyJSON) -## Swift version +--- -Alamofire-SwiftyJSON | Swift version | Alamofire | SwiftyJSON -------------- | --------------| ----------| ---------- -2.x | Swift 3.x | 4.x | 3.x -3.x | Swift 4.x | 4.5.x | 4.x +## 📦 Installation -## Requirements +### Swift Package Manager (Recommended) -- iOS 8.0+ / Mac OS X 10.9+ -- Xcode 8.0+ -- Swift 3.0+ +Add this package to your `Package.swift` dependencies: -## Install +```swift +.package(url: "https://github.com/your-username/AlamofireSwiftyJSON.git", from: "1.0.0") +``` -[CocoaPods](https://cocoapods.org/): +Then add `"AlamofireSwiftyJSON"` to your target dependencies. -```ruby -pod 'Alamofire-SwiftyJSON' -``` +--- -[Carthage](https://github.com/Carthage/Carthage): +## ✅ Requirements -``` -github "SwiftyJSON/Alamofire-SwiftyJSON" "master" -``` +- iOS 15+ / macOS 12+ / tvOS 13+ +- Swift 5.9+ +- Xcode 15+ -## Usage -```swift -import Alamofire_SwiftyJSON -``` +--- + +## 🚀 Usage ```swift -Alamofire.request(URL, method: .get, parameters: parameters, encoding: URLEncoding.default) - .responseSwiftyJSON { dataResponse in - print(dataResponse.request) - print(dataResponse.response) - print(dataResponse.error) - print(dataResponse.value) - }) +import Alamofire +import AlamofireSwiftyJSON + +AF.request("https://api.example.com/data") + .responseSwiftyJSON { response in + switch response.result { + case .success(let json): + print("JSON:", json) + case .failure(let error): + print("Error:", error) + } + } ``` diff --git a/Source/Alamofire-SwiftyJSON.h b/Source/Alamofire-SwiftyJSON.h deleted file mode 100644 index 2f8bd28..0000000 --- a/Source/Alamofire-SwiftyJSON.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Alamofire-SwiftyJSON.h -// Alamofire-SwiftyJSON -// -// Created by Pinglin Tang on 14-9-23. -// Copyright (c) 2014年 SwiftJSON. All rights reserved. -// - -#import - -//! Project version number for Alamofire-SwiftyJSON. -FOUNDATION_EXPORT double Alamofire_SwiftyJSONVersionNumber; - -//! Project version string for Alamofire-SwiftyJSON. -FOUNDATION_EXPORT const unsigned char Alamofire_SwiftyJSONVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Source/Alamofire-SwiftyJSON.swift b/Source/Alamofire-SwiftyJSON.swift deleted file mode 100644 index 84806fc..0000000 --- a/Source/Alamofire-SwiftyJSON.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// AlamofireSwiftyJSON.swift -// AlamofireSwiftyJSON -// -// Created by Pinglin Tang on 14-9-22. -// Copyright (c) 2014 SwiftyJSON. All rights reserved. -// - -import Foundation - -import Alamofire -import SwiftyJSON - -// MARK: - Request for Swift JSON - -extension Request { - /// Returns a SwiftyJSON object contained in a result type constructed from the response data using `JSONSerialization` - /// with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter response: The response from the server. - /// - parameter data: The data returned from the server. - /// - parameter error: The error already encountered if it exists. - /// - /// - returns: The result data type. - public static func serializeResponseSwiftyJSON( - options: JSONSerialization.ReadingOptions, - response: HTTPURLResponse?, - data: Data?, - error: Error?) - -> Result - { - guard error == nil else { return .failure(error!) } - - if let response = response, emptyDataStatusCodes.contains(response.statusCode) { return .success(JSON.null) } - - guard let validData = data, validData.count > 0 else { - return .failure(AFError.responseSerializationFailed(reason: .inputDataNilOrZeroLength)) - } - - do { - let json = try JSONSerialization.jsonObject(with: validData, options: options) - return .success(JSON(json)) - } catch { - return .failure(AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error))) - } - } -} - -extension DataRequest { - /// Creates a response serializer that returns a SwiftyJSON object result type constructed from the response data using - /// `JSONSerialization` with the specified reading options. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - /// - returns: A JSON object response serializer. - public static func swiftyJSONResponseSerializer( - options: JSONSerialization.ReadingOptions = .allowFragments) - -> DataResponseSerializer - { - return DataResponseSerializer { _, response, data, error in - return Request.serializeResponseSwiftyJSON(options: options, response: response, data: data, error: error) - } - } - - /// Adds a handler to be called once the request has finished. - /// - /// - parameter options: The JSON serialization reading options. Defaults to `.allowFragments`. - /// - parameter completionHandler: A closure to be executed once the request has finished. - /// - /// - returns: The request. - @discardableResult - public func responseSwiftyJSON( - queue: DispatchQueue? = nil, - options: JSONSerialization.ReadingOptions = .allowFragments, - completionHandler: @escaping (DataResponse) -> Void) - -> Self - { - return response( - queue: queue, - responseSerializer: DataRequest.swiftyJSONResponseSerializer(options: options), - completionHandler: completionHandler - ) - } -} - -private let emptyDataStatusCodes: Set = [204, 205] diff --git a/Source/Info.plist b/Source/Info.plist deleted file mode 100644 index e0f4bf7..0000000 --- a/Source/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 - 3.0.0 - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - NSPrincipalClass - - - diff --git a/Sources/AlamofireSwiftyJSON.swift b/Sources/AlamofireSwiftyJSON.swift new file mode 100644 index 0000000..d664a0a --- /dev/null +++ b/Sources/AlamofireSwiftyJSON.swift @@ -0,0 +1,70 @@ +import Alamofire +import Foundation +import SwiftyJSON + +public final class SwiftyJSONResponseSerializer: 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. `SwiftyJSONResponseSerializer.defaultDataPreprocessor` 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. + /// - options: The options to use. `.allowFragments` by default. + public init(dataPreprocessor: DataPreprocessor = SwiftyJSONResponseSerializer.defaultDataPreprocessor, + emptyResponseCodes: Set = SwiftyJSONResponseSerializer.defaultEmptyResponseCodes, + emptyRequestMethods: Set = SwiftyJSONResponseSerializer.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 -> JSON { + 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 an empty JSON object for valid empty responses. + return JSON() + } + + data = try dataPreprocessor.preprocess(data) + + do { + let json = try JSONSerialization.jsonObject(with: data, options: options) + return JSON(json) + } catch { + throw AFError.responseSerializationFailed(reason: .jsonSerializationFailed(error: error)) + } + } +} + +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. + /// - options: The JSON serialization reading options. `.allowFragments` by default. + /// - completionHandler: A closure to be executed once the request has finished. + /// + /// - Returns: The request. + @discardableResult + public func responseSwiftyJSON(queue: DispatchQueue = .main, + options: JSONSerialization.ReadingOptions = .allowFragments, + completionHandler: @escaping (AFDataResponse) -> Void) -> Self + { + response(queue: queue, + responseSerializer: SwiftyJSONResponseSerializer(options: options), + completionHandler: completionHandler) + } +} diff --git a/SwiftyJSON b/SwiftyJSON deleted file mode 160000 index 6b9f11e..0000000 --- a/SwiftyJSON +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6b9f11e2bbd277f199b1c09fa65631bfc52d4a5d diff --git a/Tests/AlamofireSwiftyJSONTests.swift b/Tests/AlamofireSwiftyJSONTests.swift new file mode 100644 index 0000000..7d3fa12 --- /dev/null +++ b/Tests/AlamofireSwiftyJSONTests.swift @@ -0,0 +1,79 @@ +import XCTest +import Alamofire +import SwiftyJSON +@testable import AlamofireSwiftyJSON + +final class SwiftyJSONResponseSerializerTests: XCTestCase { + + func testValidJSONResponseParsesSuccessfully() throws { + // Given + let jsonObject: [String: Any] = ["name": "Adam", "age": 30] + let data = try JSONSerialization.data(withJSONObject: jsonObject, options: []) + + let serializer = SwiftyJSONResponseSerializer() + let response = HTTPURLResponse(url: URL(string: "https://example.com")!, + statusCode: 200, + httpVersion: nil, + headerFields: nil) + + // When + let json = try serializer.serialize(request: nil, response: response, data: data, error: nil) + + // Then + XCTAssertEqual(json["name"].stringValue, "Adam") + XCTAssertEqual(json["age"].intValue, 30) + } + + func testEmptyResponseWith204Succeeds() throws { + // Given + let data = Data() + let response = HTTPURLResponse(url: URL(string: "https://example.com")!, + statusCode: 204, + httpVersion: nil, + headerFields: nil) + + let serializer = SwiftyJSONResponseSerializer() + + // When + let json = try serializer.serialize(request: nil, response: response, data: data, error: nil) + + // Then + XCTAssertEqual(json.boolValue, false) + } + + func testInvalidJSONThrowsError() throws { + // Given + let invalidData = "not-json".data(using: .utf8)! + let response = HTTPURLResponse(url: URL(string: "https://example.com")!, + statusCode: 200, + httpVersion: nil, + headerFields: nil) + + let serializer = SwiftyJSONResponseSerializer() + + // Then + XCTAssertThrowsError( + try serializer.serialize(request: nil, response: response, data: invalidData, error: nil) + ) { error in + guard case AFError.responseSerializationFailed(let reason) = error else { + return XCTFail("Unexpected error type") + } + guard case .jsonSerializationFailed(_) = reason else { + return XCTFail("Expected jsonSerializationFailed") + } + } + } + + func testErrorIsThrownDirectly() { + // Given + let error = NSError(domain: "test", code: 1) + let serializer = SwiftyJSONResponseSerializer() + + // Then + XCTAssertThrowsError( + try serializer.serialize(request: nil, response: nil, data: nil, error: error) + ) { thrown in + XCTAssertEqual((thrown as NSError).code, 1) + } + } +} diff --git a/Tests/Alamofire_SwiftyJSONTests.swift b/Tests/Alamofire_SwiftyJSONTests.swift deleted file mode 100644 index 43731b0..0000000 --- a/Tests/Alamofire_SwiftyJSONTests.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// Alamofire_SwiftyJSONTests.swift -// Alamofire-SwiftyJSONTests -// -// Created by Pinglin Tang on 14-9-23. -// Copyright (c) 2014年 SwiftJSON. All rights reserved. -// - -import XCTest -import Alamofire -import SwiftyJSON -import AlamofireSwiftyJSON - -class Alamofire_SwiftyJSONTests: XCTestCase { - - func testGETRequestJSONResponse() { - let URL = "http://httpbin.org/get" - let parameters: Parameters = ["foo": "bar"] - let expect = expectation(description: "responseSwiftyJSON method should work") - Alamofire.request(URL, method: .get, parameters: parameters, encoding: URLEncoding.default) - .validate() - .responseSwiftyJSON { response in - XCTAssertNotNil(response.request, "request should not be nil") - XCTAssertNotNil(response.response, "response should not be nil") - XCTAssertNil(response.error, "result error should be nil") - XCTAssertEqual(response.value?["args"], SwiftyJSON.JSON(["foo": "bar"] as NSDictionary), "args should be equal") - expect.fulfill() - } - waitForExpectations(timeout: 10.0, handler: nil) - } -} diff --git a/Tests/Info.plist b/Tests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/Tests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - -