Skip to content

Commit 03dddb3

Browse files
krabyuAbySwifter
authored andcommitted
chore: update api-example from source (2026-03-24 11:40:41)
1 parent 2c3f22d commit 03dddb3

46 files changed

Lines changed: 10626 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api-example/.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# =========================
2+
# iOS 平台忽略规则
3+
# =========================
4+
5+
# Xcode 用户数据
6+
xcuserdata/
7+
*.xcuserstate
8+
9+
# Xcode 构建产物
10+
build/
11+
DerivedData/
12+
*.ipa
13+
*.dSYM.zip
14+
*.dSYM
15+
16+
# CocoaPods
17+
Pods/
18+
!Podfile
19+
!Podfile.lock
20+
21+
# Carthage
22+
Carthage/Build/
23+
Carthage/Checkouts/
24+
25+
# Swift Package Manager
26+
.build/
27+
.swiftpm/
28+
Package.resolved
29+
30+
# fastlane
31+
fastlane/report.xml
32+
fastlane/Preview.html
33+
fastlane/screenshots/**/*.png
34+
fastlane/test_output
35+
36+
# Code Injection
37+
iOSInjectionProject/
38+
39+
# Playgrounds
40+
timeline.xctimeline
41+
playground.xcworkspace

api-example/App/AppDelegate.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import UIKit
2+
import Toast_Swift
3+
4+
@main
5+
class AppDelegate: UIResponder, UIApplicationDelegate {
6+
7+
func application(_ application: UIApplication,
8+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
9+
configureToast()
10+
return true
11+
}
12+
13+
/// Configure Toast globally to appear centered by default
14+
private func configureToast() {
15+
ToastManager.shared.position = .center
16+
}
17+
18+
// MARK: UISceneSession Lifecycle
19+
20+
func application(_ application: UIApplication,
21+
configurationForConnecting connectingSceneSession: UISceneSession,
22+
options: UIScene.ConnectionOptions) -> UISceneConfiguration {
23+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
24+
}
25+
26+
func application(_ application: UIApplication,
27+
didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
28+
}
29+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import UIKit
2+
3+
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
4+
5+
var window: UIWindow?
6+
7+
func scene(_ scene: UIScene,
8+
willConnectTo session: UISceneSession,
9+
options connectionOptions: UIScene.ConnectionOptions) {
10+
guard let windowScene = (scene as? UIWindowScene) else { return }
11+
12+
window = UIWindow(windowScene: windowScene)
13+
14+
// Navigate directly to the login screen (the launch screen is provided by LaunchScreen.storyboard)
15+
let loginVC = LoginViewController()
16+
let navController = UINavigationController(rootViewController: loginVC)
17+
18+
window?.rootViewController = navController
19+
window?.makeKeyAndVisible()
20+
}
21+
22+
func sceneDidDisconnect(_ scene: UIScene) {}
23+
24+
func sceneDidBecomeActive(_ scene: UIScene) {}
25+
26+
func sceneWillResignActive(_ scene: UIScene) {}
27+
28+
func sceneWillEnterForeground(_ scene: UIScene) {}
29+
30+
func sceneDidEnterBackground(_ scene: UIScene) {}
31+
}

api-example/AtomicXCoreExample.xcodeproj/project.pbxproj

Lines changed: 604 additions & 0 deletions
Large diffs are not rendered by default.

api-example/AtomicXCoreExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api-example/AtomicXCoreExample.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)