OpenFlutter / flutter_share_me

Flutter Plugin for sharing contents to social media. You can use it share to Facebook , WhatsApp , Twitter And System Share UI. Support Url and Text.
https://github.com/lizhuoyuan
Apache License 2.0
151 stars 145 forks source link

Does not compile for iOS #69

Open Alisofin opened 2 years ago

Alisofin commented 2 years ago

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.

Irfan-KV commented 2 years ago

Same here

hukjordanjanaq commented 2 years ago

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
Alisofin commented 2 years ago

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)

hukjordanjanaq commented 2 years ago

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

Alisofin commented 2 years ago

Many thanks !

mohadel92 commented 2 years ago

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 ?

hukjordanjanaq commented 2 years ago

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

mohadel92 commented 2 years ago

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?

Alisofin commented 2 years ago

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.

Abhishek01039 commented 2 years ago

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

jigarfumakiya commented 2 years ago

@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.

Abhishek01039 commented 2 years ago

Thanks @jigarfumakiya

Alisofin commented 2 years ago

Great ! @jigarfumakiya

ragokan commented 2 years ago

I get same error while compiling or running.

LeGoffMael commented 2 years ago

Thanks @jordanjanaq !

Irfan-KV commented 2 years ago

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

alexaung commented 2 years ago

I got same error.

ccs1428 commented 2 years ago

Getting same error

DennisAshford commented 2 years ago

Same error here also. iOS build not compiling.

Ridwan093 commented 1 year ago

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