ios-template icon indicating copy to clipboard operation
ios-template copied to clipboard

iOS-template script generates incorrect bundle identifier in app

Open joeycheek opened this issue 5 years ago • 2 comments

Xcode version: 10.2.1

Description:

App built from template using Cookiecutter prompts creates app with incorrect company name in bundle identifier. App fails to install with error message: “Failed to install the requested application… The bundle identifier of the application could not be determined.”

Steps taken:

Downloaded and installed Cookiecutter, followed guidelines for creating a template app, disregarding ‘Hockey config’ and ‘Jira key’. When running app, bundle identifier in project editor is incorrect; app fails to install to simulator with error message: “Failed to install the requested application… The bundle identifier of the application could not be determined." By manually updating the id in the project editor problem is solved.

Expected Results:

Bundle identifier would be set during script initiated setup.

Actual Results:

Bundle Identifier incorrect.

Script inputs: Screen Shot 2019-06-17 at 3 56 46 PM

Project info: Screen Shot 2019-06-17 at 3 57 33 PM

Notes:

It appears that the default value is populating the build regardless of user inputed value for bundle identifier.

joeycheek avatar Jun 17 '19 22:06 joeycheek

Probably due to generate_template.sh replace ordering on lines 90+:

replace "PRODUCTNAME" "{{ cookiecutter.project_name | replace(' ', '') }}"
replace "ORGANIZATION" "{{ cookiecutter.company_name }}"
replace "LEADDEVELOPER" "{{ cookiecutter.lead_dev }}"
replace "APPLEID" "{{ cookiecutter.apple_id }}"
replace "com.raizlabs.PRODUCTNAME" "{{ cookiecutter.bundle_identifier }}"

should probably be:

replace "com.raizlabs.PRODUCTNAME" "{{ cookiecutter.bundle_identifier }}"
replace "PRODUCTNAME" "{{ cookiecutter.project_name | replace(' ', '') }}"
replace "ORGANIZATION" "{{ cookiecutter.company_name }}"
replace "LEADDEVELOPER" "{{ cookiecutter.lead_dev }}"
replace "APPLEID" "{{ cookiecutter.apple_id }}"

mattwhitlock avatar Aug 22 '19 20:08 mattwhitlock

I believe this fixed it. Generating PR shortly.

mattwhitlock avatar Aug 22 '19 21:08 mattwhitlock