Table of Contents
1Flow is iOS Library for Analytics and Getting Feedback from your users. 1Flow is very easy to integrate and use in your project. Read More from 1Flow Dashboard
You can install 1Flow Library by using CocoaPods. To use the 1Flow, first you need to register your application on 1Flow Dashboard. Once you register your application, you will get your 1flow_app_key
. Using this key, you can configure 1Flow SDK.
iOS 10.0 and Above
1Flow is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod '1Flow'
Run pod install
. Open your *.xcworkspace project file.
1Flow is also available through Swift Package Manager In Xcode, select File > Swift Packages > Add Package Dependency. Follow the prompt and add https://github.com/1Flow-Inc/1flow-ios-sdk github url.
- Get
1flow_app_key
from 1Flow Dashboard - You can configure 1Flow SDK on Application launch and track the events like below. Check Swift or Objective C respective code.
SDK Configuration
import _1Flow;
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
OneFlow.configure("1flow_app_key")
.
.
.
Tracking Events
let parameters = ["param1": "value1", "param2": "value2"]
OneFlow.recordEventName("event_name", parameters: parameters)
here, parameters is optional. pass nil
if you dont want any parameters to send with event.
SDK Configuration
@import _1Flow;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application
[OneFlow configure:@"1flow_app_key"];
.
.
.
Tracking Events
NSDictionary *parameters = @{@"param1": @"value1", @"param2": @"value2"};
[OneFlow recordEventName:@"event_name" parameters:parameters];
here, parameters is optional. pass nil
if you dont want any parameters to send with event.
Visit 1Flow Dashboard to check for incoming events. It might takes upto 2 minutes to processed and to get visible on Dashboard.
-
To get the user's feedback, first you need to create Surveys on 1Flow Dashboard. Survey will have one or more screens. Each Survey is mapped with
trigger_event
. When you Recrod any event, SDK will check for the survey which is mapped with recorded event. If any Survey found for recorded event, then SDK will prompt that survey to user. Your Application will continue running in background until user finish or close the survey. When Survey screen is opened, Your application's UI will be blocked by Survey Screen. Hence It will be Developer's responsibility to do not Record such events when Your application is in such crytical state where it immediately require user's input. -
Each Survey will be triggered only once until user finish it by giving feedback. If user close survey without giving Feedback, then on next triggered event, it will re-prompt.
-
If user Uninstall and Re-Install the application, then It will be considered as new user. Here it will open the survey on next triggered event.