Modernize project from Swift 3/iOS 10 to Swift 5/iOS 15 - #1
Conversation
- Bump SWIFT_VERSION 3.0 -> 5.0 and IPHONEOS_DEPLOYMENT_TARGET 10.2 -> 15.0 - Replace removed String APIs (.characters.count, .substring(from:)) with their modern Collection-based equivalents - Rename UIApplicationLaunchOptionsKey/UIApplicationOpenURLOptionsKey to their Swift 4+ nested forms (UIApplication.LaunchOptionsKey/OpenURLOptionsKey) - Replace obsolete 32-bit armv7 device capability requirement with arm64 - Remove leftover debug print in the message-insert completion handler Co-Authored-By: Claude <[email protected]>
|
@claude are these changes tested and compiling ? are there any new test cases or something related to QA to cover? |
|
Good questions — honest answers: Compiling? Not verified in an actual build. This environment has no Xcode/Swift toolchain ( Tests? There are none to run — the project has no test target and no test files (only New test cases / QA? I didn't add any in this PR (it was scoped to the deprecation cleanup). Worth noting most of this codebase is UI/
Want me to add that unit-test target + refactor to this PR, or keep it scoped to just the deprecation fixes? Generated by Claude Code |
|
ok add this and we will follow up later with manual test But i would say we merge these to a new feature branch until manual tests are positive. |
…t tests - Add MovieMessaging: pure Foundation helpers for encoding a movie title into a message URL and decoding it back into an iMsgs:// deep link - Refactor MessagesViewController (willBecomeActive/didSelect/didSelectRowAt) and AppDelegate to call the helper instead of inline offset/host parsing - Add helloMsgsTests logic-test target with XCTest coverage: valid URL, empty URL, missing prefix/host, percent-encoded (special-character) titles, and a full encode->decode round trip The helper is compiled directly into the test bundle, so the tests run without hosting the app extension. No behavior change to the shipping code paths. Co-Authored-By: Claude <[email protected]>
|
Done — two things in this update: 1. Retargeted the PR to merge into a new 2. Added the unit-test target + refactor (commit
The test target is a standalone logic-test bundle —
Want me to do anything else here, or is this good to sit until your manual pass? Generated by Claude Code |
|
ok we are good for now untill we test manually @claude |
Summary
This PR modernizes the iMessage extension demo, which was originally built for Swift 3.0 / iOS 10.2 (Xcode 8.2.1, ~2017) and would no longer compile on a current toolchain. The changes bring it up to Swift 5 / iOS 15 and remove obsolete APIs.
Changes
Build settings (
iMsgExtensionDemo.xcodeproj/project.pbxproj)SWIFT_VERSION3.0 → 5.0 (all four build configurations)IPHONEOS_DEPLOYMENT_TARGET10.2 → 15.0Removed Swift APIs (
helloMsgs/MessagesViewController.swift)String.characters.count(removed in Swift 5) withString.countString.substring(from:)(removed in Swift 5) with modernRange-based subscripting (String(str[index...]))if letbindingRenamed types (
iMsgExtensionDemo/AppDelegate.swift)UIApplicationLaunchOptionsKey→UIApplication.LaunchOptionsKeyUIApplicationOpenURLOptionsKey→UIApplication.OpenURLOptionsKeyurl.hostinstead of force-unwrappingDevice capability (
iMsgExtensionDemo/Info.plist)UIRequiredDeviceCapabilitiesarmv7(32-bit) →arm64, since all current iOS devices are 64-bit onlyCleanup
print("ERRRR ...")statement in the message-insert completion handlerNotes
🤖 Generated with Claude Code
Generated by Claude Code