iOS
A Swift SDK that presents a native UIKit form modally. Supports field configuration, theming, and onSuccess/onError callbacks.
Install
Swift Package Manager:
swift
// In Package.swift or Xcode > File > Add Package Dependencies
.package(url: "https://github.com/issued-dev/issued-ios.git", from: "1.0.0")CocoaPods:
ruby
pod 'IssuedSDK', '~> 1.0'Minimal embed
swift
import IssuedSDK
let config = WidgetConfig(
projectId: "your-project-id",
fields: [
"subject": FieldConfig(visible: true, required: true),
"description": FieldConfig(visible: true, required: true),
"email": FieldConfig(visible: true, required: false)
]
)
IssuedSDK.shared.showForm(
config: config,
from: self,
onSuccess: { result in
print("Submitted: \(result.ticketId)")
},
onError: { error in
print("Error: \(error.message)")
}
)Hidden metadata
swift
let fields: [String: FieldConfig] = [
"subject": FieldConfig(visible: true, required: true),
"description": FieldConfig(visible: true, required: true),
"email": FieldConfig(visible: false, value: currentUser.email),
"userId": FieldConfig(visible: false, value: currentUser.id),
"appVersion": FieldConfig(visible: false, value: Bundle.main.appVersion)
]Styling
swift
let theme = ThemeConfig(
primaryColor: "#6366f1",
backgroundColor: "#ffffff",
textColor: "#1f2937",
borderColor: "#d1d5db",
cornerRadius: 8.0,
fontFamily: "SF Pro Display"
)
let config = WidgetConfig(
projectId: "your-project-id",
fields: fields,
theme: theme
)Gotchas
- Your app's bundle ID must appear in the project's allowlist (project edit page → Bundle IDs).
from: selfmust be aUIViewController— the SDK presents the form modally from that controller.- The iOS SDK uses the same field names as the web SDK. Pass provider-specific fields like
github_labelsorlinear_labelsthe same way.
Next steps
Copy the Swift snippet with your project ID pre-filled.