Releases: Mijick/Timer
Releases · Mijick/Timer
2.0.0
It's been a long journey!
We have just released the latest version of our library labelled as 2.0.0. The new number in front means that we unfortunately had to make some changes to the public API, for which we sincerely apologize. In the next section you will find migration tips to help you make the transition to the new version as painless as possible.
Migration Guide
Overall:
- We decided to change the way we work with timers. Each new instance of the timer must be registered.
- The
MijickTimer
now allows you to observe state changes in very different ways. Just choose which one you prefer more.
Updates of old features
- There are no more static methods to control the state of the timer. It is necessary to create an object and only then call set-up and state control methods.
- The initialization of the new
MTimer
object has been changed:MTimer.createNewInstance()
->MTimer(MTimerID(rawValue: "Your_Custom_ID"))
- Method
stop()
renamed tocancel()
New Features
- Added new control method
skip()
that allows to skip timer to it's final state. - It is no longer necessary to call the
publish()
function to make the timer work. All you need to do is initializeMTimer
and callstart()
. The state will be updated when the timer expires. - The status of the timer is expanded. Available statuses:
notStarted
,running
,finished
,paused
. MTimer
has become anObservableObject
. This means that you can observe updates to itsPublished
values:timerTime
,timerStatus
,timerProgress
.- Added visionOS support.
Visit the framework's documentation to learn how to integrate your project with MijickTimer.
1.0.2
What's Changed
- Update README by @FulcrumOne in #7
- Patch 1.0.2 by @FulcrumOne in #8
Full Changelog: 1.0.1...1.0.2