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

{"code":"UNIMPLEMENTED"} #89

Open
hallbird opened this issue Jan 27, 2023 · 11 comments
Open

{"code":"UNIMPLEMENTED"} #89

hallbird opened this issue Jan 27, 2023 · 11 comments

Comments

@hallbird
Copy link

hallbird commented Jan 27, 2023

Hello,

I have applied your package, however I am getting this error
⚡️ [error] - {"code":"UNIMPLEMENTED"}

my code is

`
let options:SignInWithAppleOptions = {
clientId: 'com.oplusstodio.cortado',
redirectURI: 'https://xxxxxx.firebaseapp.com/__/auth/handler',
scopes: 'email',
state: '12345',
nonce:"nonce"
};

SignInWithApple.authorize(options)
      .then(async (res:SignInWithAppleResponse)=>{
        console.log(res)

        if (res.response && res.response.identityToken) {
        console.log(res)
        console.log(res.response)
    //    this.appAlertService.showAlert(JSON.stringify(res.response))
        }
      })
         .catch((response) => {
    console.log(response)
    //this.presentAlert();
  });

`

I am really confuse, what could be the error... since it dose not tell much

@bppearsoft
Copy link

I do not see that exact same error, but I am seeing "The operation couldn't be completed. (com.apple.AuthenticationServices.AuthorizationError 1000)."

On my iOS device, I am unable to enable to even see the initial Apple interface popup. I have a new Ionic project using Capacitor v8.19.3. I've configured all the profiles, identifiers, etc. on the Apple side (I have been using cordova Sign in with Apple with the same clientId for a few years already).

I've installed the plugin and my code is basically the same as @hallbird and the sample code on the readme page, with the exception that I have redirectURI: '' as I do not care about the web, just iOS (I've tried entering a value here too, but no luck).

Although it states this is for v4 Capacitor, is it correct to assume this will work with v8?
Does anyone know if I've overlooked something needed to get this to work?

@hallbird
Copy link
Author

hallbird commented Feb 3, 2023

I think ... there is an issue ... since Apple login was working fine until an update to the new iOS 16.2 ... it got failed

@bppearsoft
Copy link

bppearsoft commented Feb 4, 2023

@hallbird I finally got it working. Here's the steps I took, hopefully it will help and save some time for other devs needing this plugin.

I started with the brand new ionic capacitor template tabs project (Capactor v8.19.3). I added iOS and Android then built using 'npm run build' then ran the app locally with 'ionic serve' on localhost:8100. I installed the apple-sign-in plugin as seen in the readme.

Over on Apple (developer.apple.com), I created the necessary certificates, identifiers, etc. making sure the identifier had 'Sign in with Apple' selected (enabled as primary AppID).

I opened my app in xcode (pointing to the /ios/app/app location) and in the UI with the first App folder selected on the left, clicked the Signing & Capabilities tab and completed the Signing form (team & bundle id). Then using the +Capability button added Sign in with Apple. This created an App.entitlements file. Without this the plugin will not work. This is the step I did not know about and the reason for my initial post in this thread.

Back in my sample tabs project, I added a button to call the Authorize method of the plugin as seen in the readme page.

I had already updated my phone and ipad to iOS 16.3 so not sure if this would have failed in 16.2.

@hallbird
Copy link
Author

Hi,

Still struggle ... I have App.entitlements

image : https://ibb.co/kcykx6B

I have delete the configuration in Apple developer and add it again and still the same...

the challenge is no clear error ... which makes this hard to catch ...

I hope some face this issue before and support and us

@bppearsoft
Copy link

@hallbird maybe try the steps I outlined above by creating a brand new capacitor application. That was the only way I could be certain of each step and if followed correctly the plugin has to work, at least the user interface should appear. I am not sure about the firebase backend as I didn't use that, instead connecting to our own node server hosted on heroku.

@Vatanay
Copy link

Vatanay commented Jul 29, 2023

I am experiencing the same issue as well. I am getting the {"code":"UNIMPLEMENTED"} error.

During the configuration of the App ID, I checked the "Enable as a primary App ID" option, and it includes the "Sign In with Apple" capability. Similarly, I activated the relevant capabilities in Xcode.

I am wondering if the RedirectURI might be entered incorrectly. During the bundle creation process for the app, it didn't request a RedirectURI for Apple Login authorization. Therefore, in my JS code, I tried almost everything possible for this field, but none of them resulted in success.

I have tested the integration on the browser, emulator, and mobile device. I also tried using TestFlight, but it still doesn't work.

iOS: 16.5.1
Xcode: 14.3.1

@AAmeriyan
Copy link

Same here! getting {"code":"UNIMPLEMENTED"}
Capacitor 5 on Native ios device version 17.0.2

@luisUrielLeano
Copy link

Hi ,
I was struggling for days with the same problem, and this was my solution.
While reviewing the project generated for IOS, I discovered that the source files for the library had fewer lines of code than in anther project where the library was working correctly( I created a new one from scratch just to test the library). Upon discovering this, I deleted the packages(node modules), reinstalled them, and then synchronized with Capacitor using the respective command.
Once I did this, the source files had the same number of lines, and the flow ran correctly (tested in simulator with one of latest IOS version and physical device Iphone 15).
I hope this solution will be helpful to the community.

@tolutronics
Copy link

@robingenz i am getting this error after i migrated to v6.0.0.
Error: "SignInWithApple" plugin is not implemented on ios

@robingenz
Copy link
Member

@tolutronics Please follow the Capacitor iOS troubleshooting guide in this case.

@naomiEndobit
Copy link

@robingenz i am getting this error after i migrated to v6.0.0. Error: "SignInWithApple" plugin is not implemented on ios

Have you been able to solve it? Because I have the same problem. I followed the capacitor iOS troubleshooting guide, but nothing helped.

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

8 participants