Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

iOS-template script generates incorrect bundle identifier in app #135

Open
joeycheek opened this issue Jun 17, 2019 · 2 comments
Open

iOS-template script generates incorrect bundle identifier in app #135

joeycheek opened this issue Jun 17, 2019 · 2 comments
Assignees

Comments

@joeycheek
Copy link

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.

@mattwhitlock
Copy link

mattwhitlock commented Aug 22, 2019

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 mattwhitlock self-assigned this Aug 22, 2019
@mattwhitlock
Copy link

I believe this fixed it. Generating PR shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants