• Stars
    star
    197
  • Rank 197,722 (Top 4 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 10 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iOS Library to perform location & time-based promotions.

VENPromotionsManager

Build Status

VENPromotionsManager enables easy definition, management and control of in-app location based promotions including the following:

  • Define promotion action events along with trigger locations and valid date intervals
  • Fire promotions on entering a geographic region or a region created by Bluetooh LE beacons, even if the app is not yet launched or is backgrounded
  • Schedule location updates on a repeating timer that runs on a background queue (optional)
  • Use an included location service built on a CLLocationManager or a custom location service

Demo

Installation

You can install VENPromotionsManager in your project by using CocoaPods:

pod 'VENPromotionsManager', '~> 1.0.0'

Usage

First create one (or more) promotion(s). Promotions can be either region based (using beacons or geofencing) or location based which require periodic location lookups.

//Location Promotion
VPLLocationPromotion *locationPromotion = [[VPLLocationPromotion alloc] initWithCity:@"Cupertino"
                                                                       state:@"CA"
                                                                     country:@"United States"
                                                            uniqueIdentifier:userDefaultsKey action:^{
                                                                NSLog(@"Promotion Number %ld Fired",(long)(i+1));
                                                            }];

//Beacon based Region Promotion
NSUUID *estimoteUUID = [[NSUUID alloc] initWithUUIDString:@"B9407F30-F5F8-466E-AFF9-25556B57FE6D"];
CLBeaconRegion *doorRegion = [[CLBeaconRegion alloc] initWithProximityUUID:estimoteUUID
                                                                    identifier:@"VenmoEntrancePromotion"];

VPLRegionPromotion *regionPromotion = [[VPLRegionPromotion alloc] initWithRegion:doorRegion
                                                                  repeatInterval:2
                                                                    enterAction:^{
                                                                      //Implement code to launch promotion here
                                                                   }];

Then init the promotions manager with an array of the created promotion(s)

self.promotionsManager = [[VPLPromotionsManager alloc] initWithPromotions:@[locationPromotion, regionPromotion]
                                                   shouldRequestGPSAccess:YES];
self.promotionsManager.refreshInterval = 60 * 60; //Lookup location every 60 minutes
[self.promotionsManager startMonitoringForPromotionLocations];

In this example, the VPLPromotionsManager instance will perform a location lookup and trigger any valid location promotion every 60 minutes and will trigger any valid region promotions whenever it enters the promotion's region. Region promotions support background notifications, while location promotions do not.

Contributing

We'd love to see your ideas for improving VENPromotionsManager! The best way to contribute is by submitting a pull request. We'll do our best to respond to your patch as soon as possible. You can also submit a new Github issue if you find bugs or have questions.

Please make sure to follow our general coding style and add test coverage for new features!

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Repositories

1

synx

A command-line tool that reorganizes your Xcode project folder to match your Xcode groups
Ruby
6,082
star
2

Static

Simple static table views for iOS in Swift.
Swift
1,250
star
3

VENTouchLock

A Touch ID and Passcode framework used in the Venmo app.
Objective-C
965
star
4

business-rules

Python DSL for setting up business intelligence rules that can be configured without code
Python
891
star
5

VENTokenField

Easy-to-use token field that is used in the Venmo app.
Objective-C
793
star
6

VENCalculatorInputView

Calculator keyboard used in the Venmo iOS app
Objective-C
763
star
7

DVR

Network testing for Swift
Swift
651
star
8

tooltip-view

Dead simple Android Tooltip Views
Java
486
star
9

DryDock-iOS

DEPRECATED: An open-source internal installer app
433
star
10

VENSeparatorView

Jagged border separators on UIViews used in the Venmo app.
Objective-C
379
star
11

VENVersionTracker

Objective-C
300
star
12

business-rules-ui

A JavaScript library for building out the logic and UI for business rules.
JavaScript
197
star
13

cursor-utils

A library that encapsulates the repeatable actions of Android Cursors.
Java
195
star
14

venmo-ios-sdk

Make and accept payments in your iOS app via Venmo
Objective-C
176
star
15

react-html-document

A foundational React component useful for rendering full html documents on the server.
JavaScript
155
star
16

VENExperimentsManager

An Objective-C library enabling easy implementation of feature experiments on iOS allowing users to opt in and out of experiments at will.
Objective-C
76
star
17

slouch

A lightweight Python framework for building cli-inspired Slack bots.
Python
71
star
18

xcode_server

Xcode Bot client
Ruby
58
star
19

android-pin

An easy drop-in PIN controller for Android
Java
42
star
20

app-switch-android

Java
35
star
21

VENCore

Core Objective-C client library for the Venmo API
Objective-C
27
star
22

QuizTrain

Swift Framework for TestRail's API
Swift
19
star
23

feature_ramp

Toggling and ramping features via a lightweight Redis backend.
Python
18
star
24

btnamespace

A Python library to isolate state on the Braintree sandbox during testing.
Python
17
star
25

flaskeleton

Python
13
star
26

swaggergenerator

Create swagger / OpenAPI schemas from example interactions.
Python
11
star
27

tornado-stub-client

A stub library for making requests with tornado's AsyncHTTPClient
Python
9
star
28

venmo.github.io

Old Venmo Engineering Blog
CSS
8
star
29

nose-detecthttp

A nose plugin that can detect tests making external http calls.
Python
7
star
30

puppet-consulr

Dynamic puppet manifests using consul
Ruby
5
star
31

puppet-sentry

Puppet module for managing the Sentry realtime event logging and aggregation platform
Ruby
4
star
32

python3-avro

Copies the python3 client implementation from our fork of apache's avro project.
Python
4
star
33

nose-seed-faker

A nose plugin that seeds the faker package
Python
4
star
34

QuizTrainExample

Example of how to use QuizTrain with Unit Tests and UI Tests on iOS
Swift
3
star
35

single-click-highlightable

HOC for React that allows users to highlight text on elements without triggering the onClick handler
JavaScript
3
star
36

puppet-hound

Puppet hound module
Puppet
2
star
37

nose-timeout

Nose plugin for aborting long running tests
Python
1
star
38

foundations-interview

This is a test repository used in Foundations team interview process
JavaScript
1
star