JubeatPlus 3.9.11
Loading...
Searching...
No Matches
ApplilinkUtilities Class Reference

Applilink SDK string, device, and request-parameter utilities. More...

#include <ApplilinkUtilities.h>

Inheritance diagram for ApplilinkUtilities:
Collaboration diagram for ApplilinkUtilities:

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.

Detailed Description

Applilink SDK string, device, and request-parameter utilities.

Method Documentation

◆ appendParametersToURL:parameters:

+ (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.

Parameters
appendParametersToURLThe base URL string.
parametersThe parameters to append.
Returns
The URL string with the query appended.
Ghidra address:
0x236978

◆ countryCodeString

+ (NSString *) countryCodeString

The device's country code.

Returns
The current locale's country code, or "JP" when it is unavailable.
Ghidra address:
0x236e68

◆ debugLog

+ (void) debugLog

Emit a debug log message.

This is an empty stub in the shipped build; the call does nothing.

Ghidra address:
0x2372f0

◆ deviceName

+ (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.

Returns
The device model name, for example "iPhone9,1".
Ghidra address:
0x236768

◆ getFileNameFromPath:

+ (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.

Parameters
getFileNameFromPathThe path to trim.
Returns
The trailing file-name component of getFileNameFromPath.
Ghidra address:
0x237264

◆ getImpressionId

+ (NSString *) getImpressionId

Generate a random 64-character impression identifier.

Returns
A 64-character string of random alphanumeric characters.
Ghidra address:
0x237038

◆ hasParentViewController:

+ (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.

Parameters
hasParentViewControllerThe responder to test.
Returns
YES when the responder resolves to a view controller.
Ghidra address:
0x236f04

◆ joinDictionary:withDictionary:

+ (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.

Parameters
joinDictionaryThe first dictionary to merge.
withDictionaryThe second dictionary to merge, overriding duplicate keys.
Returns
A new dictionary containing the union of both.
Ghidra address:
0x235ea8

◆ localeString

+ (NSString *) localeString

The user's preferred language code.

Returns
The first preferred language, or "ja" when none is available.
Ghidra address:
0x236dd4

◆ narrowedListWithList:object:forKey:

+ (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.

Parameters
narrowedListWithListThe list to filter.
objectThe value the key must match.
forKeyThe key path to test on each element.
Returns
The subset of narrowedListWithList whose forKey matches object.
Ghidra address:
0x237118

◆ userAgentParameters

+ (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.

Returns
The user-agent parameter dictionary.
Ghidra address:
0x236010

◆ userAgentParametersJoinDictionary:

+ (nullable NSDictionary *) userAgentParametersJoinDictionary: (nullable NSDictionary *) userAgentParametersJoinDictionary

Merge the given dictionary with the standard user-agent parameters.

Parameters
userAgentParametersJoinDictionaryThe caller's parameters to merge in.
Returns
A new dictionary combining userAgentParametersJoinDictionary and the user-agent parameters, with the caller's entries taking precedence.
Ghidra address:
0x235f7c

The documentation for this class was generated from the following files: