Repackage assets and upgrade to Swift 5
Repackage the latest mobile assets from
webapp, upgrade to Swift 5 and support larger screens, by upgrading to Xcode 11.1.
Requires https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1610 to be merged.
- The migration to Swift 4 was done automatically, using the highest compatibility mode. This minimises risk.
- The migration to Swift 5 was mostly automatic, but some changes were required to fix up the use of
String.characters- largely just removing
.characters. There are still some warnings and deprecations, which we should really look into.
The only significant changes that were required:
- The third-party SlackTextViewController component is abandoned upstream. We have forked this and patched its font handling to work in newer iOS builds, https://github.com/gitterHQ/SlackTextViewController
- A crash on startup/become active was fixed due to trying to clear out core data entities that didn't exist.
- I updated the cocoapods to the latest versions matching our version constraints. This was not strictly necessary (other than for SlackTextViewController), but I think it should help. There are other major version updates (check
pod outdated), but I didn't attempt that.
- Dark mode in iOS 13 is new, and does not look good with the current app. Some small changes make it usable, but more styling work is required, so for now, Light mode is forced in the
Gitter-Info.plist. I suspect that Apple's patience with this will run out eventually, so we should raise a new issue to support this as some point.
- I have tested the app builds on my devices (iPhone, iPad), and in a number of simulators, including back to iOS 11. I haven't tested iOS 9 which is the current deployment target. I think we should consider bumping the deployment target to iOS 11, as testing that far back is unlikely to be plausible and empirical data from the internet suggests that more than 95% of iOS users are on iOS 12 or later.
- Some updates to the developer documentation
- Automatic migration to Swift 4
- Semi-automatic migrate to swift 5 (required manual changes)
- Upgrade slack text input to latest
- read/unread status not updating
@mentionstatus not clearing
- Font of chat input box is incorrect
- Fix #45 (closed) - correct the entity names when deleting objects from core data
- Dark mode does not work (text unreadable) (disabled dark mode, https://developer.apple.com/documentation/xcode/supporting_dark_mode_in_your_interface/choosing_a_specific_interface_style_for_your_ios_app)
Run up on devices:
- iPhone X - iOS 13
- iPad Pro - iOS 12
- iOS Simulator - various