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

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

Related

No podspec found for xyz module

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?

Module 'BrightcovePlayerSDK' not found after upgrading to 0.63

I have just upgraded to React Native 0.63 and can no longer build my app due to the following error
Module 'BrightcovePlayerSDK' not found
I tried adding it as a custom pod in my podfile but this did not work. Instead i have followed the instructions here https://github.com/brightcove/brightcove-player-sdk-ios to install manually. This now gives me the error
No visible #interface for 'BCOVOfflineVideoManager' declares the selector 'requestVideoDownload:parameters:completion:'
I have checked the framework search path is correct but i'm not sure what this error means.
I have just upgraded to Xcode 12.5 and here is my podfile now:
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'ProjectcNameApp' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'ProjectcNameAppTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
# use_flipper!
# post_install do |installer|
# flipper_post_install(installer)
# end
end```

fatal error: module 'firebase_auth' not found #import firebase_auth

I am trying to use Firebase Authentication for my iOS Flutter.
I have tried all of the procedures laid out in this link but I still receive the same error.
https://github.com/FirebaseExtended/flutterfire/issues/1929
This is the error I receive when I run the iOS app.
/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'firebase_auth' not found
#import firebase_auth;
~~~~~~~^~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
This is my Podfile
# add pods for desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'Runner' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Firestore'
pod 'Firebase/Storage'
end
post_install do |pi|
pi.pods_project.targets.each do |t|
t.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
end
end
You may be interested in this thread here: https://github.com/FirebaseExtended/flutterfire/issues/192
Essentially its recommendation is to delete Podfile and Podfile.lock. Once you've done this re-run and flutter should automatically create the correct Podfiles for you.
Hopefully that helps.
DB
When it happens remove the "^" on the dependency. So firebase_auth: ^1.0.0 -> firebase_auth: 1.0.0.

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

Resources