🇨🇳 Learn how to make WeChat with SwiftUI. 微信 7.0 🟢

Overview

SwiftUI-WeChat

codebeat badge


Overview

  • I will continue to follow the development of technology, the goal is to bring SwiftUI-WeChat to an infinitely close WeChat experience. When you want to implement a function similar to WeChat, you can quickly find out how to implement this function in this project, so I believe this project will help someone.

  • The plan will be perfected until the popularity of SwiftUI, update occasionally. If you have questions about the implementation, or have better ideas, please feel free to communicate with me in issue

  • Your ★ Star is my biggest motivation

Features

  • All based on SwiftUI2 (SwiftUI1 Version).
  • The navigation bar changes when the homepage switches. TabView is hidden in the details page.
  • Timeline: Picture layout. Play online video. The status bar navigation bar changes as you scroll through the list.
  • Full support for Dark Mode

Screenshots

Light Mode Dark Mode
HomeView HomeView
ChatView ChatView
ContactView ContactView
DiscoverView DiscoverView
MomentView MomentView
MeView MeView

TODO

  • Homepage: Support left slide to delete chat content
  • Chat: keyboard processing, multi-line text box height, send content, more media types, emoji, voice, etc.
  • Timeline: pull-down refresh, pull-up loading, full-screen preview of pictures and videos, comments, likes, etc.
  • Search interface

Requirements

  • iOS 14+
  • Xcode 12+
  • Swift 5.3+

Contributors

Create by 森仔

Banner Design by @aduqin

License

SwiftUI-WeChat is released under the MIT license. See LICENSE for details.


中文

SwiftUI-WeChat

codebeat badge


项目概览

  • 我将持续关注 SwiftUI 技术的发展,目标是将 SwiftUI-WeChat 更新至无限接近微信的体验。每个人都熟悉微信,因此当您想实现类似于微信的功能时,可以通过此项目了解实现思路,因此我相信这个项目会对大家有帮助。

  • 此项目计划维护到 SwiftUI 真正流行为止。如果您对实现有疑问,或者有更好的想法,请随时在 issue 中与我交流,或者提交 PR。

  • 你的 ★ Star 是我最大的动力

功能特性

  • 全部基于 SwiftUI2(SwiftUI1 版本传送门)。
  • 底部导航切换时顶部导航更新,进入二级界面时底部导航隐藏。
  • 朋友圈:多种宫格布局、可播放在线视频、状态栏导航栏随列表滚动变化。
  • 完全支持夜间模式。
  • 特殊处理、知识点中文注释

屏幕截图

Light Mode Dark Mode
HomeView HomeView
ChatView ChatView
ContactView ContactView
DiscoverView DiscoverView
MomentView MomentView
MeView MeView

项目依赖

  • iOS 14+
  • Xcode 12+
  • Swift 5.3+

贡献者

作者 森仔

Banner 设计 @aduqin

开源许可

SwiftUI-WeChat is released under the MIT license. See LICENSE for details.

Comments
  • Moment: ForEach(), Index out of range

    Moment: ForEach(), Index out of range

    感谢分享, ForEach<Range<Int>, Int, ModifiedContent<ModifiedContent<ModifiedContent<Image, _AspectRatioLayout>, _FrameLayout>, _ClipEffect<Rectangle>>> count (2) != its initial count (3).ForEach(:content:)should only be used for *constant* data. Instead conform data toIdentifiableor useForEach(:id:content:)and provide an explicitid!

    我在真机上运行发现朋友圈View下拉会导致数组越界,在ForEach里面加上id参数可以解决这个问题。 e.g. ForEach(0 ..< rows, id: \.self)

    opened by Haibo-Zhou 8
  • How to build this project?

    How to build this project?

    Hey bro,

    After fresh checkout the code doesn't really build in Xcode, it can not find Refresh and VideoPlayer package, is there any specific command I need to run? I'm using Xcode version 13.2 (13C90), which is the latest one

    (I'm an android developer recently started learning iOS)

    opened by kwang7nyc 1
  • 如何在SwiftUI中实现navigationController.popToRootViewControoler的功能

    如何在SwiftUI中实现navigationController.popToRootViewControoler的功能

    NavigationLink多个View之后,无法直接返回根视图。 我在您项目的基础上做了个人详情页,想在用户信息页面删除用户后快速返回跟视图,但是没有找到合适的方法。 在微信中ChatView始终只有一个,比如从群聊进入用户页面,再点击发送消息到聊天也,则NavigationController中的其他ChildViewController会被移除,再进入ChatView页面,现在也无法在SwiftUI上实现

    opened by damonZDM 1
  • 全局数据问题

    全局数据问题

    你采用的是全局的navigationView,通过更新store的状态去改变navigationView的状态,这个会存在问题,特别是在onAppear里面进行网络请求刷新数据,会导致界面数据丢失。初步看原因就是在因为在onAppear里面更新的store.hiddenNavBar的状态,导致所有界面多次刷新。

    opened by maik-he 1
  • Xcode14编译的版本List的头部出现空白间距

    Xcode14编译的版本List的头部出现空白间距

    你好,谢谢你开源这么优秀的swiftui项目!

    我用xcode14 beta5编译出来的版本,在list的section header部分出现了细微的差异。 具体表现在,iOS15的section header一切正常,iOS16的section header却出现了空白间距。

    下面截图都是用Xcode14编译的app通讯录界面的效果,你可以看到明显的差异。

    iOS16版本的C, F, G, N...上面都会出现空白部分

    iOS15 | iOS16 ------ | ------ |

    通过查看项目代码,我发现有定义过下面内容

    // 避免 iOS15 增加的列表顶部空白 UITableView.appearance().sectionHeaderTopPadding = 0

    但是上述设置貌似对iOS16不生效。

    可能是因为iOS16版本下swiftui的list组件已经不再使用tableview,而是使用了collectionview这个原因吗?

    本人swiftui小白,望大神给予解答,多谢!

    opened by guo-melon 1
  • 你好,编译运行报错了

    你好,编译运行报错了

    Showing Recent Messages Couldn’t get revision ‘3c5b9531ee20e34d3a86142ca2c076a5b99afdb2^{commit}’:

    Showing Recent Messages The operation couldn’t be completed. (SwiftPM.SPMRepositoryError error 5.)

    opened by 542604974 1
  • 请教一个问题,如何像js一样阻止事件向上冒泡

    请教一个问题,如何像js一样阻止事件向上冒泡

    Simulator Screen Shot - iPod touch (7th generation) - 2021-10-21 at 11 32 52 如上图,怎么让只点击红色背景时才关闭弹出菜单,现在是点击菜单边缘也会关闭 ` if commonData.isPopupMenuShow{ VStack(alignment:.trailing, spacing:0){ HStack{ Spacer() topArrow .offset(x: -16, y: 0)

                    }
                    VStack(alignment: .center, spacing: 10){
                        Button("按钮1"){ }
                        Button("按钮2"){ }
                        Button("按钮3"){ }
                    }
                    .padding(.horizontal,10)
                    .padding(.vertical,15)
                    .frame(width: 100)
                    .background("#333333".toColor())
                    .foregroundColor(Color.white)
                    .cornerRadius(10)
                    Spacer()
                }
                .background(Color.init(.sRGB, red: 0.8, green: 0.1, blue: 0.1, opacity: 0.5))
                .offset(x:-5,y: 0)
                .zIndex(2)
                .onTapGesture {
                    commonData.isPopupMenuShow = false
                }
            }
    

    `

    opened by qq124719010 1
  • presentationMode 问题

    presentationMode 问题

    你好,我也是在实际项目中使用swiftui,使用你的项目也发现Xcode连接程序时调试presentationMode可以dismissed,但是关闭xcode直接在模拟器允许app时候,presentationMode的dismissed就失效了,自定义导航栏的back就不能用了 请问大神怎么处理这种情况

    opened by wingCi 5
Owner
Gesen
———————————————
Gesen
An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.

中文版本请参看这里 MMKV is an efficient, small, easy-to-use mobile key-value storage framework used in the WeChat application. It's currently available on Andr

Tencent 15.4k Jan 6, 2023
macOS WeChat.app header files version history (automatic updated)

macos-wechat-app-tracker macOS WeChat.app header files version history (automatic updated) Troubleshooting $ class-dump -H /Applications/WeChat.app 20

Wechaty 3 Feb 10, 2022
CleanArchitecture - Helping project to learn Clean Architecture using iOS (Swift)

Clean Architecture Helping project to learn Clean Architecture using iOS (Swift)

Alliston 2 Dec 5, 2022
CoreDataCloudKitShare - Learn how to use Core Data CloudKit

Sharing Core Data Objects Between iCloud Users Implement the flow to share data

null 3 Feb 10, 2022
KeyPathKit is a library that provides the standard functions to manipulate data along with a call-syntax that relies on typed keypaths to make the call sites as short and clean as possible.

KeyPathKit Context Swift 4 has introduced a new type called KeyPath, with allows to access the properties of an object with a very nice syntax. For in

Vincent Pradeilles 406 Dec 25, 2022
GraphQLite is a toolkit to work with GraphQL servers easily. It also provides several other features to make life easier during iOS application development.

What is this? GraphQLite is a toolkit to work with GraphQL servers easily. It also provides several other features to make life easier during iOS appl

Related Code 2.8k Jan 9, 2023
PJAlertView - This library is to make your own custom alert views to match your apps look and feel

PJAlertView - This library is to make your own custom alert views to match your apps look and feel

prajeet 6 Nov 10, 2017
This SwiftUI project is a result of the second 'milestone' in "Hacking With Swift's 100 Days of SwiftUI".

mutiplication-tables This SwiftUI project is a result of the second 'milestone' in "Hacking With Swift's 100 Days of SwiftUI". In this simple multipli

Eric Tolson 1 Dec 5, 2022
A property wrapper for displaying up-to-date database content in SwiftUI views

@Query Latest release: November 25, 2021 • version 0.1.0 • CHANGELOG Requirements: iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+ • Swift 5.5+ /

Gwendal Roué 102 Dec 29, 2022
A demo app to showcase pixel perfect, modern iOS development with SwiftUI and Combine on MVVM-C architecture.

Pixel_Perfect_SwiftUI A demo app to showcase pixel perfect, modern iOS development with SwiftUI and Combine on MVVM-C architecture. Tech Stack: Swift,

Burhan Aras 0 Jan 9, 2022
Creating a Todo app using Realm and SwiftUI

Realmで作るTodoアプリ note記事「【SwiftUI】Realmを使ってTodoアプリを作る」のソースです。

null 1 Jul 20, 2022
AppCodableStorage - Extends `@AppStorage` in SwiftUI to support any Codable object

AppCodableStorage Extends @AppStorage in SwiftUI to support any Codable object.

Andrew Pouliot 19 Nov 25, 2022
Auto scrollable multi platform header menu usually used in food delivery applications - SwiftUI & Combine

Auto scrollable header menu - SwiftUI & Combine Features Auto scrollable up menu while navigating the list up and down Navigate to any section from up

Igor 6 Aug 13, 2022
Server-driven SwiftUI - Maintain iOS apps without making app releases.

ServerDrivenSwiftUI Maintain ios apps without making app releases. Deploy changes to the server and users will receive changes within minutes. This pa

null 9 Dec 29, 2022
This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "make it black" and change the background color of the view in the frame.

VoiceOperationSample This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "mak

Takuya Aso 3 Dec 3, 2021
WeChat-like Moments App implemented using Swift 5.5 and SwiftUI

Moments SwiftUI This is a re-implementation of Moments App using Swift 5.5 and SwiftUI. Features: Aysnc/Await Actor AysncImage MVVM BFF Screenshot Als

Jake Lin 46 Jan 5, 2023
WCDB is a cross-platform database framework developed by WeChat.

WCDB 中文版本请参看这里 WCDB is an efficient, complete, easy-to-use mobile database framework used in the WeChat application. It's currently available on iOS,

Tencent 9.6k Jan 8, 2023
A WeChat alternative. Written in Swift 5.

TSWeChat - A WeChat alternative, updated to Swift 5. 中文说明 Requirements Cocoapods 1.2.0 + iOS 10.0+ / Mac OS X 10.9+ Xcode 10.0+ Features Send your ric

Hilen Lai 3.7k Dec 31, 2022
An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.

中文版本请参看这里 MMKV is an efficient, small, easy-to-use mobile key-value storage framework used in the WeChat application. It's currently available on Andr

Tencent 15.4k Jan 6, 2023
macOS WeChat.app header files version history (automatic updated)

macos-wechat-app-tracker macOS WeChat.app header files version history (automatic updated) Troubleshooting $ class-dump -H /Applications/WeChat.app 20

Wechaty 3 Feb 10, 2022