Skip to content

Commit 08dd5ee

Browse files
authored
feat!: raise minimum deployment targets for Xcode 27 (#103)
Xcode 27 no longer builds for macOS < 12, iOS/tvOS < 15 or watchOS < 9, so raise Package.swift and the Xcode project to those versions (visionOS stays at 1.0). This is a breaking change for 5.0.0. The fastlane tests lane now resolves simulators at runtime like CI and skips platforms with no installed runtime, instead of hardcoding device names that no longer exist.
1 parent 1a686a9 commit 08dd5ee

5 files changed

Lines changed: 93 additions & 118 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- **Breaking:** Raised the minimum deployment targets to macOS 12, iOS 15, tvOS 15 and watchOS 9 (visionOS stays at 1.0). These are the lowest versions Xcode 27 builds for. Apps that need the older targets can stay on 4.x.
13+
814
## [4.0.4] - 2026-10-05
915

1016
### Fixed

‎Package.swift‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import PackageDescription
66
let package = Package(
77
name: "Punycode",
88
platforms: [
9-
.macOS(.v10_13),
10-
.iOS(.v12),
11-
.tvOS(.v12),
12-
.watchOS(.v4),
9+
.macOS(.v12),
10+
.iOS(.v15),
11+
.tvOS(.v15),
12+
.watchOS(.v9),
1313
.visionOS(.v1),
1414
],
1515
products: [

‎Punycode.xcodeproj/project.pbxproj‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -279,18 +279,18 @@
279279
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
280280
GCC_WARN_UNUSED_FUNCTION = YES;
281281
GCC_WARN_UNUSED_VARIABLE = YES;
282-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
282+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
283283
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
284-
MACOSX_DEPLOYMENT_TARGET = 10.13;
284+
MACOSX_DEPLOYMENT_TARGET = 12.0;
285285
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
286286
MTL_FAST_MATH = YES;
287287
ONLY_ACTIVE_ARCH = YES;
288288
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
289289
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
290-
TVOS_DEPLOYMENT_TARGET = 12.0;
290+
TVOS_DEPLOYMENT_TARGET = 15.0;
291291
VERSIONING_SYSTEM = "apple-generic";
292292
VERSION_INFO_PREFIX = "";
293-
WATCHOS_DEPLOYMENT_TARGET = 4.0;
293+
WATCHOS_DEPLOYMENT_TARGET = 9.0;
294294
XROS_DEPLOYMENT_TARGET = 1.0;
295295
};
296296
name = Debug;
@@ -342,16 +342,16 @@
342342
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
343343
GCC_WARN_UNUSED_FUNCTION = YES;
344344
GCC_WARN_UNUSED_VARIABLE = YES;
345-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
345+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
346346
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
347-
MACOSX_DEPLOYMENT_TARGET = 10.13;
347+
MACOSX_DEPLOYMENT_TARGET = 12.0;
348348
MTL_ENABLE_DEBUG_INFO = NO;
349349
MTL_FAST_MATH = YES;
350350
SWIFT_COMPILATION_MODE = wholemodule;
351-
TVOS_DEPLOYMENT_TARGET = 12.0;
351+
TVOS_DEPLOYMENT_TARGET = 15.0;
352352
VERSIONING_SYSTEM = "apple-generic";
353353
VERSION_INFO_PREFIX = "";
354-
WATCHOS_DEPLOYMENT_TARGET = 4.0;
354+
WATCHOS_DEPLOYMENT_TARGET = 9.0;
355355
XROS_DEPLOYMENT_TARGET = 1.0;
356356
};
357357
name = Release;
@@ -373,7 +373,7 @@
373373
GENERATE_INFOPLIST_FILE = YES;
374374
INFOPLIST_KEY_NSHumanReadableCopyright = "";
375375
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
376-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
376+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
377377
LD_RUNPATH_SEARCH_PATHS = (
378378
"@executable_path/Frameworks",
379379
"@loader_path/Frameworks",
@@ -382,7 +382,7 @@
382382
"@executable_path/../Frameworks",
383383
"@loader_path/Frameworks",
384384
);
385-
MACOSX_DEPLOYMENT_TARGET = 10.13;
385+
MACOSX_DEPLOYMENT_TARGET = 12.0;
386386
MARKETING_VERSION = 4.0.4;
387387
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
388388
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
@@ -419,7 +419,7 @@
419419
GENERATE_INFOPLIST_FILE = YES;
420420
INFOPLIST_KEY_NSHumanReadableCopyright = "";
421421
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
422-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
422+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
423423
LD_RUNPATH_SEARCH_PATHS = (
424424
"@executable_path/Frameworks",
425425
"@loader_path/Frameworks",
@@ -428,7 +428,7 @@
428428
"@executable_path/../Frameworks",
429429
"@loader_path/Frameworks",
430430
);
431-
MACOSX_DEPLOYMENT_TARGET = 10.13;
431+
MACOSX_DEPLOYMENT_TARGET = 12.0;
432432
MARKETING_VERSION = 4.0.4;
433433
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
434434
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
@@ -455,8 +455,8 @@
455455
CODE_SIGN_STYLE = Automatic;
456456
CURRENT_PROJECT_VERSION = 1;
457457
GENERATE_INFOPLIST_FILE = YES;
458-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
459-
MACOSX_DEPLOYMENT_TARGET = 10.13;
458+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
459+
MACOSX_DEPLOYMENT_TARGET = 12.0;
460460
MARKETING_VERSION = 4.0.4;
461461
PRODUCT_BUNDLE_IDENTIFIER = dev.futamura.PunycodeTests;
462462
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -479,8 +479,8 @@
479479
CODE_SIGN_STYLE = Automatic;
480480
CURRENT_PROJECT_VERSION = 1;
481481
GENERATE_INFOPLIST_FILE = YES;
482-
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
483-
MACOSX_DEPLOYMENT_TARGET = 10.13;
482+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
483+
MACOSX_DEPLOYMENT_TARGET = 12.0;
484484
MARKETING_VERSION = 4.0.4;
485485
PRODUCT_BUNDLE_IDENTIFIER = dev.futamura.PunycodeTests;
486486
PRODUCT_NAME = "$(TARGET_NAME)";

‎README.md‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
Punycode is a representation of Unicode with the limited ASCII character subset used for Internet host names. Using Punycode, host names containing Unicode characters are transcoded to a subset of ASCII consisting of letters, digits, and hyphen, which is called the Letter-Digit-Hyphen (LDH) subset. For example, München (German name for Munich) is encoded as Mnchen-3ya. [(Wikipedia)](https://en.wikipedia.org/wiki/Punycode)
1616

1717
## Requirements
18-
- macOS 10.13 or later
19-
- iOS 12.0 or later
20-
- tvOS 12.0 or later
21-
- watchOS 4.0 or later
18+
- macOS 12.0 or later
19+
- iOS 15.0 or later
20+
- tvOS 15.0 or later
21+
- watchOS 9.0 or later
2222
- visionOS 1.0 or later
2323
- Linux
2424
- Swift 5.9 or later (Xcode 15 or later) for Swift Package Manager
@@ -34,7 +34,14 @@ Swift Package Manager is the recommended way to install PunycodeSwift.
3434

3535
Add the following to your `Package.swift` file.
3636

37-
- macOS, iOS, tvOS, watchOS, visionOS, Linux, and Swift 5.9 (Xcode 15) or later
37+
- macOS 12, iOS 15, tvOS 15, watchOS 9, visionOS 1, Linux, and Swift 5.9 (Xcode 15) or later
38+
```swift
39+
dependencies: [
40+
.package(url: "https://github.com/futamura/PunycodeSwift.git", .upToNextMajor(from: "5.0.0"))
41+
]
42+
```
43+
44+
- macOS 10.13, iOS 12, tvOS 12, watchOS 4, visionOS 1, Linux, and Swift 5.9 (Xcode 15) or later
3845
```swift
3946
dependencies: [
4047
.package(url: "https://github.com/futamura/PunycodeSwift.git", .upToNextMajor(from: "4.0.0"))

‎fastlane/Fastfile‎

Lines changed: 55 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -84,105 +84,67 @@ end
8484
# Test
8585
##########################################
8686

87+
# Simulator device names change with every Xcode release, so pick an available
88+
# device at runtime (newest runtime first) instead of hardcoding names that rot.
89+
# Mirrors the device resolution in .github/workflows/main.yml.
90+
def available_simulator(runtime_pattern, device_prefix)
91+
require "json"
92+
devices = JSON.parse(sh("xcrun", "simctl", "list", "devices", "available", "-j", log: false))["devices"]
93+
runtimes = devices.keys.grep(runtime_pattern).sort_by { |key| key.scan(/\d+/).map(&:to_i) }.reverse
94+
runtimes.each do |runtime|
95+
device = devices[runtime].find { |d| d["name"].start_with?(device_prefix) }
96+
return device["name"] if device
97+
end
98+
nil
99+
end
100+
87101
desc "Run all tests"
88102
lane :tests do
89103
xcclean
90104

91-
desc "Run macOS Tests"
92-
run_tests(
93-
destination: "platform=macOS",
94-
scheme: scheme,
95-
force_quit_simulator: true,
96-
reset_simulator: true,
97-
prelaunch_simulator: false,
98-
code_coverage: true,
99-
open_report: false,
100-
output_files: "report-macos.html,report-macos.junit"
101-
)
102-
slather(
103-
scheme: scheme,
104-
proj: xcodeproj_file,
105-
output_directory: "./fastlane/reports/macOS",
106-
html: true,
107-
show: false
108-
)
109-
110-
desc "Run iOS Tests"
111-
run_tests(
112-
destination: "platform=iOS Simulator,name=iPhone 15 Pro",
113-
scheme: scheme,
114-
force_quit_simulator: true,
115-
reset_simulator: true,
116-
prelaunch_simulator: false,
117-
code_coverage: true,
118-
open_report: false,
119-
output_files: "report-ios.html,report-ios.junit"
120-
)
121-
slather(
122-
scheme: scheme,
123-
proj: xcodeproj_file,
124-
output_directory: "./fastlane/reports/iOS",
125-
html: true,
126-
show: false
127-
)
128-
129-
desc "Run tvOS Tests"
130-
run_tests(
131-
destination: "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)",
132-
scheme: scheme,
133-
force_quit_simulator: true,
134-
reset_simulator: true,
135-
prelaunch_simulator: false,
136-
code_coverage: true,
137-
open_report: false,
138-
output_files: "report-tvos.html,report-tvos.junit"
139-
)
140-
slather(
141-
scheme: scheme,
142-
proj: xcodeproj_file,
143-
output_directory: "./fastlane/reports/tvOS",
144-
html: true,
145-
show: false
146-
)
147-
148-
desc "Run watchOS Tests"
149-
run_tests(
150-
destination: "platform=watchOS Simulator,name=Apple Watch Series 9 (45mm)",
151-
scheme: scheme,
152-
force_quit_simulator: true,
153-
reset_simulator: true,
154-
prelaunch_simulator: false,
155-
code_coverage: true,
156-
open_report: false,
157-
output_files: "report-watchos.html,report-watchos.junit"
158-
)
159-
slather(
160-
scheme: scheme,
161-
proj: xcodeproj_file,
162-
output_directory: "./fastlane/reports/watchOS",
163-
html: true,
164-
show: false
165-
)
105+
targets = [
106+
{ name: "macOS", destination: "platform=macOS" },
107+
{ name: "iOS", platform: "iOS", runtime: /SimRuntime\.iOS-/, prefix: "iPhone" },
108+
{ name: "tvOS", platform: "tvOS", runtime: /SimRuntime\.tvOS-/, prefix: "Apple TV" },
109+
{ name: "watchOS", platform: "watchOS", runtime: /SimRuntime\.watchOS-/, prefix: "Apple Watch" },
110+
{ name: "visionOS", platform: "visionOS", runtime: /SimRuntime\.(xrOS|visionOS)-/, prefix: "Apple Vision" },
111+
]
112+
skipped = []
113+
114+
targets.each do |target|
115+
destination = target[:destination]
116+
if destination.nil? then
117+
device = available_simulator(target[:runtime], target[:prefix])
118+
if device.nil? then
119+
UI.important("Skipping #{target[:name]} tests: no available #{target[:prefix]} simulator. Install the runtime from Xcode > Settings > Components.")
120+
skipped << target[:name]
121+
next
122+
end
123+
destination = "platform=#{target[:platform]} Simulator,name=#{device}"
124+
end
166125

167-
desc "Run visionOS Tests"
168-
run_tests(
169-
destination: "platform=visionOS Simulator,name=Apple Vision Pro",
170-
scheme: scheme,
171-
force_quit_simulator: true,
172-
reset_simulator: true,
173-
prelaunch_simulator: false,
174-
code_coverage: true,
175-
open_report: false,
176-
output_files: "report-visionos.html,report-visionos.junit"
177-
)
178-
slather(
179-
scheme: scheme,
180-
proj: xcodeproj_file,
181-
output_directory: "./fastlane/reports/visionOS",
182-
html: true,
183-
show: false
184-
)
126+
UI.header("Run #{target[:name]} Tests (#{destination})")
127+
report = target[:name].downcase
128+
run_tests(
129+
destination: destination,
130+
scheme: scheme,
131+
force_quit_simulator: true,
132+
reset_simulator: true,
133+
prelaunch_simulator: false,
134+
code_coverage: true,
135+
open_report: false,
136+
output_files: "report-#{report}.html,report-#{report}.junit"
137+
)
138+
slather(
139+
scheme: scheme,
140+
proj: xcodeproj_file,
141+
output_directory: "./fastlane/reports/#{target[:name]}",
142+
html: true,
143+
show: false
144+
)
145+
end
185146

147+
UI.important("Skipped platforms: #{skipped.join(", ")}") unless skipped.empty?
186148
end
187149

188150
##########################################

0 commit comments

Comments
 (0)