Platforms to show: All Mac Windows Linux Cross-Platform
DCDeviceMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | System | MBS iOS Plugin | 23.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Use the shared instance of the DCDevice class to generate a token that identifies a device. Call the generateToken method to get the token, and then send it to your server.
On your server, combine the token with an authentication key that you obtain from Apple, and use the result to request access to two per-device binary digits (bits). After authenticating the device, Apple passes the current values of the bits, along with the date they were last modified, to your server. Your server applies its business logic to this information and communicates the results to your app. For more information about server-side procedures, see Accessing and Modifying Per-Device Data.
To use the DCDevice class, your app must have an app ID that you register on the Apple Developer website.
Apple records the bits for you, and reports the bits back to you, but you’re responsible for keeping track of what the bits mean. You’re also responsible for determining when to reset the bits for a given device; for example, when a user sells the device to someone else.
- 2 properties
- 2 methods
- method Constructor
- method generateToken(CompleteHandler as GenerateTokenCompletedMBS, tag as variant = nil)
- 2 shared methods
- shared method available as boolean
- shared method currentDevice as DCDeviceMBS
- delegate GenerateTokenCompletedMBS(token as MemoryBlock, Error as NSErrorMBS, Tag as Variant)
- 5 constants
Errors
Constant | Value | Description |
---|---|---|
ErrorFeatureUnsupported | 1 |
The feature is not supported on this device. |
ErrorInvalidInput | 2 |
Input to the server process was invalid. |
ErrorInvalidKey | 3 |
The key used is invalid. |
ErrorServerUnavailable | 4 |
The server application to talk to is not available. |
ErrorUnknownSystemFailure | 0 |
Unknown error in system. |
This class has no sub classes.
Some examples using this class:
Blog Entries
- News from the MBS Xojo Plugins in Version 23.0
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.0
- MBS Xojo Plugins, version 22.6pr1
Xojo Developer Magazine
Release notes
- Version 23.0
- Added DCDeviceMBS class.
The items on this page are in the following plugins: MBS iOS Plugin.