blog
blog copied to clipboard
🍁 What you don't know is what you haven't learned
For security purposes, the auth schema is not exposed on the auto-generated API. We can make a `profiles` table in public namespace and mirror data from `auth.users` when user signs...
The default [SwiftGen](https://github.com/SwiftGen/SwiftGen) generate generated strings `L10n` file like this ```swift extension L10n { private static func tr(_ table: String, _ key: String, _ args: CVarArg..., fallback value: String) ->...
SwiftUI in iOS 16 supports [Layout](https://developer.apple.com/documentation/swiftui/layout) protocol to arrange subviews We need to implement 2 methods - [sizeThatFits(proposal:subviews:cache:)](https://developer.apple.com/documentation/swiftui/layout/sizethatfits(proposal:subviews:cache:)) reports the size of the composite layout view. - [placeSubviews(in:proposal:subviews:cache:)](https://developer.apple.com/documentation/swiftui/layout/placesubviews(in:proposal:subviews:cache:)) assigns positions...
There are a few keychain wrappers around but for simple needs, you can write it yourself Here is a basic implementation. I use actor to go with async/await, and a...
In this tutorial, we'll learn how to use Swift Charts to visualize ranking data. We use default `AxisMarks` and `AxisMarks` to let Swift Charts interpolate x and y grid lines....
Expose supabase with `createClient` `useSupabase.ts` ```ts import { createClient } from '@supabase/supabase-js' const supabaseUrl = process.env.SUPABASE_URL const supabaseAnonKey = process.env.SUPABASE_ANON_KEY export const supabase = createClient(supabaseUrl!, supabaseAnonKey!) export const signIn =...
In this tutorial we will be creating a React app with Parcel 2 with Typescript and Tailwind Install the following dependencies. Parcel supports TypeScript out of the box without any...
Instead of letting the Image decide the size, we can put it as `background` or `overlay`. I use `clipped` and `contentShape` to avoid the fill image obscuring touch event ```swift...
To let app and extension to talk to the same database, we need to use `AppGroup`. Here is how to use [replacePersistentStore](https://developer.apple.com/documentation/coredata/nspersistentstorecoordinator/3747536-replacepersistentstore) > Replaces one persistent store with another ```swift...
First, you need to enable `iCloud Documents` capability. Go to target settings -> Signing & Capabilities -> iCloud ` Then inside your `Info.plist`, add this with your iCloud identifier and...