How to ENABLE_BITCODE in Xcode 7?
Asked Answered
E

6

63

I'm developing with parse.com and I get this problem upgrading to Xcode 7. Some Parse Frameworks are not fully working.

I've got this Warning:

URGENT: all bitcode will be dropped because '/Users/[MY_USER]/Downloads/parse-starter-project-1/ParseStarterProject/Parse.framework/Parse(PFMutableFileState.o)' was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. Note: This will be an error in the future.

Let me remind that everything was working in the last version of Xcode 6.

How to ENABLE Bitcode in Xcode 7?

Ellamaeellan answered 3/7, 2015 at 10:57 Comment(0)
G
136

If you are using a third-party framework or library that was updated for iOS 9, and you don't want to include bitcode, then you should check to see if a version of the framework was provided without bitcode. See Apple's note on when to include it in your app bundle:

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.

To disable/enable bitcode in your project, follow these steps:

  1. In the project build settings, make sure you have enabled All settings to be visible.
  2. The Build Options are the 4th section down. Select Yes or No for the Enable Bitcode option.

enter image description here

enter image description here

Garnishee answered 8/9, 2015 at 20:14 Comment(1)
You def have to do it to your Pod directory too, if you have any cocopodsSilvereye
M
4

That would be something Parse has to do, when enabling bitcode for your app, all apps and frameworks in your bundle need to include bitcode (see here). As you can see, the Parse framework does not use this as of now, which is understandable as this is still in beta and not ready for prime-time yet.

Metzgar answered 3/7, 2015 at 11:14 Comment(0)
P
3

This appears to now be an error in Xcode 7 beta 3. If the the Cocoapod you're using wasn't built with ENABLE_BITCODE turned on, you can try disabling it altogether by adding the following to the bottom of your Podfile:

post_install do |installer|

  installer.pods_project.targets.each do |target|
    installer.pods_project.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end

    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

WARNING: From what I've read, you can't submit WatchKit apps without ENABLE_BITCODE turned on, so that is a trade-off until Parse updates their pods.

Pelletier answered 15/7, 2015 at 5:24 Comment(3)
Crashes pod install with the exception, undefined method project' for #<Pod::Installer:0x007fb3da9fb128>`Pennoncel
change "project" to "pods_project"Gretna
crash here too.Underhanded
T
3

Just Search for bitcode in Build setting and set it to false/NO

Tort answered 4/11, 2015 at 14:12 Comment(0)
C
1

You have several options

  • Enable Bitcode (ENABLE_BITCODE)
  • Other C Flags(OTHER_CFLAGS) with -fembed-bitcode
  • Create User-Defined Setting BITCODE_GENERATION_MODE with bitcode

[Bitcode]

Citral answered 8/5, 2021 at 12:1 Comment(0)
D
0

Bitcode will be deprecated from Xcode 14: https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes

Deprecations Starting with Xcode 14, bitcode is no longer required for watchOS and tvOS applications, and the App Store no longer accepts bitcode submissions from Xcode 14.

Xcode no longer builds bitcode by default and generates a warning message if a project explicitly enables bitcode: “Building with bitcode is deprecated. Please update your project and/or target settings to disable bitcode.” The capability to build with bitcode will be removed in a future Xcode release. IPAs that contain bitcode will have the bitcode stripped before being submitted to the App Store. Debug symbols for past bitcode submissions remain available for download. (86118779)

Danica answered 25/7, 2022 at 2:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.