0

I've got a library that I'm trying to push to CocoaPods trunk, but it won't lint against the iOS 7 SDK, because it contains iOS 8 API calls.

Changing the podspec's version to 8.0 does nothing, and the linter tries to build against 7.1, which fails. How can I change the cocoapods linter to lint against iOS 8 beta?

Edit

I run the pod trunk push my.podspec command with the --verbose option and see this in the log:

=== BUILD TARGET Pods-MBPlacePickerController OF PROJECT Pods WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies iOS deployment target '8.0' for architecture 'arm64' and variant 'normal' is greater than > the maximum value '7.1.99' for the iOS 7.1 SDK.

Here's my podspec:

Pod::Spec.new do |s|

  s.name         = "MBPlacePickerController"
  s.version      = "2.2.2"
  s.summary      = "An open source place picker for iOS."
  s.description  = <<-DESC
    A view controller for picking a location. I wrote it to be a simple wrapper around automatic location detection, but also to offer manual location selection in case GPS isn't available.
                   DESC
  s.homepage     = "https://github.com/MosheBerman/MBPlacePickerController"
  s.screenshots  = "https://raw.github.com/MosheBerman/MBPlacePickerController/master/screens/2.2.0/Readme/Default-Dark.png"
  s.author       = { "Moshe Berman" => "moshberm@gmail.com" }
  s.license      = 'MIT'
  s.platform     = :ios, '8.0'
  s.source       = { :git => "https://github.com/MosheBerman/MBPlacePickerController.git", :tag => "2.2.2"} 
  s.source_files  = 'Classes', 'MBPlacePickerController/MBPlacePickerController/**/*.{h,m}'
  s.frameworks = 'QuartzCore'
  s.weak_framework = 'CoreLocation'
  s.requires_arc = true
end
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Moshe
  • 57,511
  • 78
  • 272
  • 425
  • I'm trying to figure out the proper description for [tag:xcode-tools]. I know what the command line tools are, but I'm not sure if that's why you created the tag. Did you intend the [Xcode Command Line Tools](http://developer.apple.com/library/ios/technotes/tn2339/_index.html), or were you referring to [Xcode-Build](http://stackoverflow.com/questions/tagged/xcodebuild)? Or was it something else? – jww Aug 13 '14 at 10:24
  • I meant the command line tools. – Moshe Aug 13 '14 at 16:07

1 Answers1

2

You will want to include the following line in the pod spec:

s.platform = :ios, '8.0'

8.0 refers to the deployment target, so only if the deployment target is iOS 8.0 can other developers use your library through CocoaPods.

Also, since iOS 8.0 is still in beta and Xcode 6 is therefore too, you will want to run the following command:

sudo xcode-select --switch /Applications/Xcode6-Beta5.app/Contents/Developer
Scott Berrevoets
  • 16,921
  • 6
  • 59
  • 80
  • I do include that line, but cocoapods insists in linting against iOS 7.1. – Moshe Aug 10 '14 at 01:37
  • 1
    @Moshe: Is it possible the linter can't find 8.0 because it uses Xcode 5.1.1? Maybe try `sudo xcode-select --switch /Applications/Xcode6-Beta5.app/Contents/Developer`? – Scott Berrevoets Aug 10 '14 at 02:06
  • So that solved the build problem, but my podspec is still not ready for prime time. Will report back shortly. – Moshe Aug 10 '14 at 02:14
  • Your comment was the correct answer. If you edit the answer to include it, I will give you the check. – Moshe Aug 10 '14 at 02:21
  • Checked. The library, in case you're interested: https://github.com/MosheBerman/MBPlacePickerController – Moshe Aug 10 '14 at 03:07