|
LayarSDK Documentation
|
This is the main class for Layar SDK. You use this class to configure the SDK and to construct required AR view controllers. More...
#import <LayarSDK/LayarSDK.h>
Inherits <NSObject>.
Instance Methods | |
| (id) | - initWithConsumerKey:andConsumerSecret:andDelegate: |
| Initialize an instance of LayarSDK object and configure it. More... | |
| (id) | - initWithConsumerKey:andConsumerSecret:andDelegate:customLocationProvider: |
| Initialize an instance of LayarSDK object and configure it. More... | |
| (void) | - webViewControllerForURL:withCompletion: |
| Open an web view controller with http url loaded. More... | |
| (void) | - viewControllerForURL:withCompletion: |
| Open an AR view controller with layer/campaign loaded. More... | |
| (void) | - openURL:onExistingViewController:completion: |
| Load a layer/campaign on an existing view controller. More... | |
| (void) | - viewControllerForScanningWithCompletion: |
| Open an AR view controller for scanning. More... | |
Class Methods | |
| (NSString *) | + localizedStringForKey:andComment: |
| Returns a localized string from the LayarSDK Bundle. | |
| (LayarSDK *) | + layarSDKWithConsumerKey:andConsumerSecret:andDelegate: |
| Construct an instance of LayarSDK object and configure it. More... | |
| (LayarSDK *) | + layarSDKWithConsumerKey:andConsumerSecret:andDelegate:customLocationProvider: |
| Construct an instance of LayarSDK object and configure it. More... | |
Properties | |
| id< LayarSDKDelegate > | delegate |
| Reference to Layad SDK delegate. | |
| CLLocation * | fixedLocation |
| Fixed location to use for Geo layers. More... | |
| BOOL | popOutsEnabled |
| Use this property to control if 'pop out' functionality is enabled in AR view controllers. More... | |
This is the main class for Layar SDK. You use this class to configure the SDK and to construct required AR view controllers.
Ideally, there should only be one single instance of this class in your application.
| - (id) initWithConsumerKey: | (NSString *) | consumerKey | |
| andConsumerSecret: | (NSString *) | consumerSecret | |
| andDelegate: | (id< LayarSDKDelegate >) | delegate | |
Initialize an instance of LayarSDK object and configure it.
| consumerKey | NSString* Your OAuth consumer key used to sign all Layar API requests |
| consumerSecret | NSString* Your OAuth consumer secret used to sign all Layar API requests |
| delegate | id<LayarSDKDelegate> Reference to an object of a class that implements LayarSDKDelegate protocol. Can be nil. Will be weakly held. |
| - (id) initWithConsumerKey: | (NSString *) | consumerKey | |
| andConsumerSecret: | (NSString *) | consumerSecret | |
| andDelegate: | (id< LayarSDKDelegate >) | delegate | |
| customLocationProvider: | (id< LayarSDKLocationProvider >) | customLocationProvider | |
Initialize an instance of LayarSDK object and configure it.
| consumerKey | NSString* Your OAuth consumer key used to sign all Layar API requests |
| consumerSecret | NSString* Your OAuth consumer secret used to sign all Layar API requests |
| delegate | id<LayarSDKDelegate> Reference to an object of a class that implements LayarSDKDelegate protocol. Can be nil. Will be weakly held. |
| customLocationProvider | id<LayarSDKLocationProvider> Reference to an object of a class that implements LayarSDKDelegate protocol. Will be strongly held. |
| + (LayarSDK*) layarSDKWithConsumerKey: | (NSString *) | consumerKey | |
| andConsumerSecret: | (NSString *) | consumerSecret | |
| andDelegate: | (id< LayarSDKDelegate >) | delegate | |
Construct an instance of LayarSDK object and configure it.
| consumerKey | NSString* Your OAuth consumer key used to sign all Layar API requests |
| consumerSecret | NSString* Your OAuth consumer secret used to sign all Layar API requests |
| delegate | id<LayarSDKDelegate> Reference to an object of a class that implements LayarSDKDelegate protocol. Can be nil. Will be weakly held. |
| + (LayarSDK*) layarSDKWithConsumerKey: | (NSString *) | consumerKey | |
| andConsumerSecret: | (NSString *) | consumerSecret | |
| andDelegate: | (id< LayarSDKDelegate >) | delegate | |
| customLocationProvider: | (id< LayarSDKLocationProvider >) | customLocationProvider | |
Construct an instance of LayarSDK object and configure it.
| consumerKey | NSString* Your OAuth consumer key used to sign all Layar API requests |
| consumerSecret | NSString* Your OAuth consumer secret used to sign all Layar API requests |
| delegate | id<LayarSDKDelegate> Reference to a class that implements LayarSDKDelegate protocol. Can be nil. Will be weakly held. |
| customLocationProvider | id<LayarSDKLocationProvider> Reference to an object of a class that implements LayarSDKDelegate protocol. Can be nil. Will be strongly held. |
| - (void) openURL: | (NSURL *) | url | |
| onExistingViewController: | (UIViewController< LayarSDKViewController > *) | viewController | |
| completion: | (void(^)(BOOL completed, NSError *error)) | completion | |
Load a layer/campaign on an existing view controller.
| url | A URL pointing to layer or campaign. Should have 'layar://' scheme and contain layer name and optionally additional parameters. Example: layar://layername See Layar client API docs for a detailed description. |
| completion | Completion block that will be executed when the view controller has loaded the new URL |
| - (void) viewControllerForScanningWithCompletion: | (LayarSDKViewControllerForScanningCompletion) | completion |
Open an AR view controller for scanning.
| completion | Completion block that will be executed when the view controller is ready to be displayed. You get a reference to the view controller as a parameter to the completion block. |
| - (void) viewControllerForURL: | (NSURL *) | url | |
| withCompletion: | (LayarSDKURLCompletion) | completion | |
Open an AR view controller with layer/campaign loaded.
| url | A URL pointing to layer or campaign. Should have 'layar://' scheme and contain layer name and optionally additional parameters. Example: layar://layername See Layar client API docs for a detailed description. |
| completion | Completion block that will be executed when the view controller is ready to be displayed. You get a reference to the view controller as a parameter to the completion block. |
| - (void) webViewControllerForURL: | (NSURL *) | url | |
| withCompletion: | (LayarSDKWebURLCompletion) | completion | |
Open an web view controller with http url loaded.
| url | A URL pointing to the web page. Can have http or https schemes. Example: http://www.google.com |
| completion | Completion block that will be executed when the view controller is ready to be displayed. You get a reference to the view controller as a parameter to the completion block. |
|
readwritenonatomicstrong |
Fixed location to use for Geo layers.
Using this property you can test your Geo layers for any arbitrary Geo location. Setting it to an instance of CLLocation object will override GPS location used for Geo layers. Set to nil to disable the override.
|
readwritenonatomicassign |
Use this property to control if 'pop out' functionality is enabled in AR view controllers.
Defaults to YES. Setting this property does not affect AR view controllers that are already created.
1.8.9.1