New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default Xcode 12 settings fail to build CocoaPods-generate umbrella headers #9902
Comments
Should we set |
Yes, that should be safer and easier than generating different content for the umbrellas. |
Is Xcode 12 now expecting umbrella headers to use |
Yes. |
Interesting - makes sense I guess. Apple does that in their own frameworks |
I just updated to Xcode 12 and am experiencing this issue. How should I resolve it? After the update, the project can initially be successfully built, with a lot of I did the following in order, but still get the error. gem install cocopoads, |
Just upgraded Xcode and am unable to run my flutter app on Ios now as well. Looking for a fix |
@jackguo709 @swisscheesy Update to CocoaPods 1.10. More details and options at https://stackoverflow.com/a/63648164/556617 |
Thanks Paul |
Actually, decline most of the suggestions and just update the LastUpgradeCheck so that Xcode stops nagging us for updates. - Keep building "arm64e" architecture for iOS. Xcode 12 wants to set ARCHS -- the architectures to build for -- to just $(ARCHS_STANDARD). However, keep building the arm64e slice contrary to Xcode suggestions. arm64e is an architecture for Apple A12 chips which supports 'pointer authentication' [1]. Keep building Themis for this architecture to ensure that it is supported. This architecture is only supported on the real iOS devices, iOS Simulator does not support it (even on Apple Silicon). It is also not supported on macOS. [1]: https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication - Build for all architectures, not just the active one. Xcode 12 suggests disabling ONLY_ACTIVE_ARCH to build code for all architectures at all time, presumable to ease the transition to Apple Silicon. We are already building for all archs in Release mode, do the same for Debug mode too, to make sure that we don't miss anything. However, make sure that arm64 builds are disabled for iOS Simulator in test targets too, just like they are disabled in the framework. - Ignore warnings about quotes includes in framework headers. Set CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to NO. This new warning (enabled by default since Xcode 12) is known to break umbrella headers of frameworks. CocoaPods currently disables it [2]. We do this as well since all those #import "objcthemis.h" in "src/wrappers/themis/Obj-C/Themis/themis.h" are causing this warning. Apparently, Xcode wants this to be changed to this: #import <objcthemis.h> but then in fails due to a missing file because the framework is not in the search path for itself. We *do intend* to include a header file from the current directory -- the framework header directory. It's not clear what Xcode wants from us here, so just follow the CocoaPods guidance for now and disable the warning. This does not affect compilation and later use of the framework in apps. [2]: CocoaPods/CocoaPods#9902 - Keep iOS target at 10.0. Xcode 12 suggests to update the minimum supported iOS to 12.0, but we'll still support iOS 10 for this release so keep the old value. - Keep Swift 4 in tests for Swift 4. Do not upgrade SWIFT_VERSION in the targets which test Swift 4 compatibility specifically, in spite Xcode wanting to do this.
Actually, decline most of the suggestions and just update the LastUpgradeCheck so that Xcode stops nagging us for updates. - Keep building "arm64e" architecture for iOS. Xcode 12 wants to set ARCHS -- the architectures to build for -- to just $(ARCHS_STANDARD). However, keep building the arm64e slice contrary to Xcode suggestions. arm64e is an architecture for Apple A12 chips which supports 'pointer authentication' [1]. Keep building Themis for this architecture to ensure that it is supported. This architecture is only supported on the real iOS devices, iOS Simulator does not support it (even on Apple Silicon). It is also not supported on macOS. [1]: https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication - Build for all architectures only in Release mode. Xcode 12.2 suggests enabling ONLY_ACTIVE_ARCH in Debug mode in order to improve build times. Release builds -- such as when archiving -- will still build all architectures. However, make sure that arm64 builds are disabled for iOS Simulator in test targets too, just like they are disabled in the framework. - Ignore warnings about quotes includes in framework headers. Set CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to NO. This new warning (enabled by default since Xcode 12) is known to break umbrella headers of frameworks. CocoaPods currently disables it [2]. We do this as well since all those #import "objcthemis.h" in "src/wrappers/themis/Obj-C/Themis/themis.h" are causing this warning. Apparently, Xcode wants this to be changed to this: #import <objcthemis.h> but then in fails due to a missing file because the framework is not in the search path for itself. We *do intend* to include a header file from the current directory -- the framework header directory. It's not clear what Xcode wants from us here, so just follow the CocoaPods guidance for now and disable the warning. This does not affect compilation and later use of the framework in apps. [2]: CocoaPods/CocoaPods#9902 - Keep iOS target at 10.0. Xcode 12 suggests to update the minimum supported iOS to 12.0, but we'll still support iOS 10 for this release so keep the old value. - Keep Swift 4 in tests for Swift 4. Do not upgrade SWIFT_VERSION in the targets which test Swift 4 compatibility specifically, in spite Xcode wanting to do this. squash! Update to Xcode 12.0.1 recommended settings Xcode 12.2 keep building for active only in debug
Actually, decline most of the suggestions and just update the LastUpgradeCheck so that Xcode stops nagging us for updates. - Keep building "arm64e" architecture for iOS. Xcode 12 wants to set ARCHS -- the architectures to build for -- to just $(ARCHS_STANDARD). However, keep building the arm64e slice contrary to Xcode suggestions. arm64e is an architecture for Apple A12 chips which supports 'pointer authentication' [1]. Keep building Themis for this architecture to ensure that it is supported. This architecture is only supported on the real iOS devices, iOS Simulator does not support it (even on Apple Silicon). It is also not supported on macOS. [1]: https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication - Build for all architectures only in Release mode. Xcode 12.2 suggests enabling ONLY_ACTIVE_ARCH in Debug mode in order to improve build times. Release builds -- such as when archiving -- will still build all architectures. However, make sure that arm64 builds are disabled for iOS Simulator in test targets too, just like they are disabled in the framework. - Ignore warnings about quotes includes in framework headers. Set CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to NO. This new warning (enabled by default since Xcode 12) is known to break umbrella headers of frameworks. CocoaPods currently disables it [2]. We do this as well since all those #import "objcthemis.h" in "src/wrappers/themis/Obj-C/Themis/themis.h" are causing this warning. Apparently, Xcode wants this to be changed to this: #import <objcthemis.h> but then in fails due to a missing file because the framework is not in the search path for itself. We *do intend* to include a header file from the current directory -- the framework header directory. It's not clear what Xcode wants from us here, so just follow the CocoaPods guidance for now and disable the warning. This does not affect compilation and later use of the framework in apps. [2]: CocoaPods/CocoaPods#9902 - Keep iOS target at 10.0. Xcode 12 suggests to update the minimum supported iOS to 12.0, but we'll still support iOS 10 for this release so keep the old value. - Keep Swift 4 in tests for Swift 4. Do not upgrade SWIFT_VERSION in the targets which test Swift 4 compatibility specifically, in spite Xcode wanting to do this.
* Update to Xcode 12.2 recommended settings Actually, decline most of the suggestions and just update the LastUpgradeCheck so that Xcode stops nagging us for updates. - Keep building "arm64e" architecture for iOS. Xcode 12 wants to set ARCHS -- the architectures to build for -- to just $(ARCHS_STANDARD). However, keep building the arm64e slice contrary to Xcode suggestions. arm64e is an architecture for Apple A12 chips which supports 'pointer authentication' [1]. Keep building Themis for this architecture to ensure that it is supported. This architecture is only supported on the real iOS devices, iOS Simulator does not support it (even on Apple Silicon). It is also not supported on macOS. [1]: https://developer.apple.com/documentation/security/preparing_your_app_to_work_with_pointer_authentication - Build for all architectures only in Release mode. Xcode 12.2 suggests enabling ONLY_ACTIVE_ARCH in Debug mode in order to improve build times. Release builds -- such as when archiving -- will still build all architectures. However, make sure that arm64 builds are disabled for iOS Simulator in test targets too, just like they are disabled in the framework. - Ignore warnings about quotes includes in framework headers. Set CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER to NO. This new warning (enabled by default since Xcode 12) is known to break umbrella headers of frameworks. CocoaPods currently disables it [2]. We do this as well since all those #import "objcthemis.h" in "src/wrappers/themis/Obj-C/Themis/themis.h" are causing this warning. Apparently, Xcode wants this to be changed to this: #import <objcthemis.h> but then in fails due to a missing file because the framework is not in the search path for itself. We *do intend* to include a header file from the current directory -- the framework header directory. It's not clear what Xcode wants from us here, so just follow the CocoaPods guidance for now and disable the warning. This does not affect compilation and later use of the framework in apps. [2]: CocoaPods/CocoaPods#9902 - Keep iOS target at 10.0. Xcode 12 suggests to update the minimum supported iOS to 12.0, but we'll still support iOS 10 for this release so keep the old value. - Keep Swift 4 in tests for Swift 4. Do not upgrade SWIFT_VERSION in the targets which test Swift 4 compatibility specifically, in spite Xcode wanting to do this. * Move common settings to project level A lot of Xcode settings for targets are actually shared by all of them. Having common settings specified for individual targets makes it hard to update them as you can easily forget to update them everywhere. Let's move all shared settings to the project level so that they can be easily updated everywhere at once. Leave per-target overrides where necessary. - Build for iOS and iPadOS simultaneously. Keep TARGETED_DEVICE_FAMILY for iOS framework as "1,2" which marks both iOS and iPadOS as supported by default for all targets. - Use common versioning. Instead of iOS and macOS frameworks using separate versions, move the version variables to the project level: CURRENT_PROJECT_VERSION and MARKETING_VERSION. We also have no use for VERSION_INFO_PREFIX. Since we release iOS and macOS frameworks simultaneously, their versions should be updated simultaneously as well. - Use common warning settings. Move some of the additional compiler warnings to the project level so that they are enabled for all targets by default. This includes the "treat warnings as errors" policy which is now enabled for all targets. - Use common Swift compiler settings. All our targets use the same Swift compiler settings (except for Swift version). Move all of them to the project level, but keep the test targets using SWIFT_VERSION. - Use default code signing settings. Since we're building a framework here, it's not normally signed. The signature is applied only when archiving the complete app. Default settings use ad-hoc signing for integrity protection, but we should not hardcode development teams, etc. - Enable bitcode by default. Make sure that bitcode is enabled for all (iOS) targets by default. However, keep it disabled for tests. Test targets are built as bundles and they are not compatible with bitcode, causing ld errors: "-bundle and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together". - Move miscellaneous settings to project level. Such as CLANG_ENABLE_MODULES. We don't really use Clang modules in our source code, but system headers use them and this somewhat speeds up compilation. * Drop deprecated settings Remove the settings which we don't really need. - Ignore high-DPI images. Remove COMBINE_HIDPI_IMAGES as none of our frameworks contains any image resources whatsoever. Xcode's default is fine for us. - Ignore user paths. Remove ALWAYS_SEARCH_USER_PATHS as it's marked deprecated since Xcode 8 and may be removed. It has no effect on out builds. - Remove unused Metal settings. Older Xcodes insisted on including MTL_ENABLE_DEBUG_INFO and MTL_FAST_MATH into new projects, but Themis does not use Metal so we don't really need those settings. * Suppress non-null warnings in tests Since now all warnings are treated as errors, those warnings in tests are no longer tolerated. The tests intentionally pass NULL values to parameters marked as "nonnull". Suppress the warnings here to test this invalid behavior.
@libyasdf Make sure to run |
problem solved
|
In Xcode 12 default options,
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER
is set to Yes. This causes CocoaPods generated umbrella header files to fail with errors like:Double-quoted include "FBLPromise+All.h" in framework header, expected angle-bracketed instead
Reported and additional discussion at firebase/firebase-ios-sdk#5987
Reproducible project:
testProject.zip
The text was updated successfully, but these errors were encountered: