Skip to content

Cleanup: dead Date helper, swiftier String predicates, README env vars#59

Merged
dadachi merged 3 commits intosubstrate-v2from
substrate-v2--cleanup-string-predicates
Apr 30, 2026
Merged

Cleanup: dead Date helper, swiftier String predicates, README env vars#59
dadachi merged 3 commits intosubstrate-v2from
substrate-v2--cleanup-string-predicates

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Apr 30, 2026

Summary

  • Drop unused cardTimeAgoInWordsDateString and its timeAgoInWordsDateFormatter.
  • Move isBlank and validateEmail from Utility static helpers to String computed-property extensions (isBlank, isValidEmail) — boolean assertions read more naturally on the receiver per Apple's API Design Guidelines. Updated all production and test call sites; folded the old UtilityTest cases into StringExtensionsTest and removed UtilityTest.swift.
  • README: clarify that Xcode is in practice the only NATEMPLATE_API_* env var injector, so the hardcoded fallbacks are what keep Debug builds working when launched from SpringBoard or after Xcode disconnects.

Ports the documented changes from upstream PR https://github.com/nativeapptemplate/NativeAppTemplate-iOS/pull/70.

Test plan

  • make lint — 0 violations, 0 formatting issues
  • Debug build for iPhone 17 / iOS 26.2 simulator — BUILD SUCCEEDED
  • Run unit tests in Xcode (Cmd+U) — covers String.isBlank, String.isValidEmail, and the touched ViewModels (SignUp, SignIn, ForgotPassword, ResendConfirmation, etc.)
  • Smoke-test the auth flows (sign up, sign in, forgot password) to confirm validation behavior unchanged

🤖 Generated with Claude Code

dadachi and others added 3 commits April 30, 2026 19:26
- Drop unused cardTimeAgoInWordsDateString and its timeAgoInWordsDateFormatter
- Move isBlank and validateEmail from Utility static helpers to String
  computed-property extensions (isBlank, isValidEmail) and update all call
  sites in production and tests
- Fold UtilityTest cases into StringExtensionsTest and delete UtilityTest
- README: clarify that Xcode is in practice the only NATEMPLATE_API_* env
  var injector, so the hardcoded fallbacks are what keep Debug builds
  working when launched from SpringBoard or after Xcode disconnects

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Beta config has no shared scheme and isn't referenced by CI, README, or
any xcconfig — drop it from the pbxproj so the project only ships Debug and
Release.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eric

The String.image(...) renderer and both isAlphanumeric() overloads have no
production callers — only their own tests reference them. Drop the helpers
and their tests; UIKit/Foundation imports collapse to Foundation since the
remaining isBlank / isValidEmail need only that.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit b2841d1 into substrate-v2 Apr 30, 2026
2 checks passed
@dadachi dadachi deleted the substrate-v2--cleanup-string-predicates branch April 30, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant