@@ -24,6 +24,44 @@ target 'ZulipMobile' do
24
24
post_install do |installer |
25
25
react_native_post_install ( installer )
26
26
__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
27
65
end
28
66
29
67
use_expo_modules!
0 commit comments