https://supabase.com/ logo
Join Discord
Powered by
# swift
  • o

    OLZHAS

    07/23/2022, 12:36 PM
    you will need to learn sql / plpgsql and implement it on the server side it's not hard, took me less than a week to get comfortable
  • e

    Evjen

    07/26/2022, 10:56 AM
    Anyone here experienced with functions?
  • g

    garyaustin

    07/26/2022, 1:14 PM
    Normally you will get better responses if you also ask your technical question, or at least hint at the question.
  • e

    emin

    07/29/2022, 7:46 PM
    Roger that, thank you! It sounds a tad scary, not gonna lie, but it's easier once I know what to aim towards 🙂
  • m

    MartinW

    08/10/2022, 3:12 PM
    Hi all, I've had no luck getting this sample code from the repo to build:
    Copy code
    let todo = Todo(label: "Example todo!")
    
    let jsonData: Data = try JSONEncoder().encode(todo)
    let jsonDict: [String: Any] = try JSONSerialization.jsonObject(with: jsonData, options: .allowFragments))
    
    client.database.from("todos")    
        .insert(values: jsonDict)
        .execute { results in
            // Handle response
        }
    Giving a compile error of:
    Protocol 'Any' as a type cannot conform to 'Encodable'
    Any help appreciated. Thanks
  • g

    grsouza

    08/11/2022, 9:16 AM
    Hi @MartinW You don't need to use
    JSONEncoder
    and
    JSONSerialization
    manually, that's already done by the library, you just need to pass an
    Encodable
    type to the
    insert
    method, in your example just pass the
    todo
    directly to the
    insert
    .
    Copy code
    swift
    let todo = Todo(label: "Example todo!")
    
    client.database.from("todos")    
        .insert(values: todo)
        .execute { results in
            // Handle response
        }
    That example is incorrect, I'll be fixing it on the repository
  • g

    grsouza

    08/11/2022, 9:17 AM
    thanks!
  • m

    MartinW

    08/11/2022, 12:22 PM
    Thanks @grsouza I've got this working now 🙌
  • d

    d33pu

    08/26/2022, 1:54 PM
    Hey everyone, how you all managing signup/signin on Supabase? I couldn't find examples from Supabase for Swift https://supabase.com/docs/guides/examples
  • m

    mhaezaragoza

    09/07/2022, 11:22 AM
    Hi @grsouza, I have this error when using
    auth.session(from:)
    , do you have any idea what's wrong?
    dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "identities", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "id", intValue: nil)], debugDescription: "Attempted to decode UUID from invalid UUID string.", underlyingError: nil))
    BTW, I'm updating from 0.0.4 (no error) to 0.0.9 (error).
  • d

    d33pu

    09/11/2022, 1:53 PM
    Hi all
  • c

    cbunge3

    09/26/2022, 11:43 AM
    Will this ever become an official SDK? I’m curious as to why other languages for mobile are more supported than iOS?
  • g

    grsouza

    10/19/2022, 10:00 AM
    Hi Swift friends, I just pushed an initial implementation of functions for Swift, https://github.com/supabase-community/functions-swift
  • d

    d33pu

    11/02/2022, 7:40 AM
    Hey folks anyone successfully able to use Supabase in your iOS or macOS app? I mean the authentication - sign up and sign in via Supabase with official SDK or non SDK? Hardly seen any new updates to it and also articles around it Any help is appreciated 🙏
  • e

    elliott

    11/08/2022, 2:35 AM
    I have the same question. I prefer supabase to firebase but supabase is very mobile non-friendly
  • d

    d33pu

    11/08/2022, 4:58 AM
    true, haven't seen anyone who's building iOS with Supabase. It got me thinking that either devs are not showing interest in Supabase because of lack of support or Supabase is not seeing enough traction for the devs to build an SDK 😄 lesson learned don't switch to new tech tools at work
  • c

    cbunge3

    11/09/2022, 9:07 AM
    @elliott @d33pu I’m currently building aMac app with it for my work. Definitely not mobile friendly or at least iOS friendly but the swift package literally does mimic the JavaScript package almost perfectly
  • d

    d33pu

    11/09/2022, 9:22 AM
    Nice, do you have an example?
  • c

    cbunge3

    11/09/2022, 12:00 PM
    It’s still in development. But I chose supabase because we have 200 tables, 20 million rows, 1.2 TBs of file storage and 80 gb data storage we need migrated, Firebase wouldn’t cut this and the querying functionality you get with the swift package is nice once you get the syntax down
  • c

    cbunge3

    11/09/2022, 12:00 PM
    I do wish the auth and real time were more like Firebase but maybe that will come later on
  • o

    OLZHAS

    11/09/2022, 7:01 PM
    @d33pu @elliott i use Supabase (incl. Auth) for my Swift project While the client isn't always perfect, it mostly works pretty well But my db is nowhere near 20 million rows and 1.2 tb of files, so take it with a grain of salt
  • o

    OLZHAS

    11/09/2022, 7:01 PM
    @grsouza is the goat for keeping the client going, he's been doing monumental work with it
  • m

    malachi

    11/11/2022, 10:38 PM
    Anyone know where to find any docs/example code for the storage-swift api? Link on github read.md goes to 404.
  • m

    malachi

    11/17/2022, 9:52 PM
    I have this piece of code where I am trying to upload an image to Storage.
    uploadedImage
    is a UIImage and userId is just an integer. I feel like I am using the File Object incorrectly as I keep getting this error: "StorageError(statusCode: Optional(400), message: Optional("Bad Request"))".
  • m

    malachi

    11/17/2022, 9:53 PM
    any pointers would be great
  • c

    cbunge3

    11/21/2022, 10:42 PM
    make sure you have permissions turned off
  • c

    cbunge3

    11/21/2022, 10:42 PM
    in supabase
  • v

    Vik

    11/26/2022, 9:31 PM
    How's the Swift community package these days? Is it up to par with the JavaScript one?
  • j

    Jake378

    12/07/2022, 5:32 PM
    @everyone fast join >< https://discord.gg/tiktokhub
  • j

    Jake378

    12/07/2022, 6:10 PM
    @everyone fast join >< https://discord.gg/tiktokhub