Add Markdown & Code Syntax Highlighting to ChatGPT iOS SwiftUI App

Опубликовано: 28 Сентябрь 2024
на канале: Xcoding with Alfian
3,543
94

In this video, we're going to add Markdown Rendering & Code Syntaxt Highlighting to the iOS target of ChatGPT SwiftUI App. This is a continuation of the previous tutorials in "Build SwiftUI ChatGPT series"
#swiftui #chatgpt #iosdevelopment #iosdevelopment

Tutorial Links:

Starter Project - XCAChatGPT SwiftUI Git
(Select markdown-code-highlight-ios-starter Tag):
https://github.com/alfianlosari/ChatG...

Completed Project commit diff changes:
https://github.com/alfianlosari/ChatG...

Build SwiftUI ChatGPT series Playlist:
   • Build ChatGPT SwiftUI Multiplatform A...  

Apple Swift Markdown Git:
https://github.com/apple/swift-markdown

Highlighter Swift Forked Git:
https://github.com/alfianlosari/Highl...

Christian Selig Markdownosaur Code Snippet:
https://github.com/christianselig/Mar...

Highlighter Swift Original Git:
https://github.com/smittytone/Highlig...

Timeline
00:00:00 Intro
00:01:20 Project Setup & SPM Dependencies
00:05:59 Markdown Attributed String Parser
00:21:07 CodeBlock Syntax Higlighting SwiftUI View
00:39:01 MessageRow SwiftUI View with Attributed String
01:00:11 ChatGPT API Response Parsing in View Model

Colorful Flowers by Tokyo Music Walker |   / user-356546060  
Music promoted by https://www.chosic.com/free-music/all/
Creative Commons CC BY 3.0
https://creativecommons.org/licenses/...