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
iOS: await FlutterDownloader.initialize(); leads to google sign in cancel button crash #158
Comments
Try to modifying your @implementation AppDelegate
void registerPlugins(NSObject<FlutterPluginRegistry>* registry) {
// [GeneratedPluginRegistrant registerWithRegistry:registry];
[FlutterDownloaderPlugin registerWithRegistrar:[registry registrarForPlugin:@"vn.hunghd.flutter_downloader"]];
}
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
[FlutterDownloaderPlugin setPluginRegistrantCallback:registerPlugins];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
} |
I have already modified AppDelegate like this and project running fine: import UIKit @UIApplicationMain private func registerPlugins(registry: FlutterPluginRegistry) { The main issue is google_sign_in popup (Cancel or success result) leads to crash. Something wrong with |
Also in your documentation |
Have a look at this comment. private func registerPlugins(registry: FlutterPluginRegistry) {
GeneratedPluginRegistrant.register(with: registry)
} This default codes will execute the registration of all plugins in your project and if there's any plugins that requires UI manipulation, they will be broken in this step. |
Thanks for the insight @hnvn. Issue is still the same. I just checked facebook login as well. When I click for facebook login It automatically lands to This is really strange for me. No social login is working. Without |
Check my first comment again and notice this snip codes: void registerPlugins(NSObject<FlutterPluginRegistry>* registry) {
// [GeneratedPluginRegistrant registerWithRegistry:registry];
[FlutterDownloaderPlugin registerWithRegistrar:[registry registrarForPlugin:@"vn.hunghd.flutter_downloader"]];
} It's a modified version (from default one in document) for your case. It's Objective-C codes, you may as well translate it to Swift in your case. |
Thanks swift version of above code worked for me. I already spent many hours, It saved many more :-) Swift code:
|
Can you kindly share your full Swift codes of |
Complete AppDelegate swift code:
|
Nice |
i've tried to use this in my appdelegate.swift. Butt my app is still crash after launch |
Please share the log where it is crashing? My code was using facebook and some other libraries also which might be not necessary in your case. Also Initialize it properly in main method. |
this is my main method code
i only got this message :
|
"FBSDKExceptionHandler" is related with Facebook SDK. You must be sure if you have added FB sdk or if your app do not use FB SDK. Just remove FB related instances from your project. Might help. |
But, it’s running well if i don’t use flutter downloader, |
Sorry, what's the solution here? I have the same issue |
iOS Only:
After initializing await FlutterDownloader.initialize(); in main() when google sign in popup appears and user press cancel.. APP Crashes.
Please look into.
This is very basic to use google sign in. Many users will face the same.
The text was updated successfully, but these errors were encountered: