From c3bb40f750d15cffb155be1debdd929c84824325 Mon Sep 17 00:00:00 2001
From: Shehab Tareque <stareque@atlassian.com>
Date: Fri, 8 Jul 2022 15:01:50 +1000
Subject: [PATCH] Remove all instances of bitcode as not supported in Xcode 14
 https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes

---
 .../Apollo-Project-Performance-Testing.xcconfig       |  1 -
 .../Apollo/Apollo-Target-TestHost-iOS.xcconfig        |  1 -
 .../Shared/Workspace-Target-Codegen.xcconfig          |  1 -
 Configuration/Shared/Workspace-Target-Test.xcconfig   |  3 ---
 .../Shared/Workspace-Universal-Framework.xcconfig     | 11 -----------
 5 files changed, 17 deletions(-)

diff --git a/Configuration/Apollo/Apollo-Project-Performance-Testing.xcconfig b/Configuration/Apollo/Apollo-Project-Performance-Testing.xcconfig
index 8f9cbc9a16..642cf691b3 100644
--- a/Configuration/Apollo/Apollo-Project-Performance-Testing.xcconfig
+++ b/Configuration/Apollo/Apollo-Project-Performance-Testing.xcconfig
@@ -3,5 +3,4 @@
 ONLY_ACTIVE_ARCH = YES
 
 COPY_PHASE_STRIP = NO
-ENABLE_BITCODE = NO
 ENABLE_TESTABILITY = YES
diff --git a/Configuration/Apollo/Apollo-Target-TestHost-iOS.xcconfig b/Configuration/Apollo/Apollo-Target-TestHost-iOS.xcconfig
index 6b371e3b66..bfb1742c9c 100644
--- a/Configuration/Apollo/Apollo-Target-TestHost-iOS.xcconfig
+++ b/Configuration/Apollo/Apollo-Target-TestHost-iOS.xcconfig
@@ -4,7 +4,6 @@ SDKROOT = iphoneos
 SUPPORTED_PLATFORMS = iphonesimulator iphoneos
 
 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
-ENABLE_BITCODE = NO
 
 INFOPLIST_FILE = Tests/TestHost iOS/Info.plist
 PRODUCT_BUNDLE_IDENTIFIER = com.apollographql.$(PRODUCT_NAME:rfc1034identifier)
diff --git a/Configuration/Shared/Workspace-Target-Codegen.xcconfig b/Configuration/Shared/Workspace-Target-Codegen.xcconfig
index 2afef98af7..e3dcad0c3c 100644
--- a/Configuration/Shared/Workspace-Target-Codegen.xcconfig
+++ b/Configuration/Shared/Workspace-Target-Codegen.xcconfig
@@ -1,4 +1,3 @@
 SDKROOT = macosx
 SUPPORTED_PLATFORMS = macosx
 
-ENABLE_BITCODE = NO
diff --git a/Configuration/Shared/Workspace-Target-Test.xcconfig b/Configuration/Shared/Workspace-Target-Test.xcconfig
index c5c18604db..4c7a189f05 100644
--- a/Configuration/Shared/Workspace-Target-Test.xcconfig
+++ b/Configuration/Shared/Workspace-Target-Test.xcconfig
@@ -1,9 +1,6 @@
 // Packaging
 WRAPPER_EXTENSION = xctest
 
-// Code Generation
-ENABLE_BITCODE = NO
-
 // Disable some known troublesome warnings for the test target, as -Weverything without these exceptions causes errors when importing XCTest
 WARNING_CFLAGS = $(inherited) -Wno-documentation-unknown-command -Wno-incomplete-module -Wno-disabled-macro-expansion -Wno-shadow
 
diff --git a/Configuration/Shared/Workspace-Universal-Framework.xcconfig b/Configuration/Shared/Workspace-Universal-Framework.xcconfig
index b11e19bf0d..22768cede4 100644
--- a/Configuration/Shared/Workspace-Universal-Framework.xcconfig
+++ b/Configuration/Shared/Workspace-Universal-Framework.xcconfig
@@ -19,14 +19,3 @@ TARGETED_DEVICE_FAMILY[sdk=watch*] = 4
 SDKROOT[sdk=macosx*] = macosx
 SUPPORTS_MACCATALYST = YES
 
-// Enable Bitcode only for actual devices, not for macOS or simulators
-ENABLE_BITCODE[sdk=watchos*][config=Release] = YES
-ENABLE_BITCODE[sdk=iphoneos*][config=Release] = YES
-ENABLE_BITCODE[sdk=appletvos*][config=Release] = YES
-
-// By default, BITCODE_GENERATION_MODE is "marker".
-// Based on Realm's fix for Bitcode, this needs to be "bitcode"
-// Source: https://github.com/realm/realm-cocoa/pull/2567
-BITCODE_GENERATION_MODE[sdk=watchos*][config=Release] = bitcode
-BITCODE_GENERATION_MODE[sdk=iphoneos*][config=Release] = bitcode
-BITCODE_GENERATION_MODE[sdk=appletvos*][config=Release] = bitcode