●Platforms · iOS
iOS
A Swift SDK that presents a native UIKit form modally. Supports field configuration, theming, and onSuccess/onError callbacks.
01
Install
Swift Package Manager:
Package.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:
Podfile
pod 'IssuedSDK', '~> 1.0'02
Minimal embed
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)")
}
)03
Hidden metadata
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)
]04
Styling
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
)05
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.