You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello this bug report relates to an issue we are having over at OpenCV: opencv/opencv#19254
We have normal iOS and macOS frameworks which are working just fine - however when we combine them into an xcframework and then try and import that xcframework the Swift compiler gives an error on the import.
An Objective-C class with a NS_SWIFT_NAME declaration that renames the class in Swift with a name that matches the name of an object in Darwin
A Swift class that uses import and uses Foundation framework
A Swift declaration that uses the Swift name of the class in 2
An example of the errors returned is:
/xxx/ViewController.swift:9:8: error: failed to build module 'XcFrameTest' from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced
import XcFrameTest
^
/xxx/Xcode/DerivedData/TestXcFrame-cjcpvodfchxqayegspcbiajyodzr/Build/Products/Debug-iphoneos/XcFrameTest.framework/Modules/XcFrameTest.swiftmodule/arm64-apple-ios.swiftinterface:8:40: error: ambiguous type name 'Size' in module 'XcFrameTest'
public func area(_ size: XcFrameTest.Size) -> Swift.Int32
~~~~~~~~~~~ ^
XcFrameTest.Size:1:12: note: found candidate with type 'Size'
open class Size : NSObject {
^
Darwin.Size:1:18: note: found candidate with type 'Size' (aka 'Int')
public typealias Size = Int
The text was updated successfully, but these errors were encountered:
Environment
XCode 12.3
macOS 10.15.7
MacBook Pro (2018)
Additional Detail from JIRA
md5: 9be91d998919de177fea1b2cf76fd841
Issue Description:
Hello this bug report relates to an issue we are having over at OpenCV: opencv/opencv#19254
We have normal iOS and macOS frameworks which are working just fine - however when we combine them into an xcframework and then try and import that xcframework the Swift compiler gives an error on the import.
I have created a repository on Github here: https://github.com/opencv/opencv/issues/19254 which isolates the conditions under which the error occurs.
The conditions are:
Combined Objective-C/Swift framework
An Objective-C class with a NS_SWIFT_NAME declaration that renames the class in Swift with a name that matches the name of an object in Darwin
A Swift class that uses import and uses Foundation framework
A Swift declaration that uses the Swift name of the class in 2
An example of the errors returned is:
The text was updated successfully, but these errors were encountered: