Add ScenicPermission module and AMap CocoaPods with simulator support.
Integrate scenic selection and permission flows into home routing, add AMap SDK for device builds while keeping arm64 simulators compilable via Podfile post_install hooks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -15,6 +15,7 @@ struct RootView: View {
|
||||
@State private var scenicSpotContext = ScenicSpotContext()
|
||||
@State private var appRouter = AppRouter()
|
||||
@State private var toastCenter = ToastCenter()
|
||||
@State private var snapshotStore: AccountSnapshotStore
|
||||
@State private var apiClient: APIClient
|
||||
@State private var authAPI: AuthAPI
|
||||
@State private var profileAPI: ProfileAPI
|
||||
@ -25,6 +26,7 @@ struct RootView: View {
|
||||
@State private var statisticsAPI: StatisticsAPI
|
||||
@State private var paymentAPI: PaymentAPI
|
||||
@State private var walletAPI: WalletAPI
|
||||
@State private var scenicPermissionAPI: ScenicPermissionAPI
|
||||
@State private var authSessionCoordinator: AuthSessionCoordinator
|
||||
@State private var sessionBootstrapper: SessionBootstrapper
|
||||
|
||||
@ -33,6 +35,7 @@ struct RootView: View {
|
||||
let apiClient = APIClient()
|
||||
let tokenStore = SessionTokenStore()
|
||||
let snapshotStore = AccountSnapshotStore()
|
||||
_snapshotStore = State(initialValue: snapshotStore)
|
||||
_apiClient = State(initialValue: apiClient)
|
||||
_authAPI = State(initialValue: AuthAPI(client: apiClient))
|
||||
_profileAPI = State(initialValue: ProfileAPI(client: apiClient))
|
||||
@ -44,6 +47,7 @@ struct RootView: View {
|
||||
_statisticsAPI = State(initialValue: StatisticsAPI(client: apiClient))
|
||||
_paymentAPI = State(initialValue: PaymentAPI(client: apiClient))
|
||||
_walletAPI = State(initialValue: WalletAPI(client: apiClient))
|
||||
_scenicPermissionAPI = State(initialValue: ScenicPermissionAPI(client: apiClient))
|
||||
_authSessionCoordinator = State(
|
||||
initialValue: AuthSessionCoordinator(
|
||||
tokenStore: tokenStore,
|
||||
@ -68,6 +72,7 @@ struct RootView: View {
|
||||
.environment(scenicSpotContext)
|
||||
.environment(appRouter)
|
||||
.environment(toastCenter)
|
||||
.environment(snapshotStore)
|
||||
.environment(apiClient)
|
||||
.environment(authAPI)
|
||||
.environment(profileAPI)
|
||||
@ -78,6 +83,7 @@ struct RootView: View {
|
||||
.environment(statisticsAPI)
|
||||
.environment(paymentAPI)
|
||||
.environment(walletAPI)
|
||||
.environment(scenicPermissionAPI)
|
||||
.environment(authSessionCoordinator)
|
||||
.task {
|
||||
apiClient.bindAuthTokenProvider { appSession.token }
|
||||
|
||||
Reference in New Issue
Block a user