Skip to content

pod spec lint fails after Cocoapods 1.0 update #5320

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
agyorev opened this issue May 13, 2016 · 23 comments
Closed
1 task done

pod spec lint fails after Cocoapods 1.0 update #5320

agyorev opened this issue May 13, 2016 · 23 comments
Labels
s1:awaiting input Waiting for input from the original author

Comments

@agyorev
Copy link

agyorev commented May 13, 2016

When I try to run pod spec lint on my project I get the following error:

- ERROR | [iOS] unknown: Encountered an unknown error (Simulator iPhone 4s is not available.) during validation.

Report

What did you do?

Ran pod spec lint, and also pod spec lint --use-libraries.

What did you expected to happen?

Pass the linter check.

What happened instead?

Failed with:

 - ERROR | [iOS] unknown: Encountered an unknown error (Simulator iPhone 4s is not available.) during validation.

Analyzed 1 podspec.

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

And I have the iPhone 4s Simulator on Xcode working just fine.

CocoaPods Environment

Stack

   CocoaPods : 1.0.0
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.11.4 (15E65)
       Xcode : 7.1 (7B85)
         Git : git version 2.6.1
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ bc7f14875ed082013473f9d284080ee90d76c097

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.0
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.0.0
cocoapods-try         : 1.0.0
@segiddins
Copy link
Member

@neonichu looks like a fourflusher issue?

@neonichu
Copy link
Member

What's the output of xcrun simctl list on your system?

@neonichu neonichu added the s1:awaiting input Waiting for input from the original author label May 14, 2016
@agyorev
Copy link
Author

agyorev commented May 14, 2016

== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad Pro (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
== Runtimes ==
iOS 7.1 (7.1 - 11D167) (com.apple.CoreSimulator.SimRuntime.iOS-7-1) (unavailable, failed to open liblaunch_sim.dylib)
iOS 9.1 (9.1 - 13B134) (com.apple.CoreSimulator.SimRuntime.iOS-9-1)
tvOS 9.0 (9.0 - 13T5379f) (com.apple.CoreSimulator.SimRuntime.tvOS-9-0)
watchOS 2.0 (2.0 - 13S343) (com.apple.CoreSimulator.SimRuntime.watchOS-2-0)
== Devices ==
-- iOS 7.1 --
-- iOS 9.1 --
-- tvOS 9.0 --
-- watchOS 2.0 --
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-3 --
    Simulator iPhone 4s (2EB9F873-0809-468C-8343-868ED046F843) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5s (66C7F166-3BD7-4958-AC81-A7555744DF4E) (Shutdown) (unavailable, runtime profile not found)
== Device Pairs ==

@agyorev
Copy link
Author

agyorev commented May 14, 2016

I tried deleting the two unavailable devices using xcrun simctl delete <device_id>, but it didn't give any results.

@neonichu
Copy link
Member

Can you also please share the spec you were linting or at least its platform information if you prefer to keep it private?

@neonichu
Copy link
Member

Oh wait, that list doesn't show any actually usable simulator devices. Curious that you still have any inside Xcode.

@agyorev
Copy link
Author

agyorev commented May 14, 2016

I looked at the output of xcode-select -p and it turned out it was pointing to a beta release version, so then I just did xcode-select --switch to the latest updated one, ran pod spec lint again and it worked.

@agyorev agyorev closed this as completed May 14, 2016
@ishaq
Copy link

ishaq commented May 29, 2016

  • I've read and understood the *CONTRIBUTING guidelines and have done my best effort to follow.

I am seeing the same issue:

- ERROR | [iOS] unknown: Encountered an unknown error (Simulator iPhone 4s is not available.

here's list of simulators:

➤ xcrun simctl list
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad Pro (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
== Runtimes ==
iOS 9.3 (9.3 - 13E230) (com.apple.CoreSimulator.SimRuntime.iOS-9-3)
tvOS 9.2 (9.2 - 13Y227) (com.apple.CoreSimulator.SimRuntime.tvOS-9-2)
watchOS 2.2 (2.2 - 13V143) (com.apple.CoreSimulator.SimRuntime.watchOS-2-2)
== Devices ==
-- iOS 9.3 --
    iPhone 4s iOS 9.3 (AD7A2A98-A75F-4309-9A7D-BF23863BD2D1) (Shutdown)
    iPhone 5 iOS 9.3 (F5891505-1AF4-4128-B3D2-050D8FFB1C92) (Shutdown)
    iPhone 5s iOS 9.3 (6862DBC7-879C-4AB4-9929-FA6892375A84) (Shutdown)
    iPhone 6 iOS 9.3 (4A6192D9-A8C3-46D5-A313-AB5DC2D0D87A) (Shutdown)
    iPhone 6 Plus iOS 9.3 (91EF04EE-2076-469D-87C5-8E82CEC66526) (Shutdown)
    iPhone 6s iOS 9.3 (CFE81565-75AC-4411-AC25-F2B12E8713A3) (Shutdown)
    iPhone 6s Plus iOS 9.3 (05CFFDBB-9087-48CC-88F9-58D90827CA3E) (Shutdown)
    iPad 2 iOS 9.3 (49A53380-7F29-4327-813D-F4C63B5B57AA) (Shutdown)
    iPad Retina iOS 9.3 (0B0B6723-133B-413A-A261-37EF295D1458) (Shutdown)
    iPad Air iOS 9.3 (D6752EC8-AE8A-4868-8A99-2B3209C02E5D) (Shutdown)
    iPad Air 2 iOS 9.3 (9D9654AE-D2F4-4A8D-BABB-43E0D0B51E46) (Shutdown)
    iPad Pro iOS 9.3 (E0603AD6-FA4A-43C4-BB79-39D7DD9B97DC) (Shutdown)
-- tvOS 9.2 --
    Apple TV 1080p tvOS 9.2 (963639ED-5166-41E7-8163-551C985DC71E) (Shutdown)
-- watchOS 2.2 --
    Apple Watch - 38mm watchOS 2.2 (D169F50B-3AC9-4621-9FDA-8C2E4AE9472C) (Shutdown)
    Apple Watch - 42mm watchOS 2.2 (FF550E59-5888-41A7-9597-9FDCBA05F582) (Shutdown)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-0 --
    iPhone 6 (9B37E0DB-F49D-4CEF-8F46-FE7F4553F12D) (Creating) (unavailable, runtime profile not found)
    iPhone 6 Plus (70609CBD-72A6-4345-971A-E1BECE66BF2B) (Creating) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-9-1 --
    iPhone 6s (BC05BF59-22EC-4656-AB13-61E4159ED877) (Creating) (unavailable, runtime profile not found)
    iPhone 6s Plus (8F891455-025D-4DB9-BE54-86546D2FE4DE) (Creating) (unavailable, runtime profile not found)
-- Unavailable: com.apple.CoreSimulator.SimRuntime.watchOS-2-1 --
    Apple Watch - 38mm (0934A77A-CF28-43B6-BCB6-9295BB2E798A) (Creating) (unavailable, runtime profile not found)
    Apple Watch - 42mm (10D635E9-D169-425A-B56D-55A30DF47E80) (Creating) (unavailable, runtime profile not found)
== Device Pairs ==

xcode-select points to correct path (Xcode 7.3.1)

Here's the podspec

#
# Be sure to run `pod lib lint SimplePDF.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 http://guides.cocoapods.org/syntax/podspec.html
#

Pod::Spec.new do |s|
  s.name             = "SimplePDFSwift"
  s.version          = "0.2.0"
  s.summary          = "A Swift class to help generate simple PDF documents with page numbers and Table of Contents."

# 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
SimplePDF is a Swift class to create PDF documents with page numbers and table of contents. SimplePDF generated document may have:

* Headings (H1 - H6) and Body Text.
* Images (with captions), multiple images per row.
* Multi column text (can be used for borderless tables too)
* UIView instances (good for cover pages, etc)
* Any attributed string
DESC

  s.homepage         = "https://github.com/ishaq/SimplePDF"
  # s.screenshots     = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
  s.license          = 'MIT'
  s.author           = { "Muhammad Ishaq" => "ishaq@involution.co" }
  s.source           = { :git => "https://github.com/ishaq/SimplePDF.git", :tag => s.version.to_s }
  # s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'

  s.platform     = :ios, '8.0'
  s.requires_arc = true

  s.source_files = 'Pod/Classes/**/*'
  # s.resource_bundles = {
  #   'SimplePDF' => ['Pod/Assets/*.png']
  # }

  # s.public_header_files = 'Pod/Classes/**/*.h'
  # s.frameworks = 'UIKit', 'MapKit'
  # s.dependency 'AFNetworking', '~> 2.3'
end

Sorry, something went wrong.

@neonichu
Copy link
Member

neonichu commented May 30, 2016

@ishaq which version of Xcode are you using to get that output? The issue is that your simulator is called "iPhone 4s iOS 9.3" whereas CocoaPods is looking for one which is called "iPhone 4s" (default naming of Xcode 6.x and 7.x).

@ishaq
Copy link

ishaq commented May 30, 2016

Thank you @neonichu, I am using Xcode 7.3.1 but I was using simulator_populator script. I have changed it to produce default naming and it now works.

I am sorry for raising false alarm, when I couldn't find a solution through google, I thought may be it was a bug in CocoaPods. Sincere apologies.

@soffes
Copy link

soffes commented Jun 3, 2016

I ran into this issue. I didn't have a TV simulator. Added one and then it worked.

@zats
Copy link

zats commented Jul 5, 2016

I ran into the same problem with Xcode 7.3.1 (xcode-select points to it, too).
I actually removed bunch of unused devices a while ago.
I can confirm that adding iPhone 4S simulator in Xcode → Devices resolves the problem
Not sure why does spec lint rely on that particular simulator though.
Would be happy to provide more info on my particular setup if needed

@orta
Copy link
Member

orta commented Jul 5, 2016

Not sure why does spec lint rely on that particular simulator though.

This got fixed in master, it'll now determine the lowest supported sim in the next release

@lfarah
Copy link

lfarah commented Sep 15, 2016

Getting the same error for Xcode 8

@gabriel
Copy link

gabriel commented Sep 17, 2016

re: Xcode 8, I updated to 1.1.0.rc.2 and problem went away.

@arasmussen
Copy link

This worked for me (with Xcode 8)

  1. Install the Cocoapods release candidate.

    sudo gem install cocoapods --pre

  2. Use it when running spec lint

    pod _1.1.0.rc.2_ spec lint

@adriano-s
Copy link

adriano-s commented Oct 18, 2016

I ran into the same issue with XCode 8. I installed 1.1.0.rc.3 and it still did not work. Then I uninstalled all older cocoapod versions with sudo gem uninstall cocoapods and then it worked again.

@crspybits
Copy link

I installed 1.1.1 (from 1.0.1) and this issue was fixed for me.

@ShixinPeng
Copy link

I ran into the same issue used XCode 8.1 ,I download iOS 8.1 develop doucment and set up a Simulator iPhone 4s in my XCode simulator device ,ran "pod lib lint" it worked .
fix article

@khaledannajar
Copy link

I had two versions of Xcode 7.3 and 8. it was using 7.3.

I just used sudo xcode-select --switch /Applications/Xcode.app to make the default Xcode 8 and it worked

@Anilkumarkotur
Copy link

make sure ua simulator and xcode is closed

@JaredHalpern
Copy link

I've seen this issue before:
-El Capitan
-XCode 8.2.1
-Cocoapods 1.0.2

The solution was to run sudo gem install cocoapods and update to 1.2.0.

@coooliang
Copy link

xcode-->preferences(command+,)-->locations-->Command Line Tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s1:awaiting input Waiting for input from the original author
Projects
None yet
Development

No branches or pull requests