TomTomCopyrightsService
final public class TomTomCopyrightsService : CopyrightsServiceDefault implementation of CopyrightsService.
- 
                  
                  Creates a TomTomCopyrightsServiceinstance.DeclarationSwift public convenience init()
- 
                  fetchCopyrights()AsynchronousGet copyright details. For users who are utilizing iOS 15+ and leveraging SwiftUI to ensure accurate rendering of hyperlinks that are interactive (tappable) and capable of opening in the web browser, the following method can be employed: func parseContent(_ content: String) -> AttributedString { do { let detector = try NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) let matches = detector.matches(in: content, options: [], range: NSRange(location: 0, length: content.utf16.count)) let modifiedContent = NSMutableAttributedString(string: content) for match in matches.reversed() { guard let range = Range(match.range, in: content) else { continue } let url = content[range] let markdownLink = "[\(url)](\(url))" let markdownAttributedString = try AttributedString(markdown: markdownLink) modifiedContent.replaceCharacters(in: match.range, with: NSAttributedString(markdownAttributedString)) } return AttributedString(modifiedContent) } catch { return AttributedString("Something went wrong during the Copyright parsing.") } }Example of usage of this method: Text(parseContent(text))Important This is a Public Preview API. It may be changed or removed at any time.DeclarationSwift public func fetchCopyrights() async -> String?Return ValueString copyright details in HTML format 
- 
                  
                  Get copyright details. For users who are utilizing iOS 15+ and leveraging SwiftUI to ensure accurate rendering of hyperlinks that are interactive (tappable) and capable of opening in the web browser, the following method can be employed: func parseContent(_ content: String) -> AttributedString { do { let detector = try NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) let matches = detector.matches(in: content, options: [], range: NSRange(location: 0, length: content.utf16.count)) let modifiedContent = NSMutableAttributedString(string: content) for match in matches.reversed() { guard let range = Range(match.range, in: content) else { continue } let url = content[range] let markdownLink = "[\(url)](\(url))" let markdownAttributedString = try AttributedString(markdown: markdownLink) modifiedContent.replaceCharacters(in: match.range, with: NSAttributedString(markdownAttributedString)) } return AttributedString(modifiedContent) } catch { return AttributedString("Something went wrong during the Copyright parsing.") } }Example of usage of this method: Text(parseContent(text))DeclarationSwift public func fetchCopyrights(completion: @escaping (String?) -> ())ParameterscompletionCompletion handler for when we get the copyrights. 
 
         TomTom SDK for iOS (0.53.1)
 
          TomTom SDK for iOS (0.53.1)
         TomTomCopyrightsService
          TomTomCopyrightsService