verygoodsecurity/vgs-collect-ios

[ISSUE] SwiftUI preview builds fail due to missing Foundation import

Closed this issue · 2 comments

Describe the bug
In a Swift package, which depends on vgs-collect-ios, I cannot use SwiftUI previews. The preview build fails, because CharacterSet.decimalDigits cannot be found. CharacterSet is part of Foundation, which is not imported in the file VGSDateFormat.swift.

To Reproduce
Steps to reproduce the behavior:

  1. Create Swift package with a SwiftUI view
  2. Add dependency to vgs-collect-ios
  3. Try to use SwiftUI preview
  4. See error

Expected behavior
The preview build should not fail.

Screenshots
image

Environment (please complete the following information):

  • SDK Version: latest master
  • iOS Version: [e.g. iOS 13.1+]
  • Xcode Version: 14.3.1
  • Device: e.g. iPhone 14 Pro Simulator target
  • Dependency manager and it's version:
    • SPM

Possible Solution
Add import Foundation to VGSDateFormat.swift. Pull request incoming… 🙃

@fabianmuecke thanks, we will take a look.

@fabianmuecke this is fixed in v1.15.0.