Skip to main content

iOS SDK Setup AppRemark

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

Step 1. Basic Requirements for service usage

apiKey Setup
  • Make sure to configure the API key properly. For additional information Getting started

Step 2. Info.plist must contain a NSPhotoLibraryUsageDescription name 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

Step 3. Import the AppsOnAir-AppRemark iOS SDK into your Xcode Project

Using CocoaPods

3.1 Make sure your current Xcode project is closed and in the project root, run sudo gem install cocoapods.

3.2 Now run pod init from the terminal in your project directory.

3.3 Open the newly created Podfile with the code editor you are preferring to open.

3.4 Add the AoA dependency under your project target like below.


target 'your_project_name' do
#only copy below line and paste into your podfile
pod 'AppsOnAir-AppRemark'
end

3.5 Run the following commands on the terminal window of your project's directory.

pod repo update
pod install

3.6 Now open the newly created <project_name>.xcworkspace file.

Step 4. Add the AoA services initialization code and usage

You can call initialization at your preference however, we recommend you to add initialization code in 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"])
return true
}
// Remaining contents of your AppDelegate Class...
}

Properties Information

initialize(shakeGestureEnable:Bool = true,options: NSDictionary = [:])
  • This method configures the remark service.
  • The shakeGestureEnable parameter controls whether the shake gesture is enabled or disabled for triggering the remark screen.
  • 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.

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

Step 5. Manually open AppRemark Screen

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

//Help to open remark screen manually and add extra data about app
appsOnAirRemarkServices.addRemark(extraPayload: ["XX":"XX"])

Properties Information

addRemark(extraPayload: NSDictionary = [:])
  • This method is used to manually open the remark screen with additional data,allowing users to provide feedback.
  • The extraPayload parameter is optional and can be used to pass additional metadata, 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 .

Step 6. Run your App and Setup your 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