diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5e6f234..59b4851f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,13 +15,8 @@ concurrency: jobs: example: runs-on: macos-12 - strategy: - matrix: - xcode: ["14.1"] steps: - uses: actions/checkout@v3 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - name: Setup Secrets.swift run: cp Examples/Examples/_Secrets.swift Examples/Examples/Secrets.swift - name: Build example @@ -35,4 +30,4 @@ jobs: run: cp Examples/Examples/_Secrets.swift Examples/Examples/Secrets.swift - name: Test library run: make test-library - \ No newline at end of file + diff --git a/Examples/Examples.xcodeproj/xcshareddata/xcschemes/Examples.xcscheme b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/Examples.xcscheme new file mode 100644 index 00000000..a2160637 --- /dev/null +++ b/Examples/Examples.xcodeproj/xcshareddata/xcschemes/Examples.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Package.swift b/Package.swift index 70dc7fc5..2713edc0 100644 --- a/Package.swift +++ b/Package.swift @@ -1,9 +1,10 @@ // swift-tools-version:5.7 // The swift-tools-version declares the minimum version of Swift required to build this package. +import Foundation import PackageDescription -let package = Package( +var package = Package( name: "Supabase", platforms: [ .iOS(.v13), @@ -18,13 +19,7 @@ let package = Package( targets: ["Supabase"] ), ], - dependencies: [ - .package(url: "https://github.com/supabase-community/gotrue-swift", from: "1.0.0"), - .package(url: "https://github.com/supabase-community/storage-swift.git", from: "0.1.1"), - .package(url: "https://github.com/supabase-community/realtime-swift.git", from: "0.0.2"), - .package(url: "https://github.com/supabase-community/postgrest-swift", from: "1.0.0"), - .package(url: "https://github.com/supabase-community/functions-swift", from: "1.0.0"), - ], + dependencies: [], targets: [ .target( name: "Supabase", @@ -39,3 +34,25 @@ let package = Package( .testTarget(name: "SupabaseTests", dependencies: ["Supabase"]), ] ) + +if ProcessInfo.processInfo.environment["USE_LOCAL_PACKAGES"] != nil { + package.dependencies.append( + contentsOf: [ + .package(path: "../gotrue-swift"), + .package(path: "../storage-swift"), + .package(path: "../realtime-swift"), + .package(path: "../postgrest-swift"), + .package(path: "../functions-swift"), + ] + ) +} else { + package.dependencies.append( + contentsOf: [ + .package(url: "https://github.com/supabase-community/gotrue-swift", from: "1.0.0"), + .package(url: "https://github.com/supabase-community/storage-swift.git", from: "0.1.1"), + .package(url: "https://github.com/supabase-community/realtime-swift.git", from: "0.0.2"), + .package(url: "https://github.com/supabase-community/postgrest-swift", from: "1.0.0"), + .package(url: "https://github.com/supabase-community/functions-swift", from: "1.0.0"), + ] + ) +} diff --git a/Tests/SupabaseTests/SupabaseClientTests.swift b/Tests/SupabaseTests/SupabaseClientTests.swift index 78bee9b6..a6a0df9d 100644 --- a/Tests/SupabaseTests/SupabaseClientTests.swift +++ b/Tests/SupabaseTests/SupabaseClientTests.swift @@ -38,7 +38,10 @@ final class SupabaseClientTests: XCTestCase { XCTAssertEqual(client.storageURL.absoluteString, "https://project-ref.supabase.co/storage/v1") XCTAssertEqual(client.databaseURL.absoluteString, "https://project-ref.supabase.co/rest/v1") XCTAssertEqual(client.realtimeURL.absoluteString, "https://project-ref.supabase.co/realtime/v1") - XCTAssertEqual(client.functionsURL.absoluteString, "https://project-ref.supabase.co/functions/v1") + XCTAssertEqual( + client.functionsURL.absoluteString, + "https://project-ref.supabase.co/functions/v1" + ) XCTAssertEqual( client.defaultHeaders, @@ -46,7 +49,7 @@ final class SupabaseClientTests: XCTestCase { "X-Client-Info": "supabase-swift/\(Supabase.version)", "apikey": "ANON_KEY", "header_field": "header_value", - "Authorization": "Bearer ANON_KEY" + "Authorization": "Bearer ANON_KEY", ] ) } diff --git a/supabase-swift.xcworkspace/xcshareddata/swiftpm/Package.resolved b/supabase-swift.xcworkspace/xcshareddata/swiftpm/Package.resolved index 2da9d3bb..9fcc8dee 100644 --- a/supabase-swift.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/supabase-swift.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/supabase-community/gotrue-swift", "state" : { - "revision" : "9626a5833224b92126bd3f2350e3a8e2f4cb7cc5", - "version" : "1.0.0" + "revision" : "a972c99bf0ed745047ec7bc6231460f6738d004e", + "version" : "1.1.1" } }, { @@ -68,8 +68,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/supabase-community/storage-swift.git", "state" : { - "revision" : "6081d81a59f5b5abb6ec7ae1eacf4bff41e6ec8b", - "version" : "0.1.1" + "revision" : "db67ce7764ef80e7941cea6bc4a0104c88e060f8", + "version" : "0.1.3" } }, { @@ -77,8 +77,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-case-paths", "state" : { - "revision" : "870133b7b2387df136ad301ec67b2e864b51dda1", - "version" : "0.14.0" + "revision" : "fc45e7b2cfece9dd80b5a45e6469ffe67fe67984", + "version" : "0.14.1" } }, { @@ -95,8 +95,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-custom-dump", "state" : { - "revision" : "de8ba65649e7ee317b9daf27dd5eebf34bd4be57", - "version" : "0.9.1" + "revision" : "3a35f7892e7cf6ba28a78cd46a703c0be4e0c6dc", + "version" : "0.11.0" } }, { @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swift-identified-collections.git", "state" : { - "revision" : "ad3932d28c2e0a009a0167089619526709ef6497", - "version" : "0.7.0" + "revision" : "f52eee28bdc6065aa2f8424067e6f04c74bda6e6", + "version" : "0.7.1" } }, { @@ -113,8 +113,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/swiftui-navigation.git", "state" : { - "revision" : "47dd574b900ba5ba679f56ea00d4d282fc7305a6", - "version" : "0.7.1" + "revision" : "db81007362f998654239021ca9308a264e59d3e2", + "version" : "0.7.2" } }, { @@ -131,8 +131,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay", "state" : { - "revision" : "ab8c9f45843694dd16be4297e6d44c0634fd9913", - "version" : "0.8.4" + "revision" : "4af50b38daf0037cfbab15514a241224c3f62f98", + "version" : "0.8.5" } } ],