documentation
NetFUNNEL
iOS Agent v4.1.1

iOS Agent v4.1.1

NetFUNNEL Agent is a dedicated client for communicating with the NetFUNNEL server. Users can apply a virtual waiting room by applying and implementing various functions provided by the agent in the client application code they wish to apply.

⭐️ Agent Requirements: iOS 12 or higher / Usable in Storyboard (obj-c, swift), Swift UI

iOS Agent Operation Flowchart

📌 Basic Control Flowchart
ios에이전트동작흐름도
📌 Section Control Flowchart
ios에이전트동작흐름도

NetFUNNEL Agent has the following operational flows:

Before Waiting
  • Before waiting, initialization of configuration information is carried out. This process involves fetching configuration information from the NetFUNNEL server and initializing objects based on that information by the agent.
  • Use the provided initialization function to initialize the configuration information of the NetFUNNEL agent.
During Waiting
  • This involves waiting at a specific part of the page (view or activity) where you want to apply traffic waiting by exposing a virtual waiting room.
  • Use the provided start waiting function to apply the virtual waiting room.
After Waiting
  • This is the process after the waiting has ended. The reasons for waiting to end are entry success, entry failure, or waiting cancellation.
  • Use the provided delegate function and completion function to implement the logic after waiting ends.

How to Apply the Agent

Step 1. Apply Agent File

Import SurffyAgent at the top of the class where you want to use the agent.

ios에이전트

Step 2. Initialize Configuration

The first step in applying the agent involves using the provided initialization function to initialize the configuration information of the NetFUNNEL agent. The version can be referenced by the variable below.

Variable TypeVariable NameDescription
Version Check VariableNetFunnelVersionVersion of the NetFUNNEL agent file

Initialization Function Used in This Process:

Function TypeFunction NameArgumentDescription
Initialization FunctionsetConfigtenantURLNF access URL
projectDetailURLURL to fetch the configuration file
eumURLURL for collecting eum data
delegatePosition of NetFunnel delegate declaration
oneTimeCallbackCallback function that operates once after successfully loading the config file using setConfig
Initialization Check FunctioncheckConfigSuccessN/AReturns true if loaded normally, false if not

Add the setConfig function at the override position of the viewDidLoad() function as follows.

// Example in Swift
let agent = NetFunnelAgent.shared
agent.setConfig(tenantURL: "Tenant address guided on the NetFUNNEL console page",
                projectDetailURL: "Configuration file load address guided on the NetFUNNEL console page",
                eumURL: "EUM address guided on the NetFUNNEL console page",
                delegate: self,
                oneTimeCallback: "Immediately after setConfig, if NF call functions are used before the config file is loaded, NF may not work. Place areas or functions guaranteed for one-time call immediately after setConfig here in oneTimeCallback or add them as callbacks to ensure they are called.")
// Example in Objective-C
NetFunnelAgent *agent = [NetFunnelAgent shared];
[agent setConfigWithTenantURL:@"Tenant address guided on the NetFUNNEL console page"
            projectDetailURL:@"Configuration file load address guided on the NetFUNNEL console page"
            eumURL:@"EUM address guided on the NetFUNNEL console page"
            delegate:self
            oneTimeCallback:^{
              // Immediately after setConfig, if NF call functions are used before the config file is loaded, NF may not work. Place areas or functions guaranteed for one-time call immediately after setConfig here in oneTimeCallback or add them as callbacks to ensure they are called.
            }
    ];
💡 Tip. If you want to check if the settings are loaded properly
// Example in Swift
var check = agent.checkConfigSuccess()
// Example in Objective-C
bool check = [agent checkConfigSuccess];
💡 Tip. If you want to start NetFUNNEL waiting as soon as the application starts

If you want to start NetFUNNEL waiting as

soon as the application starts, it is recommended to add the start waiting function in the oneTimeCallback function, which operates only once after setConfig has successfully loaded the configuration file.

// Example in Swift
func actionAfterSetting(){
    var req = SurffyReqManager.shared
    req.NFStart(projectKey: "projectKey", segmentKey: "segmentKey")
}
// Example in Objective-C
- (void)actionAfterSetting {
  // Immediately after setConfig, if NF call functions are used before the config file is loaded, NF may not work. Place areas or functions guaranteed for one-time call immediately after setConfig here in oneTimeCallback or add them as callbacks to ensure they are called.
  
  SurffyReqManager *req = [SurffyReqManager shared];
  [req NFStartWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
  // Additional UI Process etc.
}

Step 3. Start Basic Control

To apply traffic waiting to a specific part of the page (view or activity) where you want to expose a virtual waiting room, use the provided start waiting function.

Function Used in Starting Basic Control:

Function TypeFunction NameArgumentDescription
Start Basic Control FunctionNFStartprojectKeyProject key displayed on NF console page, e.g., service_1
segmentKeySegment key displayed on NF console page, e.g., segKey_1234

Call the singleton object SurffyReqManager shared and use the NFStart function. Return the waiting key using the NFStop function.

// Example in Swift
var req = SurffyReqManager.shared
req.NFStart(projectKey: "projectKey", segmentKey: "segmentKey")
// Example in Objective-C
SurffyReqManager *req = [SurffyReqManager shared];
[req NFStartWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];

Step 4. Start Section Control

To apply traffic waiting to a specific part of the page (view or activity) where you want to expose a virtual waiting room, use the provided start waiting function.

In this case, if you want to apply waiting between the entry and end of a specific page, use section waiting. e.g., From entry to product purchase on an event page, or from login to logout

Call the singleton object SurffyReqManager shared and use the NFStartSection function. Return the waiting key using the NFStopSection function.

Function Used in Starting Section Control:

Function TypeFunction NameArgumentDescription
Start Section Control FunctionNFStartSectionprojectKeyProject key displayed on NF console page, e.g., service_1
segmentKeySegment key displayed on NF console page, e.g., segKey_1234
// Example in Swift
var req = SurffyReqManager.shared
req.NFStartSection(projectKey: "projectKey", segmentKey: "segmentKey")
// Example in Objective-C
SurffyReqManager *req = [SurffyReqManager shared];
[req NFStartSectionWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
💡 Tip. How to ensure that the virtual waiting room is always displayed

To always display the virtual waiting room, first set the entry allowance to 0 in the administrator console. An entry allowance of 0 means that no traffic is allowed to enter. Verify the project key and segment key set to an entry allowance of 0, and calling the start waiting function with these keys will immediately expose the virtual waiting room.

Step 5. Implement Delegate

Various callback functions are called depending on the situation during waiting. Depending on the type of callback function, you can handle entry success and blocking, and implement various user scenarios that occur when waiting is canceled.

Here are the return codes received from the server and the Delegates provided:

Return CodeDescriptionDelegate
0Network error when requesting service entrySurffyActionError
200 (SUCCESS)Normal service connectionSurffyActionSuccess
201 (CONTINUE)Service waiting (entry into the queue)-
300 (BYPASS)Service bypassSurffyActionBypass
301 (SERVERSIDE_BLOCK)Service blockingSurffyActionBlock
302 (SERVERSIDE_IP_BLOCK)Service blockingSurffyActionBlock
303 (EXPRESS_NUMBER)Service bypassSurffyActionBypass
499 (USER_CANCEL)User canceled in the waiting roomSurffyActionCancel
500Network errorSurffyActionError
Other 50x ~ 999Other errorsSurffyActionError
1001Device network disconnection (mobile network, WiFi)SurffyActionBlock

Below is the definition of Delegate:

Function Type: Delegate
Function NameArgumentDescription
SurffyActionSuccessprojectKeyProject key used for entry, e.g., service_1
segmentKeySegment key used for entry, e.g., serKey_1234
retcodeResult code at the time of delegate execution
SurffyActionErrorprojectKeyProject key used for entry, e.g., service_1
segmentKeySegment key used for entry, e.g., serKey_1234
retcodeResult code at the time of delegate execution
SurffyActionCancelprojectKeyProject key used for entry, e.g., service_1
segmentKeySegment key used for entry, e.g., serKey_1234
retcodeResult code at the time of delegate execution
SurffyActionBypassprojectKeyProject key used for entry, e.g., service_1
segmentKeySegment key used for entry, e.g., serKey_1234
retcodeResult code at the time of delegate execution
SurffyActionBlockprojectKeyProject key used for entry, e.g., service_1
segmentKeySegment key used for entry, e.g., serKey_1234
retcodeResult code at the time of delegate execution
SurffyCompleteSuccessprojectKeyProject key used for entry, e.g., service_1
segmentKeySegment key used for entry, e.g., serKey_1234
SurffyCompleteErrorprojectKeyProject key used for entry, e.g., service_1
segmentKeySegment key used for entry, e.g., serKey_1234

In the actual code, declare the ViewController interface by inheriting SurffyDelegate as follows. Inheritance is possible in positions other than ViewController if necessary.

// Example in Swift
import SurffyAgent
class ViewController: UIViewController, SurffyDelegate {
    //
    //
}
// Example in Objective-C, ViewController.h
@import SurffyAgent;
@interface ViewController : UIViewController <SurffyDelegate>

Implement the callback functions within the ViewController implementation that inherits SurffyDelegate as follows.

// Example in Swift
class ViewController: UIViewController, SurffyDelegate {
    func SurffyActionSuccess(projectKey: String, segmentKey: String, retcode: Int) {
        print("SurffyActionSuccess called ", retcode)
        // Delegate executed on successful waiting. retcode is 200
    }
    
    func SurffyActionBlock(projectKey: String, segmentKey: String, retcode: Int) {
        print("SurffyActionBlock called ", retcode)
        // Delegate executed on blocking. retcode is 301 or 302
    }
    
    func SurffyActionError(projectKey: String?, segmentKey: String?, retcode: Int) {
        print("SurffyActionError called ", retcode)
        // Delegate executed on error. retcode is 0, 500, 501~999
    }
    
    func SurffyActionBypass(projectKey: String, segmentKey: String, retcode: Int) {
        print("SurffyActionBypass called ", retcode)
        // Delegate executed on bypass setting. retcode is 300, 303
    }
    
    func SurffyActionCancel(projectKey: String, segmentKey: String, retcode: Int, cancelTargetAddr: String) {
        print("SurffyActionCancel called ", retcode)
        // Delegate executed on waiting cancellation. retcode is 499
    }
    
    func SurffyCompleteSuccess(projectKey: String, segmentKey: String) {
        print("SurffyCompleteSuccess called")
 
 
        // Delegate executed on successful key return.
    }
    
    func SurffyCompleteError(projectKey: String, segmentKey: String) {
        print("SurffyCompleteError called")
        // Delegate executed on failed key return.
    }
}
// Example in Objective-C, ViewController.m
@interface ViewController ()
 
@end
 
@implementation ViewController
 
- (void)SurffyActionBlockWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
    // Delegate executed on blocking. retcode is 301 or 302
}
 
- (void)SurffyActionBypassWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
    // Delegate executed on bypass setting. retcode is 300, 303
}
 
- (void)SurffyActionCancelWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode cancelTargetAddr: (NSString * _Nonnull)cancelTargetAddr {
    // Triggered when user canceled NetFUNNEL request
}
 
- (void)SurffyActionErrorWithProjectKey:(NSString * _Nullable)projectKey segmentKey: (NSString * _Nullable)segmentKey retcode:(NSInteger)retcode {
    // Delegate executed on error. retcode is 0, 500, 501~999
}
 
- (void)SurffyActionSuccessWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
    // Delegate executed on successful waiting. retcode is 200
}
 
- (void)SurffyCompleteErrorWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey {
    // Delegate executed on failed key return.
}
 
- (void)SurffyCompleteSuccessWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey {
    // Delegate executed on successful key return.
}
 
@end

When entry is successful, implement the callback

When entry is successful, implement the following: 1️⃣ Code for entering the target page 2️⃣ Call the completion function to return the issued key to the NetFUNNEL server

Basic Control Completion Function

Function Name: NFStop

ArgumentDescriptionExample
projectKeyProject key displayed on NF console, e.g., service_1
segmentKeySegment key displayed on NF console, e.g., serKey_1234

Section Control Completion Function

Function Name: NFStopSection

ArgumentDescriptionExample
projectKeyProject key displayed on NF console, e.g., service_1
segmentKeySegment key displayed on NF console, e.g., serKey_1234

Below is an example code implementing the SurffyActionSuccess Delegate function.

// Example in Swift
let SRM = SurffyReqManager.shared
SRM.NFStart(projectKey: "projectKey", segmentKey: "segmentKey")
...
 
func SurffyActionSuccess(projectKey: String, segmentKey: String, retcode: Int) {
    /*
    Action after entering the target page
    */
    // Return the waiting key
    let req = SurffyReqManager.shared
    req.NFStop(projectKey: "projectKey", segmentKey: "segmentKey")
}
// Example in Objective-C
SurffyReqManager *req = [SurffyReqManager shared];
[req NFStartWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
 
...
 
- (void)SurffyActionSuccessWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
    /*
    Action after entering the target page
    */
    // Return the waiting key
    [req NFStopWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
}

Refer to the detailed guidance in Step 2. Agent Operation Flowchart for all callback functions that need to implement the logic corresponding to successful entry.

When entry is blocked, implement the callback

When entry is blocked, it is usually due to frequent macro-like requests or malicious requests using incorrect keys. In such scenarios, you can typically implement the following logic to enhance the user experience of your customers.

When entry is successful, implement the following: 1️⃣ If you want to stay on the current page, there is no need to implement any logic. 2️⃣ Implement logic to display a modal window indicating that entry has been blocked. 3️⃣ Implement logic to redirect to a specific page indicating that entry has been blocked. 4️⃣ Implement logging logic.

When entry is blocked or fails, you can implement the above logic, and unlike the successful entry case, there is no need to call a separate completion function.

Below is an example code implementing the SurffyActionBlock Delegate function.

// Example in Swift
let SRM = SurffyReqManager.shared
SRM.NFStart(projectKey: "projectKey", segmentKey: "segmentKey")
...
 
func SurffyActionBlock(projectKey: String, segmentKey: String, retcode: Int) {
    /*
    1. If you want to stay on the current page, there is no need to implement any logic.
    2. Implement logic to display a modal window indicating that entry has been blocked.
    3. Implement logic to redirect to a specific page indicating that entry has been blocked.
    4. Implement logging logic.
    */
}
// Example in Objective-C
SurffyReqManager *req = [SurffyReqManager shared];
[req NFStartWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
 
...
 
- (void)SurffyActionBlockWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
    /*
    1. If you want to stay on the current page, there is no need to implement any logic.
    2. Implement logic to display a modal window indicating that entry has been blocked.
    3. Implement logic to redirect to a specific page indicating that entry has been blocked.
    4. Implement logging logic.
    */
}

Refer to the detailed guidance in Step 2. Agent Operation Flowchart for all callback functions that need to implement the logic corresponding to blocked or failed entry.

When an error occurs during entry/waiting, implement the callback

Errors during entry into the queue or during waiting can occur due to reasons such as NetFUNNEL server downtime or network connection issues. Refer to all the Delegate functions and return codes in Step 2. Agent Operation Flowchart for detailed guidance. Depending on the return code, you can implement various flows.

1️⃣ When allowing entry upon error occurrence, implement the same logic as successful entry. 2️⃣ When blocking entry upon error occurrence, implement the same logic as entry blocking. 3️⃣ Implement other logic depending on the error.

When entry is blocked or fails, you can implement the above logic, and unlike the successful entry case, there is no need to call a separate completion function.

Below is an example code implementing the SurffyActionError Delegate function.

// Example in Swift
let SRM = SurffyReqManager.shared
SRM.NFStart(projectKey: "projectKey", segmentKey: "segmentKey")
...
 
func SurffyActionError(projectKey: String, segmentKey: String, retcode: Int) {
    /*
    1. When allowing entry, implement the same logic as SurffyActionSuccess.
    2. When blocking entry, implement the same logic as SurffyActionBlock.
    3. Implement other logic.
    */
}
// Example in Objective-C
SurffyReqManager *req = [SurffyReqManager shared];
[req NFStartWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
 
...
 
- (void)SurffyActionErrorWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
    /*
    1. When allowing entry, implement the same logic as SurffyActionSuccessWithProjectKey.
    2. When blocking entry, implement the same logic as SurffyActionBlockWithProjectKey.
    3. Implement other logic.
    */
}

When bypassing the waiting, implement the callback

When checking off the use of NetFUNNEL on the console page, the waiting request receives return codes 300 or 303, and SurffyActionBypass is executed. When bypassing waiting, you can implement the following logic:

1️⃣ When allowing entry, implement the same logic as successful entry. 2️⃣ Implement other logic.

Below is an example code implementing the SurffyActionBypass Delegate function.

// Example in Swift
let SRM = SurffyReqManager.shared
SRM.NFStart(projectKey: "projectKey", segmentKey: "segmentKey")
...
 
func SurffyActionBypass(projectKey: String, segmentKey: String, retcode: Int) {
    ```swift
    /*
    1. When allowing entry, implement the same logic as successful entry.
    2. Implement other logic.
    */
}
// Example in Objective-C
SurffyReqManager *req = [SurffyReqManager shared];
[req NFStartWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
 
...
 
- (void)SurffyActionBypassWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
   /*
    1. When allowing entry, implement the same logic as successful entry.
    2. Implement other logic.
    */
}

When waiting is canceled, implement the callback

When the end user cancels waiting in the virtual waiting room, the waiting cancel callback may be called. In such scenarios, you can typically implement the following logic to enhance the user experience of your customers:

1️⃣ If you want to stay on the current page, there is no need to implement any logic. 2️⃣ Implement logic to display a modal window indicating that waiting has been canceled. 3️⃣ Implement logic to redirect to a specific page indicating that waiting has been canceled. 4️⃣ Implement logging logic.

When waiting is canceled, you can implement the above logic, and unlike the successful entry case, there is no need to call a separate completion function.

Below is an example code implementing the SurffyActionCancel callback function.

// Example in Swift
let SRM = SurffyReqManager.shared
SRM.NFStart(projectKey: "projectKey", segmentKey: "segmentKey")
...
 
func SurffyActionCancel(projectKey: String, segmentKey: String, retcode: Int) {
    /*
    1. If you want to stay on the current page, there is no need to implement any logic.
    2. Implement logic to display a modal window indicating that waiting has been canceled.
    3. Implement logic to redirect to a specific page indicating that waiting has been canceled.
    4. Implement logging logic.
    */
}
// Example in Objective-C
SurffyReqManager *req = [SurffyReqManager shared];
[req NFStartWithProjectKey: @"projectKey" segmentKey:@"segmentKey"];
 
...
 
- (void)SurffyActionCancelWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode {
    /*
    1. If you want to stay on the current page, there is no need to implement any logic.
    2. Implement logic to display a modal window indicating that waiting has been canceled.
    3. Implement logic to redirect to a specific page indicating that waiting has been canceled.
    4. Implement logging logic.
    */
}
💡 Tip. How to display a separate modal window and restart waiting when the cancel button is pressed
// Example in Swift
func SurffyActionCancel(projectKey: String, segmentKey: String, retcode: Int, cancelTargetAddr: String) {
 
    let alert = UIAlertController(title: "Do you really want to exit the app?", message: "", 
      preferredStyle: UIAlertController.Style.alert)
    let cancel = UIAlertAction(title: "Re-enter NF", style: .default, handler: {
        action in
        let SRM = SurffyReqManager.shared
        SRM.NFStart(projectKey: self.proKey.text ?? "", segmentKey: self.segKey.text ?? "")
    })
    // Create OK button
    let ok = UIAlertAction(title: "Exit", style: .destructive, handler: {
        action in
        // Perform specific function
    })
    alert.addAction(cancel)
    // Add OK button to alert window
    alert.addAction(ok)
    present(alert, animated: true, completion: nil)
}
// Example in Objective-C, ViewController.m
@interface ViewController ()
 
@end
 
@implementation ViewController
 
- (void)SurffyActionCancelWithProjectKey:(NSString * _Nonnull)projectKey segmentKey: (NSString * _Nonnull)segmentKey retcode:(NSInteger)retcode cancelTargetAddr: (NSString * _Nonnull)cancelTargetAddr {
    // Triggered when user cancels NetFUNNEL request
    UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Do you really want to exit the app?"
                                message:@"" preferredStyle:UIAlertControllerStyleAlert];
 
    UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Re-enter NF"
                              style:UIAlertActionStyleDefault
                              handler:^(UIAlertAction *action) {
      SurffyReqManager *SRM = [SurffyReqManager shared];
      [SRM NFStartWithProjectKey:self.proKey.text segmentKey:self.segKey.text];
    }];
 
    UIAlertAction *ok = [UIAlertAction actionWithTitle:@"Exit"
                         style:UIAlertActionStyleDestructive
                         handler:^(UIAlertAction *action) {
                          // Perform specific function
                          }];
 
    [alert addAction:cancel];
    [alert addAction:ok];
    [self presentViewController:alert animated:YES completion:nil];
}
 
@end

FAQ

🙋 What is retcode given in the Delegate, and when is it needed?

🧑‍💻 retcode (Return Code) is a result code received from the NetFUNNEL server when making a virtual waiting request. You can define the desired logic with a combination of return codes and delegates. For detailed information, please refer to Implement the callback when an error occurs during entry/waiting.

Example: If you want to bypass waiting when receiving a network disconnection code (retcode: 0) during a service waiting request

func SurffyActionError(projectKey: String, segmentKey: String, retcode: Int) {
    if (retcode == 0) {
      /*
      Implement the logic for the service to operate normally according to projectKey, segmentKey
      */
    }
}

Example: If you want to block the service when receiving a network disconnection code (retcode: 0) during a service waiting request

func SurffyActionError(projectKey: String, segmentKey: String, retcode: Int) {
    if (retcode == 0) {
      /*
      Implement the logic for blocking the service according to projectKey, segmentKey
      */
    }
}

🙋 The waiting is not applied when I want to use NetFUNNEL at the start of the app. How can I fix this?

🧑‍💻 If the NetFUNNEL request is made before the NetFUNNEL settings are loaded, the request may not enter the queue properly. Please refer to the oneTimeCallback item in Step 2.


🙋 What is basic control and section control? What are the differences between the two?

🧑‍💻 Basic Control refers to control that applies waiting to a specific logic or action itself. The waiting key return for basic control occurs immediately after waiting (SurffyActionSuccess key return case), reducing the number of the next waiting queue.
e.g., Waiting for app entry, waiting for button click

Section Control refers to control that applies waiting to a specific logic or action section. Section control sets the entry and end points, adjusting traffic to only the total allowed number of entries between entry and end. The waiting key return for section control is executed by explicitly calling the key return function.
e.g., Login (entry) - Logout (end), Page entry (entry) - Page transition (end)


🙋 How can I make the service operate normally if the NF server is down?

🧑‍💻 It is possible to provide normal service through implementation within the SurffyActionError Delegate when the NF server is disconnected.

Example: If you want to bypass waiting when receiving a network disconnection code (retcode: 0) during NF service waiting request

func SurffyActionError(projectKey: String, segmentKey: String, retcode: Int){
    if (retcode == 0) {
      /*
      Implement the logic for the service to operate normally according to projectKey, segmentKey
      */
    }
}

Example: If you want to block the service during a non-NF entry when receiving a network disconnection code (retcode: 0) during a service waiting request

func SurffyActionError(projectKey: String, segmentKey: String, retcode: Int){
    if (retcode == 0) {
      /*
      projectKey, segmentKey returns nil.
      Other intended logic can be implemented.
      */
    }
}

Appendix

API Description

CategoryFunction NameParametersDescription
Load ConfigurationsetConfigtenantURLNF Access URL
projectDetailURLURL to retrieve configuration file
eumURLeum data collection URL
delegateNetFunnel delegate declaration view location
oneTimeCallbackCallback function that operates once after setConfig successfully loads the configuration file
URL-based NFstartManagerURL valueURL value registered on the NF console page
URL-based NFcompleteManagerURL valueURL value registered on the NF console page
Key-based NFNFStartprojectKeyProject key value output on the NF console page during segment registration, e.g., service_1
segmentKeySegment key value output on the NF console page during segment registration, e.g., serKey_1234
Key-based NFNFStopprojectKeyProject key value output on the NF console page during segment registration, e.g., service_1
segmentKeySegment key value output on the NF console page during segment registration, e.g., serKey_1234
Key-based NF (Section Control)NFStartSectionprojectKeyProject key value output on the NF console page during segment registration, e.g., service_1
segmentKeySegment key value output on the NF console page during segment registration, e.g., serKey_1234
Key-based NF (Section Control)NFStopSectionprojectKeyProject key value output on the NF console page during segment registration, e.g., service_1
segmentKeySegment key value output on the NF console page during segment registration, e.g., serKey_1234
delegateSurffyActionSuccessprojectKeyProject key value used at entry, e.g., service_1
segmentKeySegment key value used at entry, e.g., serKey_1234
retcodeResult code of the request at the time of delegate execution
delegateSurffyActionErrorprojectKeyProject key value used at entry, e.g., service_1
segmentKeySegment key value used at entry, e.g., serKey_1234
retcodeResult code of the request at the time of delegate execution
delegateSurffyActionCancelprojectKeyProject key value used at entry, e.g., service_1
segmentKeySegment key value used at entry, e.g., serKey_1234
retcodeResult code of the request at the time of delegate execution
delegateSurffyActionBypassprojectKeyProject key value used at entry, e.g., service_1
segmentKeySegment key value used at entry, e.g., serKey_1234
retcodeResult code of the request at the time of delegate execution
delegateSurffyActionBlockprojectKeyProject key value used at entry, e.g., service_1
segmentKeySegment key value used at entry, e.g., serKey_1234
retcodeResult code of the request at the time of delegate execution
delegateSurffyCompleteSuccessprojectKeyProject key value used at entry, e.g., service_1
segmentKeySegment key value used at entry, e.g., serKey_1234
delegateSurffyCompleteErrorprojectKeyProject key value used at entry, e.g., service_1
segmentKeySegment key value used at entry, e.g., serKey_1234