List posts with infinite scroll from Google Blogger API in MVVM architecture, and using SwiftUI to design like Medium iOS App, which could read, search, save, comment posts, and so many excellent features!
Demo GIF:iPhone 13 Pro Max
YouTube Demo Video:youtu.be/xL209rnT73M
- How To Use
- Architecture Design、Features、Explanation
- Models/BloggerFeedJSONModel
- ContentView
- HomeView
- ExploreView
- SavedView
- AuthorView
- Widget:iPad Pro(12.9-inch、5th generation)
- Watch:Apple Watch Series 7 - 45mm
- License:MIT
- Simply click on the green「Code」button on top right
- click「Open with Xcode」
- Having fun to explore this Google Blogger iOS App!
if nothing happen:
- Download this repository via
git cloneor from Releases
git clone https://github.com/5j54d93/Google-Blogger-iOS-App --depth- use
CodingKeyto change label in JSON data fetched from API
TabView:HomeView()、ExploreView()、SavedView()、AuthorView()- use
.environment(\.symbolVariants, .none)to preventtabItemwith default.fillicon type- only change
tabItemicon type to.fillwhen selected
- only change
- Show「You're offline」if we can't fetch data from API
.scrollTo()top when user click onTabView'stabItem- when there's more posts to load, show
ProgressView()at list bottom with.onAppearto achieve infinite scroll - use
.refreshableto let list could refresh when been pull down
- display tags with
ScrollView(.horizontal, showsIndicators: false) - click first plus button could triger bottomSheet(
AddTagButtomSheetView)to add tag toCore Data - show tags that store in
Core Data .onLongPressGesturetag could show delete icon aside which on click could delet tag formCore Data
- couldn't add the same tag multiple times
- use
.prefix(3)to only show the first 3 items in array withForEach - deal with post's thumbnail url to get higher resolution image
let resVarId = thumbnail.url.lastIndex(of: "s") ?? thumbnail.url.endIndex
let fullResUrl = thumbnail.url[..<resVarId]
AsyncImage(url: URL(string: fullResUrl + "s480")) { image in
image
.resizable()
.scaledToFill()
} placeholder: {
Color.gray.overlay { ProgressView() }
}
.frame(width: 75, height: 75)
.clipped()- onClink to show
fullScreenCoverPostView - long press to show
contextMenu
- use
WebKit:WKWebViewto show web
- recommended search words(posts topics)with
ScrollView(.horizontal, showsIndicators: false)from API - search post from API
- show recommendation posts with different UI if there's no search word
- if there's no posts saved in
Core Data, click「Start browsing」could change tab toExploreView - only show post title & post thumbnail when
List:editMode.isEditing
- if user click on version tag 5 times could change Blogger url in API to change this app's content!
Widgets:iPad Pro(12.9-inch、5th generation)
- 4 different size
- UI design like Apple News
- data fetch from API to get the newest posts
- we also call API on
getSnapshotin addition togetTimeline
watchOS:Apple Watch Series 7 - 45mm
- UI design with SwiftUI
- data fetch from API
- two clickable
Buttonin a row ofList
This package is MIT licensed.

































