Closed Lo4D closed 6 months ago
Hello, @Lo4D
Can you share your Podfile file?
Yeah, sure
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
flutter_additional_ios_build_settings(target)
end
end
I've added this line source 'https://github.com/CocoaPods/Specs.git'
as a test. I get the same response with or without it.
The same goes for this fragment too :
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
Hello @Lo4D. It seems your file is missing the CAS pods source.
Try adding the following line to the beginning of the Podfile.
source 'https://github.com/cleveradssolutions/CAS-Specs.git'
Also, in your target 'Runner' do
section change:
use_frameworks!
with
use_frameworks! :linkage => :static
and add the Pods you need, for instance:
$casVersion = '~>3.5.0'
pod 'CleverAdsSolutions-Base', $casVersion
pod 'CleverAdsSolutions-SDK/Optimal', $casVersion
Refer to the guide here https://github.com/cleveradssolutions/CAS-iOS/wiki to see how to configure the Podfile according to your needs :)
@Str4tos , @piannelli I got it working. Thanks for your help. Don't know how, but I missed this guide https://github.com/cleveradssolutions/CAS-iOS/wiki
For anyone wondering my podfile looks like that now :
source 'https://cdn.cocoapods.org/'
source 'https://github.com/cleveradssolutions/CAS-Specs.git'
platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks! :linkage => :static
use_modular_headers!
$casVersion = '~> 3.5.0'
pod 'CleverAdsSolutions-SDK/Optimal', $casVersion
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
I've added
clever_ads_solutions: ^0.2.1
to mypubspec.yaml
, got the packages and changed minimum deployment target to13.0
. But when I try topod install --repo-update
I get this error:[!] Unable to find a specification for "CleverAdsSolutions-Base (~> 3.5.0)" depended upon by "clever_ads_solutions"
My
gem -v
is3.4.22
andpod --version
is1.14.3