Skip to content

Commit de4cc67

Browse files
committed
1 parent c72611e commit de4cc67

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

ios/Podfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,44 @@ target 'ZulipMobile' do
2424
post_install do |installer|
2525
react_native_post_install(installer)
2626
__apply_Xcode_12_5_M1_post_install_workaround(installer)
27+
28+
# Apparently, Xcode 14 newly defaults CODE_SIGNING_ALLOWED to YES, and
29+
# that's caused some build errors like
30+
# > Signing for "Foo" requires a development team. […]
31+
# where for "Foo" we've seen, so far, "EXConstants-EXConstants" and
32+
# "React-Core-AccessibilityResources".
33+
#
34+
# The code for our fix follows the Expo template app
35+
# (expo/expo@d970a9ecb) by switching CODE_SIGNING_ALLOWED to NO,
36+
# specifically for "resource bundles". The Flutter maintainers give some
37+
# helpful analysis ( https://github.com/flutter/flutter/pull/111714 ):
38+
# > Bundles can contain resources like images and localization files.
39+
# > They are embedded in the framework and should not be codesigned.
40+
# > Xcode 14 changed behavior and is erroneously codesigning these.
41+
#
42+
# There are reports of sporadic App Store Review rejections with
43+
# code-signing disabled, though, e.g.:
44+
# https://github.com/CocoaPods/CocoaPods/issues/11402#issuecomment-1258608914
45+
# But some developers had success, and it's plausible that the reported
46+
# failures were red herrings. See discussion:
47+
# https://chat.zulip.org/#narrow/stream/48-mobile/topic/.22signing.20requires.20development.20team.22.20build.20error/near/1472700
48+
#
49+
# In facebook/react-native@967de03f3, React Native v0.71.0-rc.0 applies
50+
# the same workaround (in react_native_post_install, which we call
51+
# above), except limited to the React-Core pod. So we'll double-process
52+
# React-Core, which we expect to be harmless.
53+
#
54+
# Flutter and React Native's workarounds mention the CocoaPods issue
55+
# https://github.com/CocoaPods/CocoaPods/issues/11402 with hope that
56+
# CocoaPods will publish a fix.
57+
installer.target_installation_results.pod_target_installation_results
58+
.each do |pod_name, target_installation_result|
59+
target_installation_result.resource_bundle_targets.each do |resource_bundle_target|
60+
resource_bundle_target.build_configurations.each do |config|
61+
config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
62+
end
63+
end
64+
end
2765
end
2866

2967
use_expo_modules!

ios/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,6 @@ SPEC CHECKSUMS:
740740
Yoga: d6b6a80659aa3e91aaba01d0012e7edcbedcbecd
741741
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
742742

743-
PODFILE CHECKSUM: 8db8fd58aa716230e2454248621f94fcead2efe8
743+
PODFILE CHECKSUM: 5246a27326b34ca5020f4cfdd2d084a266874427
744744

745745
COCOAPODS: 1.11.3

0 commit comments

Comments
 (0)