swift-server / swift-prometheus

Prometheus client library for Swift
https://swiftpackageindex.com/swift-server/swift-prometheus
Apache License 2.0
145 stars 31 forks source link

Add import of UIKit to use the library on an iOS client #33

Closed matiasvillaverde closed 4 years ago

matiasvillaverde commented 4 years ago

I tried to use the library from an iOS app, and everything is compatible except that the compiler gets a bit confused of where to useCGFloat.

While trying to compile we get this error Use of undeclared type 'CGFloat'

This gets fixed by adding a compiler flag to know if we need to import CoreGraphics on iOS.

Steps to reproduce

  1. Import Prometheus library to an iOS App
  2. Try to compile the app
  3. Error will prevent compiling

Expected behavior

Just be able to compile on iOS

MrLotU commented 4 years ago

Fixed per #34

MrLotU commented 4 years ago

Now available in https://github.com/MrLotU/SwiftPrometheus/releases/tag/1.0.0-alpha.7