{"id":15563050,"url":"https://github.com/svdo/swift-netutils","last_synced_at":"2025-08-20T22:31:06.639Z","repository":{"id":31356980,"uuid":"34919822","full_name":"svdo/swift-netutils","owner":"svdo","description":"Swift library that simplifies getting information about your network interfaces and their properties, both for iOS and OS X.","archived":false,"fork":false,"pushed_at":"2022-07-25T19:56:49.000Z","size":834,"stargazers_count":112,"open_issues_count":1,"forks_count":22,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-10T04:10:25.270Z","etag":null,"topics":["carthage","cocoapods","ios","macos","networking","swift","swift-library","swift-package-manager"],"latest_commit_sha":null,"homepage":"http://svdo.github.io/swift-netutils/","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/svdo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-01T19:23:55.000Z","updated_at":"2024-11-18T13:51:26.000Z","dependencies_parsed_at":"2022-07-28T08:48:55.675Z","dependency_job_id":null,"html_url":"https://github.com/svdo/swift-netutils","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svdo%2Fswift-netutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svdo%2Fswift-netutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svdo%2Fswift-netutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svdo%2Fswift-netutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svdo","download_url":"https://codeload.github.com/svdo/swift-netutils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230462906,"owners_count":18229864,"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":["carthage","cocoapods","ios","macos","networking","swift","swift-library","swift-package-manager"],"created_at":"2024-10-02T16:17:14.858Z","updated_at":"2024-12-19T16:10:50.673Z","avatar_url":"https://github.com/svdo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetUtils for Swift\n\n![Swift Version 4](https://img.shields.io/badge/Swift-v4-yellow.svg)\n![Swift Version 5](https://img.shields.io/badge/Swift-v5-yellow.svg)\n[![CocoaPods Version Badge](https://img.shields.io/cocoapods/v/NetUtils.svg)](https://cocoapods.org/pods/NetUtils)\n[![License Badge](https://img.shields.io/cocoapods/l/NetUtils.svg)](LICENSE.txt)\n![Supported Platforms](https://img.shields.io/badge/platform-ios%20%7C%20macos%20%7C%20linux-lightgrey.svg)\n[![Percentage Documented Badge](http://svdo.github.io/swift-netutils/badge.svg)](http://svdo.github.io/swift-netutils/)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Swift Package Manager compatible](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)\n[![Swift Build](https://github.com/svdo/swift-netutils/actions/workflows/swift-package.yml/badge.svg)](https://github.com/svdo/swift-netutils/actions/workflows/swift-package.yml)\n[![Xcode Build](https://github.com/svdo/swift-netutils/actions/workflows/objective-c-xcode.yml/badge.svg)](https://github.com/svdo/swift-netutils/actions/workflows/objective-c-xcode.yml)\n[![Join the chat at https://gitter.im/NetUtils-for-Swift/Lobby](https://badges.gitter.im/NetUtils-for-Swift/Lobby.svg)](https://gitter.im/NetUtils-for-Swift/Lobby)\n\nSwift library that simplifies getting information about your network interfaces\nand their properties, both for iOS, macOS and Linux. This library is a wrapper\naround the BSD APIs like `getifaddrs`, to make it easy to use them from Swift.\n\nRecommended way of integrating this library on macOS or iOS is using CocoaPods:\nhttps://cocoapods.org/pods/NetUtils. On Linux I recommend using the Swift\nPackage Manager.\n\nThis library works with both Swift 4 and Swift 5.\n\n## Background Info\n\nSome system APIs you can simply use from Swift, but others you cannot. The\ndifference is that some are made available as a module, and some are not. The\nAPIs around network interfaces are not exposed as a module, which means that you\ncannot use them from Swift without defining a module for them yourself. I\ndocumented this problem extensively [in a blog post][blog-post].\n\n## Installation\n\nThis library can be installed via CocoaPods, Carthage and Swift Package Manager.\n\n## Usage\n\nThis module contains only one class: `Interface`. This class represents a\nnetwork interface. It has a static method to list all interfaces, somewhat\nsurprisingly called `allInterfaces()`. This will return an array of `Interface`\nobjects, which contain properties like their IP address, family, whether they\nare up and running, etc.\n\nPlease note that both IPv4 and IPv6 interfaces are supported.\n\n## License\n\nThis project is released under the [MIT license](LICENSE.txt).\n\n[blog-post]: https://medium.com/@stefanvdoord/using-system-headers-in-swift-8731e972adfe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvdo%2Fswift-netutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvdo%2Fswift-netutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvdo%2Fswift-netutils/lists"}