Closed blg-nb closed 4 years ago
Hallo,
i have a problem with SwiftMessages in v 7.0.0 and the Xcode GM 1 + 2. I build on an iPhone X with 13.1 and Simulator iPhone 11 Pro with 13.0.
No matter what I do, no message will be displayed on Device or Simulator.
I have build an extension:
` public extension SwiftMessages {
static func show(message: String, for theme: Theme) { let view = MessageView.viewFromNib(layout: .cardView) view.configureTheme(theme) view.configureContent(title: "dfasf", body: message) view.button?.isHidden = true DispatchQueue.main.async { show(config: config(), view: view) } } private static func config() -> SwiftMessages.Config { var config = SwiftMessages.defaultConfig config.presentationStyle = .bottom config.duration = .forever return config }
} `
I also tried the following to setup the config:
if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene, let window = scene.windows.first, let rootViewController = window.rootViewController { config.presentationContext = .viewController(rootViewController) }
Where is my mistake?
Is the demo app working for you?
Never mind. I need to make a small change to support scenes.
You can try the swift5.2 branch. I'll release it officially soon.
swift5.2
nice, thank you
Fixed in 7.0.1.
Hallo,
i have a problem with SwiftMessages in v 7.0.0 and the Xcode GM 1 + 2. I build on an iPhone X with 13.1 and Simulator iPhone 11 Pro with 13.0.
No matter what I do, no message will be displayed on Device or Simulator.
I have build an extension:
` public extension SwiftMessages {
} `
I also tried the following to setup the config:
if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene, let window = scene.windows.first, let rootViewController = window.rootViewController { config.presentationContext = .viewController(rootViewController) }
Where is my mistake?