Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I add whatsapp_share2: ^2.0.2 this library I cant install pod

Tags:

flutter

dart

Please check this image when I add whatsapp_share2: ^2.0.2 this plugin I can't install pod and they give me "No podspec found for whatsapp_share2 in .symlinks/plugins/whatsapp_share2/ios" and also I use this library for share image in direcly Whatsapp so please help me to find a solution

check this image

like image 374
keyur Avatar asked Dec 29 '25 16:12

keyur


2 Answers

I found the solution by doing this:

  1. Rename podspec file in .symlinks folder

ios/.symlinks/plugins/whatsapp_share2/ios/flutter_share.podspec

to :

ios/.symlinks/plugins/whatsapp_share2/ios/whatsapp_share2.podspec

  1. Inside this previous whatsapp_share2.podspec file

· Edit the line no. 5 s.name to :

s.name = 'whatsapp_share2'

  1. Inside in same folder go to Classes folder and edit in file named FlutterSharePlugin.m

☞ 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>

like image 174
Harsh Sutariya Avatar answered Jan 01 '26 15:01

Harsh Sutariya


Go to:

iOS > .symlinks/plugins/whatsapp_share2/iOS/

There is a file named flutter_share.podspec

Rename this file to whatsapp_share2.posdpec and paste the following content:

# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
  s.name             = 'whatsapp_share2'
  s.version          = '0.0.1'
  s.swift_version    = '4.1'
  s.summary          = 'Simple way to share a message, link or files from your flutter app'
  s.description      = <<-DESC
Simple way to share a message, link or files from your flutter app
                       DESC
  s.homepage         = 'http://example.com'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Your Company' => '[email protected]' }
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.public_header_files = 'Classes/**/*.h'
  s.dependency 'Flutter'

  s.ios.deployment_target = '8.0'
end
like image 23
Coding Frontend Avatar answered Jan 01 '26 15:01

Coding Frontend



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!