Post

Replies

Boosts

Views

Activity

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
694
Sep ’21
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
1k
Sep ’21
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         }
Topic: UI Frameworks SubTopic: UIKit Tags:
4
1
1.9k
Dec ’22
iOS AttributedString markdown code blocks
The new AttributedString markdown doesn't seem to support code blocks. Such as with single or triple ` marks Hello world or func foo(text:String) -> String{ return text } Does anyone know how to make this work?
Replies
1
Boosts
0
Views
794
Activity
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.
Replies
0
Boosts
0
Views
694
Activity
Sep ’21
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
Replies
2
Boosts
0
Views
1k
Activity
Sep ’21
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         }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
4
Boosts
1
Views
1.9k
Activity
Dec ’22
thematicBreak on AttributedString produces a very short horizontal rule
Is it possible to change the width of the HR produced by the PresentationIntent.Kind.thematicBreak ?
Replies
2
Boosts
0
Views
551
Activity
Nov ’23
Convert AttributedString to Markdown?
Is there a way of converting AttributedString or NSAttributedString to Markdown?
Replies
0
Boosts
0
Views
451
Activity
Feb ’24