Game World!

Join A World Of Gamers

Enter your email address:

Delivered by FeedBurner

Followers

Popular Posts

Friday 25 June 2021

Is Bitcode required?

 2Bug of the Month: Bitcode



I was having some trouble uploading my Ionic Ios App to the App Store through Xcode(v 7.2).

I was constantly faced with the error: "upload failed: You are not authorized to use this service for provider XXXXXX"

After some careful problem solving I was able to resolve that I needed to have "Enable Bitcode: Yes" under my project's Target. This allowed me to upload the app through Application Loader by exporting the app with bitcode attached.

My question is in terms of my wanting to better understand what is going on under the hood here.

What difference did the enabling of bitcode make to allow the app to upload vs not having it? I tested this out to confirm and this one change was the difference in the success and failure of uploading.

Thanks.

0

What difference did the enabling of bitcode make to allow the app to upload vs not having it? I tested this out to confirm and this one change was the difference in the success and failure of uploading.

->You don't need to Set Yes to bitcode for iOS apps. Enabling bitcode might have simply recompiled your libraries ( above error looks like an profile error). To prove this theory, disable bitcode (Set Value to No) recompile and upload on iTunes.

Refer to this link https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html

For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode.

  • I uploaded few versions of my app when bitcode was enabled. Recently I'm using a SDK to connect a printer. If I keep bitcode enabled, I'm getting apple linker error with exit code 1. Because the SDK is not bitcode supported. Hence, I disabled bitcode and uploaded to itunesconnect for testflight but the new version of the app is not showing. Any suggestion in this case? – Julfikar Oct 6 '17 at 3:26

What is app thinning? (iOS, tvOS, watchOS)

The App Store and operating system optimize the installation of iOS, tvOS, and watchOS apps by tailoring app delivery to the capabilities of the user’s particular device and operating system versions, with minimal footprint. This optimization, called app thinning, lets you create apps that use the most device features, occupy minimum disk space, and accommodate future updates that can be applied by Apple. Faster downloads and more space for other apps and content provides a better user experience.

Slicing (iOS, tvOS)

Slicing is the process of creating and delivering variants of the app bundle for different target devices and operating system versions. A variant contains only the executable architecture and resources that are needed for the target device and operating system version. You continue to develop and upload full versions of your app to App Store Connect. The App Store will create and deliver different variants based on the devices and operating system versions your app supports. Use asset catalogs so that the App Store can select images, GPU resources, and other data appropriate for each variant. When the user installs an app, a variant for the user’s device and operating system version is downloaded and installed.

Xcode simulates slicing during development so you can create and test variants locally. Xcode slices your app when you build and run your app on a device or in Simulator. When you create an archive, Xcode includes the full version of your app but allows you to export variants from the archive.

Note: Sliced apps are supported on devices running iOS and tvOS 9.0 and later. Otherwise, the App Store delivers universal variants to customers. Universal variants are also delivered through Mobile Device Management (MDM), apps purchased in volume through Apple School Manager or Apple Business Manager, or apps downloaded using iTunes 12.6 or earlier.

Bitcode

Bitcode is an intermediate representation of a compiled program. Apps you upload to App Store Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the App Store.

For iOS apps, bitcode is the default, but optional. For watchOS and tvOS apps, bitcode is required. If you provide bitcode, all apps and frameworks in the app bundle (all targets in the project) need to include bitcode.

Xcode hides your app’s symbols by default, so they are not readable by Apple. When you upload your app to App Store Connect, you have the option of including symbols. Including symbols allows Apple to provide crash reports for your app when you distribute your app using TestFlight or distribute your app through the App Store. If you’d like to collect and symbolication crash reports yourself, you don’t have to upload symbols. Instead, you can download the bitcode compilation dSYM files after you distribute your app.

On-Demand Resources (iOS, tvOS)

On-demand resources are resources—such as images and sounds—that you can tag with keywords and request in groups, by tag. The App Store hosts the resources on Apple servers and manages the downloads for you. The App Store also slices on-demand resources, further optimizing variants of the app.

On-demand resources provide a better user experience:

  • App sizes are smaller so apps download faster, improving the first-time launch experience.

  • On-demand resources download in the background, as needed, while the user explores your app.

  • The operating system purges on-demand resources when they are no longer needed and disk space is low.

For example, an app may divide resources into levels and request the next level of resources only when the app anticipates that the user will move to that level. Similarly, the app can request In-App Purchase resources only when the user makes the corresponding in-app purchase.

Note: If you distribute your app to registered devices (outside of the App Store), you must host the on-demand resources yourself.

To set up on-demand resources in your app, read On-Demand Resources Guide and NSBundleResourceRequest.

Floating Button

Button