Scenario:
I had built a Swift <-- package simple App that is working.
Now I'm trying to convert this to a Objective-C <--- package app.
Question #1: How to I formally import the package?
I've read to use the '@import' vs the older '#import'.
Now I'm getting the "'init'isn't available".
Here's the package ("RicPackage.swift"):
import Foundation
public struct RicStruct {
public private(set) var text = "Hello, World!"
public init() {
}
public func sayHello() -> String {
"Hello Ric!"
}
}
public class RicClass: NSObject {
@objc public var msg = "Mother has a feeling, I might be too appealing."
@objc public let text = "Hello Everybody!"
public init(msg: String) {
if msg.isEmpty {
self.msg = "Hello Ric!"
}
}
public func sayHello() {
print(text)
}
public func doSomething() {
print("Inside doSomething()")
}
}
I want to a least do something simple like:
RicClass *ricClass = [[RicClass alloc] init];
[ricClass sayHello];