Latest 0.1.0
Homepage https://github.com/alexmreynolds/AREndPointSwitcher
License MIT
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

In the view that you want to be able to trigger the endpoint switch from, you will need to instantiate a switcher

[AREndPointSwitch initWithOptions:@{kAREndpointOptionEndPoints : @[@"foo", @"bar"], kAREndpointOptionCurrentEndpoint : @"bar", kAREndpointOptionTriggerAction : @(AREndpointAction2FingerTap)}];

By default the trigger action is 2 finger tap.
You can listen for changes via NSNoticiationCenter

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changed:) name:kAREndpointChangedNotification object:nil];

- (void)changed:(NSNotification*)notification
{
    NSLog(@"endpoint %@",notification.object);
}

OR you can use the delegate

- (void)endpointUpdated:(NSString *)endpoint
{

}

The point of the notification is that you could load this class in the AppDelegate and any view in the app can launch the picker.

Requirements

Installation

AREndPointSwitch is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "AREndPointSwitch"

Author

Alex M Reynolds, [email protected]

License

AREndPointSwitch is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "AREndPointSwitch",
    "version": "0.1.0",
    "summary": "A simple way to switch endpoints on the fly",
    "description": "Switching between staging and live endpoints is very useful in debugging an app. This easy to use switcher will allow you to hide in your app and make debugging easier.n",
    "homepage": "https://github.com/alexmreynolds/AREndPointSwitcher",
    "license": "MIT",
    "authors": {
        "Alex M Reynolds": "[email protected]"
    },
    "source": {
        "git": "https://github.com/alexmreynolds/AREndPointSwitcher.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "AREndPointSwitch": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This