Move API key para Secrets.swift fora do versionamento

- Secrets.swift entra no .gitignore; Secrets.swift.example fica como modelo
- Adiciona .gitignore (xcuserdata, DerivedData) e README com instruções

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-04 19:49:33 -03:00
parent 017f4c022a
commit bf49716639
4 changed files with 50 additions and 3 deletions

View File

@@ -54,9 +54,8 @@ struct Chapter: Decodable, Hashable {
enum BibleAPI {
static let baseURL = URL(string: "https://bible.falehandix.com.br")!
// NOTA: para produção, mover para um Secrets.xcconfig (fora do controle de
// versão) ou para o Keychain. Mantido aqui apenas para a prova de conceito.
static let apiKey = "3717732ae41aa989ec7e0b30568784d78d23a8e026f5df889d82ae4b54f2986b"
// A chave vive em Secrets.swift (gitignored) ver Secrets.swift.example.
static let apiKey = Secrets.bibleAPIKey
/// Faz um GET na API e decodifica a resposta JSON.
static func get<T: Decodable>(_ path: String, query: [URLQueryItem] = []) async throws -> T {