Cocoapods: ERROR | [iOS] unknown: Encountered an unknown error (Pod::DSLError /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:724:in `rescue in _eval_podspec'

Created on 21 Sep 2018  Â·  13Comments  Â·  Source: CocoaPods/CocoaPods

ℹ I'm trying to update my pod but i encountered this error

ERROR | [iOS] unknown: Encountered an unknown error (Pod::DSLError
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:724:in `rescue in _eval_podspec'

What did you do?

ℹ Run pod trunk push iOS_Bootstrap.podspec --verbose --allow-warnings

What did you expect to happen?

ℹ Expected the pod to be updated with a success message indicating the new version in the terminal.

What happened instead?

ℹ Update failed with this stack trace

-> iOS_Bootstrap (0.4.8)
    - ERROR | [iOS] unknown: Encountered an unknown error (Pod::DSLError
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:724:in `rescue in _eval_podspec'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:715:in `_eval_podspec'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:625:in `block in from_string'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:622:in `chdir'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:622:in `from_string'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.5.3/lib/cocoapods-core/specification.rb:605:in `from_file'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/podspec_finder.rb:15:in `block in podspecs'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/podspec_finder.rb:14:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/podspec_finder.rb:14:in `podspecs'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader.rb:82:in `download_request'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader/cache.rb:171:in `download'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader/cache.rb:154:in `block in uncached_pod'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader/cache.rb:181:in `in_tmpdir'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader/cache.rb:153:in `uncached_pod'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader.rb:42:in `download'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:121:in `download_source'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:60:in `install!'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:374:in `install_source_of_pod'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:339:in `block (2 levels) in install_pod_sources'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:85:in `titled_section'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:338:in `block in install_pod_sources'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `install_pod_sources'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:164:in `block in download_dependencies'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:162:in `download_dependencies'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:472:in `block in download_pod'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:472:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:472:in `download_pod'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:318:in `block in perform_extensive_analysis'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:312:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:312:in `perform_extensive_analysis'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/validator.rb:87:in `validate'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-trunk-1.3.0/lib/pod/command/trunk/push.rb:125:in `validate_podspec'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-trunk-1.3.0/lib/pod/command/trunk/push.rb:68:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
) during validation.

[!] The spec did not pass validation, due to 1 error.

/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-trunk-1.3.0/lib/pod/command/trunk/push.rb:127:in `validate_podspec'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-trunk-1.3.0/lib/pod/command/trunk/push.rb:68:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

ℹ Here is my podspecs file

#
# Be sure to run `pod lib lint iOS_Bootstrap.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
    s.name             = 'iOS_Bootstrap'
    s.version          = '0.4.8'
    s.summary          = 'iOS Bootstrap library'

    # This description is used to generate tags and improve search results.
    #   * Think: What does it do? Why did you write it? What is the focus?
    #   * Try to keep it short, snappy and to the point.
    #   * Write the description between the DESC delimiters below.
    #   * Finally, don't worry about the indent, CocoaPods strips it!

    s.description      = <<-DESC
    TODO: Add long description of the pod here.
    DESC

    s.homepage         = 'https://github.com/ahmadmssm/iOS_Bootstrap'
    # s.screenshots     = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
    s.license          = { :type => 'MIT', :file => 'LICENSE' }
    s.author           = { 'Ahmad Mahmoud Saleh' => '[email protected]' }
    s.source           = { :git => 'https://github.com/ahmadmssm/iOS_Bootstrap.git', :tag => s.version.to_s }

    s.ios.deployment_target = '9.1'
    s.swift_version = '4.0'
    s.source_files = 'iOS_Bootstrap/Classes/**/*'


    # s.ios.xcconfig = {'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES'}

    # s.resource_bundles = {
    #   'iOS_Bootstrap' => ['iOS_Bootstrap/Assets/*.png']
    # }

    # s.pod_target_xcconfig = { 'SWIFT_WHOLE_MODULE_OPTIMIZATION' => 'YES',
    # 'APPLICATION_EXTENSION_API_ONLY' => 'YES', 'DEFINES_MODULE' => 'YES' }

    s.dependency 'Moya/RxSwift'
    s.dependency 'HandyJSON'
    s.dependency 'IQKeyboardManagerSwift'
    s.dependency 'Kingfisher', '4.9.0'
    s.dependency 'SCLAlertView'
    # s.dependency 'SNSSocial', '~> 2.0'
    #
    s.frameworks = 'Foundation'

    #s.subspec 'Facebook' do |facebook|
    #     facebook.source_files = 'iOS_Bootstrap/Classes/Managers/SocialMediaManager/**/*'
    #    facebook.ios.dependency     'FBSDKCoreKit',   '~> 4.22'
    #   facebook.ios.dependency     'FBSDKShareKit',  '~> 4.22'
    #  facebook.ios.dependency 'FBSDKLoginKit', '~> 4.22'
    # end

    #s.subspec 'Twitter' do |twitter|
    #       twitter.source_files = 'iOS_Bootstrap/Classes/Managers/SocialMediaManager/**/*'
    #       twitter.dependency 'STTwitter', '0.2.5'
    #   end

    # s.subspec 'Firebase' do |firebase|
    #       firebase.source_files = 'iOS_Bootstrap/Classes/Managers/PushNotificationManager/**/*'
    #       firebase.dependency 'Firebase/Core'
    #       firebase.dependency 'Firebase/Messaging'
    #   end

end

All 13 comments

On tag 0.4.8 you have a typo: https://github.com/ahmadmssm/iOS_Bootstrap/blob/0.4.8/iOS_Bootstrap.podspec#L47

Replace the backtick ` with '

@dnkoutso Which one, i can not see it, but thanks for your help

Its highlighted in the link:

s.dependency 'Kingfisher', ‘4.9.0'

spec lint will clone your repo at the tag 0.4.8 so you have to fix it and re-tag.

I did the update with a new tag but still getting the same error

did you push the tag? I am sorry so far this does not seem to be a CocoaPods issue.

I got it further:

    ** BUILD FAILED **


    The following build commands failed:
        CompileSwift normal x86_64
        CompileSwift normal i386
        CompileSwift normal x86_64
        CompileSwift normal i386
        CompileSwift normal x86_64
        CompileSwift normal i386
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
        CompileSwift normal x86_64
        CompileSwift normal i386
    (9 failures)
   Testing with `xcodebuild`. 
 -> iOS_Bootstrap (0.4.8)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  note: Using build description '9310a5b7611b675f1870854286396555'
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file. (in target 'App')
    - NOTE  | [iOS] xcodebuild:  note: Using eager compilation
    - NOTE  | [iOS] xcodebuild:  note: build debugging is enabled, trace file: '/Users/dimitris/Library/Developer/Xcode/DerivedData/App-avgaagsaubqyglcnlizliwkkesvz/Build/Intermediates.noindex/XCBuildData/buildDebugging-559246496.432078/build.trace'
    - NOTE  | [iOS] xcodebuild:  note: build debugging is enabled, current manifest: '/Users/dimitris/Library/Developer/Xcode/DerivedData/App-avgaagsaubqyglcnlizliwkkesvz/Build/Intermediates.noindex/XCBuildData/buildDebugging-559246496.432078/current-manifest.xcbuild'
    - NOTE  | [iOS] xcodebuild:  note: build debugging is enabled, current serialized description: '/Users/dimitris/Library/Developer/Xcode/DerivedData/App-avgaagsaubqyglcnlizliwkkesvz/Build/Intermediates.noindex/XCBuildData/buildDebugging-559246496.432078/current-desc.xcbuild'
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/BuiltInBasicType.swift:183:11: error: 'ImplicitlyUnwrappedOptional' has been renamed to 'Optional'
    - NOTE  | [iOS] xcodebuild:  Swift.ImplicitlyUnwrappedOptional:2:18: note: 'ImplicitlyUnwrappedOptional' has been explicitly marked unavailable here
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/BuiltInBasicType.swift:185:49: error: reference to generic type 'ImplicitlyUnwrappedOptional' requires arguments in <...>
    - NOTE  | [iOS] xcodebuild:  Swift.ImplicitlyUnwrappedOptional:2:18: note: generic type 'ImplicitlyUnwrappedOptional' declared here
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/BuiltInBasicType.swift:186:25: error: use of unresolved identifier 'Wrapped'
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/BuiltInBasicType.swift:188:42: error: use of undeclared type 'Wrapped'
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/BuiltInBasicType.swift:199:24: error: use of unresolved identifier '_getWrappedValue'
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/HelpingMapper.swift:204:13: error: invalid redeclaration of '<--'
    - NOTE  | [iOS] xcodebuild:  HandyJSON/Source/HelpingMapper.swift:179:13: note: '<--' previously declared here
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/HelpingMapper.swift:208:13: error: invalid redeclaration of '<--'
    - NOTE  | [iOS] xcodebuild:  HandyJSON/Source/HelpingMapper.swift:183:13: note: '<--' previously declared here
    - ERROR | [iOS] xcodebuild:  HandyJSON/Source/HelpingMapper.swift:213:13: error: invalid redeclaration of '<--'
    - NOTE  | [iOS] xcodebuild:  HandyJSON/Source/HelpingMapper.swift:188:13: note: '<--' previously declared here

This was with Xcode 10 so maybe this is why I got all these errors.

Either way I recommend asking StackOverflow under cocoapods tag. This still does not appear to be a CocoaPods library issue.

Yes, i pushed the new tag, anyway, thank you very very much for your help

@dnkoutso
Sorry but i'm getting different error now , can you help me with this error !

 - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
    - NOTE  | xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)

This seems like a linker issue use --no-clean and open the workspace to inspect it.

after i used no clean i get this

 Testing with `xcodebuild`. 
 -> iOS_Bootstrap (0.5.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
    - NOTE  | xcodebuild:  clang: error: linker command failed with exit code 1 (use -v to see invocation)

Pods workspace available at `/var/folders/ln/b_zq85ds1jlbmwm14f3_htrr0000gn/T/CocoaPods-Lint-20180921-24569-1wl9sqx-iOS_Bootstrap/App.xcworkspace` for inspection.

[!] iOS_Bootstrap did not pass validation, due to 1 error.

/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:85:in `block in run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:54:in `each'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command/lib/lint.rb:54:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

open /var/folders/ln/b_zq85ds1jlbmwm14f3_htrr0000gn/T/CocoaPods-Lint-20180921-24569-1wl9sqx-iOS_Bootstrap/App.xcworkspace

then ??!!

Hey there, @ahmadmssm this issue has turned into looks like a great example of a question that you should ask on StackOverflow - there is an active tag CocoaPods where people can help out with questions like this.

We try to keep the CocoaPods issues focused only on bug reports for the tool, and for upcoming feature requests. Which this doesn't look like.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gerchicov-bp picture gerchicov-bp  Â·  3Comments

soleares picture soleares  Â·  3Comments

tlandsmancars picture tlandsmancars  Â·  3Comments

marzapower picture marzapower  Â·  3Comments

dawnnnnn picture dawnnnnn  Â·  3Comments