MaikuB / flutter_appauth

A Flutter wrapper for AppAuth iOS and Android SDKs
270 stars 243 forks source link

manifestPlaceholders are overriding the applicationName placeholder #287

Closed martin-ez closed 2 years ago

martin-ez commented 2 years ago

I think this issue might be just with recent versions of Flutter, but it seems that adding the manifestPlaceholders as instructed in the readme:

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

Causes Flutter to throw this error: Attribute application@name at AndroidManifest.xml:5:9-42 requires a placeholder substitution but no value for <applicationName> is provided.

The solution seems to be quite simple, we should be adding to the manifestPlaceholders, using += instead of =. Meaning:

manifestPlaceholders += [
                'appAuthRedirectScheme': '<your_custom_scheme>'
        ]

Not an issue per se, but you might want to update the guide.

MaikuB commented 2 years ago

Do you have details on the version of Flutter you saw this issue on? Wondering if this is actually related to Flutter as I haven't heard of other reports on this issue yet

martin-ez commented 2 years ago

I experience it on Flutter 2.8.1