Skip to content

iOS FluwxPlugin.m 下的 UIViewController *vc = UIApplication.sharedApplication.keyWindow.rootViewController; 在UIScene 模式会有兼容问题 #774

Description

@HYKQtxt
  • (void)handleAuthByPhoneLogin:(FlutterMethodCall *)call result:(FlutterResult)result {
    UIViewController *vc = UIApplication.sharedApplication.keyWindow.rootViewController;
    SendAuthReq *authReq = [[SendAuthReq alloc] init];
    authReq.scope = call.arguments[@"scope"];
    authReq.state = (call.arguments[@"state"] == (id) [NSNull null]) ? nil : call.arguments[@"state"];
    [WXApi sendAuthReq:authReq viewController:vc delegate:self completion:^(BOOL success) {
    result(@(success));
    }];
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions