Skip to content

Commit bb15d5e

Browse files
authored
update readme
1 parent 663fc05 commit bb15d5e

1 file changed

Lines changed: 215 additions & 2 deletions

File tree

README.md

Lines changed: 215 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,215 @@
1-
# tuikit_ios
2-
[AtoimcXCore API documention](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore)
1+
# TUIKit_iOS
2+
3+
English | [简体中文](README.cn.md)
4+
5+
## Overview
6+
7+
TUIKit_iOS is a powerful UI component library built on top of Tencent Cloud's `AtomicXCore` SDK. `AtomicXCore` integrates the core capabilities of Tencent Cloud Real-Time Communication (TRTC), Instant Messaging (IM), Audio/Video Calling (TUICallEngine), and Room Management (TUIRoomEngine), providing a state-driven API design.
8+
9+
TUIKit_iOS provides a set of pre-built user interfaces (UI) on top of the core capabilities offered by `AtomicXCore`, enabling you to quickly integrate video live streaming, voice chat rooms, audio/video calling, and other features into your iOS applications without worrying about complex backend logic and state management.
10+
11+
## Features
12+
13+
TUIKit_iOS provides complete UI implementations for the following core business scenarios based on `AtomicXCore`:
14+
15+
* **Video/Voice Live Streaming:**
16+
17+
* **Live Room Management:** Fetch live room lists.
18+
* **Broadcasting & Watching:** Create live rooms, join live streams.
19+
* **Seat Management:** Support seat management, audience mic on/off.
20+
* **Host Co-hosting:** Support cross-room co-hosting between hosts.
21+
* **Host PK (Battle):** Support PK interactions between hosts.
22+
* **Interactive Features:**
23+
* **Gifts:** Support sending and receiving gifts.
24+
* **Likes:** Support live room likes.
25+
* **Barrage:** Support sending and receiving barrage messages.
26+
27+
* **Audio/Video Calling:**
28+
29+
* **Basic Calling:** Support 1v1 and multi-party audio/video calls.
30+
* **Call Management:** Support answering, rejecting, and hanging up calls.
31+
* **Device Management:** Support camera and microphone control during calls.
32+
* **Call History:** Support querying and deleting call records.
33+
34+
* **Instant Messaging (Chat):**
35+
36+
* **Conversation Management:** Support fetching and managing conversation lists.
37+
* **Message Sending/Receiving:** Support C2C (one-to-one) and Group chat scenarios, with multiple message types including text, images, voice, video, etc.
38+
* **Contact Management:** Support friend and blacklist management.
39+
* **Group Management:** Support group profile, group member, and group settings management.
40+
41+
## Quick Start
42+
43+
### 1. Environment Setup
44+
45+
* Xcode 14.0 or higher
46+
* iOS 14.0 or higher
47+
* CocoaPods (ensure it's installed)
48+
49+
### 2. Clone Repository
50+
51+
```bash
52+
git clone https://github.com/Tencent-RTC/TUIKit_iOS.git
53+
```
54+
55+
### 3. Install Dependencies
56+
57+
`TUIKit_iOS` depends on `AtomicXCore`, which in turn depends on `RTCRoomEngine`. You need to use CocoaPods to install these dependencies.
58+
59+
```bash
60+
cd TUIKit_iOS/application
61+
pod install
62+
```
63+
64+
### 4. Run Project
65+
66+
Open the generated `.xcworkspace` file with Xcode, configure your Tencent Cloud SDKAppID, UserID, and UserSig (usually configured in the `GenerateTestUserSig` file), then compile and run.
67+
68+
## Architecture
69+
70+
The architecture design of `TUIKit_iOS` follows layered principles:
71+
72+
1. **TUIKit_iOS (UI Layer):**
73+
74+
* Provides pre-built, reusable UI components.
75+
* Responsible for view presentation and user interaction.
76+
* Subscribes to `Store` in `AtomicXCore` to get state and update UI.
77+
* Calls `Store` methods in `AtomicXCore` to respond to user operations.
78+
79+
2. **AtomicXCore (Core Layer):**
80+
81+
* **Stores:** (such as `LiveListStore`, `CallListStore`, `ConversationListStore`) responsible for managing business logic and state.
82+
* **Core Views:** (such as `LiveCoreView`, `ParticipantView`) provide UI-less view containers that drive video rendering.
83+
* **Engine Wrapper:** Encapsulates underlying `RTCRoomEngine`, `TUICallEngine`, and `IMSDK`, providing unified APIs.
84+
85+
3. **Tencent Cloud SDK (Engine Layer):**
86+
87+
* `RTCRoomEngine` & `TUICallEngine`: Provide underlying real-time audio/video capabilities.
88+
* `IMSDK`: Provides instant messaging capabilities.
89+
90+
## Documentation
91+
92+
* [AtomicXCore Documentation](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore)
93+
* [Official Documentation - Quick Integration Guide](https://trtc.io/document/60455?product=live&menulabel=uikit&platform=ios)
94+
95+
## License
96+
97+
This project is licensed under the [MIT License](LICENSE).
98+
99+
---
100+
101+
## Project Structure
102+
103+
```
104+
TUIKit_iOS/
105+
├── application/ # Demo application
106+
│ ├── App-UIKit.xcodeproj
107+
│ ├── App-UIKit.xcworkspace
108+
│ └── Podfile
109+
├── atomic_x/ # AtomicX UI components
110+
│ ├── Sources/ # Swift source files
111+
│ └── Resources/ # UI resources
112+
├── call/ # TUICallKit components
113+
├── chat/ # Chat UI components
114+
├── conference/ # Conference/Room UI components
115+
├── live/ # Live streaming components
116+
└── devops/ # Build and deployment scripts
117+
```
118+
119+
## Getting Started with Development
120+
121+
### Prerequisites
122+
123+
Before you begin development, ensure you have:
124+
125+
1. **Development Environment:**
126+
- macOS with Xcode 14.0+
127+
- iOS 14.0+ deployment target
128+
- CocoaPods installed
129+
130+
2. **Tencent Cloud Account:**
131+
- SDKAppID from Tencent Cloud Console
132+
- Valid UserSig for testing
133+
134+
### Building from Source
135+
136+
1. **Clone and Setup:**
137+
```bash
138+
git clone https://github.com/Tencent-RTC/TUIKit_iOS.git
139+
cd TUIKit_iOS/application
140+
pod install
141+
```
142+
143+
2. **Configure Credentials:**
144+
- Open `App-UIKit.xcworkspace` in Xcode
145+
- Navigate to `GenerateTestUserSig.swift`
146+
- Replace placeholder values with your actual SDKAppID and SecretKey
147+
148+
3. **Build and Run:**
149+
- Select your target device or simulator
150+
- Press Cmd+R to build and run
151+
152+
### Integration Guide
153+
154+
To integrate TUIKit_iOS into your existing project:
155+
156+
1. **Add Podfile Dependencies:**
157+
```ruby
158+
pod 'AtomicX'
159+
pod 'TUICallKit_Swift'
160+
pod 'TUIRoomKit'
161+
pod 'TUILiveKit'
162+
```
163+
164+
2. **Import and Initialize:**
165+
```swift
166+
import AtomicXCore
167+
import AtomicX
168+
169+
// Initialize in your AppDelegate
170+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
171+
// Configure AtomicXCore with your credentials
172+
return true
173+
}
174+
```
175+
176+
3. **Use UI Components:**
177+
```swift
178+
import AtomicX
179+
180+
// Example: Add a call view
181+
let callView = CallView()
182+
view.addSubview(callView)
183+
```
184+
185+
## Contributing
186+
187+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to submit pull requests, report issues, and contribute to the project.
188+
189+
### Development Workflow
190+
191+
1. Fork the repository
192+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
193+
3. Make your changes following our [coding standards](docs/CODING_STANDARDS.md)
194+
4. Add tests for your changes
195+
5. Ensure all tests pass
196+
6. Commit your changes (`git commit -m 'Add amazing feature'`)
197+
7. Push to the branch (`git push origin feature/amazing-feature`)
198+
8. Open a Pull Request
199+
200+
## Support
201+
202+
- **Documentation:** [Official Documentation](https://tencent-rtc.github.io/TUIKit_iOS/)
203+
- **API Reference:** [AtomicXCore API](https://tencent-rtc.github.io/TUIKit_iOS/documentation/atomicxcore)
204+
- **Issues:** [GitHub Issues](https://github.com/Tencent-RTC/TUIKit_iOS/issues)
205+
- **Community:** [Tencent Cloud Developer Community](https://cloud.tencent.com/developer)
206+
207+
## Changelog
208+
209+
See [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes to this project.
210+
211+
## Acknowledgments
212+
213+
- Built with [Tencent Cloud TRTC](https://cloud.tencent.com/product/trtc)
214+
- UI framework powered by [SnapKit](https://github.com/SnapKit/SnapKit)
215+
- Image loading by [Kingfisher](https://github.com/onevcat/Kingfisher)

0 commit comments

Comments
 (0)