Skip to content

Commit

Permalink
Merge pull request #34 from DrAma999/develop
Browse files Browse the repository at this point in the history
Trying to fix compile, swift version corebt version again
  • Loading branch information
DrAma999 authored Sep 28, 2021
2 parents 2dbaaf8 + bd353ce commit d4a9ee0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ public struct LittleBlueToothCharacteristic: Identifiable {
/// - returns: An instance of `LittleBlueToothCharacteristic`.
public init(with characteristic: CBCharacteristic) {
// Couldn't get rid of this orrible compiler flags but it is present to make work SPM build and Xcode build
#if (TEST || Xcode) && swift(>=5.5) && !targetEnvironment(macCatalyst)
#if TEST
guard let service = characteristic.service else {
fatalError("There must be a service associated to the characteristic")
}
#elseif ((os(iOS) && !targetEnvironment(macCatalyst)) || os(tvOS) || os(watchOS)) && swift(>=5.5)
guard let service = characteristic.service else {
fatalError("There must be a service associated to the characteristic")
}
Expand Down

0 comments on commit d4a9ee0

Please sign in to comment.