keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
367 stars 102 forks source link

chore(ios,mac): support build on Apple Silicon using Xcode 15.3 #11302

Closed sgschantz closed 5 days ago

sgschantz commented 1 week ago

Several changes to get Keyman for iOS and macOS building on Apple Silicon on macOS Sonoma with the latest version of Xcode 15.3.

Most significantly, the minimum supported version of macOS had to be increased from 10.10 (Yosemite) to 10.13 (High Sierra).

Fixes #10671

@keymanapp-test-bot skip

keymanapp-test-bot[bot] commented 1 week ago

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

mcdurdin commented 1 week ago

Note re sentry update:

chore(mac): upgrade sentry pod to 8.24.0

Existing version of Sentry pod, 5.x, had a mac deployment target of 10.10, but with the upgrade to XCode 1111.66, we must have a minimum target of 10.13. The min target came in with sentry 8.0.0, but we opted to go straight to the latest released minor version in 8.0 series.

This forced an update to cocoapods to support visionos, and that forced an upgrade of Ruby away from the macOS supplied 2.6.8 to 3.3.1.

Used https://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/ to upgrade, seemed to work.

mcdurdin commented 1 week ago

That said, the minimum version increase, this late in the game... makes me wonder if we should do a first release before the update lands, then follow up with this one.

Then again, if anything feels broken with the release... we probably don't want to leave users with 10.10 - 10.12 out to dry. So we probably shouldn't use it as a reason, even if it's unfortunate to shift minimum-requirements despite the prior announcement.

Yes, better to change minimum version in beta than in 17.0-stable cycle. In any case, we don't have a choice here because we were not ready to release before Apple's deadline.

mcdurdin commented 1 week ago

iOS Test build failure:

https://build.palaso.org/buildConfiguration/Keyman_iOS_TestPullRequests/458637?buildTab=log&linesState=901193&logView=flowAware&focusLine=901224

WARN [2024-04-28 15:27:23.17]:  [33m[altool] 2024-04-28 15:27:23.172 *** Error: The provided entity includes an attribute with a value that has already been used The bundle version must be higher than the previously uploaded version: ‘200’. (ID: 2cbb1a59-d121-4cd4-acb4-6190963629fc) (-19232)

iOS Sample and Test Projects build failure:

https://build.palaso.org/buildConfiguration/Keyman_iOS_TestSamplesAndTestProjects/458641?buildTab=log&linesState=84&logView=flowAware&focusLine=909

/Users/marc_durdin/buildAgent/work/99b311828f4ee7c/keyman/ios/samples/KMSample1/build/KMSample1.build/Debug-iphoneos/KMSample1.build/DerivedSources/GeneratedAssetSymbols.swift:84:10: error: Type Name Violation: Type name '_ACResourceInitProtocol' should only contain alphanumeric and other allowed characters (type_name)
mcdurdin commented 1 week ago

Note: iOS build is running afoul of:

altool is returning the same error 149,727 times ... hmm.

It may be that this is causing the next step to fail.

Temporary mitigation: adding a hosts entry for northamerica-1.object-storage.apple.com

darcywong00 commented 1 week ago

Eventually we should also update https://github.com/keymanapp/keyman/blob/master/docs/build/macos.md#prerequisites

mcdurdin commented 1 week ago

iOS build failure (upload to TestFlight for FVKeyboards) seems to be versioning-related and exposed by changes in XCode 15.0.

https://github.com/fastlane/fastlane/discussions/20743

https://build.palaso.org/buildConfiguration/Keyman_iOS_TestPullRequests/458644?buildTab=log&linesState=2747.2799&logView=flowAware&focusLine=2830

WARN [2024-04-28 16:42:28.14]:  [33m[altool] 2024-04-28 16:42:28.139 *** Error: The provided entity includes an attribute with a value that has already been used The bundle version must be higher than the previously uploaded version: ‘200’. (ID: d9ee2dd3-47d4-4c25-9e01-9c538b265c9e) (-19232)
jahorton commented 1 week ago
06:42:28   WARN [2024-04-28 16:42:28.14]: [altool]     NSLocalizedDescription = "The provided entity includes an attribute with a value that has already been used";
06:42:28   
06:42:28   WARN [2024-04-28 16:42:28.14]: [altool]     NSLocalizedFailureReason = "The bundle version must be higher than the previously uploaded version: \U2018200\U2019. (ID: d9ee2dd3-47d4-4c25-9e01-9c538b265c9e)";
06:42:28   
06:42:28   WARN [2024-04-28 16:42:28.14]: [altool]     NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 \"The provided entity includes an attribute with a value that has already been used\" UserInfo={status=409, detail=The bundle version must be higher than the previously uploaded version., source={\n    pointer = \"/data/attributes/cfBundleVersion\";\n}, id=d9ee2dd3-47d4-4c25-9e01-9c538b265c9e, code=ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE, title=The provided entity includes an attribute with a value that has already been used, meta={\n    previousBundleVersion = 200;\n}, NSLocalizedDescription=The provided entity includes an attribute with a value that has already been used, NSLocalizedFailureReason=The bundle version must be higher than the previously uploaded version.}";

\U2018200\U2019 is mentioned as version in one part of the message, but that doesn't look like a version string to me. Then again... \u2018 is... the left-side single-quote. So, basically, it is just reading '200' from somewhere, but with curly quotes.

Wait a sec... it failed for the FV app, but not ours.

image

https://github.com/keymanapp/keyman/blob/5b1a4f08e4180ccb5b27baea47ef39f4f3cf2300/oem/firstvoices/ios/FirstVoices/Info.plist#L21-L22

I think the block linked above is not being properly updated, for whatever reason.

... and I don't see any code changes / "Files Changed" within the oem/fv section of our repo... yep, that'd do it.

keyman-server commented 5 days ago

Changes in this pull request will be available for download in Keyman version 17.0.318-beta