|
JubeatPlus 3.9.11
|
Applilink SDK string, device, and request-parameter utilities. More...
#include <ApplilinkUtilities.h>


Class Methods | |
| (nullable NSDictionary *) | + joinDictionary:withDictionary: |
| Merge two dictionaries into a new mutable dictionary. | |
| (nullable NSDictionary *) | + userAgentParametersJoinDictionary: |
| Merge the given dictionary with the standard user-agent parameters. | |
| (nullable NSDictionary *) | + userAgentParameters |
| Build the standard applilink user-agent parameter dictionary. | |
| (nullable NSString *) | + deviceName |
| The hardware model name of the current device. | |
| (nullable NSString *) | + appendParametersToURL:parameters: |
| Append a parameter dictionary to a URL as a query string. | |
| (nullable NSString *) | + localeString |
| The user's preferred language code. | |
| (nullable NSString *) | + countryCodeString |
| The device's country code. | |
| (BOOL) | + hasParentViewController: |
| Whether a responder is attached to a presentable view hierarchy. | |
| (nullable NSString *) | + getImpressionId |
| Generate a random 64-character impression identifier. | |
| (nullable NSArray *) | + narrowedListWithList:object:forKey: |
| Filter a list to the objects whose key matches a value. | |
| (nullable NSString *) | + getFileNameFromPath: |
| The file-name portion of a path. | |
| (void) | + debugLog |
| Emit a debug log message. | |
Applilink SDK string, device, and request-parameter utilities.
| + (nullable NSString *) appendParametersToURL: | (nullable NSString *) | appendParametersToURL | |
| parameters: | (nullable NSDictionary *) | parameters |
Append a parameter dictionary to a URL as a query string.
Each value is percent-joined into a key=value pair; an array value expands into repeated key[]=value pairs. The pairs are joined with & and appended after a ? or &, depending on whether the URL already contains a query.
| appendParametersToURL | The base URL string. |
| parameters | The parameters to append. |
| + (NSString *) countryCodeString |
The device's country code.
"JP" when it is unavailable. | + (void) debugLog |
Emit a debug log message.
This is an empty stub in the shipped build; the call does nothing.
| + (NSString *) deviceName |
The hardware model name of the current device.
The name is read once from the hw.machine sysctl and cached for the lifetime of the process.
"iPhone9,1". | + (nullable NSString *) getFileNameFromPath: | (nullable NSString *) | getFileNameFromPath |
The file-name portion of a path.
The path is scanned backwards for the last "/" separator; the substring from that separator is returned, or the whole path when there is no separator.
| getFileNameFromPath | The path to trim. |
getFileNameFromPath. | + (NSString *) getImpressionId |
Generate a random 64-character impression identifier.
| + (BOOL) hasParentViewController: | (nullable UIResponder *) | hasParentViewController |
Whether a responder is attached to a presentable view hierarchy.
A window or application returns NO; a view walks the responder chain, and only a view controller is treated as an attached parent.
| hasParentViewController | The responder to test. |
YES when the responder resolves to a view controller. | + (nullable NSDictionary *) joinDictionary: | (nullable NSDictionary *) | joinDictionary | |
| withDictionary: | (nullable NSDictionary *) | withDictionary |
Merge two dictionaries into a new mutable dictionary.
Entries from joinDictionary are added first, then entries from withDictionary, so the latter wins on any duplicate key.
| joinDictionary | The first dictionary to merge. |
| withDictionary | The second dictionary to merge, overriding duplicate keys. |
| + (NSString *) localeString |
The user's preferred language code.
"ja" when none is available. | + (nullable NSArray *) narrowedListWithList: | (nullable NSArray *) | narrowedListWithList | |
| object: | (nullable NSString *) | object | |
| forKey: | (nullable NSString *) | forKey |
Filter a list to the objects whose key matches a value.
The list is filtered with a "%K MATCHES %@" predicate, treating forKey as the key path and object as the pattern.
| narrowedListWithList | The list to filter. |
| object | The value the key must match. |
| forKey | The key path to test on each element. |
narrowedListWithList whose forKey matches object. | + (NSDictionary *) userAgentParameters |
Build the standard applilink user-agent parameter dictionary.
The dictionary carries the application identifier, the URL-encoded device name, operating-system name and version, SDK identifier, application version, preferred language, country code, and the OpenGL and hardware details taken from +[ApplilinkCore getDeviceInfo] (GPU vendor, renderer, and version, physical memory, window width and height, display scale, and CPU-core count). Each entry is omitted when its value is nil.
| + (nullable NSDictionary *) userAgentParametersJoinDictionary: | (nullable NSDictionary *) | userAgentParametersJoinDictionary |
Merge the given dictionary with the standard user-agent parameters.
| userAgentParametersJoinDictionary | The caller's parameters to merge in. |
userAgentParametersJoinDictionary and the user-agent parameters, with the caller's entries taking precedence.