I am using Xcode 10 and SFS2X Api Objective C 1.7.8 framework.
I think I have successfully imported the framework to a simple iphone app environment with a bridging header (the code hints for sfs all seem to work) but initiating a connection does not seem to do anything and when I run it, the build is successful but I get errors
Code: Select all
import UIKit
class ViewController: UIViewController, ISFSEvents {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let sfs = SmartFox2XClient()
print(sfs.version)
sfs.logger.loggingLevel = LogLevel_DEBUG
sfs.connect("host", port: 9933)
}
func onConnection(_ evt: SFSEvent!) {
print("connected")
}
}
results in the following in the console
Optional(0.0.0)
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
2019-05-02 16:59:21.304725+0100 testApp[696:176606] Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
Any pointers would be really helpful to get me started