Skip to content

Commit 783e56b

Browse files
committed
ios: Require iOS 14.0+
Only 0.7% of our users are on 13 and older; see https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/1476154 In fact, only 3.8% of our iOS users are on iOS 14, so graceful degradation below iOS 15 is fine. The bump to iOS 14 in tools/generate-webview-js seems to cause @babel/preset-env to drop @babel/plugin-transform-template-literals, so add an `include` key to force it to be included, with a note about why. See the doc on `include`: https://babeljs.io/docs/en/babel-preset-env#include and the doc on @babel/plugin-transform-template-literals: https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose
1 parent 340edf2 commit 783e56b

File tree

7 files changed

+28
-9
lines changed

7 files changed

+28
-9
lines changed

docs/architecture/platform-versions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ History:
100100
2021-11. It represented 0.8% of our Android users, and didn't
101101
support the API we'd started using to give spiffy new-style
102102
notifications.
103+
* We [dropped iOS 12 and 13 support] in 2023-01. Version 13 was 0.7% of iOS
104+
users who tried Zulip.
103105
<!-- When updating this, please update `docs/developer-guide.md` as well. -->
104106

105107
[dropped-android-j]: https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/625585
@@ -109,6 +111,7 @@ History:
109111
[dropped iOS 11 support]: https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/1165087
110112
[dropped-android-l]: https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/Updating.20.60minSdkVersion.60/near/1236327
111113
[dropped-android-m]: https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/1278266
114+
[dropped iOS 12 and 13 support]: https://chat.zulip.org/#narrow/stream/48-mobile/topic/platform.20versions/near/1476154
112115

113116

114117
Related observations:

docs/developer-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Developer guide
22

33
We target operating systems >= Android 7 Nougat (API 24)
4-
and >= iOS 12.1. (Details [here](architecture/platform-versions.md).)
4+
and >= iOS 14.0. (Details [here](architecture/platform-versions.md).)
55

66
## Why React Native?
77

ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This should match the iOS Deployment Target
22
# (project > ZulipMobile > Info in Xcode)
3-
platform :ios, '12.1'
3+
platform :ios, '14.0'
44

55
require_relative '../node_modules/expo/scripts/autolinking.rb'
66
require_relative '../node_modules/react-native/scripts/react_native_pods'

ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,6 @@ SPEC CHECKSUMS:
757757
Yoga: c4d61225a466f250c35c1ee78d2d0b3d41fe661c
758758
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
759759

760-
PODFILE CHECKSUM: 471cbe682ee7f0ba312982bb828ec78c4bd20655
760+
PODFILE CHECKSUM: d89f3b1e89d483f9f945122b7b9ecb7c39b9fe75
761761

762762
COCOAPODS: 1.11.3

ios/ZulipMobile.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@
515515
GCC_WARN_UNUSED_FUNCTION = YES;
516516
GCC_WARN_UNUSED_VARIABLE = YES;
517517
HEADER_SEARCH_PATHS = "";
518-
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
518+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
519519
LD_RUNPATH_SEARCH_PATHS = (
520520
/usr/lib/swift,
521521
"$(inherited)",
@@ -576,7 +576,7 @@
576576
GCC_WARN_UNUSED_FUNCTION = YES;
577577
GCC_WARN_UNUSED_VARIABLE = YES;
578578
HEADER_SEARCH_PATHS = "";
579-
IPHONEOS_DEPLOYMENT_TARGET = 12.1;
579+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
580580
LD_RUNPATH_SEARCH_PATHS = (
581581
/usr/lib/swift,
582582
"$(inherited)",

src/webview/js/js.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ import { ensureUnreachable } from '../../generics';
4646
*
4747
* * (When updating these, be sure to update tools/generate-webview-js too.)
4848
*
49-
* * We support iOS 12. So this code needs to work on Mobile Safari 12.
50-
* Graceful degradation is acceptable below iOS 14 / Mobile Safari 14.
49+
* * We support iOS 14. So this code needs to work on Mobile Safari 14.
50+
* Graceful degradation is acceptable below iOS 15 / Mobile Safari 15.
5151
*
5252
* * For Android, core functionality needs to work on Chrome 51.
5353
* Graceful degradation is acceptable below Chrome 74.

tools/generate-webview-js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const targetPlatforms = {
4343
// Babel does distinguish `safari` (meaning on macOS, I guess) from `ios`.
4444
// Some features arrive in e.g. "safari 11.1" but "ios 11.3", or in
4545
// 13.1 vs 13.4, so the distinction is still relevant.
46-
ios: 12,
46+
ios: 14,
4747
};
4848

4949
// Disable the default react-native transformations.
@@ -109,7 +109,23 @@ ${es3Code.replace(/\\/g, '\\\\')}
109109

110110
// See comments below about (the absence of) automatic polyfills via
111111
// `core-js`.
112-
presets: [['@babel/preset-env', { targets: targetPlatforms }]],
112+
presets: [
113+
[
114+
'@babel/preset-env',
115+
{
116+
targets: targetPlatforms,
117+
118+
// Remove unescaped template-literal syntax in the output
119+
// string (backticks, string interpolation with ${}, etc.),
120+
// since for now we wrap the output in a template literal.
121+
// TODO(?): Remove that wrapping, and just send the output to
122+
// a file which is read as a string. Or:
123+
// TODO(?): Properly escape template-literal syntax in the
124+
// output string.
125+
include: ['@babel/plugin-transform-template-literals'],
126+
},
127+
],
128+
],
113129
}),
114130
],
115131
});

0 commit comments

Comments
 (0)