diff --git a/Documentation/Architecture/Release1.1/Decisions.md b/Documentation/Architecture/Release1.1/Decisions.md index 9307d07..4106480 100644 --- a/Documentation/Architecture/Release1.1/Decisions.md +++ b/Documentation/Architecture/Release1.1/Decisions.md @@ -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 diff --git a/Documentation/Architecture/Release1.1/Mobile.md b/Documentation/Architecture/Release1.1/Mobile.md new file mode 100644 index 0000000..5d669b3 --- /dev/null +++ b/Documentation/Architecture/Release1.1/Mobile.md @@ -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. diff --git a/Package.swift b/Package.swift index c83a644..c372695 100644 --- a/Package.swift +++ b/Package.swift @@ -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"]), @@ -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"]), diff --git a/Scripts/ci.py b/Scripts/ci.py index 3341fd0..5f05c01 100644 --- a/Scripts/ci.py +++ b/Scripts/ci.py @@ -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 diff --git a/Sources/JSONSchema/Document/JSONSchemaBuiltins.swift b/Sources/JSONSchema/Document/JSONSchemaBuiltins.swift index 3b1153a..e35e698 100644 --- a/Sources/JSONSchema/Document/JSONSchemaBuiltins.swift +++ b/Sources/JSONSchema/Document/JSONSchemaBuiltins.swift @@ -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) }