iOS troubleshooting

  1. Unable to find a specification for SCGateway
  2. Facing issue with other pods while installing SCGateway
  3. Unable to add a source with url https://cdn.cocoapods.org

1) After adding the SCGateway library in the Podfile, we are facing an issue: Unable to find a specification for SCGateway

  • Please ensure that the following pod source is always present in the Podfile:
source 'https://github.com/smallcase/cocoapodspecs.git'

Note: This source is mutually exclusive of any other podspec source available in your Podfile (example: https://cdn.cocoapods.org) and should not replace any existing podspec source.

2) After adding the podspec source of SCGateway, we are facing issues installing other libraries

  • Please ensure that the respective podspec source of the dependency is also added in the Podfile. For example, to install both razorpay-pod and SCGateway, the podfile should be similar to this:
# Uncomment the next line to define a global platform for your project
 platform :ios, '11.0'

# private source for SCGateway
source 'https://github.com/smallcase/cocoapodspecs.git'

# default source for all other pods
source 'https://cdn.cocoapods.org'

target 'Runner' do
  use_frameworks!

  pod 'razorpay-pod', '1.1.16'

  pod 'SCGateway' , '3.1.11'


  target 'RunnerTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'RunnerUITests' do
    inherit! :search_paths
    # Pods for testing
  end
  
end

Note: SCGateway library (and its source) is mutually exclusive of any other library (and its podspec source) available in your Podfile, adding the source of one library will not break the installation of another.

3) After adding the source https://cdn.cocoapods.org, we are getting an error: [!] Unable to add a source with url https://cdn.cocoapods.org named xyz

  • Since this is a CDN issue, please follow these steps in your terminal:
  1. remove the existing pod repo (with url: https:cdn.cocoapods.org) using your terminal.
pod repo remove xyz
  1. Add the alternate source https://github.com/CocoaPods/Specs.git in your Podfile.
# default source for all other pods
# source 'https://cdn.cocoapods.org'
source 'https://github.com/CocoaPods/Specs.git'

# private source for SCGateway
source 'https://github.com/smallcase/cocoapodspecs.git'

For more details, please refer to: https://github.com/CocoaPods/CocoaPods/issues/10078


Did this page help you?