Closed eric-ampire closed 1 year ago
What do you mean crashing? On import or when running the app? Also how is your project structured? The dependency is not missing on maven central. Can you share your build file?
The supabase dependency present on my KMM project like this
val commonMain by getting {
dependencies {
api("io.github.jan-tennert.supabase:postgrest-kt:1.2.0")
}
}
When I compile the Android app, everything went well, but went it come to compile the ios app I'm getting the error saying "Could not find: io.github.jan-tennert.supabase/postgrest-kt-iossimulatorarm64"
I've just go through all the sample projects currently available "https://github.com/supabase-community/supabase-kt/tree/master/demos" and I've not seen any ios targed, it mean that the iOS target is not supported yet ?
No, ios is supported. There is no ios target in the demos because I cant run ios apps for testing. Is this the full error?
I've just fixed the issue, the version 1.2.0 wasn't compatible with kotlin 1.8.21
Okay great! Do you need any further help?
Right now I'm trying to use gotrue for auth,
apiClient.gotrue.signUpWith(Email) {
email = "sample@gmail.com"
password = "pass"
}
But I'm getting this error "(POST) failed with message: Failed to connect to localhost/127.0.0.1:443", there's any particular reason for that ?
Did you add the internet intent? (Assuming this is on android)
I do also have an error on iOS, I've the internet permission on Android
NSErrorFailingURLStringKey=https://localhost/auth/v1/token?grant_type=password&redirect_to=https%3A%2F%2Fbe-served.com, NSErrorFailingURLKey=https://localhost/auth/v1/token?grant_type=password&redirect_to=https%3A%2F%2Fbe-served.com, _kCFStreamErrorDomainKey=1}
Okay, I assume you have your correct supabase url in the supabase client? Which Ktor engines are you using?
I've just double check, the supabase url is correct https://
Is there anykind of config I need to do in order to make it work
createSupabaseClient(
supabaseKey = BuildConfig.SUPABASE_TEST_API_KEY,
supabaseUrl = BuildConfig.SUPABASE_TEST_URL,
builder = {
install(Postgrest)
install(GraphQL)
install(GoTrue)
}
)
No that seems right. Localhost is fallback url for internet problems, did you test this on an emulated device? Or could you try your code on a real device?
(Closing issue as this is off-topic)
@eric-ampire Do you use the CIO ktor engine? Maybe that's doing some trouble, I also had a similar problem when I used this engine
Yeah I've used that engine
Try OkHttp for Android and Darwin for IOS, maybe that will help
General info
What is your question?
Adding the dependency
io.github.jan-tennert.supabase:postgrest-kt:VERSION
is crashing on ios saying "error: Could not find: io.github.jan-tennert.supabase/postgrest-kt-iossimulatorarm64/1.3.0-rc-2"Is there any way to fix this ?