{"id":20149032,"url":"https://github.com/emergetools/etdistribution","last_synced_at":"2025-04-09T20:02:41.700Z","repository":{"id":257655436,"uuid":"855918226","full_name":"EmergeTools/ETDistribution","owner":"EmergeTools","description":"Distribute updates to your pre-release apps ","archived":false,"fork":false,"pushed_at":"2025-02-18T20:48:28.000Z","size":78,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T20:02:21.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.emergetools.com","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/EmergeTools.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-11T17:07:50.000Z","updated_at":"2025-02-18T06:20:46.000Z","dependencies_parsed_at":"2024-12-11T19:36:08.102Z","dependency_job_id":"a2544018-db17-4a7e-afa0-6f1ac58cf8fc","html_url":"https://github.com/EmergeTools/ETDistribution","commit_stats":null,"previous_names":["emergetools/etdistribution"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FETDistribution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FETDistribution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FETDistribution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmergeTools%2FETDistribution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmergeTools","download_url":"https://codeload.github.com/EmergeTools/ETDistribution/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103865,"owners_count":21048245,"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":"2024-11-13T22:40:52.504Z","updated_at":"2025-04-09T20:02:41.685Z","avatar_url":"https://github.com/EmergeTools.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ETDistribution 🛰️\n\n[![](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fwww.emergetools.com%2Fapi%2Fv2%2Fpublic_new_build%3FexampleId%3Detdistribution.ETDistribution%26platform%3Dios%26badgeOption%3Dversion_and_max_install_size%26buildType%3Dmanual\u0026query=$.badgeMetadata\u0026label=ETDistribution\u0026logo=apple)](https://www.emergetools.com/app/example/ios/etdistribution.ETDistribution/manual)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FEmergeTools%2FETDistribution%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/EmergeTools/ETDistribution)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FEmergeTools%2FETDistribution%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/EmergeTools/ETDistribution)\n\nETDistribution is a Swift library that simplifies the process of distributing new app versions and checking for updates. It provides an easy-to-use API to verify if a new version is available and handles the update process seamlessly, ensuring your users are always on the latest release.\n\n## Features\n\n- 🚀 Automatic Update Check: Quickly determine if a new version is available.\n- 🔑 Secure: No data is stored locally.\n- 🎯 Objective-C Compatibility: Provides compatibility with both Swift and Objective-C.\n- 🛠️ Flexible Update Handling: Customize how you handle updates.\n\n## Installation\n\n### Prerequisites:\n- iOS 13.0+\n- Xcode 12.0+\n- Swift 5.0+\n\n### Swift Package Manager\n\nTo integrate ETDistribution into your project, add the following line to your Package.swift:\n```swift\ndependencies: [\n    .package(url: \"https://github.com/EmergeTools/ETDistribution.git\", from: \"v0.1.2\")\n]\n```\n\n### Manual Integration\n1.\tClone the repository.\n2.\tDrag the ETDistribution folder into your Xcode project.\n\n## Usage\n\n### Checking for Updates\nThe ETDistribution library provides a simple API to check for updates:\n```swift\nimport UIKit\nimport ETDistribution\n\nETDistribution.shared.checkForUpdate(apiKey: \"YOUR_API_KEY\") { result in\n    switch result {\n    case .success(let releaseInfo):\n        if let releaseInfo {\n            print(\"Update found: \\(releaseInfo)\")\n            guard let url = ETDistribution.shared.buildUrlForInstall(releaseInfo.downloadUrl) else {\n              return\n            }\n            DispatchQueue.main.async {\n              UIApplication.shared.open(url) { _ in\n                exit(0)\n              }\n            }\n        } else {\n            print(\"Already up to date\")\n        }\n    case .failure(let error):\n        print(\"Error checking for update: \\(error)\")\n    }\n}\n```\n\nFor Objective-C:\n```objc\n[[ETDistribution sharedInstance] checkForUpdateWithApiKey:@\"YOUR_API_KEY\"\n                                                 tagName:nil\n                                      onReleaseAvailable:^(DistributionReleaseInfo *releaseInfo) {\n                                            NSLog(@\"Release info: %@\", releaseInfo);\n                                      }\n                                                 onError:^(NSError *error) {\n                                            NSLog(@\"Error checking for update: %@\", error);\n                                      }];\n```\n\nIf you do not provide a completion handler, a default UI will be shown asking if the update should be installed.\n\n## Configuration\n\n### API Key\n\nAn API key is required to authenticate requests. You can obtain your API key from the Emerge Tools dashboard. Once you have the key, you can pass it as a parameter to the `checkForUpdate` method.\n\n### Tag Name (Optional)\n\nTags can be used to associate builds, you could use tags to represent the dev branch, an internal project or any team builds. If the same binary has been uploaded with multiple tags, you can specify a tagName to differentiate between them. This is usually not needed, as the SDK will identify the tag automatically.\n\n### Login Level\n\nLogin levels can be configured to require login for certain actions (like downloading the update or checking for updates). They are set at [Emerge Tools Settings](https://www.emergetools.com/settings?tab=feature-configuration). You should match that level at the app level.\n\n### Debug Overrides\n\nThere are several override options to help debug integration and test the SDK.\nThey are:\n - **binaryIdentifierOverride**: Allows overriding the binary identifier to test updates from a different build.\n - **appIdOverride**: Allows changing the application identifier (aka Bundle Id).\n\n### Handling Responses\n\nBy default, if no completion closure is provided, the SDK will present an alert to the user, prompting them to install the release. You can customize this behavior using the closures provided by the API.\n\n## Example Project\nTo see ETDistribution in action, check out our example project. The example demonstrates how to integrate and use the library in both Swift and Objective-C projects.\n\n## Documentation\n\nFor more detailed documentation and additional examples, visit our [Documentation Site](https://docs.emergetools.com/).\n\n## FAQ\n\n### Why isn’t the update check working on the simulator?\n\nThe library is designed to skip update checks on the simulator. To test update functionality, run your app on a physical device.\n\n### Why I am not getting any update?\n\nThere could be several reasons:\n- Update checks are disabled for both Simulators and Debug builds.\n- ETDistribution is intended to update from an already published version on ETDistribution. If the current build has not been uploaded to Emerge Tools, you won't get any update notification.\n\n### How do I skip an update?\n\nWhen handling the response you can check the release version field to decide if it should be installed or not.\n\n### Can I use ETDistribution to get updates from the AppStore?\n\nNo, since the binary signer is different (builds installed from the AppStore are signed by Apple), the update will fail.\n\n### Can I require login to get updates?\n\nYes, there are 3 options for security:\n- No login required.\n- Login required only for downloading the update (can check for updates without login).\n- Login required for checking for updates.\n\nThese options can be configured per platform at [Emerge Tools Settings](https://www.emergetools.com/settings?tab=feature-configuration).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femergetools%2Fetdistribution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femergetools%2Fetdistribution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femergetools%2Fetdistribution/lists"}