Module 'BrightcovePlayerSDK' not found after upgrading to 0.63 - ios

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

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

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?

Can App Clip be used in an iOS Cocoapods project?

Our App was created in 2018 mid using Swift 4, and other 3rd party depended with Cocoapods.
I add one Clip target, the project structure is different from that given by the download link under session. Run this target, here are the crash errors:
Reason: image not found
dyld: Library not loaded: #rpath/Alamofire.framework/Alamofire
Referenced from: /private/var/containers/Bundle/Application/57185773-B735-4EE5-BB51-790DF004A85B/kt_iOS_Clip.app/kt_iOS_Clip
Reason: image not found
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib
Here is Podfile:
platform :ios, '10.0'
inhibit_all_warnings!
target '<Main App>' do
use_frameworks!
pod 'SnapKit' , '4.2.0'
pod 'Alamofire' , '4.7.3'
......
target '<Main App>Tests' do
inherit! :search_paths
end
swift_41_pod_targets = ['Spring','PKHUD', 'FSPagerView', 'SQLite.swift','FaveButton']
post_install do | installer |
installer.pods_project.targets.each do |target|
if target.name == 'Cache'
target.build_configurations.each do |config|
level = '-Osize'
config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = level
puts "Set #{target.name} #{config.name} to Optimization Level #{level}"
end
end
if swift_41_pod_targets.include?(target.name)
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
target '<Main App>UITests' do
inherit! :search_paths
end
end
As other answers mentioned, separate app clip target and use_modular_headers! worked for me
platform :ios, '13.0'
target 'MainAppTarget' do
use_frameworks!
pod 'Firebase/Analytics'
pod 'Firebase/RemoteConfig'
target 'MainAppTargetTests' do
inherit! :search_paths
end
end
target 'AppClipTarget' do
use_modular_headers!
pod 'Firebase/Analytics'
target 'AppClipTargetTests' do
inherit! :search_paths
end
target 'AppClipTargetUITests' do
end
end
I fixed this problem by adding another target in my podfile which pointed to the AppClip target
Ref: https://www.natashatherobot.com/cocoapods-installing-same-pod-multiple-targets/
YES, but NO at present (2020.7.15).
igor-makarov had commit an app clip support to master, now just wait for next CocoaPods release.
https://github.com/CocoaPods/CocoaPods/commit/3a5deed0adfa306307027753898cca5e23be14bd
I think the right way to do it is having another target (in my case I placed it outside the main one, because I only want a few pods).
However, Cocoapods needs to update something to export/setup everything right. Since App Clips were introduced recently, Cocoapods hasn't released a new stable version with the fix (https://github.com/CocoaPods/CocoaPods/pull/9882). So we just have to wait a bit, I guess. In the meantime, you can add the Embed Pods Frameworks manually and it will work fine.
Ref: https://developer.apple.com/forums/thread/652683?login=true
What worked for me is doing:
sudo gem install cocoapods --pre
Cocoapods latest stable release at the time of this post was not supporting the app clip target with cocoaPods.

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.

Resources