lib/cocoapods/installer/analyzer.rb
# Creates the models that represent the libraries generated by CocoaPods.
#
# @note   The libraries are generated before the resolution process
#         because it might be necessary to infer the platform from the
#         user targets, which in turns requires to identify the user
#         project.
#
# @note   The specification of the libraries are added in the
#         {#resolve_dependencies} step.
#
# @return [Array<Libraries>] the generated libraries.
#
Creates the models that represent the libraries generated by CocoaPods.
Creates the models that represent the libraries generated by CocoaPods .
def generated_libraries
        libraries = []
        podfile.target_definitions.values.each do |target_definition|
          lib                           = Library.new(target_definition)
          lib.support_files_root        = sandbox.library_support_files_dir(lib.name)
          if config.integrate_targets?
            project_path = compute_user_project_path(target_definition)
            user_project = Xcodeproj::Project.new(project_path)
            targets = compute_user_project_targets(target_definition, user_project)
            lib.user_project_path         = project_path
            lib.user_target_uuids         = targets.map(&:uuid)
            lib.user_build_configurations = compute_user_build_configurations(target_definition, targets)
            lib.platform                  = compute_platform_for_target_definition(target_definition, targets)
          else
            unless target_definition.platform
              raise Informative, "It is necessary to specify the platform in the Podfile if not integrating."
            end
            lib.user_project_path         = config.installation_root
            lib.user_target_uuids         = []
            lib.user_build_configurations = {}
            lib.platform                  = target_definition.platform
          end
          libraries << lib
        end
        libraries
      end
def generated_libraries libraries = [ ] podfile . target_definitions . values . each do | target_definition | lib = Library . new ( target_definition ) lib . support_files_root = sandbox . library_support_files_dir ( lib . name ) if config . integrate_targets? project_path = compute_user_project_path ( target_definition ) user_project = Xcodeproj :: Project . new ( project_path ) targets = compute_user_project_targets ( target_definition , user_project ) lib . user_project_path = project_path lib . user_target_uuids = targets . map ( & :uuid ) lib . user_build_configurations = compute_user_build_configurations ( target_definition , targets ) lib . platform = compute_platform_for_target_definition ( target_definition , targets ) else unless target_definition . platform raise Informative , "It is necessary to specify the platform in the Podfile if not integrating." end lib . user_project_path = config . installation_root lib . user_target_uuids = [ ] lib . user_build_configurations = { } lib . platform = target_definition . platform end libraries << lib end libraries end
Creates the models that represent the libraries generated by CocoaPods.
Creates the models that represent the libraries generated by CocoaPods .
the generated libraries.
the generated libraries .
Array<Libraries>
note
The libraries are generated before the resolution process because it might be necessary to infer the platform from the user targets, which in turns requires to identify the user project.
The libraries are generated before the resolution process because it might be necessary to infer the platform from the user targets which in turns requires to identify the user project .
note
The specification of the libraries are added in the {#resolve_dependencies} step.
The specification of the libraries are added in the { #resolve_dependencies } step .