Skip to content

An easy to use library that lets you implement background updates in your app that run whenever the user enters or exits a specified location.

Notifications You must be signed in to change notification settings

kunalsood/SJOPaperboy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SJOPaperboy

An easy to use library that lets you implement background updates in your app that run whenever the user enters or exits a specified location.

SJOPaperboyViewController

Dependancies

SJOPaperboy requires the CoreLocation (for determining user location) and AddressBookUI (for formatting address strings) frameworks. Make sure to add them to 'Link Binary with Libraries' under 'Build Phases' of your target.

Setup

Copy the following files to your Xcode project:

IPInsetLabel.h
IPInsetLabel.m
SJOPaperboyLocationManager.h
SJOPaperboyLocationManager.m
SJOPaperboyViewController.h
SJOPaperboyViewController.m

Have your AppDelegate class have a CLLocationManager as a property.

@property (strong, nonatomic) CLLocationManager *paperboyLocationManager;

Then, in application:didFinishLaunchingWithOptions: add the following:

self.paperboyLocationManager = [SJOPaperboyLocationManager sharedLocationManager];
[[SJOPaperboyLocationManager sharedInstance] setLocationChangedBlock:^{
  //Perform your background updates here.
}];

To allow users to add geofencing locations, display SJOPaperboyViewController:

SJOPaperboyViewController* paperboyViewController = [[SJOPaperboyViewController alloc] init];

You can customise elements of the view controller by editing Paperboy.strings.

See the included example project for more implementation details.

Acknowledgements

Thanks to Marco Arment for IPInsetLabel.

Inspired by the feature in News.me, Digg, and Instapaper (plus many others).

License

This project made available under the MIT License.

Copyright (C) 2013 Sam Oakley

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

An easy to use library that lets you implement background updates in your app that run whenever the user enters or exits a specified location.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 100.0%