Introduction
Welcome to the documentation for the enx CallKit iOS SDK. This SDK allows you to integrate enxRTC (an advanced real-time communication solution) with CallKit, which enables you to integrate voice and video calling capabilities into your iOS applications.
Prerequisites
- Xcode installed on your macOS machine
- Experience with iOS development
- An active Apple Developer account
- An existing iOS project or a new project created in Xcode
Installation
To install the enx CallKit iOS SDK, follow the steps below:
- Open your Xcode project.
- Navigate to File β Swift Packages β Add Package Dependency.
- Enter the GitHub repository URL for the enx CallKit iOS SDK.
- Choose the appropriate version of the SDK and click Next.
- Specify the desired target and click Finish.
Integration
To integrate the enx CallKit iOS SDK into your project, follow the steps below:
- In your Xcode project, open your
AppDelegate.swift
file. - Add the following import statement at the top of the file:
“`swift
import Contentful
“`
- Within the
AppDelegate
class, add the following variable to hold the instance of the enxCallKitManager:
“`swift
var enxCallKitManager: EnxCallKitManager?
“`
- Add the following method to initialize the enxCallKitManager:
“`swift
func setupEnxCallKit() {
enxCallKitManager = EnxCallKitManager()
enxCallKitManager?.initialize()
}
“`
- Call the
setupEnxCallKit
method from theapplication(_:didFinishLaunchingWithOptions:)
method:
“`swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
setupEnxCallKit()
return true
}
“`
Usage
The enx CallKit iOS SDK offers various features and methods to add call capabilities to your iOS app. Below is an overview of the key concepts and operations:
1. Making & Receiving Calls
With the enx CallKit iOS SDK, you can make and receive voice and video calls within your app using CallKit’s native call UI and functionalities.
To make a call, follow these steps:
- Retrieve the contact details of the person you want to call.
- Create a CXHandle object to represent the remote party.
- Create a CXStartCallAction object to initiate the call.
- Configure the call settings like audio and video options.
- Execute the CXStartCallAction using the enxCallKitManager.
To receive a call, implement the necessary delegate methods and handle incoming call actions by presenting the call UI appropriately.
For comprehensive code examples and in-depth implementation details, please refer to the SDK’s official documentation.
2. Handling Call Actions
The enx CallKit iOS SDK provides methods and delegates to handle incoming and outgoing call actions, as well as perform actions during the call, such as answering, rejecting, holding, and ending calls.
By implementing the appropriate delegate methods, you can manage the call actions and respond accordingly.
For detailed information on handling call actions and available delegate methods, consult the official SDK documentation.
3. Call UI Customization
You can customize the CallKit UI by modifying various elements, such as call interfaces, display names, icons, and more.
Refer to the enx CallKit iOS SDK documentation for detailed instructions and examples on customizing the UI to match your app’s branding and user experience.
Additional Resources
For additional information and resources related to the enx CallKit iOS SDK, refer to the following:
- GitHub Repository: https://github.com/example/repo
- API Reference: https://docs.example.com/api
- Community Forum: https://forum.example.com
Conclusion
Congratulations! You have successfully integrated the enx CallKit iOS SDK into your iOS application. You can now utilize the powerful voice and video calling capabilities within your app, thanks to the seamless integration with CallKit. For any further assistance or queries, please don’t hesitate to reach out to the enx CallKit community.