Skip to main content
Version: 4.6.1

iOS Agent

Overview

iOS Agent is a native iOS SDK that provides NetFUNNEL 4 traffic control functionality for iOS applications. It integrates directly into your iOS app code to implement queue management and waiting room functionality, distributing server load and ensuring stable user experience during high-traffic periods.

Key Features

  • Native iOS SDK: Direct integration into iOS app code with simple API calls
  • Two Control Methods: Choose between Basic Control (entry speed limiting) and Section Control (concurrent user management)
  • Dedicated APIs: Basic Control uses nfStart()/nfStop(), Section Control uses nfStartSection()/nfStopSection()
  • Native Waiting Rooms: WebView-based waiting room templates with customizable UI options
  • Real-time Queue Updates: Receive live queue position, wait time, and progress information
  • Network Recovery: Automatic recovery from network issues to maintain user experience
  • Robust Error Handling: Comprehensive delegate system with smart error handling strategies
  • Lightweight SDK: Minimal dependencies with native iOS frameworks
  • iOS Lifecycle Integration: Seamless integration with ViewController lifecycle and iOS components

System Requirements

  • iOS: 12.0 or later
  • Xcode: 12.0 or later
  • Swift: 5.0 or later
  • Objective-C: Compatible with existing Objective-C projects
  • UI Frameworks: Storyboard (Objective-C/Swift) or SwiftUI

Compatible Environments

  • Native iOS Apps: Swift/Objective-C-based iOS applications with full SDK integration
  • Hybrid Apps: Applications with native iOS components (WebView content is not protected by this SDK)
  • All iOS Build Types: Debug and release builds with full optimization support

How It Works

The iOS SDK integrates seamlessly with your app's lifecycle:

  1. SDK Initialization: Initialize NetFUNNEL SDK in your AppDelegate
  2. Native Integration: Call nfStart() for Basic Control or nfStartSection() for Section Control in your ViewControllers
  3. WebView Waiting Room: SDK displays WebView-based waiting room (default template or custom UI)
  4. Queue Management: NetFUNNEL server handles queue position and admission automatically
  5. Key Return: Call nfStop() for Basic Control or nfStopSection() for Section Control when users complete their actions

Control Flow Examples

Basic Control Flow:

User Action → nfStart() → Waiting Room → nfSuccess() → User Proceeds → nfStop()

Section Control Flow:

User Action → nfStartSection() → Waiting Room → nfSuccess() → User in Section → nfStopSection()

Important Limitations

Hybrid App Limitations
  • WebView Content: This SDK does not protect WebView content (HTML/JavaScript pages)
  • Native Components Only: Traffic control applies only to native iOS components (ViewControllers, etc.)
  • Web/JavaScript Agent: For WebView-based content, use the JavaScript Agent instead

Getting Started

To quickly begin with iOS Agent, refer to the Quickstart guide.

Practice Projects Available

Need a basic project to practice with? Check out our Sample Projects which include an iOS Application (Single ViewController) template ready for NetFUNNEL SDK integration practice.

Documentation

Core Documentation

Implementation Guides