capacitor-community / apple-sign-in

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

Update this plugin for Capacitor 3 #22

Closed joseph-navant closed 3 years ago

joseph-navant commented 3 years ago

Capacitor 3 is being built and is already in beta. In this new version the native plugins have been removed from the core and there are some changes that are necessary in the existing plugins.

Example: Plugin Imports The Plugins object is deprecated, but will continue to work in Capacitor 3. Capacitor plugins should be updated to use the new plugin registration APIs (see the Upgrade Guide for plugins), which will allow them to be imported directly from the plugin’s package.

Going forward, the Plugins object from @capacitor/core should not be used.

// OLD
import { Plugins } from '@capacitor/core';
const { AnyPlugin } = Plugins;
Importing the plugin directly from the plugin’s package is preferred, but the plugin must be updated to work with Capacitor 3 for this to be possible.
// NEW
import { AnyPlugin } from 'any-plugin';

References:

Updating Capacitor to 3.0 in your plugin

Updating Capacitor to 3.0 in your app

(credits to @mklipe for issue explanation)

danielehrhardt commented 3 years ago

Something new here?

Linknpay commented 3 years ago

any news please ?

danielehrhardt commented 3 years ago
❌  /Users/vagrant/git/node_modules/@capacitor-community/apple-sign-in/ios/Plugin/Plugin.swift:2:8: compiling for iOS 11.0, but module 'Capacitor' has a minimum deployment target of iOS 12.0: /Users/vagrant/Library/Developer/Xcode/DerivedData/App-dxfkyhrskqdpdnadxkqnzzkcyqsm/Build/Intermediates.noindex/ArchiveIntermediates/App/BuildProductsPath/Release-iphoneos/Capacitor/Capacitor.framework/Modules/Capacitor.swiftmodule/arm64-apple-ios.swiftmodule
import Capacitor
                                                                                   ^~~~~~~~~~~
hatsantos commented 3 years ago

The official Capacitor 3.0 was released. I was checking my app, to see and update could be made and it seems this is the only plugin that is not yet compatible.

There's already an PR for this https://github.com/capacitor-community/apple-sign-in/pull/34 but is referring combability to Capacitor 3.0.0-beta.3. Don't know if it needs any additional change, assuming there's possible changes in the latest official release.

Linknpay commented 3 years ago

Hi, capacitor has launched their final release 3.0.0 Could you update the plugin because we are obtaining this error :

Error: node_modules/@capacitor/core/types/definitions-internal.d.ts:16:18 - error TS2430: Interface 'CapacitorInstance' incorrectly extends interface 'CapacitorGlobal'.
  Types of property 'Plugins' are incompatible.
    Type '{ [pluginName: string]: { [prop: string]: any; }; }' is missing the following properties from type 'PluginRegistry': SignInWithApple,
vanessag commented 3 years ago

Any update on if/when a capacitor 3 compatible release of this plugin will be available?

patrickbussmann commented 3 years ago

You must only install it without the tag.

npm install capacitor-community/apple-sign-in

Then you have the master branch installed and you can use with Capacitor 3.

alexx855 commented 3 years ago

npm install capacitor-community/apple-sign-in

image

selected-pixel-jameson commented 2 years ago

@epicshaggy Why did you close this? It's still throwing the error @alexx855 posted.