https://github.com/smashingboxes/baseurl-ios
Specify a base URL for your app with facility to change it in-app using a debug modal
https://github.com/smashingboxes/baseurl-ios
Last synced: 8 months ago
JSON representation
Specify a base URL for your app with facility to change it in-app using a debug modal
- Host: GitHub
- URL: https://github.com/smashingboxes/baseurl-ios
- Owner: smashingboxes
- License: mit
- Created: 2016-10-27T18:46:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-25T04:21:45.000Z (about 9 years ago)
- Last Synced: 2025-02-22T20:43:47.872Z (about 1 year ago)
- Language: Swift
- Size: 17.6 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## BaseUrl-iOS
### Why?
It's common to have several backend environments that you switch between while you're developing an iOS app. This provides a way to quickly point at a new URL without rebuilding the app.
### Usage:
1. Implement `BaseUrlDelegate` in your app
2. `let baseUrl = BaseUrl(delegate: delegate)`
3. Use `baseUrl.url`
4. To show the debug URL switcher, call `baseUrl.showDebugSwitcher(on: viewController)`.
5. Do what you need to in `baseUrlDidChange(newURL: String)` -- log out the user, clear credentials, etc.