Skip to content

Getting Started

Dan M edited this page Mar 28, 2022 · 6 revisions

Install

Currently, geoff is only available on git. To install, add this to your pubspec.yaml under dependancies:

geoff:
    git: https://github.com/Kibibibit/geoff.git

Then, as this package depends on flutter_appauth (Can be found here), you need to update some of the build files.

Android

You will need to add the following to your android/app/build.gradle under defaultConfig:

...
android {
    ...
    defaultConfig {
        ...
        manifestPlaceholders += [
                'appAuthRedirectScheme': '<your_custom_scheme>'
        ]
    }
}

<your_custom_scheme> must be in all lowercase. Also notice the use of +=, this is required by newer versions of the flutter SDK.

If your app is target API 30 or above (i.e. Android 11 or newer), make sure to add the following to your AndroidManifest.xml file a level underneath the <manifest> element

<queries>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="https" />
    </intent>
    <intent>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.APP_BROWSER" />
        <data android:scheme="https" />
    </intent>
</queries>

Instructions taken from here

iOS

You will need to update your Info.plist to include the following:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>your_custom_scheme</string>
        </array>
    </dict>
</array>

your_custom_scheme must be in all lowercase Instructions taken from here

Keycloak

If using keycloak, your client must have your_custom_scheme added to its valid redirect urls

Clone this wiki locally