MCKillSwitch is the official kill switch to use with Mirego’s backend implementation (see API Specs).
Keep a strong instance of MCKillSwitchAlert
in your class. The alert will be the delegate of the kill switch.
@property (nonatomic) MCKillSwitchAlert *killSwitchAlert;
Then execute the kill switch when needed.
NSURL *baseURL = [NSURL URLWithString:@"https://api.project.com"];
MCKillSwitch *killSwitch = [[MCKillSwitch alloc] initWithBaseURL:baseURL];
killSwitch.delegate = _killSwitchAlert;
[killSwitch execute];
You can specify an URL like this:
Open URL in Safari:
"type": "url",
"label": "Upgrade",
"url": "https://google.com"
Open AppStore directly in the current app:
"type": "url",
"label": "Upgrade",
"url": "store:507874739"
If you're using CocoaPods
, there's nothing simpler.
Add the following to your Podfile
and run pod install
pod 'MCKillSwitch', :git => 'https://github.com/mirego/MCKillswitch.git'
MCKillSwitch is © 2013-2019 Mirego and may be freely
distributed under the New BSD license.
See the LICENSE
file.
Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We're a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.
We also love open-source software and we try to give back to the community as much as we can.