chore: drop iOS 18–25 / non-iPhone support, require iOS 26
Two related cleanups the user asked for in one shot:
1. iPhone-only is now enforced at every target — Mac Catalyst and
visionOS were never configured in `project.yml`, but the
`OSGKeyboardShared` framework and the two test bundles were
still defaulting to `TARGETED_DEVICE_FAMILY = "1,2"` (iPhone +
iPad). All four targets now explicitly set `"1"`. SDK is
`iphoneos` for everyone, no `xros` / `macosx`.
2. Deployment target bumped from iOS 18.0 to iOS 26.0 across the
board (`project.yml` + the ext's per-target setting). With
iOS 26 as the floor, the iOS 18–25 SFSpeechRecognizer path
became dead code and several `#available` checks became
always-true. Removed:
- `AppleSpeechASR` (the entire SFSpeechRecognizer-based ASR
backend) and the `#available(iOS 26.0, *)` factory branch.
`ASRServiceFactory.make()` now returns `SpeechAnalyzerASR()`
directly. SpeechAnalyzer is always fully on-device, which
also made the `requiresOnDevice` flag meaningless.
- `requiresOnDevice` from the `ASRService.transcribe` protocol
signature, from `ProviderConfig`, `AppGroupStore`,
`KeyboardState`, `AppGroupPersistor`, and the ext's
`KeyboardViewController` (`state.requiresOnDevice`,
`state.setRequiresOnDevice`, `persistRequiresOnDevice`).
- `#available(iOS 17.0, *)` branch in
`PreviewASRController.requestMicrophonePermission` and the
ext's `PermissionManager.requestMicPermission` — both now
just call the iOS 17+ `AVAudioApplication` API directly.
- The `else` (iOS 18–25) branch in `SettingsView.asrEngineRow`
— the on-device-only toggle is gone, the row is a static
"SpeechAnalyzer active" badge. Same for the `else` branch
in `EnginePickerSection.localSubtitle`.
- `makeMicAuthHandler` (the iOS < 17 mic permission callback
wrapper) from `PreviewASRController`.
No `#available` / `@available` checks remain in the codebase
except for the SpeechAnalyzer class itself (now unnecessary
too, but kept for clarity — `AVAudioApplication` and
`SpeechAnalyzer` are both iOS 17+ / iOS 26+ respectively,
and the deployment target of 26 makes the explicit
`@available` redundant; I left the SpeechAnalyzer class
un-`@available` and removed the `@available(iOS 26.0, *)`
decoration since it's no longer needed).
The Keyboard ext's existing ASRService usage
(`asr.transcribe(stream:locale:)`) is unchanged at the
call-site level — just the third argument is gone.
3. Updated `info.plist` UISupportedInterfaceOrientations is
already `[UIInterfaceOrientationPortrait]` only, which is
correct for an iPhone-only app; no change needed.
Build: BUILD SUCCEEDED.
Tests: 22/22 pass.
Verified: `TARGETED_DEVICE_FAMILY = 1` on all four targets,
`SDKROOT = iphoneos` on all four.
🤖 Generated with Claude Code
This commit is contained in:
+11
-3
@@ -5,8 +5,13 @@
|
||||
name: OSGKeyboard
|
||||
options:
|
||||
bundleIdPrefix: com.osgkeyboard
|
||||
# Minimum OS: iOS 26. We dropped iOS 18–25 support so the
|
||||
# SFSpeechRecognizer + AVAudioSession branching could be removed in
|
||||
# favour of iOS 26's `SpeechAnalyzer` (always on-device) and
|
||||
# `AVAudioApplication.requestRecordPermission` (iOS 17+). iPhone
|
||||
# only — no Mac Catalyst, no visionOS.
|
||||
deploymentTarget:
|
||||
iOS: "18.0"
|
||||
iOS: "26.0"
|
||||
developmentLanguage: en
|
||||
createIntermediateGroups: true
|
||||
generateEmptyDirectories: true
|
||||
@@ -15,7 +20,7 @@ options:
|
||||
settings:
|
||||
base:
|
||||
SWIFT_VERSION: "6.0"
|
||||
IPHONEOS_DEPLOYMENT_TARGET: "18.0"
|
||||
IPHONEOS_DEPLOYMENT_TARGET: "26.0"
|
||||
ENABLE_USER_SCRIPT_SANDBOXING: YES
|
||||
SWIFT_STRICT_CONCURRENCY: complete
|
||||
GENERATE_INFOPLIST_FILE: NO
|
||||
@@ -110,7 +115,7 @@ targets:
|
||||
- path: OSGKeyboardExt/zh-Hans.lproj
|
||||
settings:
|
||||
base:
|
||||
IPHONEOS_DEPLOYMENT_TARGET: "18.0"
|
||||
IPHONEOS_DEPLOYMENT_TARGET: "26.0"
|
||||
entitlements:
|
||||
path: OSGKeyboardExt/OSGKeyboardExt.entitlements
|
||||
properties:
|
||||
@@ -158,6 +163,7 @@ targets:
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.osgkeyboard.ios.shared
|
||||
TARGETED_DEVICE_FAMILY: "1"
|
||||
DEFINES_MODULE: YES
|
||||
SKIP_INSTALL: YES
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION: NO
|
||||
@@ -183,6 +189,7 @@ targets:
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.osgkeyboard.ios.tests
|
||||
TARGETED_DEVICE_FAMILY: "1"
|
||||
|
||||
# =========================================================
|
||||
# 键盘扩展单元测试 (TEST-4)
|
||||
@@ -199,6 +206,7 @@ targets:
|
||||
settings:
|
||||
base:
|
||||
PRODUCT_BUNDLE_IDENTIFIER: com.osgkeyboard.ios.ext.tests
|
||||
TARGETED_DEVICE_FAMILY: "1"
|
||||
|
||||
schemes:
|
||||
OSGKeyboard:
|
||||
|
||||
Reference in New Issue
Block a user