Skip to content

Commit

Permalink
Fix iOS builds after the unity upgrade (#733)
Browse files Browse the repository at this point in the history
Set -ld_classic via fastfile

Online sources suggest that the following change should also work, but I
saw that it wasn't being passed to the link call. So we'll do it this
way.

diff --git a/Assets/Editor/BuildTiltBrush.cs b/Assets/Editor/BuildTiltBrush.cs
index 8e5652fc..314d0eba 100644
--- a/Assets/Editor/BuildTiltBrush.cs
+++ b/Assets/Editor/BuildTiltBrush.cs
@@ -1824,6 +1824,9 @@ static class BuildTiltBrush
                     // TODO:Mikesky - I've disabled this disable, does bitcode work now?
                     //project.SetBuildProperty(pbxTarget, "ENABLE_BITCODE", "false");

+                    // Starting with the upgrade to Unity 2023, this seems to be required
+                    project.AddBuildProperty(pbxTarget, "OTHER_LDFLAGS", "-ld_classic");
+
                     File.WriteAllText(pbxPath, project.WriteToString());

                     string plistPath = path + "/Info.plist";
  • Loading branch information
mikeage authored Jun 26, 2024
1 parent 4745989 commit 0cd60ff
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 36 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ jobs:
publish_ios_zapbox:
name: Publish Zapbox iOS
needs: [configuration, build]
runs-on: macos-13 # As of 2024-03-01, macos-latest still points to Mac OS 12, which has an older XCode and gives ITMS-90725: SDK version issue when we submit.
runs-on: macos-14 # ARM64 workers. Change this back to -latest when they get promoted
if: |
github.event_name == 'push' &&
github.repository == 'icosa-foundation/open-brush' &&
Expand All @@ -1251,7 +1251,14 @@ jobs:
name: iOS Zapbox
path: build

- name: Fix File Permissions and Run fastlane
- name: Fix File Permissions
run: |
export FILENAME=$(basename $(readlink -f build/iOS/OpenBrush*))
export IOS_BUILD_PATH=$(pwd)/build/iOS/${FILENAME}
find $IOS_BUILD_PATH -type f -name "*.sh" -exec chmod +x {} \;
- name: Run fastlane
env:
APPLE_CONNECT_EMAIL: ${{ secrets.APPLE_CONNECT_EMAIL }}
APPLE_DEVELOPER_EMAIL: ${{ secrets.APPLE_DEVELOPER_EMAIL }}
Expand All @@ -1274,6 +1281,12 @@ jobs:
export FILENAME=$(basename $(readlink -f build/iOS/OpenBrush*))
export IOS_BUILD_PATH=$(pwd)/build/iOS/${FILENAME}
find $IOS_BUILD_PATH -type f -name "**.sh" -exec chmod +x {} \;
bundle install
bundle exec fastlane ios ${FASTLANE_LANE}
- name: Save logs
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: fastlane logs
path: /Users/runner/Library/Logs/gym/
70 changes: 38 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,32 @@ GIT
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
CFPropertyList (3.0.7)
base64
nkf
rexml
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.889.0)
aws-sdk-core (3.191.1)
aws-partitions (1.947.0)
aws-sdk-core (3.199.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.77.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (1.87.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.143.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-s3 (1.153.0)
aws-sdk-core (~> 3, >= 3.198.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
claide (1.1.0)
colored (1.2)
colored2 (3.1.2)
Expand All @@ -45,7 +48,7 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
excon (0.110.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -74,15 +77,15 @@ GEM
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.0)
fastlane (2.219.0)
fastimage (2.3.1)
fastlane (2.221.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
Expand All @@ -103,10 +106,10 @@ GEM
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
Expand All @@ -115,7 +118,7 @@ GEM
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
ffi (1.16.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
Expand All @@ -134,12 +137,12 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-core (1.7.0)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-errors (1.4.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
Expand All @@ -155,37 +158,39 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
http-cookie (1.0.6)
domain_name (~> 0.5)
httpclient (2.8.3)
jmespath (1.6.2)
json (2.7.1)
jwt (2.7.1)
mini_magick (4.12.0)
json (2.7.2)
jwt (2.8.2)
base64
mini_magick (4.13.1)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
naturally (2.2.1)
optparse (0.4.0)
nkf (0.2.0)
optparse (0.5.0)
os (1.1.4)
plist (3.7.1)
public_suffix (5.0.4)
rake (13.1.0)
public_suffix (6.0.0)
rake (13.2.1)
rbnacl (7.1.1)
ffi
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.2.9)
strscan
rouge (2.0.7)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
signet (0.18.0)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand Down Expand Up @@ -219,11 +224,12 @@ GEM
xcpretty (~> 0.2, >= 0.0.7)

PLATFORMS
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
fastlane
fastlane-plugin-github_action!

BUNDLED WITH
2.5.6
2.5.13
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ platform :ios do
build_app( #alias: gym
project: "#{ENV['IOS_BUILD_PATH']}/Unity-iPhone.xcodeproj",
scheme: 'Unity-iPhone',
xcargs: '-allowProvisioningUpdates'
xcargs: '-allowProvisioningUpdates OTHER_LDFLAGS="-ld_classic"'
)
end

Expand Down

0 comments on commit 0cd60ff

Please sign in to comment.