Files
demoapp/ios/LynkedUpPro/AppDelegate.swift
Mansi 801725edf3 feat: Add user registration component and authentication services
- Implemented Register component for user sign-up with form validation and network status handling.
- Created authAPI service for handling user login and registration with online/offline support.
- Developed localStorage service for managing user data and sessions offline.
- Introduced networkService for detecting online/offline status and managing connectivity.
- Defined authentication types for requests and responses.
- Added TypeScript configuration for the project.
2025-12-11 23:33:43 +05:30

49 lines
1.2 KiB
Swift

import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var reactNativeDelegate: ReactNativeDelegate?
var reactNativeFactory: RCTReactNativeFactory?
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
let delegate = ReactNativeDelegate()
let factory = RCTReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()
reactNativeDelegate = delegate
reactNativeFactory = factory
window = UIWindow(frame: UIScreen.main.bounds)
factory.startReactNative(
withModuleName: "LynkedUpPro",
in: window,
launchOptions: launchOptions
)
return true
}
}
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}
override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}