The iOS RNOTVPlayer plugin uses both Objective C and Swift code internally. Due to this, you may encounter a build issue of missing the Swift standard libraries if you do not link Swift code inside your project.
Click here to see an indicator of the error you might receive.
CODE
ld: warning: Could not find or use auto-linked library 'swiftUniformTypeIdentifiers'
ld: warning: Could not find or use auto-linked library 'swiftFileProvider'
ld: warning: Could not find or use auto-linked library 'swift_Concurrency'
ld: warning: Could not find or use auto-linked library 'swiftDataDetection'
ld: warning: Could not find or use auto-linked library 'swiftCoreMIDI'
ld: warning: Could not find or use auto-linked library 'swift_StringProcessing'
Undefined symbols for architecture arm64:
"__swift_FORCE_LOAD_$_swiftCoreMIDI", referenced from:
__swift_FORCE_LOAD_$_swiftCoreMIDI_$_RNOTVPlayer in libRNOTVPlayer.a(RCTOTVSDKManager-472b59130bb522350b86dab9ebff3235.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftCoreMIDI_$_RNOTVPlayer)
"__swift_FORCE_LOAD_$_swiftDataDetection", referenced from:
__swift_FORCE_LOAD_$_swiftDataDetection_$_RNOTVPlayer in libRNOTVPlayer.a(RCTOTVSDKManager-472b59130bb522350b86dab9ebff3235.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftDataDetection_$_RNOTVPlayer)
"__swift_FORCE_LOAD_$_swiftFileProvider", referenced from:
__swift_FORCE_LOAD_$_swiftFileProvider_$_RNOTVPlayer in libRNOTVPlayer.a(RCTOTVSDKManager-472b59130bb522350b86dab9ebff3235.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftFileProvider_$_RNOTVPlayer)
"__swift_FORCE_LOAD_$_swiftUniformTypeIdentifiers", referenced from:
__swift_FORCE_LOAD_$_swiftUniformTypeIdentifiers_$_RNOTVPlayer in libRNOTVPlayer.a(RCTOTVSDKManager-472b59130bb522350b86dab9ebff3235.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftUniformTypeIdentifiers_$_RNOTVPlayer)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solution 1
Click File and select New > File...
In the Choose a template for your new file window, select iOS and Swift File.
In the popup, confirm by clicking Create Bridging Header.
Solution 2
Go to Build Settings and set Always Embed Swift Standard Libraries to YES.
Android
For Android, include the following extra steps:
Open <project_folder>/android/build.gradle, and change the minSdkVersion to 21.
CODE
buildscript {
ext {
...
minSdkVersion = 21
...
Before building for Android, define your Android SDK path by:
Setting ANDROID_SDK_ROOT in your environment, or
Adding sdk.dir path in your project's local properties file at <project_folder>/android/local.properties.
Build and run the Android app on your device using yarn android.
Missing Android SDK errors
Ensure that the local.properties file, which contains Android SDK install path exists in the Android path of the React plugin.
Android manifest collided
If your application uses Android Gradle plugin version 3.6.0 or higher, it may encounter the error: Entry name 'AndroidManifest.xml' collidedwhen building the application. The application can work around this issue by adding the following into the <project_folder>/android/app/build.gradle file: