-
Notifications
You must be signed in to change notification settings - Fork 564
Bitcode support for iOS frameworks #1202
Comments
Not yet. Why do you need that functionality? |
We have a large iOS project that uses bitcode. Xcode requires that if you enable bitcode, all your framework dependencies must also be built with bitcode. |
On watchOS/tvOS that’s required. It is also likely in future this would be expanded to iOS. |
Bitcode is required to be enabled only in WatchOS but if you have optionally enabled bitcode in your regular app, it is required that all frameworks that are included are also bitcode enabled. |
Well, currently we cannot provide bitcode compatible with what Apple needs, so maybe just avoid using bitcode in the meantime. |
Is it a technical limitation that would live past 1.0? |
This part of statement is not correct. Both tvOS and watchOS require bitcode enabled now. See https://developer.apple.com/tvos/submit/
So to summarize. Without bitcode you cannot develop any tvOS and watchOS frameworks/apps. I completely understand that enabling bitcode is a complex feature, partially because Apple does whatever they want with LLVM. Same issue discussion in rust is open for 1,5 years already and with no ETA. However, IMO, K/N is in better position than Rust, because for Rust iOS support is a low-prio "good to have" feature, whereas K/N is devoted to client side from the beginning. My team is investigating now, whether we could ditch our 2 codebases on Java for Android/AndroidTV and Swift on iOS/tvOS to build one single K/N code and test base for all platforms. Everything looks too good to be true 😄 Except if there is no ETA for bitcode (even in 6 months from now), we won't be able to ship it to customers who use bitcode for a long time now and the whole idea falls apart. K/N FTW! 🏎 (edit): I updated the comment to remove incorrect claim and clarify framework case, sorry about that. |
I totally agree with @oleksandr-yefremov! We start a new SKD project that is 90% business logic, so we're starting it in Kotlin, with the expectations that it will advance quickly and it will support Bitcode and Dynamic Library in the next time (6 months is good enough). Will be a real blow if it doesn't, but we're willing to take the risk. |
It appears that Rust has recently added support for outputting Bitcode: rust-lang/rust#48896, in case that work provides any useful pointers for Kotlin Native. |
Is there any news on this topic? We're also considering K/N but support for iOS bitcode is also a blocking point for us. Thanks |
Created a ticket on YouTrack for this since it seems like things are more frequently responded to by Jetbrains over there: https://youtrack.jetbrains.com/issue/KT-27147 |
Does this mean bitcode is supported now? 😲 |
Not exactly bitcode, what we support is adding markers showing Apple tools that produced code is aware about bitcode and could be used with it. So please try and let us know about your results. |
Have someone any experience with this compiler option "-Xembed-bitcode"? Does apple reject apps with this marker ? |
We've just uploaded iOS app to iTunes Connect using -Xembed-bitcode without any problems. If your iOS project has ENABLE_BITCODE flag set, and any of the included frameworks does not provide bitcode, the archive operation will fail (and you cannot upload it to iTunes). ps: iOS Framework that we are using was built from kotlin-native project with -xembed-bitcode marker. |
@webfrea-k you uploaded to AppStore connect... Was the app approved and did you publish it in the App Store? |
@gimlids no, we did not send it to approval. It was just for testing if technicality speaking app is compliant with AppStore. We were concerned if upload will fail due to some internal bitcode checking mechanism. |
I'm confused - is bitcode working or not? I did a quick and dirty test and it seemed to be working. I created a dummy Kotlin Native framework:
Then I added the framework to a new app, archived it, and exported it with the "Rebuild from Bitcode" option using my enterprise cert. It seems to work fine. I've been searching for an alternative to C++ for sharing code between iOS and Android libraries, however lack of iOS bitcode support originally turned me away. If it is working, Kotlin/Native seems like an exciting option :) |
I've uploaded an iOS app to the App Store with the Bitcode option selected - there was no error or warning. Yet after processing there is no "Download dSYM" link. Doesn't that indicate that the binaries haven't been rebuilt? |
So my understanding is iOS and tvOS would be supported, watchOS would not. |
This will become false with 1.3.50, which is going to include real bitcode support.
Please note that "bitcode support" is not exactly the same as "watchOS support". The latter would also require other efforts. |
Fixed in 1.3.50. |
Hi. Is there a way to generate an iOS framework that has bitcode enabled from the gradle plugin?
Currently
./gradlew build
generates iOS frameworks for simulator and device but they don't seem to be bitcode enabled.The text was updated successfully, but these errors were encountered: