swift-server / swift-prometheus

Prometheus client library for Swift

Home Page:https://swiftpackageindex.com/swift-server/swift-prometheus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

matiasvillaverde opened this issue · comments

commented

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

  • OS version: iOS 12
  • Swift version: 5.1
  • Serverside Swift Framework: -
  • Framework version: 1.0.0-alpha

Fixed per #34