flutter_share_me icon indicating copy to clipboard operation
flutter_share_me copied to clipboard

Does not compile for iOS

Open Alisofin opened this issue 2 years ago • 20 comments

Hello, The app does not compile: here's the trace: Xcode's output: ↳ leveldb-library-byfjndjolxototdyoiotufacpcvp /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_share_me-1.2.0/ios/Classes/SwiftFlutterShareMePlugin.swift:189:25: error: 'init()' is unavailable let shareDialog=ShareDialog() ^~~~~~~~~~~ FBSDKShareKit.ShareDialog:4:12: note: 'init()' has been explicitly marked unavailable here public init() ^ /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_share_me-1.2.0/ios/Classes/SwiftFlutterShareMePlugin.swift:194:20: error: incorrect argument label in call (have 'fromViewController:content:delegate:', expected 'viewController:content:delegate:') ShareDialog(fromViewController: viewController, content: shareContent, delegate: self).show() ^~~~~~~~~~~~~~~~~~~ viewController /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_share_me-1.2.0/ios/Classes/SwiftFlutterShareMePlugin.swift:189:25: error: 'init()' is unavailable let shareDialog=ShareDialog() ^~~~~~~~~~~ FBSDKShareKit.ShareDialog:4:12: note: 'init()' has been explicitly marked unavailable here public init() ^ /Applications/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_share_me-1.2.0/ios/Classes/SwiftFlutterShareMePlugin.swift:194:20: error: incorrect argument label in call (have 'fromViewController:content:delegate:', expected 'viewController:content:delegate:') ShareDialog(fromViewController: viewController, content: shareContent, delegate: self).show() ^~~~~~~~~~~~~~~~~~~ viewController

Thanks for your help.

Alisofin avatar Oct 21 '21 14:10 Alisofin

Same here

Irfan-KV avatar Oct 22 '21 08:10 Irfan-KV

Can you try with this? I fixed in a pull request.

https://github.com/OpenFlutter/flutter_share_me/pull/67

In your pubspec.yaml

  flutter_share_me:
    git:
      url: https://github.com/hukjordanjanaq/flutter_share_me

hukjordanjanaq avatar Oct 23 '21 05:10 hukjordanjanaq

Thanks, compilation ok now, but problem at execution (I don't know if it is related) ======== Exception caught by Flutter framework ===================================================== The following assertion was thrown during a service extension callback for "ext.flutter.inspector.setSelectionById": Id does not exist.

When the exception was thrown, this was the stack: #0 WidgetInspectorService.toObject (package:flutter/src/widgets/widget_inspector.dart:1302:7) #1 WidgetInspectorService.setSelectionById (package:flutter/src/widgets/widget_inspector.dart:1364:25) #2 WidgetInspectorService._registerServiceExtensionWithArg. (package:flutter/src/widgets/widget_inspector.dart:869:35) #3 WidgetInspectorService._registerServiceExtensionWithArg. (package:flutter/src/widgets/widget_inspector.dart:866:17) #4 BindingBase.registerServiceExtension. (package:flutter/src/foundation/binding.dart:604:32)

Alisofin avatar Oct 23 '21 07:10 Alisofin

https://stackoverflow.com/a/66940545/8832753

hukjordanjanaq avatar Oct 23 '21 14:10 hukjordanjanaq

Many thanks !

Alisofin avatar Oct 23 '21 18:10 Alisofin

Can you try with this? I fixed in a pull request.

#67

In your pubspec.yaml

  flutter_share_me:
    git:
      url: https://github.com/jordanjanaq/flutter_share_me

is it possible to share a msg + image to a specific whatsapp number ?

mohadel92 avatar Oct 24 '21 15:10 mohadel92

I'm not really sure, but you can't try with this and check if it works. I didn't use it but it seems it has a func to share to a number phone with file.

https://pub.dev/packages/whatsapp_share Captura de Pantalla 2021-10-24 a la(s) 10 17 18

hukjordanjanaq avatar Oct 24 '21 15:10 hukjordanjanaq

I'm not really sure, but you can't try with this and check if it works. I didn't use it but it seems it has a func to share to a number phone with file.

https://pub.dev/packages/whatsapp_share Captura de Pantalla 2021-10-24 a la(s) 10 17 18

thank you for your valuable feedback i couldn't run the project after installing this new package due to issues with provider_path.xml file any another way? i was thinking about generating a dynamic links that contains a meta tag of photo to be displayed rather than actual photo, is this a good idea?

mohadel92 avatar Oct 25 '21 11:10 mohadel92

share with WhatsApp works fine for me, thank you. However, with Instagram, you can't share the image passed as a parameter, it launches Instagram and asks for access to the Album.

Alisofin avatar Oct 25 '21 16:10 Alisofin

hello @Alisofin @jordanjanaq I am still getting this issue even after deactivating devtool

Abhishek01039 avatar Oct 27 '21 05:10 Abhishek01039

@Abhishek01039 Can you check out branch v-2.0.0 I have fixed most of the issues. or just wait for 2-3 days will be releasing a new version soon.

jigarfumakiya avatar Oct 27 '21 05:10 jigarfumakiya

Thanks @jigarfumakiya

Abhishek01039 avatar Oct 27 '21 06:10 Abhishek01039

Great ! @jigarfumakiya

Alisofin avatar Oct 27 '21 16:10 Alisofin

I get same error while compiling or running.

ragokan avatar Oct 31 '21 17:10 ragokan

Thanks @jordanjanaq !

LeGoffMael avatar Nov 18 '21 06:11 LeGoffMael

@jigarfumakiya Will you be releasing the new version any time soon.

Irfan-KV avatar Jan 18 '22 10:01 Irfan-KV

I got same error.

alexaung avatar Feb 12 '22 19:02 alexaung

Getting same error

ccs1428 avatar Feb 13 '22 14:02 ccs1428

Same error here also. iOS build not compiling.

DennisAshford avatar Feb 27 '22 15:02 DennisAshford

i don't want to share path as image i want to share only URL tag with image

Ridwan093 avatar Jan 21 '23 09:01 Ridwan093