im building my npm package for ios, using native modules because i need to use a third party framework, the package is published and all good, installed to my app but when im about to render the native view from IOS to RN getting the error, heres in the IOS side:
this is my CounterViewManager.swift:
import Foundation
@objc(CounterViewManager)
class CounterViewManager: RCTViewManager {
override func view() -> UIView! {
let label = UILabel()
label.text = "Swift Counter"
label.textAlignment = .center
return label
}
}
my CounterViewManager.m:
#import <Foundation/Foundation.h>
#import "React/RCTViewManager.h"
@interface RCT_EXTERN_MODULE(CounterViewManager, RCTViewManager)
@end
and this how i import it from RN:
import { requireNativeComponent } from 'react-native';
const MyViewManager = requireNativeComponent('CounterView');
export const Test = () => {
return (
<MyViewManager></MyViewManager>
)
}
in RN i use CounterView
because RN by default wont detect Manager
at the end, but like i said always getting error that was not found in the UIManager, is driving me crazy, appreciate the help.
started the npm package following the docs: https://reactnative.dev/docs/native-modules-setup
when running in local to test works, can require the native module with that name, just when installing in my app via npm get that error