No podspec found for xyz module - ios

Hey I am trying to fetch .podspec file in my podfile. But I am getting weried issue
[!] No podspec found for `kotlinmultiplatformsharedmodule` in `https://github.com/vivek-modi/MultiplatformProject/tree/master/app/kotlinmultiplatformsharedmodule`
My project link and my .podspec file are store in this location.
podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/vivek-modi/MultiplatformProject.git'
target 'PodIosProject' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for PodIosProject
pod 'kotlinmultiplatformsharedmodule', :path => "https://github.com/vivek-modi/MultiplatformProject/tree/master/app/kotlinmultiplatformsharedmodule"
target 'PodIosProjectTests' do
inherit! :search_paths
# Pods for testing
end
target 'PodIosProjectUITests' do
# Pods for testing
end
end
Can someone suggest me what am I doing wrong here?

Related

Invalid `Podfile` file: undefined method `exists?' for File:Class

I am facing an issue with pod file as below while instlling POD in Xcode project
Invalid `Podfile` file: undefined method `exists?' for File:Class
I did try to update POD version with brew upgrade cocoapods and also followed below link
https://dev.to/retyui/fix-a-pod-install-error-undefined-method-exist-for-fileclass-react-native-24ke
But still no fix.
Please guide me what am I doing wrong here.
below is my POD file
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
flutter_application_path = '../bmi_flutter'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'MixedNativeApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
install_all_flutter_pods(flutter_application_path)
# Pods for MixedNativeApp
target 'MixedNativeAppTests' do
inherit! :search_paths
# Pods for testing
end
target 'MixedNativeAppUITests' do
# Pods for testing
end
end

Invalid `Podfile` file: cannot load such file -- ⁨path/to/.ios/Flutter/podhelper.rb

i am trying to integrate flutter module to an existing iOS app
my pod file :
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'IosFlutter' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for IosFlutter
target 'IosFlutterTests' do
inherit! :search_paths
# Pods for testing
end
target 'IosFlutterUITests' do
inherit! :search_paths
# Pods for testing
end
flutter_application_path = '⁨⁨path/to/flutter_app⁩/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
end
when running pod install in terminal i got this error :
Invalid `Podfile` file: cannot load such file -- path/to/.ios/Flutter/podhelper.rb
any advise would be appreciated , thanks
make sure your flutter and dart version is up to date
run flutter doctor to see if anything went wrong
load your flutter file out of target block and add install_all_flutter_pods inside your app dependency block like this :
flutter_application_path = '⁨⁨path/to/flutter_app⁩/'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
target 'MyApp' do
install_all_flutter_pods(flutter_application_path)
end
and finaly run pod install in terminal ios app root folder

No such Module Firebase

I have a react-native project and I have to link my xCode project with firebase. Even though I used CocoaPod and manual ways I am getting the error
"No such module as firebase.h".
I have followed all the steps correctly.
Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'App' do
# Uncomment the next line if you're using Swift or would like to use
dynamic frameworks
# use_frameworks!
# Pods for App
target 'App-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'AppTests' do
inherit! :search_paths
# Pods for testing
end
pod 'Google-Mobile-Ads-SDK'
pod 'Firebase/Core', '~> 5.6.0'
pod 'GoogleIDFASupport'
end
target 'App-tvOS' do
# Uncomment the next line if you're using Swift or would like to use
dynamic frameworks
# use_frameworks!
# Pods for App-tvOS
end
I also faced this problem. I was using react-native-firebase package. Please try following their official docs . I would rate their documentation 10/10 as they've explained every possible scenario a developer would face during integration.
Just change value with deployment target of your app.
platform :ios, 'value'
inhibit_all_warnings!
def sharedpods
pod 'Google-Mobile-Ads-SDK'
pod 'Firebase/Core', '~> 5.6.0'
pod 'GoogleIDFASupport'
end
target 'AppTests’ do
use_frameworks!
sharedpods
end
target 'App-tvOSTests’ do
use_frameworks!
sharedpods
end
target 'App-tvOS’ do
use_frameworks!
sharedpods
end
#post_install do |installer|
# installer.pods_project.targets.each do |target|
# puts "#{target.name}"
# end
#end

CocoaPods - Unable to find a specification for `GoogleMaps`

I'm new to iOS, i already have Alamofire and MarqueeLabel on my Podfile and now trying to add GoogleMaps, it keeps showing this message,
[!] Unable to find a specification for `GoogleMaps`
My Podfile looks like this
# Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'Migapixel' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'GoogleMaps'
pod 'Alamofire',
:git => 'https://github.com/Alamofire/Alamofire.git',
:branch => 'master',
:tag => '4.0.0'
pod 'MarqueeLabel/Swift',
:git => 'https://github.com/cbpowell/MarqueeLabel.git'
# Pods for Migapixel
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO' end end end
target 'MigapixelTests' do
inherit! :search_paths
end
target 'MigapixelUITests' do
inherit! :search_paths
# Pods for testing
end
end
i even tried this
pod 'GoogleMaps',
:git => 'https://github.com/CocoaPods/Specs.git'
What am i doing wrong?
Try removing source 'https://github.com/CocoaPods/Specs.git' and moving use_frameworks! out of the target block. Moreover you don't need to manually set the git path for both Alamofire and MarqueeLabel.
Try this:
platform :ios, '9.0'
use_frameworks!
target 'Migapixel' do
pod 'GoogleMaps'
pod 'Alamofire'
pod 'MarqueeLabel/Swift'
# Pods for Migapixel
end
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO' end end end
target 'MigapixelTests' do
inherit! :search_paths
end
target 'MigapixelUITests' do
inherit! :search_paths
# Pods for testing
end
Edit:
It seems that there's something wrong with your local repo.
Try cleaning and reinstalling:
pod repo remove master
pod setup
i resolved the issue like that with these step:
open terminal.
go to your project path.
type:
pod repo update
install pod again.
After trying many things Here is the fix!!
Imp: Make sure that you have these lines in your PodFile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
pod 'GoogleMaps'
end
If the above is fine then you need to update the pods:
try the following steps:
Open a new terminal and run the following command in a temp directory.
pod try GoogleMaps
keep patience! It will take some time but will update the pod.
Now try to install the pod in ur project again. It should work.Else try to run the following commands in the project dir:
pod repo update
try again.
Comment in the case of any issue!!
Go to your project directory and delete pods folder and .lock file then run
pod repo update
it helps for me.

How can I replace link_with with target blocks?

I have updated cocoapods today to 1.0.0 version. I got this string when I update the pods:
[!] InvalidPodfilefile: [!] The specification oflink_within the Podfile is now unsupported, please use target blocks instead..
The content of my Pod file is
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'QuickStart' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for QuickStart
source 'https://github.com/CocoaPods/Specs.git'
link_with ['QuickStart']
xcodeproj 'QuickStart'
pod 'ADALiOS', :git => 'https://github.com/AzureAD/azure-activedirectory-library-for-objc.git', :branch=> 'convergence'
pod 'NXOAuth2Client'
source 'https://github.com/CocoaPods/Specs.git'
link_with ['QuickStart']
xcodeproj 'QuickStart'
pod 'ADALiOS'
end

Resources