Skip to main content

iOS SDK Setup

To integrate AppsOnAir-AppRemark iOS SDK into your iOS native Apps with Swift, SwiftUI or Objective-C, follow the below steps

Basic Requirements for Service Usage​

Essential Setup
  • Make sure to configure the App ID properly. For additional information Getting started

Requirements​

  • Minimum deployment target: iOS 15.0

Info.plist Must Contain the NSPhotoLibraryUsageDescription Property​

The NSPhotoLibraryUsageDescription name property used in your photo library to allow you to view and select images directly within the application. By granting this permission, you can easily upload photos, create personalized content, and enhance your experience. We respect your privacy and will only use this access to improve your app experience and will never share your photos without your consent .

Docusaurus logo

Import the AppsOnAir-AppRemark iOS SDK into Your Xcode Project​

  1. In Xcode, go to File > Add Package Dependencies...
  2. Enter the repository URL:
    https://github.com/apps-on-air/AppsOnAir-iOS-AppRemark.git
  3. Select the version rule (e.g. Up to Next Major) and click Add Package.
  4. Select the AppsOnAir-AppRemark product and add it to your target.

Add the AppsOnAir Services Initialization Code and Usage​

You can call initialization at your preference; however, we recommend you add initialization code in the AppDelegate file's didFinishLaunchingWithOptions method as follows:

  • Swift/SwiftUI: import AppsOnAir_AppRemark
  • Objective-C: #import "AppsOnAir_AppRemark-Swift.h
AppDelegate.swift

import AppsOnAir_AppRemark
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

// AppRemark Class instance create
let appsOnAirRemarkServices = AppRemarkService.shared

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

// help to initialize remark services and customized the screen also using optional
appsOnAirRemarkServices.initialize(shakeGestureEnable: false,options: ["appBarBackgroundColor":"DAF7A6"]) { remarkInfo in
// write the code for handling success and failure case
}
return true
}
// Remaining contents of your AppDelegate Class...
}
  • This method configures the remark service.
  • The shakeGestureEnable parameter controls whether the shake gesture is enabled or disabled for triggering the remark screen.
  • The shakeSensitivity parameter (optional) controls how hard the device must be shaken to open the feedback screen. Defaults to the system shake gesture when not set.
  • The options parameter accepts a dictionary for customizing the remark screen's UI, such as modifying the app bar's background color or other visual elements.
  • The onRemarkResponse method listens for the feedback status when feedback is submitted, such as success or failure responses.

shakeSensitivity values​

ValueDescription
.veryLowVery hard, deliberate shake required
.lowFirm shake required
.mediumNormal shake
.highLight shake triggers feedback
.veryHighAny motion triggers feedback

Pass shakeSensitivity directly in initialize:

AppDelegate.swift
appRemarkService.initialize(
shakeGestureEnable: true,
options: [:],
shakeSensitivity: .medium
) { remarkInfo in
// handle response
}

To update sensitivity at runtime (e.g. from app settings) without re-initializing:

AppRemarkService.shared.setShakeSensitivity(.high)

Note: On the iOS Simulator there is no accelerometer — shakeSensitivity is ignored and Device > Shake (⌃⌘Z) opens the feedback screen instead.

onRemarkResponse listener response​

{
"message": "Remark added successfully.",
"status": "SUCCESS"
}
FieldTypeDescriptionExample
messagestringA descriptive message providing details about the feedback submission status."Remark added successfully."
status"SUCCESS" | "FAILURE"Indicates whether the feedback submission succeeded or failed in the onRemarkResponse listener."SUCCESS"

Available keys of options for Customization

KeyDataTypeValueDescription
pageBackgroundColorString"#E8F1FF"Set page background color
appBarBackgroundColorString"#E8F1FF"Set appbar background color
appBarTitleTextString"Add Remark"Set appbar title text
appBarTitleColorString"#000000"Set appbar title color
remarkTypeLabelTextString"Remark Type"Set remark type label text
descriptionLabelTextString"Description"Set description label text
descriptionHintTextString"Add description here..."Set description hint text
descriptionMaxLengthint255Set description max length
buttonTextString"Submit"Set button text
buttonTextColorString"#FFFFFF"Set button text color
buttonBackgroundColorString"#007AFF"Set button background color
labelColorString"#000000"Set text field label color
hintColorString"#B1B1B3"Set text field hint color
inputTextColorString"#000000"Set text field input text color

Manually Open the AppRemark Screen​

// Help to Create App Remark Service Class
let appsOnAirRemarkServices = AppRemarkService.shared

//Help to open remark screen manually
appsOnAirRemarkServices.addRemark()

  • This method is used to manually open the remark screen.

Manually Add Additional Meta​

// Help to Create App Remark Service Class
let appRemarkService = AppRemarkService.shared

//Help to add extra data about app
appRemarkService.setAdditionalMetaData(extraPayload: ["UserID":"UserID"])

  • The setAdditionalMetaData method is optional and can be used to pass additional metadata in extraPayload params, such as the app version, flavors, or any other contextual information. This data is sent along with the feedback to enhance tracking and categorization, making it easier to analyze and act on user inputs effectively.

Run App & Verify App Remark Services​

Run your app by using Xcode on iOS simulators or any physical device to make sure it builds correctly.

note
All submitted screenshots and feedback will be displayed on a web portal.

For more details explore the example​