Earlier quoted context omitted.
C is also very simple to add security exploits to your app. I would never advise C unless the platform is lacking of a C++ compiler. Just use extern "C" at the boundaries.
What’s the threat of a security vulnerability in a 3rd party mobile app that tightly sandboxes your app - especially for a none financial app? I would think that if even a vulnerable app could affect other running processes or the OS itself, you’ve found a vulnerability in the underlying OS.
Ask HN: Best language to share code between an Android and iOS app?
61–70 of 123 posts
Re: Ask HN: Best language to share code between an Android and iOS app?
#62Earlier quoted context omitted.
C is also very simple to add security exploits to your app. I would never advise C unless the platform is lacking of a C++ compiler. Just use extern "C" at the boundaries.
What’s the threat of a security vulnerability in a 3rd party mobile app that tightly sandboxes your app - especially for a none financial app? I would think that if even a vulnerable app could affect other running processes or the OS itself, you’ve found a vulnerability in the underlying OS.
If nothing else it can be used for piracy.
Software Engineering should strive for quality and best practices.
Re: Ask HN: Best language to share code between an Android and iOS app?
#63Earlier quoted context omitted.
I would say use C. Interfacing C with Java is simple JNI. Interfacing C with Swift is very simple, too.
C is also very simple to add security exploits to your app. I would never advise C unless the platform is lacking of a C++ compiler. Just use extern "C" at the boundaries.
Re: Ask HN: Best language to share code between an Android and iOS app?
#64Earlier quoted context omitted.
> Apple is now deprecating ObjectiveC++ How so? Objective-C++ drives a number of Apple projects, so I don't see how they're deprecating it.
Documentation seems to have vanished.
Re: Ask HN: Best language to share code between an Android and iOS app?
#65Since no one else has said it, I'll be the voice of reason. Share your design specs only, and let each platform team write the implementation in the language that they think best. Yes, you'll have two teams spending time on doing the same thing. However, you'll get important benefits. Each team will be able to implement appropriately for their platform. While iPhones and Android phones are rather similar in terms of…
> The app is responsible for processing data, submitting to ML models, and then displaying results in a UI
There is not need to handle this logic seperately. And lots of reasons not to.
Re: Ask HN: Best language to share code between an Android and iOS app?
#66Earlier quoted context omitted.
> Apple is now deprecating ObjectiveC++ How so? Objective-C++ drives a number of Apple projects, so I don't see how they're deprecating it.
Documentation seems to have vanished.
https://developer.apple.com/library/archive/documentation/Co...
Sadly the new manuals are pretty lousy.
Re: Ask HN: Best language to share code between an Android and iOS app?
#67Earlier quoted context omitted.
What’s the threat of a security vulnerability in a 3rd party mobile app that tightly sandboxes your app - especially for a none financial app? I would think that if even a vulnerable app could affect other running processes or the OS itself, you’ve found a vulnerability in the underlying OS.
The threat depends on what the app is used for. If nothing else it can be used for piracy. Software Engineering should strive for quality and best practices.
Also, are you claiming that using C == “not striving for quality” or that it is not “best practice” to use C?
And on a side note, most corporations don’t care about “quality” or “best practice”, they care about shipping and selling software. Two decades in the industry has shown that those two things aren’t as highly correlated as you wish.
Re: Ask HN: Best language to share code between an Android and iOS app?
#68Earlier quoted context omitted.
What’s the threat of a security vulnerability in a 3rd party mobile app that tightly sandboxes your app - especially for a none financial app? I would think that if even a vulnerable app could affect other running processes or the OS itself, you’ve found a vulnerability in the underlying OS.
Presumably the user of the app cares about their own data...
Re: Ask HN: Best language to share code between an Android and iOS app?
#69Since no one else has said it, I'll be the voice of reason. Share your design specs only, and let each platform team write the implementation in the language that they think best. Yes, you'll have two teams spending time on doing the same thing. However, you'll get important benefits. Each team will be able to implement appropriately for their platform. While iPhones and Android phones are rather similar in terms of…
However... Don't assume that a user has an exclusive affinity with one platform at a time. Users will load the app on different phones, sometimes at the same time, so if there are any differences in the way the apps handle data you'll soon see things getting corrupted. Make sure you have lots, and lots, and LOTS of tests.
Re: Ask HN: Best language to share code between an Android and iOS app?
#70Earlier quoted context omitted.
The threat depends on what the app is used for. If nothing else it can be used for piracy. Software Engineering should strive for quality and best practices.
How do you propose that an security vulnerability in an iOS app that doesn’t result in a jailbreak will allow someone to copy the app from an iOS device on to another device? Also, are you claiming that using C == “not striving for quality” or that it is not “best practice” to use C? And on a side note, most corporations don’t care about “quality” or “best practice”, they care about shipping and selling software. Two…
I am claiming both when using a language whose security reports from Google, Apple, Microsoft, ARM, Linux kernel just increase in size every year with the amount of memory corruption and UB induced security exploits.
Like those reports advise, usage of C should be constrained to environments where no other safer alternative is made available, or due to constraints on already deployed software.