Commit Graph

22 Commits

Author SHA1 Message Date
Daniel Arantes Loverde
72a5b59c44 [fix] LCENavigationView: remove phantom glass button, center title safely
Dummy mirrored button used to balance title centering rendered as a
visible empty glass pill under iOS 26's automatic button chrome. Side
buttons now only render when actually configured, title centers via
ZStack independent of button widths, and title padding is derived from
measured button width so long titles truncate instead of overlapping.
Glass button style is opt-in via setGlassButtonsEnabled(_:), off by
default.
2026-09-01 16:20:19 -03:00
Daniel Arantes Loverde
6acec0ff3a [api-upload-refactor] Set deployment target to iOS 15, simplify upload
- Package.swift: .iOS(.v13) -> .iOS(.v15), .watchOS(.v6) -> .v8
  (README already stated iOS 15; watchOS 8 needed for URLSession.upload(for:fromFile:))
- drop the iOS-13 uploadTask continuation bridge; both upload overloads now
  share one runUpload using session.upload(for:fromFile:delegate:)
- remove now-redundant @available(iOS 15) from the progress overload and test
- Documentation/API.md: drop iOS-version caveats
2026-08-29 18:51:49 -03:00
Daniel Arantes Loverde
fb2e417104 [api-upload-refactor] Add iOS15 upload progress overload; toObjetct throws
- upload(..., onProgress: @Sendable (Double) -> Void) @available(iOS 15.0, *)
  via URLSession.upload(for:fromFile:delegate:) + UploadProgressDelegate;
  emits 1.0 on completion. Base upload stays iOS 13+
- move all upload code to LCEssentials+API+Upload.swift (buildUploadRequest /
  finishUpload / performUpload shared); API file 400 lines. Shared request
  helpers private -> internal
- Dictionary.toObjetct: try! -> throws
- APIUploadTests: +progress contract test (final 1.0, monotonic, decodes)
2026-08-29 17:46:41 -03:00
Daniel Arantes Loverde
3c64f364be [api-upload-refactor] Add multipart upload(), split logging to its own file
- upload<T>(url:method:form:pathParams:headers:debug:timeoutInterval:networkServiceType:)
  serialises MultipartForm to a temp file, streams it via uploadTask(with:fromFile:)
  bridged to async (works on iOS 13+, unlike URLSession.upload(for:fromFile:))
- temp body file always removed via defer (success and throw)
- move requestLOG/responseLOG to LCEssentials+API+Logging.swift; extract
  logResponseError helper; keeps API file at 473 lines
- APIUploadTests: 4 cases
- progress-reporting overload deferred (no stub seam for didSendBodyData)
2026-08-29 17:16:16 -03:00
Daniel Arantes Loverde
bcd358cb09 [api-upload-refactor] Replace request surface: typed body, pathParams, bounded retry
- request(): drop params: Any? and jsonEncoding:; add body: (any HTTPBody)?
  and pathParams: [String: String]
- remove legacy magic-"file" multipart branch (-> upload() in T6) and the
  now-unused mimeTypeForPath
- decompose into makeURL / buildRequest / attach / send / classify /
  decodeResponse / friendlyError (each < 30 lines)
- headers now merge over defaults (custom wins per key) instead of replacing
- fix unbounded persistConnection recursion on permanent 4xx: cap at
  maxPersistRetries (3)
- APIRequestTests: 7 cases over StubURLProtocol
2026-08-29 17:12:52 -03:00
Daniel Arantes Loverde
9581e49ce0 [api-upload-refactor] Convert API to an actor, drop @MainActor
- API: @MainActor struct -> actor. certData/certPassword/persistConnectionDelay
  move from static var (data race) to actor-isolated instance state
- setupCertificationRequest -> setupCertification; add setPersistConnectionDelay
- add internal init(testConfiguration:) seam; makeSession() helper picks
  test / cert-delegate / shared session
- URLSessionDelegateHandler: final + @unchecked Sendable, immutable let certs,
  no @MainActor; challenge logic unchanged
- getIdentity(): remove as! SecIdentity, extract via typed Unmanaged bridging
- delete unused Result enum and defaultParams
- APIActorTests: actor conformance, delay round-trip, per-instance cert state
2026-08-29 17:09:09 -03:00
Daniel Arantes Loverde
e89935a69c [api-upload-refactor] Add test target, relax decode constraints, add HTTPBody + MultipartForm
- Package: new LCEssentialsTests target (runs on iOS simulator)
- JSONDecoder.decode: T: Codable -> T: Decodable & Sendable (4 overloads);
  remove try! in decode(fromURL:); honour encoding param in decode(_:using:)
- Propagate & Sendable to Data.object, Dictionary.toObjetct, API.request return
- LCEHTTPBody: HTTPBody protocol, JSONBody, FormURLEncodedBody, RawBody, factories
- LCEMultipartForm: multipart builder, OutputStream-streamed serialize(),
  in-memory + on-disk file parts, ported mimeType(for:)
- Tests: StubURLProtocol harness + 15 tests
2026-08-29 16:59:08 -03:00
Daniel Arantes Loverde
55e75760ec [lececryptokit-1.0.3] Bump LCECryptoKitBinary and expose pepper-refactor login primitives 2026-08-22 11:15:11 -03:00
Daniel Arantes Loverde
03044604fd Update LCEssentials+API.swift 2026-07-07 13:15:45 -03:00
Daniel Arantes Loverde
2c781fbac6 Update LCEssentials+API.swift 2026-06-06 11:00:08 -03:00
Daniel Arantes Loverde
966b439277 Update LCEssentials+API.swift 2026-06-06 10:53:16 -03:00
Daniel Arantes Loverde
a24b79f443 only remote crypto kit 2026-05-24 10:26:25 -03:00
Daniel Arantes Loverde
40581d791a fix: update keyboard notification handling for Swift concurrency
Keep snackbar keyboard animations on the main actor and read UIKit keyboard values using the expected notification payload types.

Made-with: Cursor
2026-04-07 11:19:39 -03:00
Daniel Arantes Loverde
d06a66226e iPhone UIDevice names updated 2026-02-11 17:56:53 -03:00
Daniel Arantes Loverde
57696e3036 Optional 2026-02-06 12:25:34 -03:00
Daniel Arantes Loverde
5df2499c4a Added more options 2025-10-07 20:34:33 -03:00
Daniel Arantes Loverde
9a7981b845 Fix LCECryptoKit methods 2025-10-07 20:21:28 -03:00
Daniel Arantes Loverde
d2ca6e54d2 Improvements 2025-08-15 10:57:14 -03:00
Daniel Arantes Loverde
0910973e9a documentation 2025-06-23 09:48:57 -03:00
Daniel Arantes Loverde
578c69e0f8 Network Fix 2025-04-09 21:18:50 -03:00
Daniel Arantes Loverde
6040caa2de Bugfix CoreGraphics 2025-03-23 00:37:11 -03:00
Daniel Arantes Loverde
e4538f84e2 Version 1.0.0 2025-03-23 00:27:49 -03:00