# Introducing .did parser for IcpKit.swift

**URL:** <https://forum.dfinity.org/t/introducing-did-parser-for-icpkit-swift/34209>\
**Category:** Language Support\
**Created:** [August 16, 2024, 10:54am UTC](https://forum.dfinity.org/t/introducing-did-parser-for-icpkit-swift/34209 "2024-08-16T10:54:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kosta](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@kosta](https://forum.dfinity.org/u/kosta)\
**Post date:** [August 16, 2024, 10:54am UTC](https://forum.dfinity.org/t/introducing-did-parser-for-icpkit-swift/34209/1 "2024-08-16T10:54:06Z")

</div>

We are proud to announce v0.2.1 of `IcpKit.swift` for iOS with the following features :

- `.did` file parser
- `CodeGenerator` to produce Swift code from any `.did` file
- `CandidEncoder/Decoder` for converting any `Codable` Swift value to a Candid Value and vice versa

With these enhancements, the `IcpKit.swift` Library can be used to interact with any ICP canister using native iOS methods and types.

## Installation and Documentation

Installation instructions and more technical details can be found on our [github](https://github.com/kosta-bity/IcpKit).

## Conversion rules between Swift and Candid

A comprehensive list of types as well notes regarding each type can be found in [Swift/Candid conversion rules](https://github.com/kosta-bity/IcpKit)

## Examples

For testing purposes, we provide a few real `.did` files in our repo, as well as the generated swift code for them :

| `.did` files | Generated Swift code |
| --- | --- |
| [LedgerCanister.did](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/DidFiles/LedgerCanister.did) | [LedgerCanister.did.swift](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/Generated/LedgerCanister.did.swift) |
| [ICRC7.did](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/DidFiles/ICRC7.did) | [ICRC7.did.swift](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/Generated/ICRC7.did.swift) |
| [GoldNFT.did](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/DidFiles/GoldNFT.did) | [GoldNFT.did.swift](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/Generated/GoldNFT.did.swift) |
| [EVMProviders.did](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/DidFiles/EVMProviders.did) | [EVMProviders.did.swift](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/Generated/EVMProviders.did.swift) |
| [TestImports.did](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/DidFiles/TestImports.did) | [TestImports.did.swift](https://github.com/kosta-bity/IcpKit/blob/main/Tests/CodeGeneratorTests/Generated/TestImports.did.swift) |
