Skip to content

Commit 7f30712

Browse files
author
qinhui
committed
update
1 parent 4c8f410 commit 7f30712

5 files changed

Lines changed: 20 additions & 101 deletions

File tree

iOS/AGENTS.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ SDK version: each project's `Podfile` specifies the SDK version.
2323

2424
Never share source files between projects.
2525

26-
## Architecture Red Lines (all projects)
27-
28-
1. Each case owns its own `AgoraRtcEngineKit` — never share across screens.
29-
2. Always `leaveChannel()` then `AgoraRtcEngineKit.destroy()` when the screen is dismissed.
30-
3. `AgoraRtcEngineDelegate` callbacks may arrive on a background thread — dispatch UI updates to the main thread.
31-
4. Always request permissions (camera/microphone) before calling `joinChannel()`.
32-
3326
## Further Reading
3427

3528
- `ARCHITECTURE.md` — four-project structure overview

iOS/APIExample-Audio/AGENTS.md

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,12 @@ static let AppId: String = "YOUR_APP_ID"
1818
static let Certificate: String? = nil // leave nil if App Certificate is not enabled
1919
```
2020

21-
## How to Add a New Case
21+
## Skills
2222

23-
See `ARCHITECTURE.md` for the full registration mechanism. The required steps are:
24-
25-
1. Create an example folder under `APIExample-Audio/Examples/Basic/` or `APIExample-Audio/Examples/Advanced/`:
26-
- `<ExampleName>.swift` containing both `<ExampleName>Entry` and `<ExampleName>Main` classes
27-
- `Base.lproj/<ExampleName>.storyboard` with two scenes: Entry and Main
28-
29-
2. Add a `MenuItem` to the `menus` array in `APIExample-Audio/ViewController.swift`:
30-
```swift
31-
MenuItem(name: "My New Case".localized, storyboard: "MyNewCase", controller: "MyNewCase")
32-
```
33-
34-
3. Build and run — the case appears in the list.
35-
36-
## Architecture Red Lines
37-
38-
- Do NOT call `enableVideo()`, `setupLocalVideo()`, `setupRemoteVideo()`, or any camera-related APIs — `AgoraAudio_iOS` has no video module and will crash at runtime.
39-
- Do NOT add video, screen sharing, or beauty cases — use `APIExample/` instead.
40-
- Do NOT use SwiftUI — this project is UIKit + Storyboards only.
41-
- Do NOT introduce Objective-C files — this project is Swift only.
42-
- Each case must create and destroy its own `AgoraRtcEngineKit` instance.
43-
- Always call `agoraKit.leaveChannel()` before `AgoraRtcEngineKit.destroy()` when the screen is dismissed.
44-
- `AgoraRtcEngineDelegate` callbacks may arrive on a background thread — dispatch UI updates to the main thread.
45-
- Always request microphone permission before calling `joinChannel()`. Audio cases only need `RECORD_AUDIO`.
23+
| Task | Skill | Status |
24+
|------|-------|--------|
25+
| Find an existing example | `query-cases` | TODO |
26+
| Add a new example | `add-new-case` | TODO |
4627

4728
## Further Reading
4829

iOS/APIExample-OC/AGENTS.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,12 @@ Edit `APIExample-OC/Common/KeyCenter.m`:
2323
}
2424
```
2525

26-
## How to Add a New Case
26+
## Skills
2727

28-
See `ARCHITECTURE.md` for the full registration mechanism. The required steps are:
29-
30-
1. Create an example folder under `APIExample-OC/Examples/Basic/` or `APIExample-OC/Examples/Advanced/`:
31-
- `<ExampleName>.h` / `<ExampleName>.m` containing both Entry and Main classes
32-
- `<ExampleName>.storyboard` with two scenes: Entry (`EntryViewController`) and Main
33-
34-
2. Add a `MenuItem` to the `+[MenuSection menus]` method in `APIExample-OC/ViewController.m`:
35-
```objc
36-
[[MenuItem alloc] initWithName:@"My New Case".localized storyboard:@"MyNewCase" controller:@""]
37-
```
38-
39-
3. Build and run — the case appears in the list.
40-
41-
## Architecture Red Lines
42-
43-
- Do NOT add audio-only cases that require `AgoraAudio_iOS` exclusivity — use `APIExample-Audio/` instead.
44-
- Do NOT use SwiftUI or UIKit Storyboards with Swift — this project is Objective-C + Storyboards only.
45-
- Do NOT introduce Swift files — this project is Objective-C only.
46-
- Each case must create and destroy its own `AgoraRtcEngineKit` instance.
47-
- Always call `[agoraKit leaveChannel:]` before `[AgoraRtcEngineKit destroy]` when the screen is dismissed.
48-
- `AgoraRtcEngineDelegate` callbacks may arrive on a background thread — dispatch UI updates to the main thread.
49-
- Always request camera/microphone permissions before calling `joinChannelByToken:`.
28+
| Task | Skill | Status |
29+
|------|-------|--------|
30+
| Find an existing example | `query-cases` | TODO |
31+
| Add a new example | `add-new-case` | TODO |
5032

5133
## Further Reading
5234

iOS/APIExample-SwiftUI/AGENTS.md

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,12 @@ static let AppId: String = "YOUR_APP_ID"
1818
static let Certificate: String? = nil // leave nil if App Certificate is not enabled
1919
```
2020

21-
## How to Add a New Case
21+
## Skills
2222

23-
See `ARCHITECTURE.md` for the full registration mechanism. The required steps are:
24-
25-
1. Create an example folder under `APIExample-SwiftUI/Examples/Basic/` or `APIExample-SwiftUI/Examples/Advanced/`:
26-
- `<ExampleName>.swift` — Entry view and Main view
27-
- `<ExampleName>RTC.swift` — RTC wrapper class (`ObservableObject` + `AgoraRtcEngineDelegate`)
28-
29-
2. Add a `MenuItem` to the `menus` array in `APIExample-SwiftUI/ContentView.swift`:
30-
```swift
31-
MenuItem(name: "My New Case".localized, view: AnyView(MyNewCaseEntry()))
32-
```
33-
34-
3. Build and run — the case appears in the list.
35-
36-
## Architecture Red Lines
37-
38-
- Do NOT add audio-only cases that require `AgoraAudio_iOS` exclusivity — use `APIExample-Audio/` instead.
39-
- Do NOT use UIKit view controllers or Storyboards — this project is SwiftUI only.
40-
- Do NOT introduce Objective-C files — this project is Swift only.
41-
- Each case must create and destroy its own `AgoraRtcEngineKit` instance.
42-
- Always call `agoraKit.leaveChannel()` before `AgoraRtcEngineKit.destroy()` in `onDestroy()`.
43-
- `AgoraRtcEngineDelegate` callbacks may arrive on a background thread — dispatch UI updates to the main thread.
44-
- Engine setup should happen in `.onAppear`, cleanup in `.onDisappear`.
45-
- Always request camera/microphone permissions before calling `joinChannel()`.
23+
| Task | Skill | Status |
24+
|------|-------|--------|
25+
| Find an existing example | `query-cases` | TODO |
26+
| Add a new example | `add-new-case` | TODO |
4627

4728
## Further Reading
4829

iOS/APIExample/AGENTS.md

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,12 @@ static let AppId: String = "YOUR_APP_ID"
1818
static let Certificate: String? = nil // leave nil if App Certificate is not enabled
1919
```
2020

21-
## How to Add a New Case
21+
## Skills
2222

23-
See `ARCHITECTURE.md` for the full registration mechanism. The required steps are:
24-
25-
1. Create an example folder under `APIExample/Examples/Basic/` or `APIExample/Examples/Advanced/`:
26-
- `<ExampleName>.swift` containing both `<ExampleName>Entry` and `<ExampleName>Main` classes
27-
- `Base.lproj/<ExampleName>.storyboard` with two scenes: Entry (`EntryViewController`) and Main (`<ExampleName>`)
28-
29-
2. Add a `MenuItem` to the `menus` array in `APIExample/ViewController.swift`:
30-
```swift
31-
MenuItem(name: "My New Case".localized, storyboard: "MyNewCase", controller: "MyNewCase")
32-
```
33-
34-
3. Build and run — the case appears in the list.
35-
36-
## Architecture Red Lines
37-
38-
- Do NOT add audio-only cases that require `AgoraAudio_iOS` exclusivity — use `APIExample-Audio/` instead.
39-
- Do NOT use SwiftUI — this project is UIKit + Storyboards only.
40-
- Do NOT introduce Objective-C files — this project is Swift only.
41-
- Each case must create and destroy its own `AgoraRtcEngineKit` instance.
42-
- Always call `agoraKit.leaveChannel()` before `AgoraRtcEngineKit.destroy()` when the screen is dismissed.
43-
- `AgoraRtcEngineDelegate` callbacks may arrive on a background thread — dispatch UI updates to the main thread.
44-
- Always request camera/microphone permissions before calling `joinChannel()`.
23+
| Task | Skill | Status |
24+
|------|-------|--------|
25+
| Find an existing example | `query-cases` | TODO |
26+
| Add a new example | `add-new-case` | TODO |
4527

4628
## Further Reading
4729

0 commit comments

Comments
 (0)