damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

Constants.swift (2235B)


      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: Push notification server
     22     static let PUSH_NOTIFICATION_SERVER_PRODUCTION_BASE_URL: URL = URL(string: "https://notify.damus.io")!
     23     static let PUSH_NOTIFICATION_SERVER_STAGING_BASE_URL: URL = URL(string: "https://notify-staging.damus.io")!
     24     static let PUSH_NOTIFICATION_SERVER_TEST_BASE_URL: URL = URL(string: "http://localhost:8000")!
     25     
     26     // MARK: Purple
     27     // API
     28     static let PURPLE_API_LOCAL_TEST_BASE_URL: URL = URL(string: "http://localhost:8989")!
     29     static let PURPLE_API_STAGING_BASE_URL: URL = URL(string: "https://api-staging.damus.io")!
     30     static let PURPLE_API_PRODUCTION_BASE_URL: URL = URL(string: "https://api.damus.io")!
     31     // Purple landing page
     32     static let PURPLE_LANDING_PAGE_LOCAL_TEST_URL: URL = URL(string: "http://localhost:3000/purple")!
     33     static let PURPLE_LANDING_PAGE_STAGING_URL: URL = URL(string: "https://staging.damus.io/purple")!
     34     static let PURPLE_LANDING_PAGE_PRODUCTION_URL: URL = URL(string: "https://damus.io/purple")!
     35     // Website
     36     static let DAMUS_WEBSITE_LOCAL_TEST_URL: URL = URL(string: "http://localhost:3000")!
     37     static let DAMUS_WEBSITE_STAGING_URL: URL = URL(string: "https://staging.damus.io")!
     38     static let DAMUS_WEBSITE_PRODUCTION_URL: URL = URL(string: "https://damus.io")!
     39     
     40     // MARK: Damus Company Info
     41     static let SUPPORT_PUBKEY: Pubkey = Pubkey(hex: "3efdaebb1d8923ebd99c9e7ace3b4194ab45512e2be79c1b7d68d9243e0d2681")!
     42     
     43     // MARK: General constants
     44     static let GIF_IMAGE_TYPE: String = "com.compuserve.gif"
     45 }