simonhamp wrote a comment+100 XP
2w ago
Thanks 😊
Mobile and Desktop's architectures are completely different. Plugins for Mobile don't work on Desktop
Desktop does support a kind of secure storage via Electron APIs for encrypting values via a key that is generated and stored in the user's keychain.
This is all abstracted away for you so you just need to use these System::encrypt() and System::decrypt() methods: https://nativephp.com/docs/desktop/2/the-basics/system#encryption-decryption
simonhamp wrote a comment+100 XP
2mos ago
@akaydin I'm not sure what you mean: "Is it practical to have common files for those two apps?"
how do they handle multi-platform and secure apps?
NativePHP is multi-platform by default - your single Laravel codebase is used to build binaries for each platform.
No apps distributed to a user's device are 100% secure. Any critical business logic should always run server-side with a secure API in front of it
simonhamp wrote a comment+100 XP
2mos ago
@Prantho-das Please join the Discord for support
simonhamp liked a comment+100 XP
2mos ago
Incredibly, despite what Simon says in this video, NativePHP for Mobile is now free!
https://nativephp.com/blog/nativephp-for-mobile-is-now-free
However, at the same time, some of the native features (geolocation, biometrics, etc) have moved to plugins, which are NOT free. But the core native functionality is.
simonhamp wrote a comment+100 XP
2mos ago
@gwleuverink Exactly!
simonhamp liked a comment+100 XP
2mos ago
Another argument against coupling your server and client classes;
At any point in time you may have different app versions consuming your api. If your mobile/desktop app would share say the same models you’ll undoubtedly run into trouble down the line.
Keep that stuff separate and think in terms of api versions and backwards compatibility. Out of date apps will linger around. It is a different paradigm!
simonhamp liked a comment+100 XP
2mos ago
@Prantho-das hi there. You can't do it like you normally would with web application. Only SQLite is available for native apps, as Simon explained in the video, cause of the physical limitations, and connecting directly to MySQL database that is online is a huge security risk (as Simon explained in the video). What you can do though, is create a web app that's using MySQL, set up the API endpoints from your web app and benefit from MySQL that way. But you would still probably have to use SQLite for some data, cause you probably need to store at least some data on your device.
simonhamp liked a comment+100 XP
2mos ago
simonhamp liked a comment+100 XP
2mos ago
simonhamp liked a comment+100 XP
2mos ago
simonhamp liked a comment+100 XP
2mos ago
simonhamp liked a comment+100 XP
2mos ago
simonhamp liked a comment+100 XP
2mos ago
simonhamp liked a comment+100 XP
2mos ago