Library containing various flavours of Last-In-First-Out (LIFO) data structures.
- iOS 12.0+ / macOS 10.13+
- Xcode 15.2+
- Swift 5.9+
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler. LifoContainers
supports SPM from 0.2.0
version.
You can add LifoContainers
to an Xcode project by adding it as a package dependency:
- In Xcode, select "File" → "Add Package Dependencies...";
- Enter "https://github.com/AlexLevshenkov/LifoContainers" into the "Search or Enter Package URL" search bar;
Once you have your own Swift package set up, adding LifoContainers
as a dependency is as easy as adding it to the dependencies
value of your Package.swift
:
dependencies: [
.package(url: "https://github.com/AlexLevshenkov/LifoContainers", from: "<version>")
]
Each release includes *.xcframework
framework binary.
- Download
*.xcframework.zip
from assets and unpack it; - Open the Xcode project or workspace;
- Go to the target’s General configuration page;
- Add the framework target to the Frameworks, Libraries, and Embedded Content section by clicking the Add(+) button;
- Since
LifoContainers.xcframework
contains static libraries only we recommend choosing the "Do Not Embed" embed option;
You may want to build the binary .xcframework
file yourself from the source code. To do so you need to run the build-xcframework.sh
script in a scripts folder which places the result .xcframework
file into the build
folder. Or you may follow the instructions provided by Apple.
We have created a simple macOS application called ParenthesesValidator
to demonstrate how to connect LifoContainers
to your project and show an example of problems that could be solved using the LifoContainers
API.
ParenthesesValidator
checks if parentheses in the given string are paired. If you find it similar to leetcode problem "20. Valid Parentheses" you are right! One of the ways to solve this problem relies on stack what exactly LifoContainers
provides to you.
LifoContainers
follows semantic versioning 2.0.0. We release patch versions for bug fixes, minor versions for new features (and rarely, clear and easy to fix breaking changes), and major versions for any major breaking changes. When we make breaking changes, we also introduce deprecation warnings in a minor version so that our users learn about the upcoming changes and migrate their code in advance.
We welcome any contributions. See the CONTRIBUTING.md file for how to get involved.
This project is licensed under the MIT License.