GDRegistration Class Reference

The GDRegistration helps with application registration. More...

#import <GDRegistration.h>

List of all members.

Public Member Functions

(void) - sendLicenseHome
 Sends a GET request to a URL.
(void) - saveRegistrationIntoUserDefaults:licenseStorageKey:name:license:
 Saves registration into user defaults.
(void) - saveRegistrationLicense:forName:
 Saves registration information into user defaults using default storage keys.
(NSString *) - getLicense
 The license code.
(NSString *) - getName
 The registrant name.
(Boolean) - isValidForName:andLicense:
 Whether or not a registration is valid.
(Boolean) - isValid
 Checks that the registered license is valid.
(Boolean) - hasSavedRegistration
 Whether or not a saved registration exists in user defaults.
(Boolean) - isLicenseBlacklisted:
 Check whether or not a license is blacklisted.
(Boolean) - isRegisteredLicenseBlacklisted
 Whether or not the license that is saved in user defaults is blacklisted.
(void) - addLicenseToBlacklist:
 Add a license that's considered blacklisted.

Protected Attributes

NSUserDefaultsdefaults
 User defaults instance.
NSMutableArray * blacklist
 Blacklisted licenses.

Properties

NSStringhomeURL
 A url that the license get's "sent home" to.

Detailed Description

The GDRegistration helps with application registration.


Member Function Documentation

- (void) addLicenseToBlacklist: (NSString *)  license  

Add a license that's considered blacklisted.

Parameters:
license The license to blacklist.
- (NSString *) getLicense  

The license code.

The license has to have been saved with the default license storage key.

- (NSString *) getName  

The registrant name.

The name has to have been saved with the default name storage key.

- (Boolean) isLicenseBlacklisted: (NSString *)  license  

Check whether or not a license is blacklisted.

Parameters:
license The license to check.
- (Boolean) isValid  

Checks that the registered license is valid.

A license has to already have been saved in user defaults.

- (Boolean) isValidForName: (NSString *)  name
andLicense: (NSString *)  license 

Whether or not a registration is valid.

Parameters:
name The registrant name.
license The license.
- (void) saveRegistrationIntoUserDefaults: (NSString *)  nameStorageKey
licenseStorageKey: (NSString *)  licenseStorageKey
name: (NSString *)  name
license: (NSString *)  license 

Saves registration into user defaults.

Parameters:
nameStorageKey The registrant name storage key.
licenseStorageKey The license storage key.
name The registrant name.
license The license.
- (void) saveRegistrationLicense: (NSString *)  license
forName: (NSString *)  name 

Saves registration information into user defaults using default storage keys.

Parameters:
license The license key.
name The registrant name.
- (void) sendLicenseHome  

Sends a GET request to a URL.

You need a key in your Info.plist file called "GDLicenseHomeURL" - the license is appended onto that url.


Property Documentation

- (NSString *) homeURL [read, write, copy]

A url that the license get's "sent home" to.

The license is appended onto this url.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Enumerations Enumerator Properties Defines