
Sparkscan Net Ios
Wire Scandit SparkScan barcode capture into a .NET iOS UIKit app with license key, feedback delegates, and view lifecycle hooks.
Overview
sparkscan-net-ios is an agent skill for the Build phase that guides integrating Scandit SparkScan barcode scanning into .NET iOS UIKit view controllers.
Install
npx skills add https://github.com/scandit/skills --skill sparkscan-net-iosWhat is this skill?
- UIKit ViewController pattern with ViewDidLoad setup and PrepareScanning on ViewWillAppear
- SparkScan + SparkScanView + DataCaptureContext initialization with SCANDIT_LICENSE_KEY placeholder
- ISparkScanFeedbackDelegate with success and error barcode feedback types
- Scandit.DataCapture.Barcode.Spark namespaces for capture, UI, and feedback
- Lifecycle cleanup implied via ViewWillDisappear pairing with prepare calls
Adoption & trust: 1 installs on skills.sh; 12 GitHub stars; trending (+100% hot-view momentum).
What problem does it solve?
You need barcode scanning in an iOS .NET app but lack a correct SparkScan, context, and feedback delegate setup for UIKit lifecycles.
Who is it for?
Solo builders using .NET on iOS who already chose Scandit and want agent-guided wiring of Spark capture APIs.
Skip if: Pure SwiftUI-only apps with no UIKit bridge, or products that only need static QR images without live scan SDKs.
When should I use this skill?
When implementing or fixing Scandit SparkScan barcode capture in a .NET iOS UIKit project.
What do I get? / Deliverables
You have a working ViewController skeleton with SparkScanView, license key hook, and feedback handling ready to test on device.
- ViewController with SparkScan, SparkScanView, and feedback delegate implementation
- Lifecycle hooks for PrepareScanning on appear and teardown on disappear
Recommended Skills
Journey fit
SDK integration happens in Build when you are implementing scanning UX on device, not during distribution or store listing work. Integrations subphase covers third-party capture SDKs, DataCaptureContext setup, and native UI bridges like SparkScanView.
How it compares
Native Scandit SDK integration samples, not a web-based scanner or generic OCR skill.
Common Questions / FAQ
Who is sparkscan-net-ios for?
Indie developers building iOS apps with .NET and UIKit who need Scandit SparkScan wired with delegates and lifecycle methods.
When should I use sparkscan-net-ios?
Use it in Build/integrations when adding in-app barcode capture, replacing a broken scan screen, or aligning feedback UX with Scandit’s Spark APIs.
Is sparkscan-net-ios safe to install?
The skill embeds a license key placeholder—never commit real keys; check the Security Audits panel on this Prism page before installing from the catalog.
SKILL.md
READMESKILL.md - Sparkscan Net Ios
using UIKit; namespace MyApp; public partial class ViewController : UIViewController { public ViewController(IntPtr handle) : base(handle) { } public ViewController() { } public override void ViewDidLoad() { base.ViewDidLoad(); this.View!.BackgroundColor = UIColor.SystemBackground; } } using CoreFoundation; using UIKit; using Scandit.DataCapture.Barcode.Data; using Scandit.DataCapture.Barcode.Spark.Capture; using Scandit.DataCapture.Barcode.Spark.Feedback; using Scandit.DataCapture.Barcode.Spark.UI; using Scandit.DataCapture.Core.Capture; namespace MyApp; public partial class ViewController : UIViewController, ISparkScanFeedbackDelegate { public const string SCANDIT_LICENSE_KEY = "-- ENTER YOUR SCANDIT LICENSE KEY HERE --"; private DataCaptureContext dataCaptureContext = null!; private SparkScan sparkScan = null!; private SparkScanView sparkScanView = null!; private SparkScanBarcodeSuccessFeedback successFeedback = null!; private SparkScanBarcodeErrorFeedback errorFeedback = null!; public ViewController(IntPtr handle) : base(handle) { } public ViewController() { } public override void ViewDidLoad() { base.ViewDidLoad(); this.SetupSparkScan(); } public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); this.sparkScanView.PrepareScanning(); } public override void ViewWillDisappear(bool animated) { base.ViewWillDisappear(animated); this.sparkScanView.StopScanning(); } private void SetupSparkScan() { this.dataCaptureContext = DataCaptureContext.ForLicenseKey(SCANDIT_LICENSE_KEY); SparkScanSettings settings = new(); settings.EnableSymbology(Symbology.Ean13Upca, true); settings.EnableSymbology(Symbology.Code128, true); this.sparkScan = new SparkScan(settings); this.sparkScan.BarcodeScanned += this.BarcodeScanned; SparkScanViewSettings viewSettings = new(); if (this.View == null) { throw new InvalidOperationException("Cannot initialize view"); } this.sparkScanView = SparkScanView.Create( parentView: this.View, context: this.dataCaptureContext, sparkScan: this.sparkScan, settings: viewSettings); this.successFeedback = new SparkScanBarcodeSuccessFeedback(); this.errorFeedback = new SparkScanBarcodeErrorFeedback( message: "Wrong barcode", resumeCapturingDelay: TimeSpan.FromSeconds(60)); this.sparkScanView.Feedback = this; } private void BarcodeScanned(object? sender, SparkScanEventArgs args) { var barcode = args.Session.NewlyRecognizedBarcode; if (barcode == null) return; using var imageBuffer = args.FrameData?.ImageBuffers.LastOrDefault(); using var frame = imageBuffer?.ToImage(); DispatchQueue.MainQueue.DispatchAsync(() => { }); } SparkScanBarcodeFeedback ISparkScanFeedbackDelegate.GetFeedbackForBarcode(Barcode barcode) => IsBarcodeValid(barcode) ? this.successFeedback : this.errorFeedback; private static bool IsBarcodeValid(Barcode barcode) => barcode.Data != "123456789"; } using CoreFoundation; using UIKit; using Scandit.DataCapture.Barcode.Data; using Scandit.DataCapture.Barcode.Spark.Capture; using Scandit.DataCapture.Barcode.Spark.Feedback; using Scandit.DataCapture.Barcode.Spark.UI; using Scandit.DataCapture.Core.Capture; namespace MyApp; public partial class ViewController : UIViewController, ISparkScanListener { public const string SCANDIT_LICENSE_KEY = "-- ENTER YOUR SCANDIT LICENSE KEY HERE --"; private DataCaptureContext dataCaptureContext = null!; private SparkScan sparkScan = null!; private SparkScanView sparkScanView = null!; public ViewController(IntPtr handle) : base(handle) { } public ViewController() { } public