Teknasyon / assessments-react-native

React Native Assessment #001
Apache License 2.0
0 stars 3 forks source link

Electrode Native package inconsistency #1

Open borabiricik opened 8 months ago

borabiricik commented 8 months ago

Environment

Expected Behavior

Project is being created successfully. After creating the project, run ern run-ios should boot mobile emulator and start the app.

Current Behavior

Instead of booting up the project it throws the following errors to terminal. When I inspect the iOS runner, electrode-native's native code (objective-c) is throwing following errors.

Screenshot 2024-01-08 at 16 01 53 image

Possible Solution

Maybe we can consider working with other third-party tools or native solutions for combining native code and react-native code. iOS E.g: https://reactnative.dev/docs/communication-ios Android E.g: https://reactnative.dev/docs/communication-android

Steps to Reproduce

(Before start, made sure cocapods and XCode CLI Tools installed correctly)

  1. Install electrode-native cli with npm install -g electrode-native.
  2. Generate ERN project with ern create-miniapp teknasyon-assesment-miniapp.
  3. run ern run-ios in root directory.
  4. Observe the issues in electrode-native package itself. It should be throwing objective-c errors in ios environment and gradle error in android environment.

Detailed Description

Currently, the issues in electrode-native itself a huge blocker for this case since it's not even booting up the project I created with ern create-miniapp command and didn't touch a single line of template. I did try to modify objective-c code but it didn't solve the error.

I assume Electrode Native is not being used so often (referring to npm downloads: https://www.npmjs.com/package/electrode-native). We definitely should consider alternative ways to implement this functionality since electrode-native itself is not working properly.

Also a key point: They're not maintaining this project properly, their GitHub repo has many issues that is not being solved (https://github.com/electrode-io/electrode-native/issues).

Possible Implementation

If we're not planning to use Electron Native's other functionalities (like Containerising, API's, linking multiple miniapps etc.) maybe we can implement react-native's suggested combining native code and react-native solutions.

Conclusion

I wouldn't rely on Electrode Native in use-cases for production scenarios because:

  1. Project is not stable. Even the dev environment is not stable in most of the scenerios. If you check some of the open issues in their GitHub and most them are in extremely basic steps.
  2. Besides previous, even if it's not stable, they are not trying to fix the unstability. (That is odd, because they are funding by Walmart Labs.)
borabiricik commented 8 months ago

FYI: Tried to downgrade electrode native & ios version but didn't effect the results