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

Native popup doesn't show up with Ionic 3 #22

Open
kaanerdogan opened this issue Jun 27, 2020 · 3 comments
Open

Native popup doesn't show up with Ionic 3 #22

kaanerdogan opened this issue Jun 27, 2020 · 3 comments

Comments

@kaanerdogan
Copy link

Working on ionic 3 project.

cordova -v
9.0.0 (cordova-lib@9.0.1)

First there was an error about not recognizing your code. Same as here.
After changing your code like

export declare class ASAuthorizationAppleIDRequest {
    // static readonly ASAuthorizationScopeFullName = 0;
    // static readonly ASAuthorizationScopeEmail = 1;
    requestedScopes?: number[];
}

and give requestedScopes with numbers like

...signin({requestedScopes: [0, 1]})

that error wasn't there anymore. But also nothing happening. Can not get in your plugins scope. Therefore popup doesnt show up.

@keiya
Copy link
Collaborator

keiya commented Jun 27, 2020

It is the problem of @ionic-native/sign-in-with-apple, not ours.
Please consider issue the report to ionic-native's repository.

@kaanerdogan
Copy link
Author

Ionics repo isn't the same with yours? Have they changed anything in code as far as you know? Both your link and ionic docs refers to this repo. I believe they didn't change anything. But i'll do it.

@aaahti
Copy link

aaahti commented Jul 19, 2020

With Ionic 3 you can't use the Ionic wrapper as far as I know. I got the login prompt working with this code:

import ...

declare var cordova: any;  // <-- need to declare this before @Component

@Component
...

  loginApple() {
        cordova.plugins.SignInWithApple.signin({
            requestedScopes: [0, 1]
        }, (res: any) => {
            console.log('Success: ', res);
        }, (error: any) => {
            console.error('Error: ', error);
        });
  }

the issue I can't seem to figure out is that it's always showing the same prompt and there's no "quick flow" on the second try where user just presses "Continue" and doesn't have to select "Hide or show email"

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

3 participants