I see there are some warnings in setOrientation(_ orientation: UIInterfaceOrientation) in the SWIFT example files..
It seems if you want to use the "do {try...} catch", the func setRotation should be defined
public static func setRotation(_ rotation: Int32) throws -> String
isn't it?