-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental support for IOS native targets (#53)
- Loading branch information
1 parent
03967e2
commit 73f1b30
Showing
17 changed files
with
96 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
GoTrue/src/iosMain/kotlin/io/github/jan/supabase/gotrue/GoTrueConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.github.jan.supabase.gotrue | ||
|
||
import io.github.jan.supabase.plugins.MainConfig | ||
|
||
actual class GoTrueConfig : MainConfig, GoTrueConfigDefaults() { | ||
|
||
/** | ||
* The scheme for the redirect url, when using deep linking | ||
*/ | ||
var scheme: String = "supabase" | ||
|
||
/** | ||
* The host for the redirect url, when using deep linking | ||
*/ | ||
var host: String = "login" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
GoTrue/src/iosMain/kotlin/io/github/jan/supabase/gotrue/RedirectUrl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.jan.supabase.gotrue | ||
|
||
actual fun GoTrue.generateRedirectUrl(fallbackUrl: String?): String? { | ||
if(fallbackUrl != null) return fallbackUrl | ||
this as GoTrueImpl | ||
return "${config.scheme}://${config.host}" | ||
} |
3 changes: 3 additions & 0 deletions
3
GoTrue/src/iosMain/kotlin/io/github/jan/supabase/gotrue/providers/ExternalAuthConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.github.jan.supabase.gotrue.providers | ||
|
||
actual class ExternalAuthConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
GoTrue/src/iosMain/kotlin/io/github/jan/supabase/gotrue/setupPlatform.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package io.github.jan.supabase.gotrue | ||
|
||
import io.github.aakira.napier.Napier | ||
|
||
actual fun GoTrue.setupPlatform() { | ||
Napier.w { "IOS support is highly experimental, please report any bugs you find!" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import io.github.jan.supabase.gotrue.GoTrueConfig | ||
|
||
actual fun GoTrueConfig.platformSettings() { | ||
} |
2 changes: 0 additions & 2 deletions
2
GoTrue/src/jvmMain/kotlin/io/github/jan/supabase/gotrue/compose/ComposeUtils.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Postgrest/src/iosMain/kotlin/io/github/jan/supabase/postgrest/getColumnName.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package io.github.jan.supabase.postgrest | ||
|
||
import kotlin.reflect.KProperty1 | ||
|
||
actual fun <T, V> getColumnName(property: KProperty1<T, V>) = property.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
package io.github.jan.supabase | ||
|
||
actual val CurrentPlatformTarget = PlatformTarget.WEB | ||
actual val CurrentPlatformTarget: PlatformTarget = PlatformTarget.WEB |