Git Product home page Git Product logo

kontakt-ios-sdk's Introduction

iOS SDK Quickstart

Important Note

Please make sure before updating to SDK 3.0.0 that you don't need to support devices with firmware < 4.0. As of version 3.0.0 only devices with firmware 4.0 or higher will be supported.

Administration App

To configure Kontakt.io Devices please use our new iOS Administration App or iOS Kio Gateway Installer.

screen

Sample Code

You can find our demos and sample code in Examples folder.

Overview

This document shows you a quick way to start using the Kontakt.io SDK in location-aware apps. You will find code examples for core features and best practices that we recommend developers follow.

You can find more detailed information in the Appledocs.

Installing the iOS SDK

To use the Kontakt.io SDK in your project, the minimum deployment target must be iOS 12.0.

SPM

You can add Kontakt.io SDK to an Xcode project by adding it as a package dependency.

  1. From the File menu, select Add Packages...
  2. Enter "https://github.com/kontaktio/kontakt-ios-sdk" into the package repository URL text field
  3. Add KontaktSDK directly to your application.

Manually

  • Open up Terminal, cd into your top-level project directory, and run the following command if your project is not initialized as a git repository:
$ git init
  • Add Kontakt.io SDK as a git submodule by running the following command:
$ git submodule add https://github.com/kontaktio/kontakt-ios-sdk.git
  • Open the new kontakt-ios-sdk folder, and drag the KontaktSDK.framework into the Project Navigator of your application's Xcode project.

    • Make sure your target is checked in Add to targets section.
  • Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the "Targets" heading in the sidebar.

  • In the tab bar at the top of that window, open the "General" panel.

  • Click on the + button under the "Embedded Binaries" section.

  • Select the KontaktSDK.framework and click Add button.

  • In the Build Phases tab, click the + button at the top and select “New Run Script Phase”. Enter the following code into the script text field:

bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/KontaktSDK.framework/strip-frameworks.sh"

(The last step, courtesy of Realm, is required for working around an iOS App Store bug when archiving universal binaries.)


Swift

Generics and Nullability

Our SDK uses nullability and generics annotations added in Xcode 13 which means that the Kontakt.io iOS SDK is very easy to use with swift.

Bridging Header

Create a new header file from the File menu and name it YourProjectName-Bridging-Header.h.

Add the following import to your YourProjectName-Bridging-Header.h:

    #import <KontaktSDK/KontaktSDK.h>

###Further information

For your app to work correctly you have to add a new key to your project's plist file.

  1. In the project navigator, select your project.
  2. Select your projects Info.plist file
  3. Add the following key string pair to the file.
<key>NSLocationAlwaysUsageDescription</key>
<string>Required for ios 8 compatibilty</string>

The string can be empty, the content is not important.

First steps

New SDK requires API Key to be specified. You can get it by registering a free account at https://panel.kontakt.io.

Objective-C

#import <KontaktSDK/KontaktSDK.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

	// Set API Key
	[Kontakt setAPIKey:@"Your API Key"];
	
    return YES;
}

Swift

import KontaktSDK
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
	
	// Set API Key
	Kontakt.setAPIKey("Your API Key")
	
	return true
}

Interacting with Beacons - monitoring a region

In the following example we'll show you how to can create a simple application to monitor beacons for a specific region using the Kontakt.io SDK.


Basic Setup

In our example, we have used the AppDelegate.m class for simplicity. You would probably want to create your own class in a real application.

First we'll import the Kontakt.io SDK.

#import <KontaktSDK/KontaktSDK.h>

We'll add the KTKBeaconManager object as a property.

KTKBeaconManager informs its delegates when a device enters or exits a region, and when beacons are ranged.

@property KTKBeaconManager *beaconManager;

Make sure AppDelegate conforms to KTKBeaconManagerDelegate protocol.

@interface AppDelegate () <KTKBeaconManagerDelegate>

We will use application:didFinishLaunchingWithOptions: to initiate beacon manager and start monitoring for region.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

	// Set API Key
	[Kontakt setAPIKey:@"Your API Key"];
	
	// Initiate Beacon Manager
	self.beaconManager = [[KTKBeaconManager alloc] initWithDelegate:self];
	
	// Request Location Authorization
	[self.beaconManager requestLocationAlwaysAuthorization];
	
	...
	
    return YES;
}

You can test if the current device is capable of monitoring beacons using:

if ([KTKBeaconManager isMonitoringAvailable]) {
	
}

or check authorization status using:

if ([KTKBeaconManager locationAuthorizationStatus] == kCLAuthorizationStatusAuthorizedAlways) {
	
}

Beacon Region

Now we'll start monitoring a specific region.

For more information on KTKBeaconRegion see Appledoc.

Regions define a set of beacons that your application is aware of, so the beacon manager will interact only with those beacons.

// Kontakt.io proximity UUID
NSUUID *proximityUUID = [[NSUUID alloc] initWithUUIDString:@"f7826da6-4fa2-4e98-8024-bc5b71e0893e"]; 

// Create region instance
KTKBeaconRegion *region = [[KTKBeaconRegion alloc] initWithProximityUUID: proximityUUID identifier:@"identifier"];

// Start Monitoring
[self.beaconManager startMonitoringForRegion: region];

// You can also start ranging ...
[self.beaconManager startRangingBeaconsInRegion: region];

Secure Beacon Region

Secure beacon region is very similar to standard beacon region. For more information on KTKSecureBeaconRegion see Appledoc.

Read more about security and shuffling on our support page.

You can find your beacon's Secure Proximity UUID in Kontakt.io Web Panel (in the Security Section).

// Your secure proximity UUID
NSUUID *secureProximityUUID = [[NSUUID alloc] initWithUUIDString:@"00000000-0000-0000-0000-00000000"]; 

// Create secure region instance
KTKSecureBeaconRegion *region = [[KTKSecureBeaconRegion alloc] initWithSecureProximityUUID:secureProximityUUID identifier:@"identifier_secure"];

You can also use an unsecure proximity UUID and it will be translated to the secure proximity by calling Cloud API under the hood.

// Kontakt.io proximity UUID
NSUUID *proximityUUID = [[NSUUID alloc] initWithUUIDString:@"f7826da6-4fa2-4e98-8024-bc5b71e0893e"]; 

// Create secure region instance with your non secure proximity 
KTKSecureBeaconRegion *region = [[KTKSecureBeaconRegion alloc] initWithProximityUUID: proximityUUID identifier:@"identifier"];

Delegate Calls

Now we'll add the the delegate methods for beaconManager, and get them to log some output. All delegate methods can be found in KTKBeaconManagerDelegate documentation.

- (void)beaconManager:(KTKBeaconManager*)manager didChangeLocationAuthorizationStatus:(CLAuthorizationStatus)status;
{
	// ...
}

- (void)beaconManager:(KTKBeaconManager*)manager didEnterRegion:(__kindof KTKBeaconRegion*)region
{
    NSLog(@"Enter region %@", region);
}

- (void)beaconManager:(KTKBeaconManager*)manager didExitRegion:(__kindof KTKBeaconRegion*)region
{
    NSLog(@"Exit region %@", region);
}

- (void)beaconManager:(KTKBeaconManager*)manager didRangeBeacons:(NSArray <CLBeacon *>*)beacons inRegion:(__kindof KTKBeaconRegion*)region
{
    NSLog(@"Ranged beacons count: %lu", [beacons count]);
}

When using Swift the final class should look like the following:

import UIKit
import KontaktSDK

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?
    
    var beaconManager: KTKBeaconManager!
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        
        // Set API Key
        Kontakt.setAPIKey("API Key")
        
        // Initiate Beacon Manager
        beaconManager = KTKBeaconManager(delegate: self)
        beaconManager.requestLocationAlwaysAuthorization()
        
        // Region
        let proximityUUID = NSUUID(UUIDString: "f7826da6-4fa2-4e98-8024-bc5b71e0893e")
        let region = KTKBeaconRegion(proximityUUID: proximityUUID!, identifier: "region")
        
        // Start Monitoring and Ranging
        beaconManager.startMonitoringForRegion(region)
        beaconManager.startRangingBeaconsInRegion(region)
        
        return true
    }
}

extension AppDelegate: KTKBeaconManagerDelegate {
    
    func beaconManager(manager: KTKBeaconManager, didChangeLocationAuthorizationStatus status: CLAuthorizationStatus) {
        
    }
    
    func beaconManager(manager: KTKBeaconManager, didEnterRegion region: KTKBeaconRegion) {
        print("Enter region \(region)")
    }
    
    func beaconManager(manager: KTKBeaconManager, didExitRegion region: KTKBeaconRegion) {
        print("Exit region \(region)")
    }
    
    func beaconManager(manager: KTKBeaconManager, didRangeBeacons beacons: [CLBeacon], inRegion region: KTKBeaconRegion) {
        print("Ranged beacons count: \(beacons.count)")
    }
}

Run the project

You won't be able to run apps that use Apple Core Location services (that includes our SDK) on the Simulator, so first, you'll need to connect a physical iOS device to run your app.

  1. Connect an iOS device to your Mac.
  2. In the project navigator, choose your device from the scheme pop-up menu. Xcode assumes you intend to use the selected device for development and automatically registers it for you.
  3. Click the Run button.

Check out Apple's guide to Launching Your App on Devices for more details.

Eddystone support

KTKEddystoneManager is key to retrieving Eddystone format beacon information. KTKEddystoneManager can discover nearby Eddystone format devices using regions/filters to narrow results.

@interface ViewController () <KTKEddystoneManagerDelegate>

@property KTKEddystoneManager *eddystoneManager;

@property KTKEddystoneRegion *namespaceRegion;
@property KTKEddystoneRegion *domainRegion;
@property KTKSecureEddystoneRegion *secureNamespaceRegion;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	// Eddystone Manager	        
   	self.eddystoneManager = [[KTKEddystoneManager alloc] initWithDelegate:self];
}

Discover Eddystone devices

In this example we will start discovering Eddystone devices in viewWillAppear: method and stop in viewWillDisappear:.

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
 	 	
 	// If should scan for all nearby Eddystones
 	// Passing nil will look for all regions
    [self.eddystoneManager startEddystoneDiscoveryInRegion:nil];
    
    // Scan for Eddystones with specific namespace ID
    self.namespaceRegion = [[KTKEddystoneRegion alloc] initWithNamespaceID:@"namespaceID"];
    [self.eddystoneManager startEddystoneDiscoveryInRegion: self.namespaceRegion];
    
    // Scan for Eddystone with specific domain in url
    self.domainRegion = [[KTKEddystoneRegion alloc] initWithURLDomain:@"github.com"];    
    [self.eddystoneManager startEddystoneDiscoveryInRegion: self.domainRegion];
    
    // Scan for Secure Namespace Region
    self.secureNamespaceRegion = [[KTKSecureEddystoneRegion alloc] initWithSecureNamespaceID:@"secure_namespace_id"];    
    [self.eddystoneManager startEddystoneDiscoveryInRegion: self.secureNamespaceRegion];
}

- (void)viewWillDisappear:(BOOL)animated
{    
    [super viewWillDisappear:animated];

    // Stop 
    [self.eddystoneManager stopEddystoneDiscoveryInAllRegions];
    
    // ... or you can just stop for one specific region by using
    [self.eddystoneManager stopEddystoneDiscoveryInRegion: self.domainRegion];
}

Read more about security and shuffling on our support page.

KTKEddystoneManagerDelegate

All delegate methods can be found in KTKEddystoneManagerDelegate documentation.

- (void)eddystoneManager:(KTKEddystoneManager *)manager didDiscoverEddystones:(NSSet <KTKEddystone*>*)eddystones inRegion:(__kindof KTKEddystoneRegion* _Nullable)region
{
	if ([region isEqual:self.domainRegion]) {
		// Eddystone discovered with URL in `github.com` domain ...
	}
}

Communicating with the Kontakt.io Rest API

The Kontakt.io Rest API provides a series of resources to query/update our cloud platform and allow you to manage your venues and beacons, and retrieve beacon actions.

Class responsible for communication with API is KTKCloudClient.

You can initialize it by calling ...

KTKCloudClient *client = [KTKCloudClient new];

or use shared instance (singleton) used by the SDK API calls ...

KTKCloudClient *client = [KTKCloudClient sharedInstance];

If specific NSURLSessionConfiguration configuration is required you can use:

KTKCloudClient *client = [[KTKCloudClient alloc] initWithSessionConfiguration: ...];

API Key must be provided before calling any method from KTKCloudClient.

[Kontakt setAPIKey:@"Your API Key"];

Get your API key

Using KTKCloudClient

After initialization; KTKCloudClient object acts as a facade between your app and Kontakt.io services. You can use it to get actions, beacons, and venues assigned to your company (and much more).

Getting list of devices is as simple as ...

Objective-C

[[KTKCloudClient sharedInstance] getObjects:[KTKDevice class] completion:^(KTKKontaktResponse * _Nullable response, NSError * _Nullable error) {
	NSLog(@"%@". [response objects]);
}];

or in Swift

KTKCloudClient.sharedInstance().getObjects(KTKDevice.self) { response, error in
	print(response?.objects)
}

// Get Venues
KTKCloudClient.sharedInstance().getObjects(KTKVenue.self) { response, error in
	print(response?.objects)
}

To create, update or delete objects you can use one of provided methods:

All classes representing objects from the API conforms to protocol KTKCloudModel.

Responses from KTKCloudClient

All Cloud Client responses are wrapped with KTKKontaktResponse. KTKKontaktResponse provides more context for the result. You can for example get next set of the results using nextResultsURL property like:

// Get Device by unique ID ...
NSDictionary *parameters = @{ @"uniqueId": @"K0nT" };

[[KTKCloudClient sharedInstance] getObjects:[KTKDevice class] parameters:parameters completion:^(KTKKontaktResponse * _Nullable response, NSError * _Nullable error) {
		// Check for errors etc ...
		
		// Call next result set ..
        [[KTKCloudClient sharedInstance] GET:response.nextResultsURL completion:^(KTKKontaktResponse * _Nullable response, NSError * _Nullable error) {
        	// ... more results ?
        }];
    }];

Custom calls to the API

If there is a custom call you would like to make to the API you can use:

Both methods take endpoint name parameter and HTTP parameters dictionary.

You can find more information in the Appledocs KTKCloudClient class reference.


Bluetooth Device Management

The Kontakt.io iOS SDK contains classes and methods that let you easily connect to a Kontakt.io device, read its parameters, and modify some of them. First however, you need to scan for nearby devices.

@property KTKDevicesManager *devicesManager;
...
self.devicesManager = [[KTKDevicesManager alloc] initWithDelegate: self];

// Calling `startDevicesDiscoveryWithInterval:` will report devices every `interval` value you specify.
[self.devicesManager startDevicesDiscoveryWithInterval:2.0];

// Calling `startDevicesDiscovery` will report devices in real time.
[self.devicesManager startDevicesDiscovery];

KTKDevicesManager informs its delegate about devices currently in range.

All delegate methods can be found in KTKDevicesManagerDelegate documentation.

#pragma mark - KTKDevicesManagerDelegate method

- (void)devicesManager:(KTKDevicesManager*)manager didDiscoverDevices:(NSArray <KTKNearbyDevice*>* _Nullable)devices;
    // Do something with devices.
}

Nearby Devices discovered by KTKDevicesManager are of KTKNearbyDevice class.

Changing KTKNearbyDevice configuration requires KTKDeviceConnection and it is as simple as:

Objective-C

// Create Configuration
KTKDeviceConfiguration *configuration = [KTKDeviceConfiguration new];
configuration.name = @"Disco Beacon";
configuration.advertisingInterval = @350;
configuration.major = @123;

// Connection
KTKDeviceConnection *connection = [[KTKDeviceConnection alloc] initWithNearbyDevice: nearbyDevice];

// Write Cofiguration
[connection writeConfiguration:configuration completion:^(BOOL synchronized, KTKDeviceConfiguration * _Nullable configuration, NSError * _Nullable error) {
	// Process response
}];

Swift

// Create Configuration
let configuration = KTKDeviceConfiguration()
        
configuration.name = "Disco Beacon"
configuration.advertisingInterval = 350
configuration.major = 123

// Connection
let deviceConnection = KTKDeviceConnection(nearbyDevice: device)

// Write Cofiguration
deviceConnection.writeConfiguration(configuration) { synchronized, configuration, error in
	// Process response
}

More code samples and scenarios will be covered in our sample project on github.

Microlocating vs Bluetooth

Kontakt.io iOS SDK makes extensive use of two native iOS frameworks: Core Location and Core Bluetooth. It is important to understand that although both of them use Bluetooth Low Energy, they are separate technologies and do not have much in common.

kontakt-ios-sdk's People

Contributors

dniklewicz-kio avatar jaceksoftnauts avatar stoprocent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kontakt-ios-sdk's Issues

How to output the table as csv file in kontakt-ios-sdk/Examples/OSX/Kontakt Scanner/Kontakt Scanner.xcodeproj/

Hey @stoprocent , I just bought 4 beacons from Kontakt and I managed to run this example kontakt scanner(kontakt-ios-sdk/Examples/OSX/Kontakt Scanner/Kontakt Scanner.xcodeproj/) Currently I can see the RSSI valueS in the app:
screen shot 2016-08-17 at 9 11 49 pm
I would like to output the table to a local .csv file but I could not figure our a way to do it. Do you have any suggestions on how should I do that? Thanks in advance for your help.

Beacon Proximity is Inconsistent

Hello,

We are having some strange issues now that we've upgraded to the latest SDK. It took a while to get used to the new structure of things and also the delegate callbacks (would have been great to have a better migration guide here). It looks like we are now getting all of the proper delegate callbacks after quite a struggle, but unfortunately we are seeing some strange behavior with the method: func beaconManager(_ manager: KTKBeaconManager, didRangeBeacons beacons: [CLBeacon], in region: KTKBeaconRegion) {

Essentially, I am here with an iPad running an app that is integrated with the latest Kontakt.io SDK and I have one of our beacons right next to me. The didRangeBeacons delegate method gets called over and over again as we would expect, but the proximity for the beacon keeps changing state between Unknown, Near, Immediate when it should always be Near/Immediate since I'm literally right next to the beacon. Very confused as to why it keeps giving back Unknown for stretches at a time and would rather not have to put in custom code to deal with this behavior. Note that I just updated via CocoaPods to the latest SDK version 1.3.3 and the beacon has the latest firmware 3.1. Also when I use the Kontakt.io iOS app it shows as the beacon being nearby and properly powered.

Here is some log output:

1885-35219 proximity: IMMEDIATE, 1
1885-35219 proximity: IMMEDIATE, 1
1885-35219 proximity: IMMEDIATE, 1
1885-35219 proximity: UNKNOWN, 0
1885-35219 proximity: UNKNOWN, 0
1885-35219 proximity: UNKNOWN, 0
1885-35219 proximity: UNKNOWN, 0
1885-35219 proximity: IMMEDIATE, 1
1885-35219 proximity: IMMEDIATE, 1
1885-35219 proximity: UNKNOWN, 0

Any info would be great. Not sure how to resolve this issue.

respoons contacts is null

curl post

curl -X "GET" "https://ovs.kontakt.io/presence/contact/receiver?placeId=xxxxxxxxxxx&interval=M1&startTimestamp=1489631400&endTimestamp=1489631491&q=properties.accessLevel==4"
-H "Api-Key: xxxxxxxxxxxxx"
-H "Accept: application/vnd.com.kontakt+json;version=9"

respoons contacts is null

{"searchMeta":{"interval":"M1","placeId":"xxxxxxxx","startTimestamp":1489631400,"endTimestamp":1489631491,"startIndex":0,"maxResult":500,"prevResults":"","nextResults":"https://ovs.kontakt.io/presence/contact/receiver?placeId=xxxxxxxxxxxxxx&interval=M1&startTimestamp=1489631400&endTimestamp=1489631491&q=properties.accessLevel%3D%3D4&startIndex=500","filter":"properties.accessLevel==4"},"contacts":[]}

Carthage update

Why does the README tell me to run $ carthage update when this repo is not a project. Carthage can't build this repo because it's already pre-built. I suggest that the Carthage instructions be completely removed because this repo is not compatible with Carthage.

$ carthage update
*** Fetching kontakt-ios-sdk
*** Skipped downloading kontakt-ios-sdk.framework binary due to the error:
	"Must specify two-factor authentication OTP code."
*** Checking out kontakt-ios-sdk at "v1.4.3"
*** xcodebuild output can be found in /var/folders/bk/6150wm5938gdxbyqqrklh_w00000gr/T/carthage-xcodebuild.RZaN4C.log
*** Skipped building kontakt-ios-sdk due to the error:
Dependency "kontakt-ios-sdk" has no shared framework schemes

If you believe this to be an error, please file an issue with the maintainers at https://github.com/kontaktio/kontakt-ios-sdk/issues/new

Integration error

dyld: Library not loaded: @rpath/KontaktSDK.framework/KontaktSDK
Referenced from: /Users/Welcome/Library/Developer/CoreSimulator/Devices/1BFA5957-3059-4430-A537-A53711E00207/data/Containers/Bundle/Application/3EAE9BD0-7C21-4B4C-B038-B61A76EDC6D5/iBeaconsInt.app/iBeaconsInt
Reason: image not found

beacon mac address

It is possible to get mac address from beaconManager:didRangeBeacons: inRegion: delegate method.
Something equivalent with android getAddress

Kontakt iOS Management App

Hi,

In the iOS management application, once an Eddystone beacon is detected, the application is able to display its name. However, going through the KTKEddystone, I can't seem to find that property anywhere. How do we access those properties? Do we need to query the Rest API for that?

EDIT: As I understand, the KTKNearbyDevice is the one accessed in the management app. Is there any way to get the KTKEddystoneUUID from the a KTKNearbyDevice?

Monitoring & state detection not working with some identifiers

Hey,

I've been struggling with getting my KTKBeaconManagerDelegates methods called, I did everything as suggested in your GitHub README, your guide, I triple-checked everything and still couldn't find a cause for the issue.

So to make it short, when instantiating KTKBeaconRegion I provided an identifier Michal, with capital "M". After changing it to basically anything with first lowercase character, everything started working as expected.

Can you reproduce the issue? Is there really some magic that doesn't accept initial capital characters? Or have I missed something?

Thanks!
Michal

No bluetooth power/enabled alert

Normally, when an iOS app calls
CBCentralManager *centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
Then iOS automatically shows a popup alert message requesting the user to turn on Bluetooth in case it's off.

However, when we use the KTKDevicesManager to find beacons, there seems to be no iOS system alert in case bluetooth is disabled:

self.kontaktDevicesManager = [[KTKDevicesManager alloc] initWithDelegate:self];
[self.kontaktDevicesManager startDevicesDiscoveryWithInterval:1.0];

We would like to enable this warning for the user in case his device's bluetooth is powered off. Can this be accomplished with the Kontakt SDK without having to create a (unused) CBCentralManager solely for this bluetooth check?

Create new venue

Hello there!

I would like to create a new venue in the Kontakt Cloud, and is trying to use the createObject:completion: in the KTKCloudClient.

How do I specify the name and description of the venue? The name and description properties on the KTKVenue class is readonly, so I can't init a new KTKVenue object.

Right now I can do it this way, but I think it should be possible to use the createObject: method. Isn't that right?

NSDictionary *venueParameters = @{@"name": @"New venue",@"description":@"Created with the KontaktSDK"};

[[KTKCloudClient sharedInstance] POST:@"venue/create" parameters:venueParameters completion:^(KTKKontaktResponse * _Nullable response, NSError * _Nullable error) {

}];

Not getting beacon information in "didRangeBeacons"

I have added SDK & code as per kontakt.io doc and also getting call in the method "didRangeBeacons" but getting the empty array of beacons.

This is how I did the setup:

// Initiate Beacon Manager
self.beaconManager = [[KTKBeaconManager alloc] initWithDelegate:self];

// Request Location Authorization
[self.beaconManager requestLocationAlwaysAuthorization];

// Kontakt.io proximity UUID
NSUUID *proximityUUID = [[NSUUID alloc] initWithUUIDString:@"f7826da6-4fa2-4e98-8024-bc5b71e0893e"];

// Create region instance
`self.region = [[KTKBeaconRegion alloc] initWithProximityUUID: proximityUUID identifier:@"identifier"];`

// Start Monitoring
`[self.beaconManager startMonitoringForRegion:self.region];`

// You can also start ranging ...

[self.beaconManager startRangingBeaconsInRegion:self.region];

Now call comes to "didRangeBeacons" method but beacon array is just empty.

Am I missed out anything here? Please let me know.

All beacons for Venue

GET /venue/:id response specifies that there should be a property returned that includes devices for venue, but only Device Count is available as a property. Was this removed or not yet added?

I need to get the minor numbers for all beacons at a specified venue, or the lowest and the highest, and this was the only way I could think to do it.

beacons detection problem with iOS7

Hello Team,
I want to support iOS7 and I wrote apple generic code for it.
Now, The problem is that, out beacons are discovering with iOS7 device.

Please give me some help link here!!

Thank you

See major and minor og KTKNearbyDevice

Hello

How do you see the major and minor of a nearby device?
I see with how I configurate new major and minor for it.
But I want to know how do I see the Major and Minor of a iBeacon?

iOS 9 Inquiry

Hey there,

I am working on an iOS implementation of our Android app, which will be targeting iOS 9+. My question for you is will the latest Kontakt iOS SDK work for iOS 9+? It mentions support for iOS 8 at the moment.

Thanks!
Lucas

Monitored regions nil

While ranging beacons work, region monitoring doesn't.

The code is unchanged from the Quickstart guide:

NSUUID *proximityUUID = [[NSUUID alloc] initWithUUIDString:uuid];

// Create region instance
KTKBeaconRegion *region = [[KTKBeaconRegion alloc] initWithProximityUUID:proximityUUID identifier:identifier];

// Start Monitoring
[self.beaconManager startMonitoringForRegion:region];

This delegate method is called with a nil region.

- (void)beaconManager:(KTKBeaconManager *)manager didStartMonitoringForRegion:(__kindof KTKBeaconRegion *)region

If I later log [self.beaconManager monitoredRegions] I also get nil.

I'm using KontaktSDK 1.0.5, and an iPhone 6s iOS 9.1. I'm testing with three beacons (iBeacon profile).

Undefined symbols for architecture arm64

I use pods

pod 'KontaktSDK', '~> 1.1.3'

The Architectures settings on my project are:
$(ARCHS_STANDARD)
And valid architectures are:
arm64 armv7 armv7s

But i received this error:

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_KTKBluetoothManager", referenced from: type metadata accessor for __ObjC.KTKBluetoothManager in AppDelegate.o "_OBJC_CLASS_$_KTKBeaconDevice", referenced from: Redar.AppDelegate.bluetoothManager (__ObjC.KTKBluetoothManager!, didChangeDevices : Swift.Set<__ObjC.NSObject>!) -> () in AppDelegate.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thank you for you help!

Reading Configuration returns CBErrorDomain 5

Hi, I can't seem to read the beacon configuration using the following code, It always return an NSError 5.

Here is the code, I've tried this with firmware 3.1 and 4.1 with the same results. The admin App is working.

In AppDelegate.swift
Kontakt.setAPIKey(Constants.BeaconAPI.kontakt)

Scanning for devices works and in the delegate I'm trying to read the config however it already returns an error

func devicesManager(manager: KTKDevicesManager, didDiscoverDevices devices: [KTKNearbyDevice]?) {

    for device in devices! {
        if (device.name == selectedBeacon?.beaconName) {
            self.kontaktNearBy = device
            kontaktManager!.stopDevicesDiscovery()
            self.tableView.reloadData()

            let connection = KTKDeviceConnection( nearbyDevice: self.kontaktNearBy!)

            connection.connectionTimeout = NSTimeInterval(10)

            var config : KTKDeviceConfiguration  // = KTKDeviceConfiguration()
            var error : NSError

            connection.readConfigurationWithCompletion { config, error in
                if (error == nil) {
                    // OK
                    //self.tableView.reloadData()
                }
            }


        }
    }
}

I recieve an error in Swift

i have this code and the console prints "Optional("The operation couldn’t be completed. (KTKCentralManagerErrorDomain error 10.)")"

here is my code:
thanks in advance

import UIKit
import KontaktSDK

class ViewController: UIViewController, KTKEddystoneManagerDelegate {

var eddystoneManager: KTKEddystoneManager!
var namespaceRegion: KTKEddystoneRegion!
var domainRegion: KTKEddystoneRegion!
var secureNamespaceRegion: KTKSecureEddystoneRegion!


override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.

    Kontakt.setAPIKey("AyxUsOijBTYrCuKkQkqofPvUlDTtEgqE")

    self.eddystoneManager = KTKEddystoneManager.init(delegate: self)

}

override func viewWillAppear(animated: Bool) {

    // If should scan for all nearby Eddystones
    // Passing nil will look for all regions
    self.eddystoneManager.startEddystoneDiscoveryInRegion(nil)

    // Scan for Eddystones with specific namespace ID
    self.namespaceRegion = KTKEddystoneRegion.init(namespaceID: "f7826da6-4fa2-4e98-8024-bc5b71e0893e")
    self.eddystoneManager.startEddystoneDiscoveryInRegion(namespaceRegion)

     // Scan for Eddystone with specific domain in url
    self.domainRegion = KTKEddystoneRegion.init(URLDomain: "github.com")
    self.eddystoneManager.startEddystoneDiscoveryInRegion(domainRegion)

    // Scan for Secure Namespace Region
    self.secureNamespaceRegion = KTKSecureEddystoneRegion.init(secureNamespaceID: "416d786e4e41")
    self.eddystoneManager.startEddystoneDiscoveryInRegion(secureNamespaceRegion)

}

override func viewWillDisappear(animated: Bool) {

    self.eddystoneManager.stopEddystoneDiscoveryInAllRegions()

    // ... or you can just stop for one specific region by using
    self.eddystoneManager.stopEddystoneDiscoveryInRegion(domainRegion)
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}



// Eddystones

func eddystoneManager(manager: KTKEddystoneManager, didDiscoverEddystones eddystones: Set<KTKEddystone>, inRegion region: KTKEddystoneRegion?) {

    if region == self.domainRegion {
        print("Hola")
    }

}

func eddystoneManager(manager: KTKEddystoneManager, didUpdateEddystone eddystone: KTKEddystone, withFrame frameType: KTKEddystoneFrameType) {

}

func eddystoneManagerDidFailToStartDiscovery(manager: KTKEddystoneManager, withError error: NSError?) {
    print(error?.localizedDescription)
}

}

Request state for region

Hi!

We have problem getting both state for a given regions and list of regions monitored (i saw there is already a bug opened for the last point).

Regarding requestStateForRegion: we never get any callback for any beacons. Is this something that is working on our test suite?

Best,
Loïc

Estimated distance to beacon using KTKNearbyDevice

We are using Kontakt beacons for one of our project. Our goal is to detect user presence within 1 meter of range from beacon. So i was trying to use KTKDevicesManager and KTKNearbyDevice and it does not have any property that indicate distance/accuracy.

I know that CLBeacon have this property but for this we have to use region monitoring.

I think it is possible to get estimated distance for KTKNearbyDevice because both required parameters for distance calculation are there (RSSI, transmission power). How ?

KTKDevicesManager documentation confusion

I want to scan for Kontakt beacons and read the battery status on them.

It seems like KTKNearbyDevice returns the battery status, so I followed your tutorial and used the KTKDevicesManager.

One problem with the documentation is that:

  1. It initializes KTKDevicesManager as KTKBluetoothManager
  2. The code doesn't compile with 1.1.3, as there's no header for KTKBluetoothManager
@property KTKDevicesManager *devicesManager;
...
self.devicesManager = [[KTKBluetoothManager alloc] initWithDelegate: self];

It seems like there's an error in your documentation ?

It looks like it should be:

self.devicesManager = [[KTKDevicesManager alloc] initWithDelegate: self];

Just like in your example app.

Get more results

Hello there!

[[KTKCloudClient sharedInstance] getObjects:[KTKDevice class] parameters:@{@"uniqueId":@"b05C6"} completion:^(KTKKontaktResponse * _Nullable response, NSError * _Nullable error) {
        NSLog(@"%@ ",response);   
    }];

I have used the method getObjects to get my gateway devices,and your tips tell me I can get more results when use the following example,but i found the value of response.nextResultsURL is nil.It will cause an error "unsupported URL".

// Call next result set ..
        [[KTKCloudClient sharedInstance] GET:response.nextResultsURL completion:^(KTKKontaktResponse * _Nullable response, NSError * _Nullable error) {
            // ... more results ?
        }];

discovering set to true if stopDevicesDiscovery() is called.

I have instantiated KTKDevicesManager in my ViewController.

private var deviceManager: KTKDevicesManager!

In the function viewWillAppear() I start the device discovery

if deviceManager.discovering {
    return
}

deviceManager.startDevicesDiscoveryWithInterval(2)

and in the viewWillDisappear() function it stop it again.

This works without problems. But if I enter the ViewController a second time, the deivceManager.discovering Bool is true.

This should be false.

Is this a bug in the SDK version 1.2.2? Or did I forget something?

I have also created a demo project to reproduce the problem:

github.com/patricks/kontaktio_discovery_problem/

Why is connection to beacons necessary for Kontakt.io specific data like uniqueId?

In the android version of the SDK, Kontakt.io specific fields like uniqueId, batteryLevel etc. are sent alongside the iBeacon specific fields like uuid, major, minor, accuracy etc. in the onIBeaconsUpdated event without a need to start a connection to the beacon (which requires the device to be connected to the internet) for the Kontakt.io specific fields.

In the iOS version, when I want to receive e.g. the uniqueId AND the uuid of the beacon, I have to start a KTKDeviceConnection which requires an internet connection of the device and is more power consuming. Why is this necessary on iOS and not necessary on Android?

This seems to be an issue with quite some people since the issues #19 , #20 and #15 which I looked at are related to this question.

Thanks!

Kontakt iOS SDK(8) - Region Failed

Hi there,

I am trying to get an iOS app going that connects to the kontakt beacons. I have one and have gone through the setting up documentation, but I can't seem to figure out how to detect the beacon or enter the region specified.

func beaconManager(_ manager: KTKBeaconManager, monitoringDidFailFor region: KTKBeaconRegion?, withError error: Error?) { print("Region Failed \(error!.localizedDescription)") }
It always fails and returns a "Could not resolve proximity"

Any help, guidance is highly appreciated.

Thank you

KTKBeaconManager Monitoring Delegate methods are not triggering

Hi I'm using Kontakt iOS SDK and I have followed tutorial as mentioned

Through pods I'm installing SDK
pod out is :

Update all pods
Updating local specs repositories

CocoaPods 1.2.0.beta.1 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1

Analyzing dependencies
Downloading dependencies
Using KontaktSDK (1.3.2)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

My Code :
AppDelegate.h :

#import <UIKit/UIKit.h>
#import <KontaktSDK/KontaktSDK.h>

#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)


@interface AppDelegate : UIResponder <UIApplicationDelegate,KTKBeaconManagerDelegate>

@property (strong, nonatomic) UIWindow *window;
@property(strong,nonatomic) KTKBeaconManager *beaconManager;

@end

AppDelegate.m

#import "AppDelegate.h"

@interface AppDelegate ()
@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
//    self.locationManger = [[CLLocationManager alloc] init];
//    self.locationManger.desiredAccuracy = kCLLocationAccuracyBest;
//    [self.locationManger setDelegate:self];
//    [self.locationManger startUpdatingLocation];

    [Kontakt setAPIKey:@"*****************"];
    
    [self beaconScan];

    return YES;
}


- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}


- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}


- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}


- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}


- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

-(void)beaconScan{
    NSLog(@"beaconScan"); 
    self.beaconManager = [[KTKBeaconManager alloc] initWithDelegate:self];
    
    NSUUID *myProximityUUID = [[NSUUID alloc] initWithUUIDString:@"*************"];
    KTKBeaconRegion *region1 = [[KTKBeaconRegion alloc] initWithProximityUUID:myProximityUUID identifier:@"Beacon region 1"];

    switch ([KTKBeaconManager locationAuthorizationStatus]) {
        case kCLAuthorizationStatusNotDetermined:
            [self.beaconManager requestLocationAlwaysAuthorization];
            break;
            
        case kCLAuthorizationStatusDenied:
        case kCLAuthorizationStatusRestricted:
            // No access to Location Services
            break;
            
        case kCLAuthorizationStatusAuthorizedWhenInUse:
            // For most iBeacon-based app this type of
            // permission is not adequate
            break;
            
        case kCLAuthorizationStatusAuthorizedAlways:
            if ([KTKBeaconManager isMonitoringAvailable]) {
                NSLog(@"kCLAuthorizationStatusAuthorizedAlways");
                [self.beaconManager startMonitoringForRegion:region1];
            }
            break;
    }
    
}
- (void)beaconManager:(KTKBeaconManager *)manager didChangeLocationAuthorizationStatus:(CLAuthorizationStatus)status {
    if (status == kCLAuthorizationStatusAuthorizedAlways) {
        NSUUID *myProximityUUID = [[NSUUID alloc] initWithUUIDString:@"****************"];
        KTKBeaconRegion *region1 = [[KTKBeaconRegion alloc] initWithProximityUUID:myProximityUUID identifier:@"Beacon region 1"];
        [self.beaconManager startMonitoringForRegion:region1];
    }else if (status == kCLAuthorizationStatusNotDetermined){
        [self.beaconManager requestLocationAlwaysAuthorization];
    }
}
- (void)beaconManager:(KTKBeaconManager *)manager didStartMonitoringForRegion:(__kindof KTKBeaconRegion *)region {
    // Do something when monitoring for a particular
    // region is successfully initiated
    NSLog(@"didStartMonitoringForRegion %@",region);
    [manager startRangingBeaconsInRegion:region];
}

- (void)beaconManager:(KTKBeaconManager *)manager monitoringDidFailForRegion:(__kindof KTKBeaconRegion *)region withError:(NSError *)error {
    NSLog(@"monitoringDidFailForRegion %@ %@error ",region,error);
}

- (void)beaconManager:(KTKBeaconManager *)manager didEnterRegion:(__kindof KTKBeaconRegion *)region {

    NSLog(@"didStartMonitoringForRegion %@",region);

    [manager startRangingBeaconsInRegion:region];
}

- (void)beaconManager:(KTKBeaconManager *)manager didExitRegion:(__kindof KTKBeaconRegion *)region {

    NSLog(@"didStartMonitoringForRegion %@",region);

    [manager stopRangingBeaconsInRegion:region];
}
-(void)beaconManager:(KTKBeaconManager *)manager didRangeBeacons:(NSArray<CLBeacon *> *)beacons inRegion:(__kindof KTKBeaconRegion *)region{
    NSLog(@"didRangeBeacons beacons %@ in region %@",beacons,region);
}
@end

For the first time I have run the app in device through xcode it is working properly
and second time running the app no delegate methods are calling, even the CLAuthorizationStatus is kCLAuthorizationStatusAuthorizedAlways,and app is in device privacy location service. if I uninstall the app and installed it again it is working fine for the first time and from second time as same no delegate methods are calling

Device : iPhone 5S
iOS Version : iOS 10,9

"didRangeBeacons" results empty array

Hi, Team

I'm using Kontakt.io sdk in my app. when I'm ranging beacon always I'm getting empty array even beacon immediate to device.

`
NSUUID *ProximityUUID = [[NSUUID alloc] initWithUUIDString:@"7244bebc-0084-4605-baef-0592ec35d589"];
self.KTKBRegion = [[KTKBeaconRegion alloc] initWithProximityUUID:ProximityUUID identifier:@"Beacon"];
self.KTKBManager = [[KTKBeaconManager alloc] initWithDelegate:self];
[self startMonitoring];

-(void)startMonitoring{
NSLog(@"Entered to start monitoring method");

if ([[self.KTKBManager monitoredRegions] containsObject:self.KTKBRegion]) {
    NSLog(@"this beacon region is already monitored %@",self.KTKBRegion.proximityUUID);
    [self.KTKBManager requestStateForRegion:self.KTKBRegion];
    
} else {
    
    NSLog(@"this beacon region is not monitored till %@ ",self.KTKBRegion.proximityUUID);
    [self.KTKBManager startMonitoringForRegion:self.KTKBRegion];
}

}

//Beacon Monitoring method
-(void)beaconManager:(KTKBeaconManager *)manager didStartMonitoringForRegion:(__kindof KTKBeaconRegion *)region{
NSLog(@"Beacon Monitoring Started for the region %@",region.proximityUUID);
[self.KTKBManager startRangingBeaconsInRegion:self.KTKBRegion];
}
//
-(void)beaconManager:(KTKBeaconManager *)manager didDetermineState:(CLRegionState)state forRegion:(__kindof KTKBeaconRegion *)region{
NSLog(@"Beacon Region State Determine ");

switch (state) {
    case CLRegionStateUnknown:
    {
        NSLog(@"Region state is unknown");
        [self.KTKBManager stopRangingBeaconsInRegion:self.KTKBRegion];
        break;
    }
    case CLRegionStateInside:
    {
        NSLog(@"Region state is In-Side");
        [self.KTKBManager startRangingBeaconsInRegion:self.KTKBRegion];
        break;
    }
    case CLRegionStateOutside:
    {
        NSLog(@"Region state is Out-Side");
        [self.KTKBManager stopRangingBeaconsInRegion:self.KTKBRegion];
        break;
    }
}

}

-(void)beaconManager:(KTKBeaconManager *)manager didRangeBeacons:(NSArray<CLBeacon *> *)beacons inRegion:(__kindof KTKBeaconRegion *)region{

  NSLog(@"we have ranged beacon %@ proximityUUID %@",beacons,region.proximityUUID);

}
`

Beacon Pros in iOS not firing Enter/Exit events

I have beacon pros using iOS app and they are not firing the Enter/Exit events. My code for Enter/Exit work for all other beacon types from Kontakt but beacon pros are not getting detected. I got the region based enter/exit but not getting the specific to beacon.

Problems kontakt.io SDK and geofences in one project.

kontaktio_geofencing_problem

If there is a CLLocationManager (Geofences) and a KTKBeaconManager (iBeacons) running in the same Swift project, the KTKBeaconManagerDelegate sometimes tries to handle a CLCircularRegion.
If I try to access the proximityUUID from the KTKBeaconRegion object in the methods didDetermineState:, didEnter: or didExitRegion: I get the following error:

libswiftFoundation.dylib`static Foundation.UUID._unconditionallyBridgeFromObjectiveC (Swift.Optional<__ObjC.NSUUID>) -> Foundation.UUID:

I have build a demo project to proof this.

https://github.com/patricks/kontaktio_geofencing_problem

Internal server error when trying to connect to read configuration from nearby devices

When trying to readConfigurationWithCompletion I get the following error:

Request failed: internal server error (500)

Does this mean that it's an error of the Kontakt.io server or is there an issue with my code or something else? I tried with Beacons of the firmwares 3.1 and 4.1. My beacons are not locked and the devices connected to the internet.

My objective-c code:

- (void)devicesManager:(KTKDevicesManager *)manager didDiscoverDevices:(NSArray<KTKNearbyDevice *> *)devices {
    for (KTKNearbyDevice *device in devices) {
        KTKDeviceConnection *connection = [[KTKDeviceConnection alloc] initWithNearbyDevice:device];
        
        [connection readConfigurationWithCompletion:^(KTKDeviceConfiguration* configuration, NSError* error) {
            if (error == nil) {
                NSLog(@"Configuration: uniqueId: %@, uniqueId from config: %@, uuid: %@, minor: %@", device.uniqueID, configuration.uniqueID, [configuration.proximityUUID UUIDString], configuration.minor);
            } else {
                NSLog(@"ERROR: beacon with uniqueId %@, error: %@", device.uniqueID, error.localizedDescription);
            }
        }];
    }
}

KTKDevicesManagerDelegate Nullability

In KTKDevicesManager's didDiscoverDevices method, devices is marked _Nullable. The documentation does not explain why this parameter could be nil. That is, it is unclear why didDiscoverDevices would ever be called without discovered devices.

Similarly, the devicesManagerDidFailToStartDiscovery:withError: method marks error _Nullable. The documentation does not specify the circumstances under which this method would be called with a nil error parameter.

The use cases of both of these methods imply to me that the aforementioned parameters should never be nil. If that is true, they should be marked _Nonnull. If there are cases that I am overlooking, then the documentation should be updated to explain those cases.

KTKDeviceManger want to search only beacons Which are registered in my console

Hello ,

I am Using Kontakt.io latest sdk in Objective C.

In my mobile application i want to search ,only beacons which are registered in my console account.
Currently i have implemented my code as below.

// Setting API Key to Kontakt
[Kontakt setAPIKey:@"HNsIEXoeYNgnBnJFnADWytZrlSkjaZko"];

// Initializing KTKDeviceManager Obj
devicesManager = [[KTKDevicesManager alloc] initWithDelegate:self];

// Start discovering beacons
[devicesManager startDevicesDiscovery];

//Delegate method in my class
-(void)devicesManager:(KTKDevicesManager *)manager didDiscoverDevices:(NSArray<KTKNearbyDevice *> *)devices{
if(devices.count >0){
for(int i=0;i<devices.count;i++){
KTKNearbyDevice *device = [devices objectAtIndex:i];
NSLog(@"devicesManager Method Call - UniqueID -%@",device.uniqueID);
}
}

Here i am getting beacons which are registered in my console , and other beacon which is near by.

Please guide me how to get only beacons which are registered in my console.

Error when uploading app with new iOS sdk

I installed the new kontakt iOS sdk (Version: 1.0.4) as it's explained in the quick start guide.

I wrote code to detect my eddystone. In foreground and in background, it's ok :-)
I created an archive of my target => ok.

But when I try to upload this archive to the App Store, I see errors messages like on the screenshot.
capture d ecran 2016-02-10 a 10 22 25

Can you please tell me what I'm doing wrong ?

Thanks for your help

Unable to run project with SDK dependancy

Hi,

Trying to integrate the latest SDK, but got an error during app launching (either simulator or device):

dyld: Library not loaded: @rpath/KontaktSDK.framework/KontaktSDK
Referenced from: /var/mobile/Containers/Bundle/Application/5E332836-5379-48C4-96BD-4F0D7AC4C86D/goevent.app/goevent
Reason: image not found

I saw some commits friday and this morning, is it related?
Thanks.

Loïc

Get a KTKDevice UUID, major and minor

Hello

I'm trying to get some iBeacon devices from the Kontakt.io Cloud. I'm using the KTKCloudClient to get the objects, but I just realized that the KTKDevice model doesn't have properties for UUID, major and minor. So how do I get the iBeacon properties from the CloudClient?

bicode not recognized yet

Hi, after 1.0.3 upgradig, archive generator in xcode not recognize yet bitcode.

My error in detail:

ld: '/Users/manuel/x-code/bfm/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a(GTMNSData+zlib.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

thx

Reason: image not found

I am using the latest SDK which seems to be updated just 7 hours ago. Myproject name is "kontactTest" and i am having following issue (break point) before showing the initial Screen.

dyld: Library not loaded: @rpath/KontaktSDK.framework/KontaktSDK
Referenced from: /var/mobile/Containers/Bundle/Application/87DCAF8B-3111-4CD7-A054-60145DE1188B/kontactTest.app/kontactTest
Reason: image not found

No delegate methods gets called .

Hi
I am integrating your sdk to one of my project . I have followed the instruction provided on the website .
Here is my code snippet

KTKBeaconManager *beaconManager = [[KTKBeaconManager alloc] initWithDelegate:self];
NSUUID *uid = [[NSUUID alloc] initWithUUIDString:@"f7826da6-4fa2-4e98-8024-bc5b71e0893e"];

KTKBeaconRegion *beaconRegion = [[KTKBeaconRegion alloc] initWithProximityUUID:uid identifier:@"com.domnique.beaconDemo"];

switch ([KTKBeaconManager locationAuthorizationStatus]) {

    case kCLAuthorizationStatusNotDetermined:
        [beaconManager requestLocationAlwaysAuthorization];
        break;
    case kCLAuthorizationStatusDenied:
        NSLog(@"Denied");
        break;
    case kCLAuthorizationStatusRestricted:
        NSLog(@"Restricted");
        break;
    case kCLAuthorizationStatusAuthorizedWhenInUse:
        NSLog(@"in Use");
        break;
    case kCLAuthorizationStatusAuthorizedAlways:
        
        if ([KTKBeaconManager isMonitoringAvailable]) {
            
            [beaconManager startMonitoringForRegion:beaconRegion];
        }
        break;
        
    default:
        break;
}

Problem with me is that after asking permission for location , no delegate call backs . And even the app is also not get listed in location service for using location .

I have added the key in info.plist for locationServiceAlways.

P.S - This is the version i am using right now
// KontaktSDK
// Version: 1.3.2

Kindly revert .

@import directive does not work with Obj-c++

Hi,

@import directive in framework headers don't allow the usage of the framework to be behind an obj-c++ implementation.

It is very easy to fix either by not using the @import directive or by doing it with this example code:

#if __has_feature(modules)
@import CoreLocation;
#else
#import <CoreLocation/CoreLocation.h>
#endif

Additionally, I'm not sure if the #ifdef for testing iOS 10 CoreBluetooth types is working well with iOS 10.1. At least, I had to disable it in my system but I didn't have a go to actually fix it.

Thanks!

Br,
Moises

iOS Delegate Callbacks

Hi,

I'd like to ask whether or not the iOS SDK supports callbacks for when an Eddystone device is "lost".
In the Android SDK we get discovered, updated, and lost callbacks. Is this supported in iOS?

Lastly, for the updated callback, since this returns only a single Eddystone device, won't this method be called too many times especially if we poll a beacon every second?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.