Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
[ad_1]
I’m presently programming an app which makes use of the Digicam (RAW picture format) on MacOS.
Subsequently I used react-native to create the app utilizing the .js information. Due to the RAW picture format, I’ve/need to use my very own features from SWIFT.
Is there a risk to make use of the SWIFT features inside my .js information with out a Goal-C bridge inbetween? My present strategy beneath:
swift file:
import AVFoundation
import Basis
@objc protocol MyJSClass : JSExport {
func myfunc()
}
class MyClass: NSObject, MyJSClass{
func myfunc(){
}
}
and in my .js file:
...
import {NativeModules} from 'react-native';
...
export default MyScreen = {{ route, navigation }} => {
const module = NativeModules.MyJSClass
module.myfunc();
...
};
...
the error I obtain is
null just isn’t an object (evaluating ‘module.take a look at’)
I debug utilizing expo run:ios
[ad_2]