无法安装pod

时间:2017-05-23 10:09:06

标签: ios cocoapods podfile

我正在尝试安装一个pod。以下是我的Podfile(我的项目名称是NLP):

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

def pod_target
    pod 'Alamofire','~>4.4'
end

target 'NLP' do
    use_frameworks!
    pod_target
    pod 'KFSwiftImageLoader'
    pod 'FMDB'
    pod 'Fabric'
    pod 'Crashlytics'
    pod 'Charts'
    pod 'OpenSSL-Universal'
end

target 'SwaggerRolesAndPolicies' do
    use_frameworks!
    pod_target
end

target 'SwaggerUserProfile' do
    use_frameworks!
    pod_target
end

target 'SwaggerNextStudent' do
    use_frameworks!
    pod_target
end

target 'SwaggerLogin' do
    use_frameworks!
    pod_target
end

target 'SwaggerNextAttendance' do
    use_frameworks!
    pod_target
end

target 'SwaggerNextFee' do
    use_frameworks!
    pod_target
end

target 'SwaggerNextStaff' do
    use_frameworks!
    pod_target
end

当我尝试安装pod时发生以下情况:

Preparing

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-NLP`: (``)
  Using `ARCHS` setting to build architectures of target
  `Pods-SwaggerRolesAndPolicies`: (``)
  Using `ARCHS` setting to build architectures of target
  `Pods-SwaggerUserProfile`: (``)
  Using `ARCHS` setting to build architectures of target
  `Pods-SwaggerNextStudent`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-SwaggerLogin`:
  (``)
  Using `ARCHS` setting to build architectures of target
  `Pods-SwaggerNextAttendance`: (``)
  Using `ARCHS` setting to build architectures of target `Pods-SwaggerNextFee`:
  (``)
  Using `ARCHS` setting to build architectures of target
  `Pods-SwaggerNextStaff`: (``)

Finding Podfile changes
  A OpenSSL-Universal
  - Alamofire
  - Charts
  - Crashlytics
  - FMDB
  - Fabric
  - KFSwiftImageLoader

Resolving dependencies of `Podfile`

Comparing resolved specification to the sandbox manifest
  A OpenSSL-Universal
  - Alamofire
  - Charts
  - Crashlytics
  - FMDB
  - Fabric
  - KFSwiftImageLoader

Downloading dependencies

-> Using Alamofire (4.4.0)

-> Using Charts (3.0.1)

-> Using Crashlytics (3.8.4)

-> Using FMDB (2.6.2)

-> Using Fabric (1.6.11)

-> Using KFSwiftImageLoader (3.0.0)

-> Installing OpenSSL-Universal (1.0.2.10)
 > Git download
 > Git download
     $ /usr/bin/git clone https://github.com/krzyzanowskim/OpenSSL.git
     /var/folders/nz/8hrtwpzd5dj617b_38nqrw940000gn/T/d20170523-2509-vg335k
     --template= --single-branch --depth 1 --branch 1.0.2.10
     Cloning into '/var/folders/nz/8hrtwpzd5dj617b_38nqrw940000gn/T/d20170523-2509-vg335k'...

此时此刻令人震惊。可能是什么错误,我该如何解决?仅在添加OpenSSL-Universal pod时才会出现此错误。我的xcode版本是8.3.2。

1 个答案:

答案 0 :(得分:0)

在podfile的末尾添加以下代码。它可以解决这个问题。

post_install do |installer|
installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '3.0'
    end
end
end

谢谢..

相关问题