After more than half a year of writing in my spare time, I think the wechat I copied with SwiftUI can be open source. GitHub open-source link >>
Although it was just a copycat project, I wrote it in accordance with the requirements of actual production and development, rather than just staying at the simple UI level.
The goal of this project is to use the pure SwiftUI framework as far as possible. If SwiftUI does not support it at the moment, we will not implement it until SwiftUI supports it.
preview
Many pictures have poor reading experience in Nuggets. If you want to see the preview, you can click the link to view the warehouse address. If you feel good, you can click a Star to support it. Thank you very much!
The core architecture is Redux
Redux is used extensively in the React project. The SwiftUI declarative programming philosophy is very similar to React. So using Redux in SwiftUI is perfect. What is a Redux? How do YOU implement Redux? Check out my previous post on Redux in SwiftUI.
This project uses the Redux architecture, and the relevant files are in the Redux folder.
Multilingual processing
The multilingual processing of this project refers to the method in Kickstarter iOS. Use the bin/strings – script script and ExternalResources/locales. Json file and automatically generate more language strings type. When you need to add a new statement, simply add the translation to locales.json and execute the make strings command to use strings.xxx () in your project to get the statement in the current language.
Unit testing
This project includes extensive unit testing to ensure the accuracy of key logic.
Third-party libraries
- SwiftUIRedux: Redux library I wrote myself. For an idea of how to write it, check out my previous article implementing Redux in SwiftUI.
- Kickstarter-prelude: Some handy Swift type extensions. I took the code from The Kickstarter-Prelude project of Kickstarter and made it into the Swift Package library.
- URLImage: Displays network images.
- LBJMediaBrowser: a library I wrote for previewing images and videos.
Simulation of data
The user registration and login, chat, contact and personal information of this project are all realized by Google Firebase, trying to simulate the logic of actual development.
Implemented functions
- Registration and Login
- chat
- Private chat: Chat with real users in your contacts (Lebron James, other NBA players are fake stats)
- You can send text, pictures and emojis
- Click on the image for a larger version
- The contact
- The list of
- Scroll through the list using the index on the right
- search
- Details page
- found
- The list of
- I
- View and modify personal information: avatar, name, gender and personality signature.
Add new features
If you are willing to add new features to the project, I welcome them. Please use GitHub Issues to write down the features you want to do to achieve the future submission of PR.
I’m a code freak, and I care a lot about simplicity and readability. Please follow my style when writing code. If you think there are areas in the code that could be improved, feel free to point them out. Thank you very much!