Browse Questions
  • Secure Cell is Themis's symmetric authenticated encryption primitive for data at rest, taking a key or passphrase plus an optional context and returning ciphertext that cannot be decrypted or…
  • Use a computed property for a cheap, side-effect-free value derived from existing state; use a method for expensive work, side effects, or anything that needs arguments.
  • Build configurations control compiler optimisations and flags.
  • Themis exposes Secure Cell for encrypting data at rest, Secure Message for encrypting or signing individual payloads between two parties, Secure Session for an encrypted stateful channel over an…

Answer: Build configurations control compiler optimisations and flags. Debug is for development; Release is what ships to users.

DebugRelease
OptimisationNone (-Onone)Full (-O)
Debug symbols✅ Included❌ Stripped
AssertionsActiveDisabled
#if DEBUGtruefalse
Build speedFastSlow
Runtime speedSlowFast

Code Example:

// Code only runs in Debug builds
#if DEBUG
func printDebugInfo() {
    print("User: \(currentUser)")
    print("API: \(apiBaseURL)")
}
#endif

// Assertion — removed in Release builds, no performance impact in production
assert(!items.isEmpty, "Items should never be empty here")

// Fatal error — always present (use for programmer errors)
guard let url = URL(string: urlString) else {
    fatalError("Invalid hardcoded URL — developer error")
}