Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast Error thrown when applying wallpaper #10

Open
houdayec opened this issue Jun 1, 2020 · 1 comment
Open

Cast Error thrown when applying wallpaper #10

houdayec opened this issue Jun 1, 2020 · 1 comment

Comments

@houdayec
Copy link

houdayec commented Jun 1, 2020

Platform used: iOS 13.4.1

Error thrown:

Exception has occurred.
_CastError (type 'String' is not a subtype of type 'int' in type cast)

Method throwing error:

setWallpaperFromFile()

Cause:

final int result = await _channel.invokeMethod('setWallpaperFromFile',...)

Result variable expects a int value, however, on iOS 13.4.1, the returned value is a String expression giving the current iOS version: "iOS 13.4.1".

I did a quick fix for my project by setting result variable to a simple non final var, however, the great fix might be on the iOS channel side.

Note
I know iOS does not allow to set wallpapers from third parties. But it is a great option to catch this error if a developer is using this method on iOS for any reason!

Keep up the good work!

@cristopher-rodrigues
Copy link

I think this might explains it https://github.com/AdityaMulgundkar/wallpaper_manager#notes 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants