{"id":21065043,"url":"https://github.com/prolificinteractive/piapienvironmentmanager","last_synced_at":"2025-05-16T02:32:56.837Z","repository":{"id":62449956,"uuid":"42727393","full_name":"prolificinteractive/PIAPIEnvironmentManager","owner":"prolificinteractive","description":"[DEPRECATED] A simple manager for handling the various API Environments in your project.","archived":false,"fork":false,"pushed_at":"2016-11-11T23:16:57.000Z","size":94,"stargazers_count":20,"open_issues_count":1,"forks_count":2,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-04-19T12:44:16.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":false,"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/prolificinteractive.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":"2015-09-18T14:31:46.000Z","updated_at":"2019-04-01T03:56:32.000Z","dependencies_parsed_at":"2022-11-01T23:17:11.986Z","dependency_job_id":null,"html_url":"https://github.com/prolificinteractive/PIAPIEnvironmentManager","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FPIAPIEnvironmentManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FPIAPIEnvironmentManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FPIAPIEnvironmentManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prolificinteractive%2FPIAPIEnvironmentManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prolificinteractive","download_url":"https://codeload.github.com/prolificinteractive/PIAPIEnvironmentManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254456225,"owners_count":22074130,"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-19T17:53:16.645Z","updated_at":"2025-05-16T02:32:56.396Z","avatar_url":"https://github.com/prolificinteractive.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [DEPRECATED] PIAPIEnvironmentManager #\r\n\r\n⚠️ **This repository is no longer maintained or supported. New pull requests will not be reviewed. For an alternative in Swift, check out [Yoshi](https://github.com/prolificinteractive/yoshi).** ⚠️\r\n\r\n## Summary \r\n\r\nPiOS PIAPIEnvironmentManager POD to help iOS Engineers manage API Environments within their iOS app. \r\nEasily switch environments with the shake of your device and the current environment is retained, even after closing the app.\r\n\r\n![PIAPIEnvironmentManager](https://www.dropbox.com/s/k6lxr5ndz57wwjx/apienvironmentmanager.gif?raw=1)\r\n\r\n## Requirements\r\n\r\nThis project is compatible with Xcode 6.4+ and Swift 2.0. All previous versions are not supported.\r\n\r\n## Installation\r\n\r\nTo install PIAPIEnvironmentManager, simply add the following line to your Podfile:\r\n\r\n    pod \"PIAPIEnvironmentManager\"\r\n\t\r\n\r\n## Usage\r\n\r\nPIAPIEnvironmentManager provides an interface that makes it simple to create your own API Environments and use them with the core manager\r\nwithout much fuss. \r\n\r\nFirst, create an object (class or struct) that implements the `PIAPIEnvironmentObject` protocol; this protocol defines an interface for\r\nan object to be considered a valid PIAPIEnvironment object. Objects implementing this protocol should make an attempt to be as stateless\r\nas possible to maintain maximum compatibility with the manager. \r\n\r\nNext, create an instance of `PIAPIEnvironmentManager` by passing to it all possible environments as defined by your custom implementation of\r\n`PIAPIEnvironmentObject`. That's it! The APIEnvironmentManager is ready to use.\r\n\r\nThis project also comes with a few additional bells and whistles as well.\r\n\r\n### Caching\r\n\r\n`PIAPIEnvironmentManager`, by default, caches the currently selected environment to disk and remembers it between sessions; while you \r\nstill need to create the manager and pass to it your environments when the application launches, `PIAPIEnvironmentManager` is built to be\r\nsmart enough to automatically select the cached environment on load without having to do it manually. \r\n\r\nBy default, `PIAPIEnvironmentManager` uses `NSUserDefaults` to store this information.\r\n\r\nIf you do not want to use `NSUserDefaults`, then you're in luck! Simply create an object that implements the `PIAPIEnvironmentCacheProvider` protocol\r\nand pass it to `PIAPIEnvironmentManager` using `initWithEnvironments: cacheProvider:`. That's it! `PIAPIEnvironmentManager` will now use\r\nyour cache to store and retrieve stored information, allowing you to use any storage you want: `NSKeyedArchiver`, `CoreData`, `Realm`, etc.\r\n\r\n### Changing Environments\r\n\r\nWhile `PIAPIEnvironmentManager` makes it easy to manage your environments between sessions, `PIAPIEnvironmentViewController` provides a simple,\r\ndefault interface for managing them while in the application. Simply create a new instance using `initWithEnvironmentManager:` and that's it! The\r\nview controller will now allow any user to change API environments with minimum work.\r\n\r\n### Built-In Gestures\r\n\r\nWhile you can create and display `PIAPIEnvironmentManager` easily on your own, this framework also contains a simple way to view\r\nthe environment switcher from anywhere in your application. Simply use `PIInvokeManager setInvokeEvent: forManager:` to set a gesture\r\nfor automatically displaying this user interface anywhere in your application. Usage of this is completely optional, but adds a \r\nquick and easy interface for managing environments right out of the box.\r\n\r\nSupported gestures:\r\n\r\n* Shake\r\n* Two-Finger Swipe to the Left\r\n\r\n## Author \r\n\r\nJulio,      julio@prolificinteractive.com\r\nChris,      c.jones@prolificinteractive.com\r\nMax,        max@prolificinteractive.com\r\nThibault,   thibault@prolificinteractive.com\r\n\r\n## License\r\n\r\nPIAPIEnvironmentManager is available under the MIT license. See the LICENSE file for more info.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolificinteractive%2Fpiapienvironmentmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprolificinteractive%2Fpiapienvironmentmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprolificinteractive%2Fpiapienvironmentmanager/lists"}