Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Nov 26, 2024

Why?

With versions 2019 and 2020 Unity exports with a -mno-thumb flag by default. With the current version of Xcode (16.1) building those projects fails with "unsupported option '-mno-thumb' for target". Those versions of Unity are also out-of-support and won't likely receive an update.

How this fixes it

I've added added a PostProcessBuild that removes the flag. This allows us to still build for iOS on Unity 2019 and 2020. This script resides inside of Assets/Editor/ and is excluded from being packaged. Endusers will not have his script as part of the package.

#skip-changelog

@bitsandfoxes bitsandfoxes changed the title Chore/sample no thumb update chore: Remove -mno-thumb from Xcode projects for unity-of-bugs Nov 26, 2024
@bitsandfoxes bitsandfoxes force-pushed the chore/sample-no-thumb-update branch from 06fc2e5 to 7d1af1a Compare November 27, 2024 10:06

# Copy samples
Copy-Item "samples/unity-of-bugs/Assets/Scenes*" -Destination "package-release/Samples~/unity-of-bugs/" -Recurse
Copy-Item "samples/unity-of-bugs/Assets/Editor*" -Destination "package-release/Samples~/unity-of-bugs/" -Recurse
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had nothing there in the first place.

@bitsandfoxes bitsandfoxes requested a review from vaind November 27, 2024 18:28
return;
}

Debug.Log("XcodeUpdater.OnPostProcessBuild started.");
Copy link
Member

Choose a reason for hiding this comment

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

This logger doesn't let us opt out or set level right? are we not using our logger here why?

Copy link
Contributor Author

@bitsandfoxes bitsandfoxes Nov 28, 2024

Choose a reason for hiding this comment

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

This is a script that lives outside the SDK and is not part of the shipped package.
It's is purely there to help us run builds locally, when targeting iOS on old Unity versions.

Copy link
Contributor

@vaind vaind left a comment

Choose a reason for hiding this comment

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

Only change to our sample. LGTM :shipit:

@bitsandfoxes bitsandfoxes merged commit 3913fd4 into main Nov 28, 2024
95 of 96 checks passed
@bitsandfoxes bitsandfoxes deleted the chore/sample-no-thumb-update branch November 28, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants