Skip to content

Replace iOS/visionOS Xcode templates by new Apple embedded template #107789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rsanchezsaez
Copy link
Contributor

@rsanchezsaez rsanchezsaez commented Jun 21, 2025

This PR is builds on #105628 by unifying the iOS and visionOS Xcode project template files into a new Apple embedded Xcode project template.

The templates were largely identical, with a few set of small changes between them.

The new EditorExportPlatformAppleEmbedded::_process_config_file_line() function has been overridden on the iOS and visionOS export plugins to provide the specific values needed for each platform.

I verified that the iOS and visionOS templates continue to build successfully, and have successfully exported and run the platformer sample for both platforms.

(I suggest we target this to 4.6, no need to risk a regression in 4.5 while in beta.)

cc @stuartcarnie @bruvzg

@rsanchezsaez rsanchezsaez requested review from a team as code owners June 21, 2025 02:58
Copy link
Contributor

@stuartcarnie stuartcarnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @rsanchezsaez – always nice when there is less code for the same functionality 👏🏻 💯

@BastiaanOlij
Copy link
Contributor

I don't think I can offer much input here that @bruvzg and @stuartcarnie don't have a far more informed opinion on. I'm all for improving unifying this code as it will make future maintenance easier, and this looks like excellent work.

Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsanchezsaez
Copy link
Contributor Author

@bruvzg Thank you for the review! Build scripts PR: godotengine/godot-build-scripts#121

Comment on lines +385 to +386
for (int i = 0; i < cs.size() - 1; i++) {
p_file.write[i] = cs[i];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i = 0; i < cs.size() - 1; i++) {
p_file.write[i] = cs[i];
uint8_t *p_file_ptrw = p_file.ptrw();
for (int i = 0; i < cs.size() - 1; i++) {
p_file_ptrw[i] = cs[i];

Comment on lines +447 to +449
if (uuid.is_empty()) {
uuid = "";
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (uuid.is_empty()) {
uuid = "";
}

This does nothing (was this a mistake?)

rel_manual |= valid_rel_specifier;

String str = String::utf8((const char *)pfile.ptr(), pfile.size());
String str = String::utf8((const char *)p_file.ptr(), p_file.size());
String strnew;
Vector<String> lines = str.split("\n");
for (int i = 0; i < lines.size(); i++) {
Copy link
Member

@AThousandShips AThousandShips Jun 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int i = 0; i < lines.size(); i++) {
for (const String &line : lines) {

entitlements += "<key>com.apple.developer.kernel.increased-memory-limit</key>\n<true/>\n";
}
entitlements += p_preset->get("entitlements/additional").operator String() + "\n";
strnew += _process_config_file_line(p_preset, lines[i], p_config, p_debug, code_signing);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
strnew += _process_config_file_line(p_preset, lines[i], p_config, p_debug, code_signing);
strnew += _process_config_file_line(p_preset, line, p_config, p_debug, code_signing);

Comment on lines +512 to +513
for (int idx = 0; idx < capabilities_list.size(); idx++) {
capabilities += "<string>" + capabilities_list[idx] + "</string>\n";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (int idx = 0; idx < capabilities_list.size(); idx++) {
capabilities += "<string>" + capabilities_list[idx] + "</string>\n";
for (const String &capability : capabilities_list) {
capabilities += "<string>" + capability + "</string>\n";

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

Successfully merging this pull request may close these issues.

6 participants