Cocoapods curl: (22) The requested URL returned error: 403 Forbidden - cocoapods

I am facing an issue when trying to get the "SpotX" dependency from Cocoapods that only affects a particular computer. I have tried it on my personal MacBook Pro and it works. However, my Mac Mini is failing.
The Podfile looks like that:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Demo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Demo
pod 'SpotX-SDK'
pod 'SuperAwesome', '7.2.13'
pod 'SpotX-SDK-AVPlayer'
target 'DemoTests' do
inherit! :search_paths
# Pods for testing
end
target 'DemoUITests' do
# Pods for testing
end
end
target 'DemoTV' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for DemoTV
pod 'SpotX-SDK-AVPlayer'
target 'DemoTVTests' do
inherit! :search_paths
# Pods for testing
end
target 'DemoTVUITests' do
# Pods for testing
end
end
According to Here, the version is available
The error message given is:
The weird part is that is working on other computers with the same Xcode version...
Any ideas?
DATA:
git version 2.24.3 (Apple Git-128)
Cocoapods version = 1.10.1

Make sure you have access to the url of the cocoapod zip file (try it opening it on your browser)
In my case it was a VPN issue, i had to disable VPN to have access to the url, then i tried pod install again and it worked

I also got the same error. Then I referred release notes of Spot SDK here and updated my podfile accordingly with 4.10.0.
Then tried pod install again and it worked.

Related

after pod installing , Xcode build is not working

my Podfile is
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MyApp' do
# Comment the next line if you don't want to use dynamic frameworks
# use_frameworks!
# Pods for MyApp
pod 'TensorFlowLiteObjC'
end
right after install pod file by commanding
arch -x86_64 pod install
then build keep failed saying
diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
I did many things that on web says...delete pods file...clean .... I did almost everything but no worth it.
it just happened when install pod.
m1 Mac

How to fix "The target [...] is declared multiple times" after pod install?

Working on a react-native(version 0.59.5) project, just installed cocoapods(version 1.7.5)
Installation process:
(from within project directory)
-sudo gem install cocoapods
(from within iOS directory of project)
-pod init
-pod install --repo-update
Result:
Analyzing Dependencies
[!] The Target 'ProjectName-tvOSTests' is declared multiple times.
then tried pod update which resulted in the same 'Analyzing Dependencies' warning. There is only a Podfile and a 'Pods' directory in iOS directory. the pods directory has three sub-directories which are all empty. It seems there was a hangup during pod install but I don't know where to look for the duplicate declaration.
I'm aware you should be working from within the ProjectName.xcworkspace file after a installing cocoapods, but there is no .xcworkspace file in my iOS directory of project. How do I fix this?
EDIT:
Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'TicTacWHOA' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TicTacWHOA
pod 'Google-Mobile-Ads-SDK'
target 'TicTacWHOA-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'TicTacWHOATests' do
inherit! :search_paths
# Pods for testing
pod 'Google-Mobile-Ads-SDK'
end
end
target 'TicTacWHOA-tvOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for TicTacWHOA-tvOS
target 'TicTacWHOA-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
The issue was that the "Target" was literally declared twice in the Podfile. so simple and right in front of your face potentially. I Just didn't think anything of it because it was a completely generated file except the one line I added.
All you need to do is go to podfile and look for the code in the error
for example my error was
[!] The target fifty-tvOSTests is declared multiple times.
now i have deleted this piece of code from the podfile once.
target 'fifty-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
fifty is the name of my project you know well what is yours
the above piece of code was twice in the Podfile so delete if you find multiple just keep only once

Adding Mongodb to ios project

I am currently adding monogodb to my ios project. Just after following the instruction stitch mongodb offered, I am stuck at when pod installing StitchCoreSDK. It supposed to create a xcworkspace file, but it didn't. Instead, I got the following message.
enter image description here
The podfile I create is like following
# Uncomment the next line to define a global platform for your project
platform :ios, '11.4'
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'paotuaniOS' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
# Pods for paotuaniOS
pod 'Nexmo-Stitch'
pod 'StitchSDK', '~> 4.0.5'
target 'paotuaniOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'paotuaniOSUITests' do
inherit! :search_paths
# Pods for testing
end
end
Can any one help me with this issue?
Thanks!!!
I had this issue before. The repo had problems. The repo has been updated. Please use
pod 'StitchSDK', '~> 4.1.1'

Can't import Web3. swift in Xcode project

Hey I was able to instal the web3swift pod using pod install but afterwards I can't import it in the project, so I can't start using it. Any tips?
Here is the Podfile code
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Hello' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'web3swift', '~> 0.8.0'
# Pods for Hello
target 'HelloTests' do
inherit! :search_paths
# Pods for testing
end
target 'HelloUITests' do
inherit! :search_paths
# Pods for testing
end
end
Here is what my Xcode looks like
I have managed to fix it myself, deleted everything, started from scratch. Then I have build the project and somehow everything works now..

Xcode can't find a module, after updating

I've recently updated my Xcode, but I faced with strange issue.
I'm installing library via cocoapods and use it further in my project, but after updating I Xcode can't find the module, I've installed via CocoaPods
I've updating pods, but the problem stays.
Also I have Pods.framework red
What is the problem?
Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'Bloom' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Bloom
target 'BloomTests' do
inherit! :search_paths
# Pods for testing
end
target 'BloomUITests' do
inherit! :search_paths
# Pods for testing
end
end
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Gifu'
UPD: Solved it by opening the project with the .xcworkspace file not with .xcodeproj.
Do the following things and you can import any swift file from "Pods"
Clean your project
Make sure that all your "Pods" > "Build Settings" > "Build Active Architecture Only" is set to "NO".
Don't run, just build your project.
Now, import any file from "Pods" to any swift file
This will solve your import module problem.
Update:
To solve this issue delete the current pod file and create one using the terminal. Follow the below steps:
1) Open Terminal.
2) Navigate to your Project Path.
3) Type pod init in terminal to create new pod file.
4) Open the newly created pod file and write the pod line which you want to install after target "TargetName" do and before end.
5) Then type pod install in the terminal.
Hope this helps!
I had to delete my podfile and ALL the files it made including the .workspace file then I did:
pod init
open -a Xcode Podfile
add pods I want to podfile then save and close xcode.
Finally do pod install and open the new workspace file :)
change your pod file like this and clean the project quit xcode and reopen it.it may solve the problem
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Comment this line if you're not using Swift and don't want to use
dynamic frameworks
use_frameworks!
target 'Bloom' do
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'Gifu'
end
target 'BloomTests' do
inherit! :search_paths
# Pods for testing
end
target 'BloomUITests' do
inherit! :search_paths
# Pods for testing
end
Some frameworks in cocoapods declare a hard-link to XCode in the module description file (XMPP for example). So, be sure that you have:
place XCode.app in /Application (default folder), with name
"XCode.app", not Xcode-beta.app
or/and
call xcode-select to specify the right XCode.app:
sudo xcode-select --switch /Applications/Xcode.app
I had the same issue after I tried to merge a branch using Xcode (never again!).
What finally worked for me was:
Deleting derved data
Cleaning project
Exiting Xcode
Running 'pod install' again in my project

Resources