Latest 0.6.8
License Apache 2.0
Platforms ios 9.0
Dependencies RSBarcodes_Swift, AudioPlayer, Nuke, SwiftyMarkdown, youtube-ios-player-helper, SKPhotoBrowser

winguSDK is an iOS SDK for service. This framework will allow to connect with beacons and geofences nearby user location. It’s written in Swift 3.0




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


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

pod "winguSDK-iOS"


Main goal for the SDK is react to surroundings events. wingu SDK is using CoreLocation to work with beacons and geofences. You’ll need to ask user permission to use his location, and it has to be set to always. Add this key to your .plist file:


And provide an explanation how you want to use user location


Declaring your key

Call a method

 _ = WinguComposition("[YOUR_API_KEY]", false)

The second parameter is for testing enviroment, it will be removed soon. Keep it on false.

Recommended way to call this method is application:didFinishLaunchingWithOptions in your AppDelegate.

Detecting Channels

To connect with nearby locations it’s required to respond to protocol WinguLocationsDelegate. It has required method that will return of a Channel objects that it’s nearby.

To start ranging beacons & geofences add create variable in your class:

 var winguLocations: WinguLocations!

and whenever you’re ready to range initialize this object:

 winguLocations = WinguLocations.sharedInstance
 winguLocations.delegate = self

Channel is top level object that can describe beacon or geofence. It can be extended.

For fetching ranged channels in your code add this:

extension ViewController: WinguLocationsDelegate {
    func winguRangedChannels(_ channels: [Channel]) {
        //do whatever you want with channel objects

Navigate to Deck

Whenever you got a channel and want to proceed to Deck you will need to pass an argument. We recommend to use UIStoryboards and Storyboard Reference for this, all there you have to do is set Storyboard to WinguDeckStoryboard and Bundle to de.wingu.sdk. Then in prepareForSegue: method you need to set content and channelId like this:

 deckVC.content = channel?.content!
 deckVC.channelId = channel?.uID

Where deckVC is WinguDeckViewController.

If you don’t want to use Storyboards, simply get WinguDeckViewController from WinguDeckStoryboard and declare transition like you want.


This will automatically start all analytics. It’s recommended to use it like this. Whenever you want to use only view you’re responsible to starting and finish the analytics whenever you stop displaying Deck

Custom DeckView

You have full option to customizing your deck with structure DeckComposition. You can apply it to DeckView od WinguDeckViewController. Default is:


To change for example button background color on ActionComponent you have to do something like this:

        var myComposition = DeckComposition(.defaultComposition)
        myComposition.couponComponent.fontColor =
        (winguDectVC as? WinguDeckViewController).composition = myComposition

Background activity

winguSDK can automatically switch from foreground to background activity. All you have to do is declare changing state in your AppDelegate. Then app will turn from ranging beacons to monitoring and other way around:

extension AppDelegate {
    func applicationWillResignActive(_ application: UIApplication) {

    func applicationDidEnterBackground(_ application: UIApplication) {

    func applicationWillEnterForeground(_ application: UIApplication) {

    func applicationDidBecomeActive(_ application: UIApplication) {

    func applicationWillTerminate(_ application: UIApplication) {

Use proxy card

To use proxy card you have to make sure that your deck is proxy deck. To check this and in addition check proxy payload use:


Where payloadProxy() is a Channel object func that will return your payload id as String


Keep in mind that for that integration is also required to create WinguInteractions object to collect Analytics.
For this simply use:

 self.interactions =

Where self.interactions is declared as:

 var interactions: WinguInteractions?

And to stop interactions call:!)

Analytics data will be saved locally, to send it, please check the Analytics part


When you’re using ViewControllers from SDK Analytics are gathered automatically, but you need to send it by hand, to send the analytics put this in your application:didFinishLaunchingWithOptions method:



To allow notification just call the method:


And then handle it with:

    func application(_ application: UIApplication, handleActionWithIdentifier identifier: String?, for notification: UILocalNotification, completionHandler: @escaping () -> Void) {

    func application(_ application: UIApplication, didReceive notification: UILocalNotification) {
        LocalNotificationManager.redirectFromLocalNotificationToChannelDetail(notification, DeckComposition(.defaultComposition))


iOS Developers @ wingu AG




winguSDK-iOS is available under the Apache 2.0 license. See the LICENSE file for more info.

Latest podspec

    "name": "winguSDK-iOS",
    "version": "0.6.8",
    "summary": "iOS SDK for",
    "description": "winguSDK is an iOS SDK for service. This framework will allow you to connect with beacons and geofences nearby user location.",
    "homepage": "",
    "license": {
        "type": "Apache 2.0",
        "file": "LICENSE"
    "authors": {
        "wingu AG": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.6.8"
    "social_media_url": "",
    "platforms": {
        "ios": "9.0"
    "default_subspecs": "SDK",
    "dependencies": {
        "RSBarcodes_Swift": [],
        "AudioPlayer": [],
        "Nuke": [],
        "SwiftyMarkdown": [],
        "youtube-ios-player-helper": [],
        "SKPhotoBrowser": []
    "xcconfig": {
        "LIBRARY_SEARCH_PATHS": ""$(PODS_ROOT)/winguSDK"",
        "HEADER_SEARCH_PATHS": ""${PODS_ROOT}/Headers/winguSDK""
    "pushed_with_swift_version": "3.0",
    "subspecs": [
            "name": "SDK",
            "platforms": {
                "ios": "9.0"
            "ios": {
                "vendored_frameworks": "winguSDK.framework"
            "xcconfig": {
                "FRAMEWORK_SEARCH_PATHS": "$(inherited)",
                "SWIFT_INCLUDE_PATHS": "$(PODS_ROOT)"
            "preserve_paths": "winguSDK.framework"

Pin It on Pinterest

Share This