2 ms·
> After the new machines are released, all Mac app store apps will just magically work because they were recompiled behind the scenes by Apple to run on ARM. T
by saagarjha 6y ago
> After the new machines are released, all Mac app store apps will just magically work because they were recompiled behind the scenes by Apple to run on ARM.
That would be really magical; this is essentially impossible.
- awinder 6y agoIt's not every app as far as I know because I believe you can opt out of BitCode, but this would be widely the case with exceptions: https://thenextweb.com/apple/2015/06/17/apples-biggest-developer-news-at-wwdc-that-nobodys-talking-about-bitcode/ https://thenextweb.com/apple/2015/06/17/apples-biggest-devel... https://www.highcaffeinecontent.com/blog/20190518-Translating-an-ARM-iOS-App-to-Intel-macOS-Using-Bitcode https://www.highcaffeinecontent.com/blog/20190518-Translatin... (other direction but clearly demonstrative of what apple can do here)
- saagarjha 6y agoYes, Bitcode is not a requirement for the Mac App Store. Furthermore, Steven’s blog post is misleading: it implies that Apple can just seamlessly translate IR into a different architecture, and shows it kind of working for the simple example he has there. The problem is that this falls apart for anything that is more than mildly complicated (which, of course, is not mentioned in he blog post) because of ABI differences. Apple did this once before with Apple Watch and there they had full control of both the chipset and the ABI on both sides of the transition, plus they had the forsight to mandate Bitcode submissions for the platform. And watchOS itself precludes doing certain fancy things anyways. So this isn’t really a proven way forwards in this case.
- kevin_thibedeau 6y agoAnything that uses a 32-bit uintptr_t will blow up.
- Cthulhu_ 6y agoIt's not though; when submitting a native app to the app store, at least for iOS you're sending them an intermediate version; a version that can be compiled and repackaged by Apple for a specific CPU, e.g. 32 or 64 bits. They will also grab the assets intended for that platform, e.g. regular images for small screens, 2x images for retina and 3x images for iPad screens. See also: https://en.wikipedia.org/wiki/Intermediate_representation https://en.wikipedia.org/wiki/Intermediate_representation
- danieldk 6y agoChris Lattner: Bitcode is not a magic solution, though. You can’t take a 32-bit app, for example, and run it on a 64-bit device. That kind of portability isn’t something that Bitcode can give you, notably because that is something that’s visible in C. As you’re writing C code, you can write #ifdef pointer size equals 32, and that’s something that Bitcode can’t abstract over. It’s useful for very specific, low-level kinds of enhancements, but it isn’t a panacea that makes everything magically portable. https://atp.fm/205-chris-lattner-interview-transcript https://atp.fm/205-chris-lattner-interview-transcript