class Establish::App
Attributes
app_identifier[RW]
apple_id[RW]
metadata[RW]
metadata_dir[RW]
Public Class Methods
new(apple_id = nil, app_identifier = nil)
click to toggle source
# File lib/establish/app.rb, line 28 def initialize(apple_id = nil, app_identifier = nil) self.apple_id = apple_id self.app_identifier = app_identifier if apple_id and not app_identifier # Fetch the app identifier based on the given Apple ID self.app_identifier = Establish::ItunesSearchApi.fetch_bundle_identifier(apple_id) Helper.log.debug "Created app with ID #{apple_id} and app_identifier #{self.app_identifier}" end end
Public Instance Methods
create_new_version!(version_number)
click to toggle source
Destructive/Constructive methods
# File lib/establish/app.rb, line 74 def create_new_version!(version_number) itc.create_new_version!(self, version_number) end
get_app_status()
click to toggle source
# File lib/establish/app.rb, line 47 def get_app_status itc.get_app_status(self) end
get_metadata_directory()
click to toggle source
# File lib/establish/app.rb, line 61 def get_metadata_directory metdata_dir || './' end
itc()
click to toggle source
# File lib/establish/app.rb, line 39 def itc @itc ||= Establish::ItunesConnect.new end
open_in_itunes_connect()
click to toggle source
# File lib/establish/app.rb, line 43 def open_in_itunes_connect itc.open_app_page(self) end
set_metadata_directory(dir)
click to toggle source
Use this method to change the default download location for the metadata packages
# File lib/establish/app.rb, line 56 def set_metadata_directory(dir) raise "Can not change metadata directory after accessing metdata of an app" if @metadata self.metadata_dir = dir end
to_s()
click to toggle source
# File lib/establish/app.rb, line 51 def to_s "#{apple_id} - #{app_identifier}" end
upload_metadata!()
click to toggle source
This method has to be called, after modifying the values of .metadata It will take care of uploading all changes to Apple
# File lib/establish/app.rb, line 80 def upload_metadata! raise "You first have to modify the metadata using app.metadata.setDescription" unless @metadata self.metadata.upload! end