Hello! I recently updated Xcode to 12.5 via the App Store and ran into a few interesting compiler errors in ComponentKit when compiling my iOS (Swift + Objective-C) app. The errors occur regardless of the build target; I attempted to build for a physical device, the generic build target, and a few simulators. The errors are as follows:
/Users/colin.cammarano/Workspace/Mobile/Test App/Pods/ComponentKit/ComponentKit/Core/ComponentTree/CKTreeNode.mm:54:73: Cannot initialize a parameter of type 'id<CKComponentProtocol> _Nonnull' with an lvalue of type '__unsafe_unretained Class'
/Users/colin.cammarano/Workspace/Mobile/Test App/Pods/ComponentKit/ComponentKit/Core/ComponentTree/CKTreeNode.mm:86:75: Cannot initialize a parameter of type 'id<CKComponentProtocol> _Nonnull' with an rvalue of type 'Class'
I hadn't made any code changes since my app's last successful build, so I reinstalled Xcode 12.4, built the app again, and noticed that the errors did not appear. To verify that I could reproduce this issue, I performed the following steps:
Created a new iOS app project in Xcode
Initialized the new project with Cocoapods
Installed ComponentKit via CocoaPods
Opened the .xcworkspace file generated by Cocoapods with Xcode 12.5
Built the app
By following these steps, I was able to successfully reproduce this issue with pure Swift, pure Objective-C, and mixed language (Swift + Objective-C) apps. Has anyone else experienced this issue?
If you need any more information from me, please let me know and I'll do my best to provide it. Thanks!
Hello! I recently updated Xcode to 12.5 via the App Store and ran into a few interesting compiler errors in ComponentKit when compiling my iOS (Swift + Objective-C) app. The errors occur regardless of the build target; I attempted to build for a physical device, the generic build target, and a few simulators. The errors are as follows:
/Users/colin.cammarano/Workspace/Mobile/Test App/Pods/ComponentKit/ComponentKit/Core/ComponentTree/CKTreeNode.mm:54:73: Cannot initialize a parameter of type 'id<CKComponentProtocol> _Nonnull' with an lvalue of type '__unsafe_unretained Class'
/Users/colin.cammarano/Workspace/Mobile/Test App/Pods/ComponentKit/ComponentKit/Core/ComponentTree/CKTreeNode.mm:86:75: Cannot initialize a parameter of type 'id<CKComponentProtocol> _Nonnull' with an rvalue of type 'Class'
I hadn't made any code changes since my app's last successful build, so I reinstalled Xcode 12.4, built the app again, and noticed that the errors did not appear. To verify that I could reproduce this issue, I performed the following steps:
.xcworkspace
file generated by Cocoapods with Xcode 12.5By following these steps, I was able to successfully reproduce this issue with pure Swift, pure Objective-C, and mixed language (Swift + Objective-C) apps. Has anyone else experienced this issue?
If you need any more information from me, please let me know and I'll do my best to provide it. Thanks!