skywinder / ActionSheetPicker-3.0

Quickly reproduce the dropdown UIPickerView / ActionSheet functionality on iOS.
http://skywinder.github.io/ActionSheetPicker-3.0
BSD 3-Clause "New" or "Revised" License
3.4k stars 740 forks source link

Fixed Xcode 12 Angled brackets warnings #509

Closed ddaddy closed 3 years ago

ddaddy commented 4 years ago

Xcode 12 enables the warning CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER which then throws up warnings for this framework.

noorulain17 commented 4 years ago

@ddaddy can you please show the screenshot for the warnings?

ddaddy commented 4 years ago

Sure. Xcode 12 enabled the compiler flag CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; Simply setting it to false removes the warnings, but there must be a good reason Apple decided to enable these warnings.

Screenshot 2020-10-04 at 11 17 59
noorulain17 commented 4 years ago

Thanks @ddaddy . Actually I have Xcode 12.2 beta 2, and I don't see any such warnings. That's why I've asked you for the screenshot.

Screenshot 2020-10-04 at 2 31 31 PM
ddaddy commented 4 years ago

You only see the warnings when you use the framework in a project, not within the framework itself.

noorulain17 commented 4 years ago

You mean by manually adding the framework to another project? Coz I don't see it for the Swift example project, or the after integrating it via cocoapods.

ddaddy commented 4 years ago

I use Carthage. I have a feeling CocoaPods disables the new check.

ddaddy commented 4 years ago

Do you want me to upload a sample project?

noorulain17 commented 4 years ago

Hey @ddaddy, no that's fine. I just wanted to understand as I haven't encountered this warning. I'll try integrating with Carthage later sometime, just for my learning purposes. Thanks :)

ddaddy commented 4 years ago

I've had it with most of the libraries I use through Carthage. Disabling the warning would be simple but I figured i'd try and correct the issue. If you test out a Carthage build, note that Carthage is pretty broken with Xcode 12 and you need to use this script https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323 instead of the standard carthage update command.

skywinder commented 4 years ago

well, I hope that they will fix it in carthage or Xcode in the later version. let's wait for a while. I would like to make code clean. Bi thank yo for improvment anyway. it could be helpful for others, @ddaddy 👍

ddaddy commented 4 years ago

The pull request has nothing to do with the broken Carthage. Frameworks added to a project should use angled bracket imports according to Apple.

The broken Carthage is because Xcode 12 now also builds an arm64 slice for the simulator for new Arm based Macs. The way Carthage currently works makes it fail to build when using lipo to combine slices. That's why at the moment we need to use a script that stops Carthage building the Simulator Arm64 slice.

skywinder commented 4 years ago

Got it. Thanks for clarification/ Well, I'm not an active Carthage user. @noorulain17 do you have thougts about this?

noorulain17 commented 4 years ago

@skywinder nopes I'm also not an active Carthage user. @ddaddy explained the reason in the above thread to me too.

ddaddy commented 4 years ago

Maybe just hold out a short while before implementing this. Let's see what changes Carthage end up making to overcome the fat binary issue with Xcode 12. If they end up moving to use XCFramework, it might end up like CocoaPods and not need this update.

skywinder commented 4 years ago

@ddaddy Thank. Let hold it for a while and see how it goes. 👍

noorulain17 commented 3 years ago

@ddaddy please resolve the conflicts

ddaddy commented 3 years ago

I have had to open a new pull request for this. FYI, Carthage is now fixed if you want to test it before and after my fix. You just need to use the --use-xcframeworks argument.