Closed charleshoong97 closed 2 years ago
I solved it doing this:
1_ renaming ios/.symlinks/plugins/whatsapp_share2/ios/whatsapp_share.podspec to ios/.symlinks/plugins/whatsapp_share2/ios/whatsapp_share2.podspec
2_ inside the previous file editing the line 5 to: s.name = 'whatsapp_share2'
3_ inside ios/.symlinks/plugins/whatsapp_share2/ios/Classes/FlutterSharePlugin.m changing the lines:
to:
I solved it doing this:
1_ renaming ios/.symlinks/plugins/whatsapp_share2/ios/whatsapp_share.podspec
to ios/.symlinks/plugins/whatsapp_share2/ios/whatsapp_share2.podspec
2_ inside the previous file
editing the line 5 to:
s.name = 'whatsapp_share2'
3_ inside ios/.symlinks/plugins/whatsapp_share2/ios/Classes/FlutterSharePlugin.m
changing the lines:
import "WhatsappShare.h"
import <whatsapp_share/whatsapp_share-Swift.h>
to:
import "FlutterSharePlugin.h"
import <whatsapp_share2/whatsapp_share2-Swift.h>
Thanks for your sharing, it is working perfectly!!! There is no more issue when I try to build it.
However, the share file function is not working. It didn't redirect to WhatsApp. Do you manage to send to WhatsApp in iOS?
Hi Charles. I'm not a Mac user (I use a borrowed one) and i don't have an iphone. I did that for compiling. I've uploaded it yesterday to appstoreconnect.
So i have to wait that they approve the app and users test it to find out.
Sorry if is not working, and for my english.
@icala Thanks for sharing man, please share here whether it is working in iOS after your testing. I tried to run it in iOS but is seem like doesn't work for all the function (isInstalled, share, shareFile).
@icala Thanks for sharing man, please share here whether it is working in iOS after your testing. I tried to run it in iOS but is seem like doesn't work for all the function (isInstalled, share, shareFile).
I have been testing a little and the you're right @charleshoong97. "isInstalled" and "shareFile" doesn't work. isinstalled doesn't returns. shareFile returns me false. But "share" it works (sort of). In IOS it opens a whatsapp menu to select the disired contact. (In android it goes directly to de chat of the number used)
I don't know if i'm missing a permission in info.plist. I recently added the following:
<key>UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>NSContactsUsageDescription</key>
<string> some string </string>
and i had already added:
<key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
</array>
Maybe you have another more. If so , please share it.
I solved it doing this:
1_ renaming ios/.symlinks/plugins/whatsapp_share2/ios/whatsapp_share.podspec to ios/.symlinks/plugins/whatsapp_share2/ios/whatsapp_share2.podspec
2_ inside the previous file editing the line 5 to: s.name = 'whatsapp_share2'
3_ inside ios/.symlinks/plugins/whatsapp_share2/ios/Classes/FlutterSharePlugin.m changing the lines: #import "WhatsappShare.h" #import <whatsapp_share/whatsapp_share-Swift.h> to: #import "FlutterSharePlugin.h" #import <whatsapp_share2/whatsapp_share2-Swift.h>
Additionally I renamed the Flutter_Share_Plugin.podspec file to whatsapp_share2.podspec
When I try to run ' pod install ', is show me the following error without generate podfile.lock. How to solve it?