Source and binary forms of native iOS plug-ins
Learn about the different forms of native iOS plug-ins you can create for iOS, tvOS, and visionOS.
Read time 1 minuteLast updated 12 days ago
Learn about the different forms of native iOS plug-ins you can create for iOS, tvOS, and visionOS.
You can deliver native plug-ins for iOS, tvOS, and visionOS as source files or precompiled binaries.
Source files
You can provide plug-ins as source files written in Swift, Objective-C, Objective-C++, C, or C++.
The advantages of using source files are as follows:
- Universal compatibility: Works on any device, simulator, architecture, or platform.
- Easy modification: You can easily inspect and change the code.
- Improved debugging: You can debug into the source code directly from Xcode.
- Swift considerations: If you use Swift, the Swift runtime must be embedded into the final app, which can slightly increase the app's size. This isn't a concern for visionOS, where the runtime is already included.
Precompiled binaries
You can provide your plug-ins as precompiled binaries. This approach packages your code for distribution and protects your intellectual property by hiding the source code.
Supported binary types include:
- Static libraries ().
.a - Dynamic libraries ().
.dylib - Frameworks () and XCFrameworks (
.framework)..xcframework
For distributing binaries that support multiple platforms and architectures, the recommended best practice is to use XCFrameworks.