{"id":28437085,"url":"https://github.com/flinedev/linkskit","last_synced_at":"2025-06-27T20:31:36.789Z","repository":{"id":257803865,"uuid":"858701592","full_name":"FlineDev/LinksKit","owner":"FlineDev","description":"SwiftUI convenience view to show common links in apps settings/help menu.","archived":false,"fork":false,"pushed_at":"2024-12-18T08:31:52.000Z","size":937,"stargazers_count":60,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T23:08:39.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/FlineDev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-17T11:39:01.000Z","updated_at":"2025-04-21T18:25:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"253a60e9-da6d-47fb-9ea9-e39ce271d8e2","html_url":"https://github.com/FlineDev/LinksKit","commit_stats":null,"previous_names":["flinedev/linkskit"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/FlineDev/LinksKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FLinksKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FLinksKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FLinksKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FLinksKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlineDev","download_url":"https://codeload.github.com/FlineDev/LinksKit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlineDev%2FLinksKit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262327152,"owners_count":23294212,"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":[],"created_at":"2025-06-05T23:08:38.772Z","updated_at":"2025-06-27T20:31:36.740Z","avatar_url":"https://github.com/FlineDev.png","language":"Swift","readme":"![LinksKit Logo](https://github.com/FlineDev/LinksKit/blob/main/Images/Logo.png?raw=true)\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FFlineDev%2FLinksKit%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/FlineDev/LinksKit)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FFlineDev%2FLinksKit%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/FlineDev/LinksKit)\n\n# LinksKit\n\nEvery app on the App Store must provide essential links like a privacy policy and, if applicable, terms of use (for in-app purchases) to comply with Apple's guidelines. Many apps handle this by adding a \"Links\" section in their settings, including additional helpful links like app ratings, FAQs, and support options.\n\nThat's where LinksKit comes in: it offers **a simple, ready-to-use solution to handle all these common links**, saving you a ton of time. Whether it's legal, help, or app promotion links, LinksKit covers it. And for macOS, it even supports adding these links right into the **Help** menu!\n\niOS Example             |  macOS Example\n------------------------|-------------------------\n\u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/PhoneSettings.jpeg\"\u003e  |  \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/MacHelpMenu.jpeg\"\u003e\n\n## Usage\n\nGetting started with LinksKit is easy. After adding the package to your project, simply `import LinksKit` and place a `LinksView()` inside a `List` or `Form` view. But before doing that, you'll need to configure the links you want to include.\n\n### Minimal Setup\n\nFor a basic setup, which includes legal links (like privacy policy and terms of use), app rating, and a contact email, you can configure LinksKit like this:\n\n```swift\nimport SwiftUI\n\n@main\nstruct YourApp: App {\n   init() {\n      // other setup code\n      \n      LinksKit.configure(\n         providerToken: \"123456\",\n         linkSections: [\n            .helpLinks(appID: \"123456789\", supportEmail: \"support@example.com\"),\n            .legalLinks(privacyURL: URL(string: \"https://example.com\")!)\n         ]\n      )\n   }\n   \n   var body: some Scene {\n      // your UI code\n   }\n}\n```\n\n\u003e **Tip:** Your `providerToken` already exists and is the same for all your apps. Unfortunately, Apple does not have an easier way to look it up than within the \"Campaign\" creation form on App Store Connect under Analytics \u003e Acquisition \u003e Campaigns. You don't actually need to press 'Create', just enter some text in the form and you'll see the `pt` parameter in the Campaign Link preview. Campaign links are a great way to track where users are finding your app. Learn more about them [here](https://developer.apple.com/help/app-store-connect/view-app-analytics/manage-campaigns).\n\n\u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/ProviderTokenCampaign.jpeg\" /\u003e\n\n\u003e **Note:** LinksKit will automatically add Apple's terms of use link to `.legalLinks` for apps with in-app purchases. No need to configure it yourself – it just works! 🚀\n\n### Optional Extras\n\nLinksKit goes beyond the basics, offering more customization to fit your needs. You can:\n\n* Add an FAQ link with `faqURL` passed to `.helpLinks`\n* Link to your app's or developer's social media with `.socialMenus(appLinks:developerLinks:)`\n* Promote your other apps or apps from friends using `.appMenus(ownAppLinks:friendsAppLinks:)`\n\nHere’s a real-world example from my app [TranslateKit](https://apps.apple.com/app/apple-store/id6476773066?pt=549314\u0026ct=github.com\u0026mt=8), showcasing all of these features:\n\n```swift\ninit() {\n   // other setup code\n\n   self.configureLinksKit()\n}\n\nfunc configureLinksKit() {\n   // App Links\n   let ownDeveloperApps = LinkSection(entries: [\n      .link(.ownApp(id: \"6502914189\", name: \"FreemiumKit: In-App Purchases\", systemImage: \"cart\")),\n      .link(.ownApp(id: \"6480134993\", name: \"FreelanceKit: Time Tracking\", systemImage: \"timer\")),\n   ])\n\n   let ownConsumerApps = LinkSection(entries: [\n      .link(.ownApp(id: \"6472669260\", name: \"CrossCraft: Crossword Tests\", systemImage: \"puzzlepiece\")),\n      .link(.ownApp(id: \"6477829138\", name: \"FocusBeats: Study Music Timer\", systemImage: \"music.note\")),\n      .link(.ownApp(id: \"6587583340\", name: \"Pleydia Organizer: Media Renamer\", systemImage: \"popcorn\")),\n   ])\n\n   let ownVisionApps = LinkSection(entries: [\n      .link(.ownApp(id: \"6479207869\", name: \"Guided Guest Mode: Device Demo\", systemImage: \"questionmark.circle\")),\n      .link(.ownApp(id: \"6478062053\", name: \"Posters: Discover Movies at Home\", systemImage: \"movieclapper\")),\n   ])\n\n   let nicosApps = LinkSection(entries: [\n      .link(.friendsApp(id: \"1249686798\", name: \"NFC.cool Tools: Tag Reader\", systemImage: \"tag\", providerToken: \"106913804\")),\n      .link(.friendsApp(id: \"6443995212\", name: \"Metadata for Fastlane Tools\", systemImage: \"hammer\", providerToken: \"106913804\")),\n   ])\n\n   let jansApps = LinkSection(entries: [\n      .link(.friendsApp(id: \"6503256642\", name: \"App Exhibit: Your App Showcase\", systemImage: \"square.grid.3x3.fill.square\")),\n   ])\n\n   // Configure LinksKit\n   LinksKit.configure(\n      providerToken: \"549314\",\n      linkSections: [\n         .helpLinks(appID: \"6476773066\", faqURL: Constants.faqURL, supportEmail: \"translatekit@fline.dev\"),\n         .socialMenus(\n            appLinks: .appSocialLinks(\n               platforms: [.twitter, .mastodon(instance: \"mastodon.social\"), .threads],\n               handle: \"TranslateKit\",\n               handleOverrides: [.twitter: \"TranslateKitApp\"]\n            ),\n            developerLinks: .developerSocialLinks(\n               platforms: [.twitter, .mastodon(instance: \"iosdev.space\"), .threads],\n               handle: \"Jeehut\"\n            )\n         ),\n         .appMenus(\n            ownAppLinks: [ownDeveloperApps, ownConsumerApps, ownVisionApps],\n            friendsAppLinks: [nicosApps, jansApps]\n         ),\n         .legalLinks(privacyURL: Constants.privacyPolicyURL)\n      ]\n   )\n}\n```\n\n\u003e **Tip:** If you have `appLinks` but no `developerLinks` (or vice versa) when using the `.socialMenus` helper, you can just pass `.appSocialLinks` or `.developerSocialLinks` directly instead of passing `.socialMenus`.\n\n\u003e **Note:** The `.ownApp` and `.friendsApp` helpers behave differently for a reason. LinksKit will automatically append your `providerToken` for your own apps, while you'll need to manually include a `providerToken` for your friends’ apps if you know it.\n\n### View Setup\n\nTo add LinksKit to your app’s settings screen, typically structured as a `Form` or `List`, just insert a `LinksView()` like so:\n\n```swift\nimport SwiftUI\n\nstruct SettingsView: View {\n   var body: some View {\n      Form {\n         // other sections/views like a paid status view or app settings\n         \n         #if !os(macOS)\n         LinksView()\n         #endif\n      }\n   }\n}\n```\n\nAnd that’s it! If you’re not targeting macOS, the result should look like this:\n\n\u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/PhoneSettings.jpeg\" /\u003e\n\nFor macOS apps, the best place for these links is often in the Help menu. You can easily add a `LinksView()` to the menu bar:\n\n```swift\nimport SwiftUI\n\n@main\nstruct YourApp: App {\n   var body: some Scene {\n      WindowGroup {\n         // your UI code\n      }\n      #if os(macOS)\n      .commands {\n         CommandGroup(replacing: .help) {\n            LinksView()\n               .labelStyle(.titleAndIcon)\n         }\n      }\n      #endif\n   }\n}\n```\n\nHere’s what that will look like on macOS:\n\n\u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/MacHelpMenu.jpeg\" /\u003e\n\n### Custom Links \u0026 Menus \n\nIf the default helpers like `.helpLinks` or `.appMenus` don't fit your exact use case, you can create fully custom `LinkSection` instances and add your own links. You can even nest them! For example, `.appMenus` is just a convenience for this equivalent `LinkSection`:\n\n\n```swift\nLinkSection(\n   title: \"App Links\",\n   entries: [\n      .menu(LinkMenu(\n         title: \"More Apps from Developer\",\n         systemImage: \"plus.square.on.square\",\n         linkSections: [ownDeveloperApps, ownConsumerApps, ownVisionApps]\n      )),\n      .menu(LinkMenu(\n         title: \"Apps from Friends\",\n         systemImage: \"hand.thumbsup\",\n         linkSections: [nicosApps, jansApps]\n      )),\n   ]\n)\n```\n\nThe `entries` parameter accepts one of `.menu(LinkMenu)` or `.link(Link)` and you can nest as many levels as SwiftUI supports (`.menu` is rendered as a `Menu` view, `.link` as a `Button`).\n\n### Label Styles\n\nLinksKit ships with additional `Label` styles which you can use to give your Form/List view a different look:\n\n* `.labelStyle(.titleAndTrailingIcon)`: Renders exactly like the default `.titleAndIcon` style, but with the icon at the **trailing** end.\n* `.labelStyle(.titleAndIconBadge(color:))`: Resembles Apple's style in the Settings app by adding a colored background to the leading icons.\n* `.labelStyle(.titleAndTrailingIconBadge(color:))`: Same as the above, but the icon is placed at the trailing end.\n\n\u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/LabelStyles.jpeg\" /\u003e\n\n### Localization\n\nAll of LinksKit's built-in strings are already localized in around 40 languages, covering all the languages supported by iOS. No setup is needed. If you require additional languages, feel free to open an issue on GitHub – I’m happy to add them!\n\nIf you need to localize the names of your apps or any other passed text, you can use `String(localized:)` as usual in your app.\n\n\n## Showcase\n\nI extracted this library from my following Indie apps (rate them with 5 stars to support me!):\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eApp Icon\u003c/th\u003e\n    \u003cth\u003eApp Name \u0026 Description\u003c/th\u003e\n    \u003cth\u003eSupported Platforms\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6476773066?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/TranslateKit.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6476773066?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eTranslateKit: App Localizer\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Simple drag \u0026 drop translation of String Catalog files with support for multiple translation services \u0026 smart correctness checks.\n    \u003c/td\u003e\n    \u003ctd\u003eMac\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6587583340?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/PleydiaOrganizer.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6587583340?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003ePleydia Organizer: Movie \u0026 Series Renamer\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Simple, fast, and smart media management for your Movie, TV Show and Anime collection.\n    \u003c/td\u003e\n    \u003ctd\u003eMac\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6502914189?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/FreemiumKit.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6502914189?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eFreemiumKit: In-App Purchases\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Simple In-App Purchases and Subscriptions for Apple Platforms: Automation, Paywalls, A/B Testing, Live Notifications, PPP, and more.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6480134993?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/FreelanceKit.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6480134993?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eFreelanceKit: Time Tracking\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Simple \u0026 affordable time tracking with a native experience for all  devices. iCloud sync \u0026 CSV export included.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6472669260?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/CrossCraft.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6472669260?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eCrossCraft: Custom Crosswords\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Create themed \u0026 personalized crosswords. Solve them yourself or share them to challenge others.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6477829138?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/FocusBeats.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6477829138?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eFocusBeats: Pomodoro + Music\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Deep Focus with proven Pomodoro method \u0026 select Apple Music playlists \u0026 themes. Automatically pauses music during breaks.\n    \u003c/td\u003e\n    \u003ctd\u003eiPhone, iPad, Mac, Vision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6479207869?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/GuidedGuestMode.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6479207869?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003eGuided Guest Mode\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Showcase Apple Vision Pro effortlessly to friends \u0026 family. Customizable, easy-to-use guides for everyone!\n    \u003c/td\u003e\n    \u003ctd\u003eVision\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6478062053?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cimg src=\"https://raw.githubusercontent.com/FlineDev/LinksKit/main/Images/Apps/Posters.webp\" width=\"64\" /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://apps.apple.com/app/apple-store/id6478062053?pt=549314\u0026ct=github.com\u0026mt=8\"\u003e\n        \u003cstrong\u003ePosters: Discover Movies at Home\u003c/strong\u003e\n      \u003c/a\u003e\n      \u003cbr /\u003e\n      Auto-updating \u0026 interactive posters for your home with trailers, showtimes, and links to streaming services.\n    \u003c/td\u003e\n    \u003ctd\u003eVision\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflinedev%2Flinkskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflinedev%2Flinkskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflinedev%2Flinkskit/lists"}