Skip to content

iAvro swift migration - #3

Open
aumi-sudo wants to merge 8 commits into
omicronlab:masterfrom
aumi-sudo:iavro-swift-migration
Open

iAvro swift migration#3
aumi-sudo wants to merge 8 commits into
omicronlab:masterfrom
aumi-sudo:iavro-swift-migration

Conversation

@aumi-sudo

Copy link
Copy Markdown

No description provided.

aumi-sudo and others added 8 commits July 28, 2026 20:28
- Update Xcode 4-era project settings to current recommendations
  (removes ZERO_LINK, GCC_MODEL_TUNING and other obsolete settings)
- Relink sqlite3 and icucore as SDK .tbd stubs; the old absolute
  /usr/lib dylib paths no longer exist on modern macOS
- Set minimum deployment target to macOS 11.0, sign to run locally
- Migrate localized resources from English.lproj to Base/en.lproj
- Move bundle identifier into PRODUCT_BUNDLE_IDENTIFIER build setting

Source code needed no changes; builds as a universal (arm64 + x86_64)
input method and verified working on Apple Silicon.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add Swift ports of the transliteration engine: AvroParser and
RegexParser (shared PatternTableParser base), AutoCorrect, Database
(SQLite3 module instead of FMDatabase), CacheManager, and Suggestion
(with Levenshtein folded in). Objective-C call sites now import the
generated Avro_Keyboard-Swift.h header.

Not yet buildable: the old .h/.m engine files still need to be removed
from the Xcode target and the .swift files added (Xcode UI step),
after which FMDatabase and NSString+Levenshtein go away entirely.
RegexKitLite stays until batch 2 (controller migration).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove old Objective-C engine (AvroParser, RegexParser, AutoCorrect,
  Database, CacheManager, Suggestion) plus FMDatabase and
  NSString+Levenshtein from the target
- Mark Swift singletons @unchecked Sendable for Swift 6 language mode
  (same main-thread usage as the original code)
- Mark ObjC-facing classes and methods public so they appear in the
  generated Avro_Keyboard-Swift.h (no bridging header in this target)

Verified via code snippets: transliteration (ami banglay gan gai ->
আমি বাংলায় গান গাই), case-sensitive patterns, autocorrect (2106
entries), SQLite dictionary lookups, and suffix table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Port AvroKeyboardController (IMKInputController), Candidates
  (IMKCandidates), and PreferencesController to Swift
- Replace RegexKitLite's buffer-splitting regex with a compiled
  NSRegularExpression (verified identical prefix/term/suffix splits)
- Unlink libicucore: the app no longer touches private ICU
- Wrap candidate-panel access in MainActor.assumeIsolated for
  Swift 6 isolation checking (IMK calls arrive on the main thread)
- PreferencesController keeps the underscore outlet names the 2012
  nib connects to

Only main.m and MainMenuAppDelegate remain Objective-C (batch 3).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Port main.m to main.swift (modern loadNibNamed, keeping the nib's
  top-level objects alive) and MainMenuAppDelegate to Swift
- Remove the now-unused Objective-C prefix header
- Silence remaining Swift 6 isolation warnings (assumeIsolated in
  awakeFromNib and menu(), restate @unchecked Sendable on parsers)

The app now builds with no Objective-C sources, no third-party code,
and no warnings.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant