-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consider supporting xcframworks #38
Comments
Sorry - bumping into several issues here this library brew install mint
mint install unsignedapps/swift-create-xcframework
swift create-xcframework --platform ios I need a path to get this working - spleeter) ➜ supabase-swift git:(master) ✗ swift create-xcframework --platform ios // swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Supabase",
platforms: [
.iOS(.v13),
.macCatalyst(.v13),
.macOS(.v10_15),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(
name: "Supabase",
targets: ["Supabase"]
)
],
dependencies: [
.package(url: "https://github.com/supabase-community/gotrue-swift", from: "0.0.7"),
.package(url: "https://github.com/supabase-community/storage-swift.git", from: "0.0.2"),
.package(url: "https://github.com/supabase-community/postgrest-swift", from: "0.0.6"),
],
targets: [
.target(
name: "Supabase",
dependencies: [
.product(name: "GoTrue", package: "gotrue-swift"),
.product(name: "SupabaseStorage", package: "storage-swift"),
.product(name: "PostgREST", package: "postgrest-swift"),
]
)
]
) I still hit this ** ARCHIVE FAILED ** The following build commands failed: // swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Supabase",
platforms: [
.iOS(.v13),
.macCatalyst(.v13),
.macOS(.v10_15),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(
name: "Supabase",
targets: ["Supabase"]
)
],
dependencies: [
.package(url: "https://github.com/supabase-community/gotrue-swift", from: "0.0.7"),
.package(url: "https://github.com/supabase-community/storage-swift.git", from: "0.0.2"),
.package(url: "https://github.com/wweevv-johndpope/realtime-swift.git", from: "0.0.2"),
.package(url: "https://github.com/supabase-community/postgrest-swift", from: "0.0.6"),
],
targets: [
.target(
name: "Supabase",
dependencies: [
.product(name: "GoTrue", package: "gotrue-swift"),
.product(name: "SupabaseStorage", package: "storage-swift"),
.product(name: "Realtime", package: "realtime-swift"),
.product(name: "PostgREST", package: "postgrest-swift"),
]
)
]
) I hack the package to use my fork which has this fix but still not working... swift create-xcframework --platform ios --stack-evolution
probably due to the hot fix above - I'll do some digging. UPDATE after some hotfixes - I got it to compile. not sure what's going on - but seems like theres some code rot with the realtime. // swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Supabase",
platforms: [
.iOS(.v13),
.macCatalyst(.v13),
.macOS(.v10_15),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(
name: "Supabase",
targets: ["Supabase"]
)
],
dependencies: [
.package(url: "https://github.com/supabase-community/gotrue-swift", from: "0.0.7"),
.package(url: "https://github.com/supabase-community/storage-swift.git", from: "0.0.2"),
.package(url: "https://github.com/wweevv-johndpope/realtime-swift.git", from: "0.0.5"),
.package(url: "https://github.com/supabase-community/postgrest-swift", from: "0.0.6"),
],
targets: [
.target(
name: "Supabase",
dependencies: [
.product(name: "GoTrue", package: "gotrue-swift"),
.product(name: "SupabaseStorage", package: "storage-swift"),
.product(name: "Realtime", package: "realtime-swift"),
.product(name: "PostgREST", package: "postgrest-swift"),
]
)
]
) not sure if this will work - but goal is to get a file like this UPDATE
something breaks on import |
https://github.com/apple/swift-package-manager/blob/main/Sources/SPMLLBuild/llbuild.swift It maybe possible to reduce number of xcframeworks by using this technique UPDATE - at this point using a bunch of hot fixes (renamed modules) + swift-create-xcframework I can successfully create all the packages - // swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Supabase",
platforms: [
.iOS(.v13),
.macCatalyst(.v13),
.macOS(.v10_15),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(
name: "Supabase",
targets: ["Supabase"]
)
],
dependencies: [
.package(url: "https://github.com/wweevv-johndpope/gotrue-swift", from: "0.0.10"),
.package(url: "https://github.com/supabase-community/storage-swift.git", from: "0.0.2"),
.package(url: "https://github.com/wweevv-johndpope/realtime-swift.git", from: "0.0.5"),
.package(url: "https://github.com/supabase-community/postgrest-swift", from: "0.0.6"),
],
targets: [
.target(
name: "Supabase",
dependencies: [
.product(name: "GoTrue", package: "gotrue-swift"),
.product(name: "SupabaseStorage", package: "storage-swift"),
.product(name: "Realtime", package: "realtime-swift"),
.product(name: "PostgREST", package: "postgrest-swift"),
]
)
]
) So currently - this is crashing UPDATE this is a slim example of supabase integration + bazel - demonstrating crash. git clone https://github.com/wweevv-johndpope/DemoBazel/tree/supabase
./xcodegen app
cheatsheet for adding dependencies with bazel |
Supporting xcframework is not in the roadmap for now, we can revisit this later if priority changes. |
Hi @bok- have you encountered any problems in general with xcframework / where the swift code that would automatically deallocate / BAD_EXEC - but run fine when code is ran locally? |
had some success spitting this out
https://github.com/mstfy/spm-to-xcframework
/Users/johndpope/Desktop/spm-to-xcframework/.build/arm64-apple-macosx/release/spm-to-xcframework Sup
abase --path /Users/johndpope/Desktop/supabase-swift --output /Users/johndpope/Desktop/xcframework
it's helpful for bazel builds
The text was updated successfully, but these errors were encountered: