Post

Replies

Boosts

Views

Activity

AttributedString markdown missing elements in Swift
Not all markdown elements work. The string will work if I do: "hello world" Italics "hello world" Bold But NOT "hello world" Bold & Italics There are others that also don't work such as headers and numbered lists.         let string: String = "***hello world***"         if let attributedString: AttributedString = try? AttributedString(markdown: string) {             let attributedText: NSMutableAttributedString = NSMutableAttributedString(attributedString)             myLabel.text = nil             myLabel.attributedText = attributedText         }
4
1
1.6k
Feb ’22
URLSessionWebSocketTask SIP Register
I can connect to my SIP server (asterisk), but my REGISTER message is not getting a response, and then I get disconnected 30 seconds later. Does anyone have a working example or maybe a tutorial or video on how to do this? These are the parameters I'm sending:         REGISTER sip:\(host) SIP/2.0         Via: SIP/2.0/WSS ij5094obipus.invalid;branch=\(branch)         Max-Forwards: 69         To: <sip:\(username)@\(host)>         From: <sip:\(username)@\(host)>;tag=\(tag)         Call-ID: \(callID)         CSeq: 2 REGISTER         Contact: <sip:pqqr773g@3tb56aj0gkb8.invalid;transport=ws>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:\(uuid)>";expires=60         Expires: 60         Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY         Supported: path,gruu,outbound         User-Agent: CoNameWebRTC-v1.5         Content-Length: 0
2
0
887
Sep ’21
UNUserNotificationCenterDelegate not firing for remote notifications
Notification center delegate is firing for local notifications but not remote, when using UNTextInputNotificationAction on a WKUserNotificationInterfaceController.  func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) I get a response when the user enters text and submits, but only for a local notification. For the remote notification - the delegate method never fires. The notification delegate is a singleton that's assigned in the watch's ExtensionDelegate's applicationDidFinishLaunching method.
0
0
636
Sep ’21