CFBundle is a ruby library for reading macOS and iOS bundles (including zipped bundles and .ipa files).
CFBundle is available on RubyGems:
gem install cfbundleOr in your Gemfile:
gem 'cfbundle'
require 'cfbundle'
result = CFBundle::Bundle.open('path/to/App.app') do |bundle|
name = bundle.name
version = "#{bundle.release_version} (#{bundle.build_version})"
name + ' ' + version
endYou can also call open without a block. In that case, the methods returns the bundle and you need to close it when it is no longer needed.
bundle = CFBundle::Bundle.open('path/to/App.app')
# result = ...
bundle.closeCFBundle can read bundles contained in ZIP archives or .ipa files when the Rubyzip gem is loaded. You may pass the path to the ZIP archive on the file system or an IO object (or any object that behaves like an IO). CFBundle expects the bundle to be at the root of the archive or inside a directory named Payload.
require 'cfbundle'
require 'zip'
CFBundle::Bundle.open('path/to/App.ipa') do |bundle|
# ...
endCFBundle is distributed under the MIT license. See LICENSE file.