If your project utilizes its own Package.swift file, you have the option to include ButterflyMX as a dependency within that file. Follow the steps below to add the BMXSDK package to your dependencies list.
- Include the ButterflyMX package in your list of dependencies:
dependencies: [
.package(url: "https://github.com/runslikebutter/butterflymx-sdk-ios.git", .upToNextMajor(from: "2.3.1"))
],
- Add a dependency on the BmxCore and BmxCall products to the targets that will use ButterflyMX within your application:
.target(
name: "MyApp",
dependencies: [
.product(name: "BMXCore", package: "butterflymx-sdk-ios"),
.product(name: "BMXCall", package: "butterflymx-sdk-ios")
]
)
- In Xcode, navigate to File > Add Packages....
- In the dialog box that appears, paste the URL of the BMXSDK repository (https://github.com/runslikebutter/butterflymx-sdk-ios.git) into the search bar. Wait for the butterflymx-sdk-ios package to appear in the search results.
- Choose the desired version of the ButterflyMX package, then click Add Package.
- In the list of available packages, select both the BmxCore and BmxCall packages.
- Finally, click Add Package to add the selected packages to your project.