-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUniPop_AppApp.swift
More file actions
45 lines (35 loc) · 1.12 KB
/
Copy pathUniPop_AppApp.swift
File metadata and controls
45 lines (35 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// UniPop_AppApp.swift
// UniPop-App
//
// Created by Carly Googel on 4/23/24.
//
import SwiftUI
import FirebaseCore
import Firebase
import StripePaymentSheet
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
// Configure Stripe
StripeAPI.defaultPublishableKey = "pk_test_51PUJY5CggrV7v76UjLSFjdiVesDtrOW8CSrTpvXHvQ6CCmXTMErq1x2IbRsZiFnFVufbmlXA7AR7QS50e2YcDDa900MMyKxaD6"
return true
}
}
@main
struct UniPop_AppApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
var body: some Scene {
WindowGroup {
ContentView()
// might not need this
.onOpenURL { incomingURL in
let stripeHandled = StripeAPI.handleURLCallback(with: incomingURL)
if (!stripeHandled) {
// This was not a Stripe url – handle the URL normally as you would
}
}
}
}
}