ankushmishra2903-official / whatsapp_share2

MIT License
3 stars 21 forks source link

[!] No podspec found for `whatsapp_share2` in `.symlinks/plugins/whatsapp_share2/ios` #4

Closed charleshoong97 closed 2 years ago

charleshoong97 commented 2 years ago

When I try to run ' pod install ', is show me the following error without generate podfile.lock. How to solve it?

[!] No podspec found for whatsapp_share2 in .symlinks/plugins/whatsapp_share2/ios

icala commented 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:

import "WhatsappShare.h"

import <whatsapp_share/whatsapp_share-Swift.h>

to:

import "FlutterSharePlugin.h"

import <whatsapp_share2/whatsapp_share2-Swift.h>

charleshoong97 commented 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:

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?

icala commented 2 years ago

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.

charleshoong97 commented 2 years ago

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

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

vladox1975 commented 1 year 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: #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