What does Meishe iOS Streaming SDK do?
Use this skill to explain SDK APIs, generate an iOS application or additive integration patch, and diagnose runtime behavior. Treat Objective-C public headers from the user's framework as signature truth. Use the official iOS documentation for semantics and technical topics when bundled references are insufficient.
Priority Rules
- Use only Streaming SDK entry points exposed by
NvStreamingSdkCore.framework. Do not introduce a separate effects runtime or its lifecycle. - Generate a new UIKit application in Swift by default. Use Objective-C only when the user explicitly requests it or an existing host contract requires it; Objective-C public headers remain API signature truth in both cases.
- Treat
NvStreamingSdkCore.frameworkas the user-supplied dynamic SDK artifact, not a package dependency. Do not produce a dependency list or infer private third-party dependencies. - Keep
NvsStreamingContextpublic calls on the main thread unless a public header explicitly documents an exception. - Verify the SDK license before obtaining the singleton. Keep initialization flags stable for the singleton lifetime.
- Confirm that the supplied SDK license authorizes the generated app's bundle identifier before device QA. Treat
The current app is not authorised!as a license-to-app-identity mismatch, not as a framework, signing, Timeline, or preview failure. - A Timeline width must be divisible by 4 and height by 2. Without
NvsStreamingContextFlag_Support4KEdit, requirewidth * height <= 1920 * 1080; with the flag, requirewidth * height <= 3840 * 2160. Return or report failure whencreateTimelineyieldsnil. - A custom compile height requires
setCustomCompileVideoHeight:beforecompileTimeline, withNvsCompileVideoResolutionGradeCustom. Treat the delegate as final success or failure evidence. - Every resumable Timeline compile must pass both
NVS_COMPILE_ENABLE_BREAKPOINT_CONTINUATION = trueand a non-empty writableNVS_COMPILE_CACHE_FILE_PATHthrough thecompileConfigurationsoverload. The caller owns that cache directory: clear stale cache before a non-resume compile, retain it only for a background-interrupted resume, and clear it after final success, failure, or user cancellation. - Pass
PHAsset.localIdentifierdirectly toNvsVideoTrackappend/insert/add methods for Photos assets. Check permissions, asset availability, identifier emptiness, and the returnedNvsVideoClip. - When calculating a video's display size, do not use
getVideoStreamDimensionalone. Require a valid video stream, readgetVideoStreamPixelAspectRatio, validateden != 0, multiply the stored width bynum / den, and then swap width and height forNvsVideoRotation_90orNvsVideoRotation_270. Use this corrected display size for aspect selection, preview layout, crop geometry, and export geometry; use the uncorrected dimension only when stored pixel dimensions are explicitly required. - Before adding an ordinary HTTP or HTTPS media URL as a clip path, preheat it on a worker queue with
NvsStreamingContext.getAVFileInfo. Remote metadata retrieval can be slow. Continue only when it returns non-nil, then switch to the main thread for the Track append/insert/add call and check the returned clip. Call every SDK API on the main thread unless its public documentation explicitly marks a thread exception.getAVFileInfois one such documented exception; never generalize it to another SDK API. Treat M3U8 separately: download the.m3u8file locally before adding it, and accept only the Meishe-specific extended format. Never infer, synthesize, or auto-convert private extensions; direct unknown format details to Meishe technical support. - Install asset packages only through
installAssetPackage(_:license:type:sync:assetPackageId:); there is no completion-closure overload. Before an asynchronous install, retain an object conforming toNvsAssetPackageManagerDelegateand assign it to the manager's weakdelegate. Treat the immediate return as start/validation status and wait fordidFinishAssetPackageInstallation(_:filePath:type:error:)before using the package ID. Template packages install asynchronously regardless of thesyncargument. Coordinate delegate ownership in an existing host instead of silently replacing its delegate. - A generation plan is not implementation evidence. Every module reported as emitted must have dependency-closed source, target membership, required permissions/resources, a callable integration entry, observable failure states, and cleanup. If output remains a placeholder or
contract_only, report that scope instead of claiming the module was generated. - When
--frameworkor--licenseis explicitly supplied for a new app, copy only those user-supplied inputs into the output project. Embed and sign the dynamic framework, copy the license under a stable app resource name, and add it to the target's Resources phase. Never retain the source path in reusable skill data. - Do not infer runtime or visual success from generation, static validation, compilation, Xcode build, package installation, setter success, or callback registration. Use the exact evidence level recorded in the verification matrices.
- The skill bundles no framework, license, model, media, font, shader, or asset package. Never invent credentials, private endpoints, material services, or protected resources.
- Hand off a filled build command by default. Run Xcode builds, simulator/device actions, or screenshot validation only when the user explicitly asks.
Workflow
- Classify the request as initialization, complete editor, import, Timeline editing, preview, capture, effects, AR/beauty, captions/stickers, asset packages, audio, export, templates, media tools, or custom rendering.
- Read standalone-workflow.md. For project work also read execution-and-qa-handoff.md.
- For complete editors read editor-architecture.md and editor-runtime-pitfalls.md. Implement import -> aspect ratio -> persisted Timeline state -> LiveWindow -> child tools -> export.
- Run
scripts/search_skill_index.py --compact "<request>"before opening broad references. Treat matches as routing, not runtime proof. - For an app, broad feature set, or host integration, run
scripts/compose_modules.py --compactorscripts/create_ios_project.py --dry-run-plan. Use the dependency-closed plan. - Resolve user-supplied resources through resource-requirements-index.md. Do not retain absolute external roots in registries or documentation.
- For packaged materials read asset-center-workflow.md and material-application-matrix.md. Keep installation, application, property editing, instance removal, and package uninstallation separate.
- For vague requests read capability-catalog.md. For broad ordering use feature-priority-map.md and api-priority-map.md.
- For exact APIs use api-usage-index.md,
sdk-signature-map.json, and the routed class-family reference. - Before implementation read the routed dependency, constraint, constant, and call-order maps. Preserve guards, return checks, callback gates, state conflicts, and teardown order.
- Use official-docs-index.md only when the local summary is insufficient or the user requests source detail. Actual public headers win for signatures.
- Read runtime-verification.md for evidence levels and claim boundaries. Coverage, build, runtime, and production-resource matrices belong to the separate maintenance package and are not runtime skill dependencies; do not claim their results unless the maintenance evidence is explicitly available.
- Generate implementation only from
simple-code-registry.jsonunits whose state permits emission. Never render acontract_onlyunit as completed code. - Reconcile the generation plan with emitted source, Xcode target membership, Build Phases, resources, callable UI or host entry points, and failure states. Downgrade the manifest when any planned unit remains a shell.
- Treat an existing Xcode project as
incremental-integrationwith--mode incremental. Only use a product blueprint when the skill owns the new output directory. - Keep skill artifacts, comments, CLI help, and default template copy in English. The default new-app template and executable validation flow use Swift. Localize generated app UI only when the user requests a different language.
- Generate the smallest sufficient permissions, resources, controllers, callbacks, and lifecycle integration. Exclude signing identities, private services, analytics, and distribution settings.
- After implementation provide a filled build command. Execute builds, installation, device flows, or visual QA only with explicit authorization.
- Keep retrieval compact: inspect matched references and exact symbols rather than dumping full indexes or header trees.
Reference Routing
- Core workflow and integration: standalone-workflow.md, ios-integration.md, project-structure-rules.md, and execution-and-qa-handoff.md.
- Composition: module-contract-schema.md,
sdk-module-registry.json, app-blueprints.md,simple-code-registry.json, andskill-lookup-index.json. - Feature and API selection: capability-map.md, api-usage-index.md, feature-list.md, api-list.md, and the priority/dependency/constraint/call-order maps.
- Resources: resource-requirements-index.md, asset-center-workflow.md, and material-application-matrix.md.
- Verification: runtime-verification.md. Maintenance-only coverage and verification matrices are intentionally not bundled or referenced as runtime files.
Class-family routing
| Request or public class | Read |
|---|---|
| Context, license, singleton, capture, playback, seek, compile | nvs-streaming-context.md |
| LiveWindow, preview, fill mode, coordinate mapping | nvs-live-window.md |
| Timeline, tracks, themes, Timeline-level objects | nvs-timeline.md |
| VideoTrack, VideoClip, Photos identifiers, trim, speed | nvs-video-track-clip.md |
| AudioTrack, AudioClip, music, voiceover | nvs-audio-track-clip.md |
| Captions, modular captions, compound captions, spans | nvs-caption.md |
| Animated stickers, transforms, animation, Z order | nvs-animated-sticker.md |
| Capture/Clip/Track/Timeline/Audio effects | nvs-fx.md |
| Video or audio transitions | nvs-transition.md |
| Asset package installation and state | nvs-asset-package-manager.md |
| Adaptive, standard, and AE templates; template install/apply/post-process/edit | nvs-templates.md |
| Human detection, AR Scene, beauty, shaping, makeup | nvs-ar-scene.md |
| AR Scene builtin-effect full parameter table (key/type/range/default) | builtin_effects/ar-scene.md |
| File information, frame retrievers and receivers | nvs-media-info-retriever.md |
| Thumbnails, icons, waveform generation | nvs-generators.md |
| Media and passthrough conversion | nvs-convertors.md |
| Custom video/audio effects and transitions | nvs-custom-effects.md |
| Graph, storyboard, mask, mesh, 3D composition | nvs-advanced-composition.md |
| Structures, time, resolution, enums, flags, keys | nvs-common-types.md |
Specialized Routing And Feature Guards
- Determine whether an effect belongs to Capture, Clip, Track, Timeline, or Audio before choosing an API. Built-in names and packaged IDs are different identities.
- Stop conflicting playback, seek, capture, or compile operations before structural Timeline mutation or removal.
- For media import, classify the input before appending: local path, Photos local identifier, ordinary HTTP/HTTPS media URL, or M3U8. For ordinary remote media, perform the slow first
getAVFileInfolookup on a worker queue, require a non-nilresult, and return to the main thread to append. Localize M3U8 first and reject unconfirmed standard playlists. - A complete capture flow includes permission gates, LiveWindow connection, device/camera controls as supported, start return checks, recording callbacks, and teardown.
- A complete editor is not a preview shell. It includes import, resolution/aspect choice, persisted state, Timeline reconstruction, LiveWindow, child editors, applied-material state, and compile/export.
- Material installation is not application. Collect required u