运行Pod更新更改Pods生成设置

当我跑步

pod upate

针对我的Podfile某些Pods项目的架构部分的“生成设置”部分已更改:

  • 支持的平台更改为OS X(从iOS开始)
  • 构建主动架构仅更改为是(从否)
  • 基础SDK从最新的iOS更改为无SDK(最新的OS X)
  • 我不知道它为什么会改变这一点。 它可能是我的(或没有)在我的podspec文件中为我的依赖? 以下是我的一个podspec文件的示例:

    Pod::Spec.new do |spec|
      spec.name                  = 'pi-ios-sdk'
      spec.version               = '1.2.0'
      spec.license               = { :type => 'Copyright', :text => 'Copyright 2014 <...>. All rights reserved.' }
      spec.homepage              = 'http://<...>.com/'
      spec.authors               = '<...> Grid Mobile Frameworks Team'
      spec.summary               = '<...> Identity authentication GRID projects.'
      spec.description           = 'The <...> Identity Client iOS SDK framework (Pi-ios-client) assists in accessing the services provided by the <...> Identity API.'
      spec.ios.deployment_target = '7.1'
      spec.requires_arc          = true
      spec.source                = { :git => 'ssh://git@devops-tools.<...>.com/mp/pi-ios-sdk.git', :tag => 'tag/1.2.0' }
      spec.source_files          = 'framework/src/xcode/Pi-ios-client/*.{h,m}'
      spec.header_dir            = 'Pi-ios-client'
      spec.exclude_files         = 'framework/src/xcode/Pi-ios-client/PGMPiTokenRefreshOperationTests.m'
      spec.ios.frameworks        = 'Foundation', 'UIKit'
    end
    

    而我的Podfile:

    platform :ios, "7.1"
    
    target "CourseListClient" do
      pod 'core-ios-sdk', '1.2.0'
      pod 'pi-ios-sdk', '1.2.0'
      pod 'classroom-ios-library', '0.1.0-SNAPSHOT'
    end
    
    target "CourseListClientTests" do
      pod 'core-ios-sdk', '1.2.0'
      pod 'pi-ios-sdk', '1.2.0'
      pod 'classroom-ios-library', '0.1.0-SNAPSHOT'
    end
    

    我在想 - 为测试目标设置这些相同的依赖关系可能是不必要的,但我还需要更改哪些内容? 谢谢。


    将其添加到Podfile的末尾:

    post_install do |installer_representation|
        projectSDK = nil
    
        puts"Updating all of the POD targets to not default to ONLY_ACTIVE_ARCH for debug"
        installer_representation.project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
                if projectSDK.nil?
                    projectSDK = config.build_settings['SDKROOT']
                end
            end
        end
        puts "Updating ONLY_ACTIVE_ARCH for the project, as well. While the project settings aren't supposed to matter, I've not found that to be the case."
        puts "Also setting the base SDK of the project to match that of the targets (doesn't matter which one); otherwise it defaults to No SDK (Latest OS X)"
        installer_representation.project.build_configurations.each do |config|
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
            config.build_settings['SDKROOT'] = projectSDK
        end
    end
    

    来源:支持的平台,基础SDK,仅在pod更新后恢复活动架构设置

    如果您使用的是最新的gem(gem install cocoapods --pre),请将上面的2“.project”替换为“.pods_project”

    问候

    链接地址: http://www.djcxy.com/p/23063.html

    上一篇: Running pod update changes Pods build settings

    下一篇: Custom PMD rule with Gradle