消除nonnull警告

https://stackoverflow.com/questions/32539285/pointer-is-missing-a-nullability-type-specifier

 

To disable this warning across your entire project

  1. Go to Build Settings

  2. Make sure you are viewing the "All" tab not "Basic" or "Customized"

  3. Search for the field Other Warning Flags.

  4. Add the following flag: -Wno-nullability-completeness

  5. Now clean and build (⇧⌘K then ⌘R)

  6. Quit Xcode and re-open it (Don't skip this step!)

    Note: It can take a few seconds for the warnings to go away even after you finish building and relaunching Xcode, for me it takes about 15 seconds for Xcode to fully update.

share  improve this answer   
posted @ 2020-07-24 14:24  雨筱逸悠  阅读(657)  评论(0编辑  收藏  举报