radar-sdk-ios
radar-sdk-ios copied to clipboard
migrate RadarUtils to swift
a slow but swift migration
...
swift and objective-c is fully inter-op-able, the migration only requires converting the *.m
file into a *.swift
file.
If there are no other objective-c implementations that requires a swift class (i.e. all the references of a swift class are other swift classes), then the *.h
file can be omitted, and the @objc tags can be removed, this is for internal interfaces only.
For public interfaces, the swift class can be marked public
and then *.h
header is not required if there are no more references in other headers.
shoutout to chatGPT for helping to convert the objective-C file into swift without too much pain.
something to note: UIApplication.shared.backgroundTimeRemaining
when invalid returns 1.79769e+308
in swift, inf
in obj-c. This value is only used as part of logging.
I've also tested building this branch with waypoint, and it's working properly.