Constants.swift (2442B)
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 IMAGE_CACHE_DIRNAME: String = "ImageCache" 18 static let MAIN_APP_BUNDLE_IDENTIFIER: String = "com.jb55.damus2" 19 static let NOTIFICATION_EXTENSION_BUNDLE_IDENTIFIER: String = "com.jb55.damus2.DamusNotificationService" 20 21 // MARK: Curation 22 static let ONBOARDING_FOLLOW_PACK_CURATOR_PUBKEY: Pubkey = Pubkey(hex: "895c2a90a860ac18434aa69e7b0da8465721216fa36e42c022e393579c486cba")! 23 24 // MARK: Push notification server 25 static let PUSH_NOTIFICATION_SERVER_PRODUCTION_BASE_URL: URL = URL(string: "https://notify.damus.io")! 26 static let PUSH_NOTIFICATION_SERVER_STAGING_BASE_URL: URL = URL(string: "https://notify-staging.damus.io")! 27 static let PUSH_NOTIFICATION_SERVER_TEST_BASE_URL: URL = URL(string: "http://localhost:8000")! 28 29 // MARK: Purple 30 // API 31 static let PURPLE_API_LOCAL_TEST_BASE_URL: URL = URL(string: "http://localhost:8989")! 32 static let PURPLE_API_STAGING_BASE_URL: URL = URL(string: "https://api-staging.damus.io")! 33 static let PURPLE_API_PRODUCTION_BASE_URL: URL = URL(string: "https://api.damus.io")! 34 // Purple landing page 35 static let PURPLE_LANDING_PAGE_LOCAL_TEST_URL: URL = URL(string: "http://localhost:3000/purple")! 36 static let PURPLE_LANDING_PAGE_STAGING_URL: URL = URL(string: "https://staging.damus.io/purple")! 37 static let PURPLE_LANDING_PAGE_PRODUCTION_URL: URL = URL(string: "https://damus.io/purple")! 38 // Website 39 static let DAMUS_WEBSITE_LOCAL_TEST_URL: URL = URL(string: "http://localhost:3000")! 40 static let DAMUS_WEBSITE_STAGING_URL: URL = URL(string: "https://staging.damus.io")! 41 static let DAMUS_WEBSITE_PRODUCTION_URL: URL = URL(string: "https://damus.io")! 42 43 // MARK: Damus Company Info 44 static let SUPPORT_PUBKEY: Pubkey = Pubkey(hex: "3efdaebb1d8923ebd99c9e7ace3b4194ab45512e2be79c1b7d68d9243e0d2681")! 45 46 // MARK: General constants 47 static let GIF_IMAGE_TYPE: String = "com.compuserve.gif" 48 static let MAX_SHARE_RELAYS = 4 49 }