Cocoapods: Allow override iOS 8+ framework requirement for trunk

Created on 4 Mar 2015  路  4Comments  路  Source: CocoaPods/CocoaPods

From: https://github.com/Quick/Nimble/pull/102

Pushing a swift project that has a minimum deployment version of iOS less than 8 fails.

$ pod trunk push Nimble.podspec
 -> Nimble (0.3.1)
    - ERROR | [iOS] Swift support uses dynamic frameworks and is therefore only supported on iOS > 8.
    - NOTE  |  ld: warning: embedded dylibs/frameworks only run on iOS 8 or later

While Xcode produces this warning, it is perfectly fine running dynamic frameworks on older simulators. I'm fine with an opt-in flag since using iOS frameworks for production code less than iOS 8 results in a rejection. The primary value is to run swift testing-only frameworks on older deployment targets.

discussion

Most helpful comment

This worked for me:

s.platform = :ios, "9.0"

Added this on podspec file

All 4 comments

I am wondering if we should handle this special case via PRs against the Specs repo? Once we have a flag, there is no way to ensure that people aren't pushing their non-testing Pods to trunk as well with iOS 7 deployment targets. Another possibility would be allowing this for Pods which require the XCTest framework automatically.

We could potentially have a rule where this iOS 8 check in this case isn't used when validating a pod that has framework = 'XCTest'.

^ This is a nice touch @kylef

This worked for me:

s.platform = :ios, "9.0"

Added this on podspec file

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dawnnnnn picture dawnnnnn  路  3Comments

pronebird picture pronebird  路  3Comments

pallaviMN picture pallaviMN  路  3Comments

luhui picture luhui  路  3Comments

gerchicov-bp picture gerchicov-bp  路  3Comments