flyskywhy / react-native-gcanvas

react native canvas based on gpu opengl glsl GCanvas -- A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎)
Apache License 2.0
216 stars 21 forks source link

ARC Semantic Issue (iOS) #44

Closed Tebrynn closed 2 years ago

Tebrynn commented 2 years ago

...../node_modules/@flyskywhy/react-native-gcanvas/ios/RCTGCanvasModule.m:81:25: No visible @interface for 'GCanvasModule' declares the selector 'disable:'

I've got these 4 errors: No visible @interface for 'GCanvasModule' declares the selector 'disable:' No visible @interface for 'GCanvasModule' declares the selector 'setDevicePixelRatio:ratio:' No visible @interface for 'GCanvasModule' declares the selector 'resetGlViewport:' No visible @interface for 'GCanvasModule' declares the selector 'render:commands:type:'

I installed latest version (2.3.24) Any idea?

flyskywhy commented 2 years ago

Do you (as README.md described):

Add below into /ios/Podfile

  pod "GCanvas", :path => "../node_modules/@flyskywhy/react-native-gcanvas/GCanvas.podspec"
cd YOUR_PROJECT/ios
pod install
Tebrynn commented 2 years ago

ye i've done it tnx but now i see only a black screen. I logged canvas width and height and inside render method (proton part). Logs seems correct but nothing happens. I tried on both emulator and real device. No errors only a warning when i unmount component. I tried a previous version 2.3.0 and it seems to work. "react": "18.0.0", "react-native": "0.69.1",

Tebrynn commented 2 years ago

it stopped working again when i open the app page. The warning i got is "EventEmitter.removeListener('GCanvasReady',...: Method has been deprecated, Please use remove() on the subscription returned by EventEmitter.addListener.

flyskywhy commented 2 years ago

Maybe react-native-gcanvas is not support react-native 0.69, please try lower version rn for test, and tell me the result, thanks.

Tebrynn commented 2 years ago

I think the problem is the listener. I made it work sometimes but i see a lot of memory leaks. It doesn't unmount when i unmount the parent component

flyskywhy commented 2 years ago

version 2.3.22 fix iOS memory leak, can you try it?

flyskywhy commented 2 years ago

version 2.3.26 fixed EventEmitter.removeListener ... Method has been deprecated