class Spaceship::TunesClient
def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil)
-
bundle_id
(String
) -- : The bundle ID must match the one you used in Xcode. It -
sku
(String
) -- : A unique ID for your app that is not visible on the App Store. -
version
(String
) -- : The version number is shown on the App Store and should -
primary_language
(String
) -- : If localized app information isn't available in an -
name
(String
) -- : The name of your app as it will appear on the App Store.
def create_application!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil) # First, we need to fetch the data from Apple, which we then modify with the user's values r = request(:get, 'ra/apps/create/?appType=ios') data = parse_response(r, 'data') # Now fill in the values we have data['versionString']['value'] = version data['newApp']['name']['value'] = name data['newApp']['bundleId']['value'] = bundle_id data['newApp']['primaryLanguage']['value'] = primary_language || 'English_CA' data['newApp']['vendorId']['value'] = sku data['newApp']['bundleIdSuffix']['value'] = bundle_id_suffix # Now send back the modified hash r = request(:post) do |req| req.url 'ra/apps/create/?appType=ios' req.body = data.to_json req.headers['Content-Type'] = 'application/json' end data = parse_response(r, 'data') handle_itc_response(data) end