{"id":24089468,"url":"https://github.com/nicolasnascimento/swiftairtable","last_synced_at":"2025-07-14T04:39:04.719Z","repository":{"id":49872836,"uuid":"130412814","full_name":"nicolasnascimento/SwiftAirtable","owner":"nicolasnascimento","description":"An unofficial Swift interface to Airtable's REST API","archived":false,"fork":false,"pushed_at":"2021-06-09T10:41:13.000Z","size":4295,"stargazers_count":53,"open_issues_count":4,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-09T07:51:53.238Z","etag":null,"topics":["airtable","cocoapods","ios","macos","sourcery","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicolasnascimento.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-20T20:52:41.000Z","updated_at":"2024-01-24T16:03:31.000Z","dependencies_parsed_at":"2022-09-17T15:50:29.944Z","dependency_job_id":null,"html_url":"https://github.com/nicolasnascimento/SwiftAirtable","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nicolasnascimento/SwiftAirtable","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasnascimento%2FSwiftAirtable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasnascimento%2FSwiftAirtable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasnascimento%2FSwiftAirtable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasnascimento%2FSwiftAirtable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolasnascimento","download_url":"https://codeload.github.com/nicolasnascimento/SwiftAirtable/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolasnascimento%2FSwiftAirtable/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265241122,"owners_count":23733184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airtable","cocoapods","ios","macos","sourcery","swift"],"created_at":"2025-01-10T04:25:57.847Z","updated_at":"2025-07-14T04:39:04.699Z","avatar_url":"https://github.com/nicolasnascimento.png","language":"Swift","readme":"\n# Update\n\nFor a more modern implementation, see [AirtableKit](https://github.com/appledeveloperacademypucrs/AirtableKit)\n\n# SwiftAirtable\n\n![Alt Text](https://github.com/nicolasnascimento/SwiftAirtable/blob/master/SwiftAirtableDemo3.gif)\n\n## Description\nAn unofficial Swift interface to Airtable's REST API\n\n## Usage\nIn order to make use of the Framework, simply create a strucuture\n\n```Swift\nstruct AirtablePerson {\n    // The airtable object id\n    var id: String = \"\"\n    var name: String = \"\"\n}\n```\n\nand make it adopt the AirtableObject protocol\n\n```Swift\nextension AirtablePerson: AirtableObject {\n    static var fieldKeys: [(fieldName: String, fieldType: AirtableTableSchemaFieldKey.KeyType)] {\n        var fields = [(fieldName: String, fieldType: AirtableTableSchemaFieldKey.KeyType)]()\n        fields.append((fieldName: AirtableField.name.rawValue, fieldType: .singleLineText))\n        return fields\n    }\n    \n    func value(forKey key: AirtableTableSchemaFieldKey) -\u003e AirtableValue? {\n        switch key {\n        case AirtableTableSchemaFieldKey(fieldName: AirtableField.name.rawValue, fieldType: .singleLineText): return self.name\n        default: return nil\n        }\n    }\n    \n    init(withId id: String, populatedTableSchemaKeys tableSchemaKeys: [AirtableTableSchemaFieldKey : AirtableValue]) {\n        self.id = id\n        tableSchemaKeys.forEach { element in\n            switch element.key {\n            case AirtableTableSchemaFieldKey(fieldName: AirtableField.name.rawValue, fieldType: .singleLineText): self.name = element.value.stringValue\n            default: break\n            }\n        }\n    }\n}\n```\nFinally create an Airtable to perform the operations\n```Swift\nlet airtable = Airtable(apiKey: apiKey, apiBaseUrl: apiBaseUrl, schema: AirtablePerson.schema)\n```\n\nYou can perform all standard CRUD operations\n\n### Create\n```Swift\nairtable.createObject(with: object, inTable: table) { object: AirtablePerson, error: Error? in\n    if let error = error {\n        // Error Code\n    } else {\n        // Success Code\n    }\n}\n```\n### Retrieve\n```Swift\nairtable.fetchAll(table: table) { (objects: [AirtablePerson], error: Error?) in\n    if let error = error {\n        // Error Code\n    } else {\n        // Success Code\n    }\n}\n```\n\n### Update\n```Swift\nairtable.updateObject(with: object, inTable: table) { object: AirtablePerson?, error: Error? in\n    if let error = error {\n        // Error Code\n    } else {\n        // Success Code\n    }\n}\n```\n\n### Delete\n```Swift\nairtable.deleteObject(with: object, inTable: table) { sucess, error in\n    if let error = error {\n        // Error Code\n    } else {\n        // Success Code\n    }\n}\n```\n\n## Example\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\nYou'll need to provide your API Key and Base URL.\n\n## Installation\n\nSwiftAirtable is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'SwiftAirtable'\n```\n\n## Author\n\nNicolas Nascimento, npn.adsl@gmail.com\n\n## Sourcery\n\nAn stencil file is provided in the repo that allows you generate code for the AirtableObject protocol using Sourcery (https://github.com/krzysztofzablocki/Sourcery)\n\n## License\n\nSwiftAirtable is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasnascimento%2Fswiftairtable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolasnascimento%2Fswiftairtable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolasnascimento%2Fswiftairtable/lists"}