sceneview-ios — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sceneview-ios (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
SceneViewSwift is the Apple-platform half of the SceneView SDK — a declarative SwiftUI API over RealityKit. Same mental model as the Android library (SceneView { } / ARSceneView { }) but expressed with SwiftUI result-builders and view modifiers, not Jetpack Compose.
SceneView { … } SwiftUI view (iOS / macOS / visionOS).ARSceneView(…) SwiftUI view (iOS only — ARKit).github.com/sceneview/sceneview monorepo; consumers add it by URL and pin a version tag (currently 4.18.0).
SceneViewSwift is consumable directly from Swift, and also underneath the Flutter and React Native bridges.
Three sources, in priority order:
API reference (every node factory, view modifier, environment preset, the Android↔Apple mapping table, and the iOS parity-status tables). <https://github.com/sceneview/sceneview/blob/main/docs/docs/cheatsheet-ios.md>
in doubt about a signature, read it. Node factories live under Nodes/, the views in SceneView.swift / ARSceneView.swift.
for every feature. Read the demo, do NOT improvise an API.
llms.txt at the repo root carries the cross-platform surface but is Android-centric — prefer cheatsheet-ios.md for Swift.
Trigger on any of:
.usdz / .glb / .gltf / .reality model on iOS."Skip for plain ARKit-SDK, SceneKit, Unity, Unreal, or RealityKit projects that do NOT use the SceneViewSwift wrapper.
// Package.swift
.package(url: "https://github.com/sceneview/sceneview.git", from: "4.18.0")import SceneViewSwiftFor AR, the host app's Info.plist must declare NSCameraUsageDescription. For ARRecorder saving to Photos, add NSPhotoLibraryAddUsageDescription.
Verified against samples/ios-demo/.../ModelViewerDemo.swift and the declarative @NodeBuilder initializer in SceneView.swift:
import SwiftUI
import SceneViewSwift
struct ModelViewerScreen: View {
@State private var model: ModelNode?
var body: some View {
SceneView { root in
if let model {
root.addChild(model.entity)
}
}
.environment(.studio) // IBL lighting preset
.cameraControls(.orbit) // .orbit | .pan | .firstPerson | native (iOS 18+): .none | .tilt | .dolly | .gimbal
.autoCenterContent(true)
.task {
model = try? await ModelNode.load("models/helmet.usdz")
model?.scaleToUnits(0.3)
model?.playAllAnimations()
}
}
}The declarative form uses the @NodeBuilder result-builder — nodes are expressions inside the trailing closure:
SceneView {
GeometryNode.cube(size: 0.3, color: .red)
.position(.init(x: -1, y: 0, z: -2))
GeometryNode.sphere(radius: 0.2, color: .blue)
.position(.init(x: 1, y: 0, z: -2))
}
.environment(.studio)
.cameraControls(.orbit)Verified against samples/ios-demo/.../ARPlacementDemo.swift. ARSceneView is a UIViewRepresentable — iOS only:
ARSceneView(
planeDetection: .horizontal, // .horizontal | .vertical | .both | .none
showPlaneOverlay: true,
showCoachingOverlay: true,
onTapOnPlane: { position, arView in
let anchor = AnchorNode.world(position: position)
let cube = GeometryNode.cube(size: 0.1, color: .blue)
anchor.add(cube.entity)
arView.scene.addAnchor(anchor.entity)
}
)
.onSessionStarted { arView in /* session began */ }remember*-stylenullable. Call it inside a SwiftUI .task { } (or another async context) and try/try? it. Store the result in @State.
Entityfrom DispatchQueue.global(). Use await MainActor.run { } to cross back. SwiftUI .task already runs on the main actor for view work.
AnchorNode.world(position:)and AnchorNode.plane(alignment:minimumBounds:). This differs from Android, where AnchorNode wraps a com.google.ar.core.Anchor. Do NOT translate the Android AnchorNode(anchor:) shape to Swift.
.cube(size:color:),.sphere(radius:color:), .cylinder(radius:height:color:), .plane(width:depth:color:), .cone(height:radius:color:), .torus(...), .capsule(...). There are NO CubeNode / SphereNode types — that naming is Android-only.
.directional(color:intensity:castsShadow:),.point(color:intensity:attenuationRadius:), .spot(color:intensity:innerAngle:outerAngle:). Position/aim via the fluent .position(_:) / .lookAt(_:) modifiers — not Android's LightManager.Type enum + apply lambda.
deprecated symbol, consult the "iOS parity status (#1036)" tables in cheatsheet-ios.md: CameraNode.exposure, CameraNode.depthOfField, and LightNode.shadowColor are compile-warning no-ops on iOS; ARSceneView(playbackDataset:), StreetscapeGeometry, terrain/rooftop anchors have no ARKit equivalent. ARRecorder on iOS is record-only (ReplayKit screen capture) — there is no deterministic playback.
SceneView is cross-platform (iOS/macOS/visionOS); ARSceneView is iOSonly.** macOS and visionOS get 3D but not the ARKit camera view.
Don't drive SwiftUI `@State` from a per-frame loop (an onFrame / RealityKit update closure). A @State write every frame churns the view body — the per-frame loop should mutate entities (or a reference-box class you hold) and only flip @State when UI-visible state actually changes. Same root rule as the other platforms: never recompute or allocate per frame what you can read once and cache. Full cross-platform guidance: docs/docs/performance.md § Hot Paths & Allocation-Free APIs (audit umbrella #2263).
Pair this skill with Xcode's command-line tools:
xcrun simctl boot "iPhone 16" + xcodebuild -scheme … -destination … —build and run on the simulator.
xcrun simctl io booted screenshot ui.png — capture the rendered scene.swift build / swift test from SceneViewSwift/ — build/test the packagein isolation.
docs/docs/cheatsheet-ios.md plus the most-used SwiftUI signatures.
samples/ios-demo/ for each canonical pattern. Read the demo, copy from it.
SceneViewSwift, and the Android↔Apple mapping.
When the user asks for a SceneViewSwift feature:
ARSceneView isiOS-only; SceneView works everywhere.
SceneView { } for 3D, ARSceneView(…) forAR. Mention import SceneViewSwift and the SPM dependency line.
samples/ios-demo/.../Demos/ beforewriting code. Fall back to cheatsheet-ios.md. Never invent an API.
.task { }, store in @State.NSCameraUsageDescription in Info.plist.character — the result-builder + modifiers + factory naming differ. Use the Android↔Apple mapping table in cheatsheet-ios.md.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.