Constants.swift (2177B)
1 // 2 // Constants.swift 3 // damus 4 // 5 // Created by Sam DuBois on 12/18/22. 6 // 7 8 import Foundation 9 10 /// General app-wide constants 11 /// 12 /// ## Implementation notes: 13 /// - Force unwrapping in this class is generally ok, because the contents are static, and so we can easily provide guarantees that they will not crash the app. 14 class Constants { 15 //static let EXAMPLE_DEMOS: DamusState = .empty 16 static let DAMUS_APP_GROUP_IDENTIFIER: String = "group.com.damus" 17 static let MAIN_APP_BUNDLE_IDENTIFIER: String = "com.jb55.damus2" 18 static let NOTIFICATION_EXTENSION_BUNDLE_IDENTIFIER: String = "com.jb55.damus2.DamusNotificationService" 19 20 // MARK: Push notification server 21 static let PUSH_NOTIFICATION_SERVER_PRODUCTION_BASE_URL: URL = URL(string: "https://notify.damus.io")! 22 static let PUSH_NOTIFICATION_SERVER_STAGING_BASE_URL: URL = URL(string: "https://notify-staging.damus.io")! 23 static let PUSH_NOTIFICATION_SERVER_TEST_BASE_URL: URL = URL(string: "http://localhost:8000")! 24 25 // MARK: Purple 26 // API 27 static let PURPLE_API_LOCAL_TEST_BASE_URL: URL = URL(string: "http://localhost:8989")! 28 static let PURPLE_API_STAGING_BASE_URL: URL = URL(string: "https://api-staging.damus.io")! 29 static let PURPLE_API_PRODUCTION_BASE_URL: URL = URL(string: "https://api.damus.io")! 30 // Purple landing page 31 static let PURPLE_LANDING_PAGE_LOCAL_TEST_URL: URL = URL(string: "http://localhost:3000/purple")! 32 static let PURPLE_LANDING_PAGE_STAGING_URL: URL = URL(string: "https://staging.damus.io/purple")! 33 static let PURPLE_LANDING_PAGE_PRODUCTION_URL: URL = URL(string: "https://damus.io/purple")! 34 // Website 35 static let DAMUS_WEBSITE_LOCAL_TEST_URL: URL = URL(string: "http://localhost:3000")! 36 static let DAMUS_WEBSITE_STAGING_URL: URL = URL(string: "https://staging.damus.io")! 37 static let DAMUS_WEBSITE_PRODUCTION_URL: URL = URL(string: "https://damus.io")! 38 39 // MARK: Damus Company Info 40 static let SUPPORT_PUBKEY: Pubkey = Pubkey(hex: "3efdaebb1d8923ebd99c9e7ace3b4194ab45512e2be79c1b7d68d9243e0d2681")! 41 42 // MARK: General constants 43 static let GIF_IMAGE_TYPE: String = "com.compuserve.gif" 44 }