Method: RunLoop::App#bundle_identifier

Defined in:
lib/run_loop/app.rb

#bundle_identifierString

Inspects the app’s Info.plist for the bundle identifier.

Returns:

  • (String)

    The value of CFBundleIdentifier.

Raises:

  • (RuntimeError)

    If the plist cannot be read or the CFBundleIdentifier is empty or does not exist.



84
85
86
87
88
89
90
# File 'lib/run_loop/app.rb', line 84

def bundle_identifier
  identifier = plist_buddy.plist_read("CFBundleIdentifier", info_plist_path)
  unless identifier
    raise "Expected key 'CFBundleIdentifier' in '#{info_plist_path}'"
  end
  identifier
end