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.
Note: When you build your project, Unity copies these assets into the generated Xcode project if their plug-in Inspector window settings match the build target. Xcode then compiles and links them into the final application.
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:
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:
.a)..dylib)..framework) and XCFrameworks (.xcframework).
Important: Dynamic libraries (.dylib) are for use in the simulator only. Apple doesn’t permit publishing applications that contain .dylib files.
For distributing binaries that support multiple platforms and architectures, the recommended best practice is to use XCFrameworks.