Method: Xcode::FileReference.system_framework

Defined in:
lib/xcode/file_reference.rb

.system_framework(name, properties = {}) ⇒ Hash

Generate the properties for a system framework.

Examples:

CoreGraphics.framework


FileReference.system_framework "CoreGraphics.framework"
FileReference.system_framework "Foundation"

Parameters:

  • name (String)

    of the system framework which can be specified with or without the “.framework” suffix / extension.

  • properties (Hash) (defaults to: {})

    the parameters to override for the system framework

Returns:

  • (Hash)

    system framework properties



69
70
71
72
73
74
75
76
77
78
79
# File 'lib/xcode/file_reference.rb', line 69

def self.system_framework(name,properties = {})
  name = name.gsub(File.extname(name),"")
  
  default_properties = { 'isa' => 'PBXFileReference',
    'lastKnownFileType' => 'wrapper.framework', 
    'name' => "#{name}.framework",
    'path' => "System/Library/Frameworks/#{name}.framework",
    "sourceTree" => "SDKROOT" }
    
  default_properties.merge(properties)
end