2014-10-07 18 views
7

Quando eseguoEsecuzione aggiornamento pod cambia Pods costruire impostazioni

pod upate 

contro i miei Podfile alcune impostazioni di generazione per la sezione Architetture per il progetto baccelli sono cambiati:

  1. Piattaforme modifiche supportate da OS X (da iOS) cambia solo
  2. Costruire architetture attivi su Sì (da No)
  3. modifiche SDK Base a No SDK (ultimo OS X) da ultimo iOS

Non so perché lo sta cambiando. Potrebbe essere qualcosa che sto avendo (o non avendo) nel mio file podspec per le mie dipendenze? Ecco un esempio di uno dei miei file 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://[email protected]<...>.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 

E il mio 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 

sto pensando - vista quelle stesse dipendenze per target di test è probabilmente inutile, ma che altro posso bisogno di cambiare? Grazie.

risposta

3

aggiungere questo alla fine della vostra 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 

fonte: Supported platforms, base SDK, build active architecture only settings reverted after pod update

se si utilizza l'ultima gemma (gem install cocoapods --pre), sostituire la ".project" 2 in alto da ".pods_project"

saluti

Problemi correlati