Thank you for visiting the documentation page for BranchNative. Here, you will find all the information you need to integrate and utilize the features offered by this software library. Whether you are a beginner or an experienced developer, this documentation will guide you through the process step by step.
Getting Started
If you are new to BranchNative, this section will help you get up and running quickly. Follow the instructions below to integrate this library into your project:
Step 1: Installation
To install BranchNative, follow these steps:
- Open your project in Xcode.
- Navigate to the target where you want to include BranchNative.
- Go to the “General” tab and scroll down to “Linked Frameworks and Libraries”.
- Click the “+” button and select “Add Other…”.
- Browse to the location where you saved BranchNative and select the “BranchNative.framework” file.
- Ensure that “Copy items if needed” is selected and click “Add”.
- You have successfully installed BranchNative!
Step 2: Initialization
Now that you have installed BranchNative, it’s time to initialize it in your code:
import BranchNative
class YourViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
BranchNative.initialize()
}
}
Features
BranchNative offers several features that can enhance your mobile app. Explore the functionality provided by the library:
Feature 1: Deep Linking
Deep linking allows you to route users to specific content or actions within your app. With BranchNative, you can easily implement deep linking into your app. To handle deep links, follow the steps below:
- Implement the
UIApplicationDelegate
protocol in your application delegate class. - Add the following code to handle deep links:
import BranchNative
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
BranchNative.handleDeepLink()
return true
}
// ...
}
Feature 2: Universal Ads Attribution
With BranchNative, you can track the source of your app installations and attribute them to specific ad campaigns effectively. To enable Universal Ads Attribution, follow these steps:
- Ensure you have integrated BranchNative into your project and initialized it as mentioned earlier.
- Add the following code to track ad campaigns:
import BranchNative
class MyViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
BranchNative.trackAdCampaign()
}
// ...
}
Troubleshooting
If you encounter any issues while working with BranchNative, try the following solutions:
Issue 1: Deep Linking Not Working
If deep linking is not working as expected, ensure that you have followed all the steps mentioned in the Feature 1: Deep Linking section. Double-check your implementation and make sure you have correctly added the required code.
Issue 2: Universal Ads Attribution Not Tracking
If the Universal Ads Attribution feature is not tracking your ad campaigns, verify that you have integrated and initialized BranchNative correctly. Check your code in the Feature 2: Universal Ads Attribution section, and ensure that the tracking code is being called at the appropriate time in your app’s lifecycle.
Conclusion
Congratulations! You have successfully learned how to install and integrate BranchNative into your mobile app. You are well-equipped to utilize its powerful features, such as deep linking and universal ads attribution, to enhance your app’s functionality and track user interactions efficiently. If you have any further questions or need assistance, please don’t hesitate to reach out to our support team.