Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Documentation/Architecture/Release1.1/Decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ fields. In-memory rereading is not evidence; no cloud-sync claim is intended.

## Mobile platform and CI

Propose `.macOS("27.0")` and `.iOS("27.0")`; iPadOS shares iOS. The root manifest
remains macOS-only pending the focused platform PR. All four products, private
The mobile feature manifest declares `.macOS("27.0")` and `.iOS("27.0")`;
iPadOS shares iOS. See [mobile qualification](Mobile.md) for the packaging fix
and the distinction between deployment minima and executed support evidence. All four products, private
regex and schema resources compile for iPhoneOS with the default build engine.
The simulator default engine fails while signing the schema resource bundle; its
`Resources` directory layout needs qualification. The documented deprecated native
Expand Down
21 changes: 21 additions & 0 deletions Documentation/Architecture/Release1.1/Mobile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Apple mobile qualification

The 1.1 feature manifest declares macOS 27 and iOS 27 minimum deployment versions.
iPadOS uses the iOS declaration. The native host still requires macOS/SDK 27 and
Swift tools/compiler 6.4, language mode 6. SDK compilation alone does not qualify
mobile runtime or physical-device behavior.

The schema resource rule copies `Resources/Draft2020-12` as `Draft2020-12` at the
resource root. It retains every pinned schema byte and provenance/license record.
The loader uses the same path relative to `Bundle.module.resourceURL` on each
platform. A flat iOS bundle with a root directory literally named `Resources` and
a root Info.plist failed native codesign. A temporary-copy experiment reproduced
the failure and signed successfully after removing that extra directory level.
No signing bypass, custom plist, resolver or dependency is introduced.

The mobile probe builds a public consumer of all four products, the private regex
implementation and packaged schemas with the default Swift Build engine for both
iPhoneOS and iPhoneSimulator. Required subsequent evidence includes iPhone/iPad
simulator behavior/cancellation, physical-device smoke and measurements, and real
disk-backed SwiftData teardown/reopen using the exact payload. Keep every not-run
row explicit; this document does not certify those later runs.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription

let package = Package(
name: "Swift-JSON",
platforms: [.macOS("27.0")],
platforms: [.macOS("27.0"), .iOS("27.0")],
products: [
.library(name: "JSON", targets: ["JSON"]),
.library(name: "JSONSchema", targets: ["JSONSchema"]),
Expand All @@ -14,7 +14,7 @@ let package = Package(
targets: [
.target(name: "JSON"),
.target(name: "JSONRegexRuntime", dependencies: ["JSON"]),
.target(name: "JSONSchema", dependencies: ["JSON", "JSONRegexRuntime"], resources: [.copy("Resources")]),
.target(name: "JSONSchema", dependencies: ["JSON", "JSONRegexRuntime"], resources: [.copy("Resources/Draft2020-12")]),
.target(name: "JSONStreaming", dependencies: ["JSON"]),
.target(name: "JSONPatch", dependencies: ["JSON"]),
.testTarget(name: "JSONTests", dependencies: ["JSON"], exclude: ["ImplementationPlan.md"]),
Expand Down
2 changes: 1 addition & 1 deletion Scripts/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def check_result(command, code, log):
passed = passed and len(probes) == 49 and dict(probes) == expected_probes
if command == ['swift', 'package', 'dump-package'] and passed:
d = json.loads(log)
passed = sorted(p['name'] for p in d['products']) == ['JSON', 'JSONPatch', 'JSONSchema', 'JSONStreaming'] and not d['dependencies'] and d['swiftLanguageVersions'] == ['6'] and d['toolsVersion']['_version'] == '6.4.0' and d['platforms'] == [{'options': [], 'platformName': 'macos', 'version': '27.0'}]
passed = sorted(p['name'] for p in d['products']) == ['JSON', 'JSONPatch', 'JSONSchema', 'JSONStreaming'] and not d['dependencies'] and d['swiftLanguageVersions'] == ['6'] and d['toolsVersion']['_version'] == '6.4.0' and d['platforms'] == [{'options': [], 'platformName': 'macos', 'version': '27.0'}, {'options': [], 'platformName': 'ios', 'version': '27.0'}]
if command == ['swift', 'package', 'show-dependencies', '--format', 'json'] and passed:
passed = json.loads(log)['dependencies'] == []
return passed, counts
Expand Down
2 changes: 1 addition & 1 deletion Sources/JSONSchema/Document/JSONSchemaBuiltins.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension JSONSchemaRegistry {
for (path, identifier, size, expectedHash) in files {
try meter.checkpoint(); try meter.charge(.schemaDocuments); try meter.resetValueBounds()
try meter.require(.inputBytes, size); try meter.charge(.schemaBytes, size); try meter.retain(size)
let url = root.appendingPathComponent("Resources/Draft2020-12").appendingPathComponent(path)
let url = root.appendingPathComponent("Draft2020-12").appendingPathComponent(path)
let handle: FileHandle
do { handle = try FileHandle(forReadingFrom: url) }
catch { throw JSONSchemaCompilationFailure(.metaSchema) }
Expand Down