If I compile this source code in Swift Package, and try to import it in Objective-C based App or Package, the code refuses to compile.
It gives following error:
"unknown type name 'vector_float3'"
The problem is that Objective-C Generated Interface Header "<Package>-Swift.h" does not import simd framework. I tried to make "umbrella header":
But with no success. This approach works when making a swift framework, unfortunately not for packages.
I tried to move h file into include directory, to define public header path... with no success. Is this possible somehow?
Code Block swift import Foundation import simd @objc public class TestPoint: NSObject { @objc public var p: vector_float3 = [] }
It gives following error:
"unknown type name 'vector_float3'"
The problem is that Objective-C Generated Interface Header "<Package>-Swift.h" does not import simd framework. I tried to make "umbrella header":
Code Block objective-c #import <Foundation/Foundation.h> @import simd; FOUNDATION_EXPORT double TestPackageVersionNumber; ...
But with no success. This approach works when making a swift framework, unfortunately not for packages.
I tried to move h file into include directory, to define public header path... with no success. Is this possible somehow?