capacitor-community / apple-sign-in

Sign in with Apple Support
MIT License
135 stars 58 forks source link

Dependencies Problem "@capacitor/core": "latest", "@capacitor/ios": "latest" and "@capacitor/android": "latest" breaks builds : New Capacitor 3.x Release #39

Closed hatsantos closed 3 years ago

hatsantos commented 3 years ago

Describe the bug The dependencies "@capacitor/core": "latest", "@capacitor/ios" and "@capacitor/android" are specified to the latest version.

The new Capacitor 3.0 was released yesterday and now the builds of Capacitor 2.X apps, are broken, because internally this plugin installs the new Capacitor 3.0 (latest version).

Older Capacitor 2.x apps seems to be broken because of this dependency, and new Capacitor 3.X apps still have the same problem because this plugin does not support yet Capacitor 3.X.

To Reproduce Steps to reproduce the behavior:

  1. Use an "old" Capacitor 2.X project;
  2. Add this plugin to the project;
  3. Try to run the project.

Reported Error Error: node_modules/@capacitor-community/apple-sign-in/node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'. [ng] Types of property 'Plugins' are incompatible. [ng] Property 'SignInWithApple' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'. [ng] 16 export interface CapacitorInstance extends CapacitorGlobal { [ng] ~~~~~~~~~~~~~~~~~ [ng] node_modules/@capacitor-community/apple-sign-in/dist/esm/definitions.d.ts:3:9 [ng] 3 SignInWithApple: SignInWithApplePlugin; [ng] ~~~~~~~~~~~~~~~ [ng] 'SignInWithApple' is declared here.

Expected behavior The Capacitor dependencies should be specified to a specific version so older versions of capacitor could still use this plugin and build the app.

A new release should be created with a "pinned" version the latest Capacitor 2.X.X version so the support to older apps could still be possible.

And eventually a new version should be release to add support to the new Capacitor 3.X.X.

Screenshots image

epicshaggy commented 3 years ago

Fixed

cyril-colin commented 2 years ago

@epicshaggy Hi, can you be more specific ? which version of this plugin should we use to keep compatibility with capacitor 2 ?

thanks !

cyril-colin commented 2 years ago

Finally, I use this version to fix this problem :

"@capacitor-community/apple-sign-in": "0.0.14",