Closed leo6104 closed 3 years ago
Thanks for pointing this out. Does it work with Capacitor v3 for you?
Yes. it works with Capacitor 3 ! (iOS / Android)
Thanks for awesome plugin. :)
Good to know! I will aim to fix this sometime before Capacitor v4 is released.
@leo6104 did you do anything special to get this working in Capacitor 3? I am running into these build errors:
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.
Property 'BlobWriter' is missing in type '{ [pluginName: string]: { [prop: string]: any; }; }' but required in type 'PluginRegistry'.
16 export interface CapacitorInstance extends CapacitorGlobal {
~~~~~~~~~~~~~~~~~
node_modules/capacitor-blob-writer/dist/index.d.ts:4:9
4 BlobWriter: BlobWriterPlugin;
~~~~~~~~~~
'BlobWriter' is declared here.
node_modules/capacitor-blob-writer/dist/index.d.ts:1:10 - error TS2305: Module '"@capacitor/core"' has no exported member 'FilesystemDirectory'.
1 import { FilesystemDirectory } from '@capacitor/core';
Based on my experience upgrading another plugin of mine (which was quite involved), I would be very surprised if this plugin is compatible with Capacitor v3 in its current form. It needs upgrading.
@diachedelic interface PluginRegistry
logic should be removed on capacitor v3.
https://github.com/diachedelic/capacitor-blob-writer/blob/master/src/index.ts#L9
@leo6104 I just submitted my PR for the same. Haha I wish I had noticed your PR two days ago it would have given me more of a head start. It looks like I made it a little further since I updated the pods and have tested it in my Capacitor 3 iOS app. Please check it out and let me know if there is anything I can improve on it. https://github.com/diachedelic/capacitor-blob-writer/pull/30
Please try version 1 of the plugin, it should support Capacitor v3. Thanks for your pull requests, they helped a lot.
I saw that this plugin have console.warn about deprecated functions.