Ezi Comments for iOS
Add Ezi Comments to a native iOS app so reviewers can comment on its screens. Read the overview first for how it works and what you need in the dashboard.
Requirements
- iOS 16 or later, on iPhone and iPad.
- A UIKit or SwiftUI app built with Xcode 26 and Swift Package Manager.
- A signed app. The reviewer's sign-in is kept in the Keychain, which iOS only grants to signed apps. On the simulator, "Sign to Run Locally" is enough.
- Your project key (dashboard, Widget key).
- Your app's bundle id on the project's Allowed apps page, with the platform set to iOS.
Install
The SDK is a Swift package named EziComments. It is not on a public package index yet; email damianosdev@gmail.com for the package, then add it to your app from the folder you receive:
- In Xcode, choose File > Add Package Dependencies, then Add Local, and select the package folder.
- Add the
EziCommentslibrary to your app target.
If your app is itself a Swift package, add the dependency by path instead:
.package(path: "path/to/EziComments")
Set up
Start the SDK once when the app launches. Wrap it in #if DEBUG (or your own build flag) so it never runs in App Store builds:
import EziComments
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
#if DEBUG
do {
EziComments.configure(try EziConfiguration(
projectKey: "pk_your-project-key",
endpoint: "https://comments.example.com",
launcher: true, // floating button
shakeToOpen: true // shake to open
))
} catch {
print("Ezi Comments is not configured: \(error.localizedDescription)")
}
#endif
return true
}
projectKey: the key from Widget key.endpoint: the address of your Ezi Comments dashboard, without a path.enabled:trueby default. Withfalse, the SDK does nothing at all.
EziConfiguration throws if the key or the endpoint is not valid; the error message says which rule failed.
Open review mode
Pick one or more ways for reviewers to open it:
launcher: trueshows a floating button. It is off by default.shakeToOpen: trueopens review mode when the device is shaken. It is off by default.- Call the SDK from your own code, for example a debug menu:
EziComments.show() // capture the current screen and open review mode
EziComments.hide() // close it
To sign the reviewer out (for example from the same debug menu):
Task { try? await EziComments.signOut() }
If the server cannot be reached, the sign-in is still removed from the device and the sign-out finishes the next time the app starts.
Name your screens
Comments are grouped by screen. Give each screen a stable name so its comments stay together across builds:
// UIKit: the name applies while this view controller is on top.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
EziComments.setScreen("checkout", for: self)
}
// SwiftUI: the name applies while the view is shown.
CheckoutView().eziScreen("checkout")
Without a name, the SDK uses the class name of the view controller on top. Names are 1 to 200 characters.
To tell developers which element a comment is about, give your views an accessibilityIdentifier. When a pin lands on such a view, its identifier is sent with the comment. This works reliably in UIKit; in SwiftUI the identifier is usually not available to the SDK.
Protect sensitive content
Mask views that must not appear in screenshots. Masked areas are filled before the image is saved or sent:
// SwiftUI
BalanceView().eziRedacted()
// UIKit
EziComments.redact(balanceLabel)
For areas you cannot mark as views, return them from redactedRects (in window coordinates). To skip screenshots on whole screens, return false from shouldCapture; reviewers can still comment there, and the comment posts without a screenshot:
try EziConfiguration(
projectKey: "pk_your-project-key",
endpoint: "https://comments.example.com",
shouldCapture: { screenId in screenId != "payment" }
)
The screenshot shows only your app's own window (on iPad, only this window in Split View, Slide Over or Stage Manager). It never includes the software keyboard, system alerts or DRM-protected video. The package includes an Apple privacy manifest declaring no tracking and no collected data types.
Check that it works
- Add your bundle id under Allowed apps (iOS) and turn on Screenshots on the project's General page.
- Run a debug build on a simulator or device and open review mode.
- Turn on Comment, tap anywhere on the screen, type a comment and tap Post.
- Sign in with your email and the 6-digit code.
- Open the project's Threads in the dashboard: the comment is there with the screenshot and your device details.
Troubleshooting
- "This app can't post comments": the bundle id of this build is not on Allowed apps for iOS. If your debug configuration uses a different bundle id (for example with a
.debugsuffix), add that id too. - The sign-in is not kept between launches: the app is not signed. Turn on signing for the target ("Sign to Run Locally" is enough on the simulator).
- Nothing appears: check that the code runs in this build configuration (
#if DEBUG), thatconfiguredid not throw, and that the floating button or shake is turned on, or callEziComments.show(). - Testing against a server on your own computer:
httpis accepted forlocalhost,127.0.0.1and[::1], and in debug builds also for private-network addresses (such as192.168.x.x) or.localnames. Allow local networking in the app's App Transport Security settings (NSAllowsLocalNetworking).
Other messages reviewers may see are explained in the overview.