Documentation Index Fetch the complete documentation index at: https://wukong.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Integration via CocoaPods
Add the dependency to your project’s Podfile:
Then run the installation command:
Integration via Source Code
If you need to use the latest development version, you can integrate directly from the GitHub repository:
pod 'WuKongIMSDK' , :git => 'https://github.com/WuKongIM/WuKongIMiOSSDK.git'
Swift Package Manager
You can also integrate using Swift Package Manager:
In Xcode, go to File → Add Package Dependencies
Enter the repository URL: https://github.com/WuKongIM/WuKongIMiOSSDK.git
Select the version and add to your project
Manual Integration
For manual integration:
Download the latest release from GitHub Releases
Drag WuKongIMSDK.framework into your project
Add the framework to your target’s “Frameworks, Libraries, and Embedded Content”
Set “Embed & Sign” for the framework
Basic Setup
After integration, import the SDK in your code:
Or in Objective-C:
#import <WuKongIMSDK/WuKongIMSDK.h>
Initialization
Initialize the SDK in your AppDelegate:
// Swift
func application ( _ application : UIApplication, didFinishLaunchingWithOptions launchOptions : [UIApplication.LaunchOptionsKey: Any ] ? ) -> Bool {
// Initialize WuKongIM SDK
WKSDK. shared . setup ()
return true
}
// Objective-C
- ( BOOL )application:(UIApplication * )application didFinishLaunchingWithOptions:( NSDictionary * )launchOptions {
// Initialize WuKongIM SDK
[WKSDK.shared setup ];
return YES ;
}
Configuration Options
You can configure various options during initialization:
// Swift
let options = WKOptions ()
options. connectAddr = "ws://your-server.com:5200"
options. apiURL = "http://your-api-server.com"
options. uploadURL = "http://your-upload-server.com"
WKSDK. shared . setup ( options : options)
// Objective-C
WKOptions * options = [[WKOptions alloc ] init ];
options.connectAddr = @"ws://your-server.com:5200" ;
options.apiURL = @"http://your-api-server.com" ;
options.uploadURL = @"http://your-upload-server.com" ;
[WKSDK.shared setupWithOptions: options];
Permissions
Add necessary permissions to your Info.plist:
<!-- Network access -->
< key > NSAppTransportSecurity </ key >
< dict >
< key > NSAllowsArbitraryLoads </ key >
< true />
</ dict >
<!-- Microphone access for voice messages -->
< key > NSMicrophoneUsageDescription </ key >
< string > This app needs microphone access to record voice messages </ string >
<!-- Camera access for photo/video messages -->
< key > NSCameraUsageDescription </ key >
< string > This app needs camera access to take photos and videos </ string >
<!-- Photo library access -->
< key > NSPhotoLibraryUsageDescription </ key >
< string > This app needs photo library access to send images </ string >
Next Steps
Connection Management Learn how to manage connection status
Message Handling Implement message sending and receiving
Channel Management Manage channels and groups
Conversation Management Handle conversation lists