JubeatPlus 3.9.11
Loading...
Searching...
No Matches
JubeatAppDelegate.h
Go to the documentation of this file.
1
18
19#import <UIKit/UIKit.h>
20
22
23NS_ASSUME_NONNULL_BEGIN
24
38typedef NS_ENUM(unsigned int, JubeatTheme) {
45};
46
76
80@interface JubeatAppDelegate : UIResponder <UIApplicationDelegate>
81
82#pragma mark - Identification
83
91@property(class, nonatomic, readonly, nullable) JubeatAppDelegate *appDelegate;
99@property(class, nonatomic, readonly) NSString *deviceName;
109@property(class, nonatomic, readonly) NSString *primDeviceName;
118@property(class, nonatomic, readonly) NSString *appVersion;
139@property(class, nonatomic, readonly) NSDictionary *clientInfo;
140
141#pragma mark - Standard directories
142
151@property(class, nonatomic, readonly) NSString *appLibraryDirectory;
156@property(class, nonatomic, readonly) NSString *appDocumentsDirectory;
161@property(class, nonatomic, readonly) NSString *appCachesDirectory;
162
163#pragma mark - Root view controller
164
174@property(nonatomic, readonly) RootViewController *rootViewCtrl;
175
176#pragma mark - Client identification
177
185@property(nonatomic, readonly) NSString *userAgent;
198- (void)refreshUserAgent;
206@property(nonatomic, readonly) JubeatDeviceType deviceType;
215@property(nonatomic, readonly, nullable) NSString *deviceToken;
216
217#pragma mark - Device idiom predicates
218
226@property(nonatomic, readonly) BOOL isPad;
233@property(nonatomic, readonly) BOOL isPhoneRetina;
240@property(nonatomic, readonly) BOOL is4inchAspect;
247@property(nonatomic, readonly) BOOL isPadRetina;
248
249#pragma mark - Game Center
250
258@property(nonatomic, readonly) BOOL gameCenterAvailable;
266@property(nonatomic, readonly, nullable) NSString *gameCenterName;
267
274- (void)disableGameCenter;
283- (void)loginGameCenter;
284
285#pragma mark - Presentation
286
296@property(nonatomic, readonly) JubeatTheme currentTheme;
301@property(nonatomic, readonly) id markerList;
302
303#pragma mark - Download and store selection
304
311@property(nonatomic, readonly, nullable) id jcfDownloadID;
316@property(nonatomic, readonly, nullable) id storeGenreID;
321@property(nonatomic, readonly, nullable) id storePackID;
326@property(nonatomic, readonly, nullable) id storeCampaignID;
332@property(nonatomic, strong, nullable) NSString *campaignImageName;
338@property(nonatomic, strong, nullable) NSString *campaignImagePath;
344@property(nonatomic, strong) id storeMissionText;
349@property(nonatomic, readonly) id searchString;
356@property(nonatomic, readonly) int totalPurchaseAmount;
357
358#pragma mark - Gameplay option flags
359
364@property(nonatomic, readonly) BOOL isRandom;
369@property(nonatomic, readonly) BOOL isExtend;
374@property(nonatomic, readonly) BOOL isHold;
381@property(nonatomic, readonly) BOOL isMarkerLegal;
387@property(nonatomic) BOOL isRectangleWave;
393@property(nonatomic) BOOL isMarkerDirRandom;
399@property(nonatomic) BOOL bEnableAutoPlay;
404@property(nonatomic, readonly) BOOL bEnableReward;
405
406#pragma mark - Collaboration modes
407
413@property(nonatomic) BOOL isNagaCoraMode;
419@property(nonatomic) BOOL isHinabitaMode;
420
421#pragma mark - Challenge state
422
427@property(nonatomic, readonly) BOOL bChallengeOpen;
432@property(nonatomic, readonly) BOOL bChallengeMode;
438@property(nonatomic, readonly) unsigned int challengeMusicID;
443@property(nonatomic, readonly) int challengeDifficulty;
444
445#pragma mark - Notifications
446
455@property(nonatomic, readonly, nullable) NSURL *notificationURL;
464@property(nonatomic, readonly, nullable) id notificationTime;
472@property(nonatomic, readonly) NSMutableArray *pushNotificationList;
482@property(nonatomic, readonly, nullable) NSDictionary *remotePushInfo;
488@property(nonatomic) BOOL bSendPushID;
489
490#pragma mark - Recommendations
491
497@property(nonatomic) int hasNewRecommendNum;
498
506@property(nonatomic, readonly) NSString *totalScoreLeaderboardCategory;
507
508#pragma mark - Presentation mutators
509
518- (void)changeTheme:(JubeatTheme)theme;
524- (void)setKnitColor:(NSArray *)knitColor;
534- (void)switchTitleEvent;
544
560- (NSString *)musicListKey;
561
562#pragma mark - Validation
563
579- (BOOL)digitStringCheck:(nullable NSString *)string;
586- (void)rewardEnable;
587
588#pragma mark - Licence
589
599- (NSString *)getCurrentLicenseDate;
609- (nullable NSString *)getCurrentLicenseMessage;
610
611#pragma mark - Challenge mutators
612
628- (void)setChallengeMode:(BOOL)challengeMode;
638- (void)setChallengeMusic:(unsigned int)musicID diff:(int)difficulty;
644- (void)setTotalAmount:(int)amount;
645
646#pragma mark - Notification persistence
647
656- (NSString *)getNotificationFilePath;
663- (void)loadNotification;
671- (void)saveNotification;
683- (BOOL)pushActiveCheck:(NSInteger)fireTime;
696- (nullable NSDictionary *)popNotification;
697
698#pragma mark - Launch
699
719- (BOOL)application:(UIApplication *)application
720 didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions;
721
722#pragma mark - URL scheme
723
737- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url;
738
739#pragma mark - Push payload
740
753- (nullable NSMutableDictionary *)apsDictionary:(NSDictionary *)userInfo;
754
755#pragma mark - Notification registration
756
766- (void)application:(UIApplication *)application
767 didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;
778- (void)application:(UIApplication *)application
779 didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken;
789- (void)application:(UIApplication *)application
790 didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
791
792#pragma mark - Notification delivery
793
812- (void)application:(UIApplication *)application
813 didReceiveLocalNotification:(UILocalNotification *)notification;
834- (void)application:(UIApplication *)application
835 didReceiveRemoteNotification:(NSDictionary *)userInfo;
836
837#pragma mark - Application lifecycle
838
847- (void)applicationDidEnterBackground:(UIApplication *)application;
856- (void)applicationWillResignActive:(UIApplication *)application;
865- (void)applicationDidBecomeActive:(UIApplication *)application;
871- (void)applicationWillTerminate:(UIApplication *)application;
880- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application;
881
882#pragma mark - Download selection mutators
883
885- (void)resetDownLoadIndex;
893- (void)setDownloadGenreID:(nullable id)genreID;
895- (void)resetDownloadPackID;
901- (void)setDownloadPackID:(nullable id)packID;
903- (void)resetCampaignID;
909- (void)setCampaignID:(nullable id)campaignID;
910
911#pragma mark - Notification page mutators
912
921- (void)setNotificationPageURL:(nullable NSString *)pageURL updateTime:(nullable id)updateTime;
922
923#pragma mark - Option flag mutators
924
930- (void)setRandomFlag:(BOOL)flag;
936- (void)setExtendFlag:(BOOL)flag;
942- (void)setHoldFlag:(BOOL)flag;
948- (void)setSearchString:(nullable id)searchString;
951
952@end
953
954NS_ASSUME_NONNULL_END
955
956// code: language=Objective-C
957// kate: hl Objective-C;
958// vim: set ft=objc :
JubeatTheme
The three skins the game ships.
Definition JubeatAppDelegate.h:38
@ JubeatThemeKnit
The knit livery, built by a dedicated factory rather than allocated inline.
Definition JubeatAppDelegate.h:44
@ JubeatThemeRipples
The ripples livery.
Definition JubeatAppDelegate.h:42
@ JubeatThemeOriginal
The game's own livery.
Definition JubeatAppDelegate.h:40
JubeatDeviceType
The device classes this build distinguishes.
Definition JubeatAppDelegate.h:58
@ JubeatDeviceTypePhoneRetina
Retina phone, 480-point screen: scale 2, height neither 667 nor 568.
Definition JubeatAppDelegate.h:62
@ JubeatDeviceTypePhone
Non-retina phone: idiom Phone, scale neither 2 nor 3.
Definition JubeatAppDelegate.h:60
@ JubeatDeviceTypePhoneRetina4Inch
Four-inch retina phone: scale 2, height 568.
Definition JubeatAppDelegate.h:64
@ JubeatDeviceTypePadRetina
Retina pad: idiom not Phone, scale 2.
Definition JubeatAppDelegate.h:74
@ JubeatDeviceTypePhoneRetinaHD
Scale-3 phone at its native height.
Definition JubeatAppDelegate.h:70
@ JubeatDeviceTypePad
Non-retina pad: idiom not Phone, scale not 2.
Definition JubeatAppDelegate.h:72
@ JubeatDeviceTypePhoneRetina47Inch
4.7-inch retina phone: scale 2, height 667.
Definition JubeatAppDelegate.h:66
@ JubeatDeviceTypePhoneRetinaHD47Inch
Scale-3 phone showing a 667-point screen, which is display zoom on a 5.5-inch device.
Definition JubeatAppDelegate.h:68
The application delegate for jubeat plus.
Definition JubeatAppDelegate.h:80
NSString * appCachesDirectory
The user Caches directory.
Definition JubeatAppDelegate.m:286
BOOL bSendPushID
Whether the device token still needs to be sent to the servers.
Definition JubeatAppDelegate.h:488
id notificationTime
The update timestamp that accompanies notificationURL.
Definition JubeatAppDelegate.h:464
NSString * appDocumentsDirectory
The user Documents directory.
Definition JubeatAppDelegate.m:280
BOOL isMarkerLegal
Whether the installed marker set is licensed for play.
Definition JubeatAppDelegate.h:381
NSMutableArray * pushNotificationList
The queued push notifications, persisted to disk between launches.
Definition JubeatAppDelegate.h:472
BOOL isPad
Whether this is an iPad.
Definition JubeatAppDelegate.m:1108
unsigned int challengeMusicID
The music identifier for the current challenge.
Definition JubeatAppDelegate.h:438
JubeatAppDelegate * appDelegate
The shared application's delegate.
Definition JubeatAppDelegate.m:232
void markerDownloadComplete()
Latches isMarkerLegal to YES.
Definition JubeatAppDelegate.m:1207
void resetDownLoadIndex()
Clears jcfDownloadID.
Definition JubeatAppDelegate.m:1136
void moveChallengeOpenFlag()
Promotes a pending challenge into challenge mode.
Definition JubeatAppDelegate.m:539
NSString * appVersion
The application version.
Definition JubeatAppDelegate.m:238
id storePackID
The pack selected in the store.
Definition JubeatAppDelegate.h:321
id jcfDownloadID
The identifier of the jcf content download currently in progress.
Definition JubeatAppDelegate.h:311
void dropChallengeOpenFlag()
Clears bChallengeOpen.
Definition JubeatAppDelegate.m:534
NSDictionary * clientInfo
The client identification dictionary sent to the servers.
Definition JubeatAppDelegate.m:244
NSString * totalScoreLeaderboardCategory
The Game Center leaderboard identifier for the total-score board.
Definition JubeatAppDelegate.m:364
NSString * primDeviceName
The device model identifier, by a second copy of the same routine.
Definition JubeatAppDelegate.m:305
void disableGameCenter()
Marks Game Center unusable for the rest of the session.
Definition JubeatAppDelegate.m:335
BOOL isHold
Whether the hold option is enabled.
Definition JubeatAppDelegate.h:374
BOOL isRandom
Whether the random-note option is enabled.
Definition JubeatAppDelegate.h:364
NSString * appLibraryDirectory
The user Library directory.
Definition JubeatAppDelegate.m:274
BOOL isRectangleWave
Whether the rectangle-wave sound option is enabled.
Definition JubeatAppDelegate.h:387
RootViewController * rootViewCtrl
The root view controller of the application.
Definition JubeatAppDelegate.h:174
NSString * getCurrentLicenseDate()
The build's licence date.
Definition JubeatAppDelegate.m:514
NSString * deviceName
The device model identifier, for example "iPhone9,3".
Definition JubeatAppDelegate.m:291
id storeMissionText
The mission text shown on the store screen.
Definition JubeatAppDelegate.h:344
JubeatTheme currentTheme
The currently-selected interface theme.
Definition JubeatAppDelegate.h:296
void rewardEnable()
Latches bEnableReward on.
Definition JubeatAppDelegate.m:404
NSDictionary * remotePushInfo
The payload of the remote push that launched the application.
Definition JubeatAppDelegate.h:482
BOOL isPhoneRetina
Whether this is a retina iPhone.
Definition JubeatAppDelegate.m:1114
BOOL isHinabitaMode
Whether the hinabita collaboration mode is active.
Definition JubeatAppDelegate.h:419
NSString * campaignImagePath
The on-disk path of the current campaign's banner image.
Definition JubeatAppDelegate.h:338
id storeGenreID
The genre selected in the store.
Definition JubeatAppDelegate.h:316
void resetDownloadPackID()
Clears storePackID.
Definition JubeatAppDelegate.m:1151
NSString * deviceToken
The APNs device token, retained as received.
Definition JubeatAppDelegate.h:215
NSString * musicListKey()
The per-install identifier, persisted in the keychain.
Definition JubeatAppDelegate.m:412
nullable NSString * getCurrentLicenseMessage()
The localized use-policy message, or nil when the bundle has no translation for it.
Definition JubeatAppDelegate.m:519
JubeatDeviceType deviceType
The device idiom and screen class this build has classified the device as.
Definition JubeatAppDelegate.h:206
BOOL isExtend
Whether the extend option is enabled.
Definition JubeatAppDelegate.h:369
id searchString
The music-list search term currently in effect.
Definition JubeatAppDelegate.h:349
BOOL is4inchAspect
Whether the screen has the taller four-inch aspect ratio.
Definition JubeatAppDelegate.m:1120
int totalPurchaseAmount
The running total of in-app purchases.
Definition JubeatAppDelegate.h:356
BOOL gameCenterAvailable
Whether Game Center is usable in this session.
Definition JubeatAppDelegate.h:258
BOOL bChallengeOpen
Whether the challenge is open.
Definition JubeatAppDelegate.h:427
NSURL * notificationURL
The URL of the in-game notification page.
Definition JubeatAppDelegate.h:455
void enableCopiousMarkers()
Unlocks the copious marker set and reloads the markers.
Definition JubeatAppDelegate.m:396
void resetDownloadGenreID()
Clears storeGenreID.
Definition JubeatAppDelegate.m:1141
void loginGameCenter()
Starts Game Center authentication, if it is available and not already done.
Definition JubeatAppDelegate.m:340
id markerList
The installed marker set, as loaded from disk.
Definition JubeatAppDelegate.h:301
BOOL bChallengeMode
Whether challenge mode is engaged.
Definition JubeatAppDelegate.h:432
void switchTitleEvent()
Switches the title screen to the current event's presentation.
Definition JubeatAppDelegate.m:386
NSString * getNotificationFilePath()
The on-disk path of the persisted notification queue, creating its directory if needed.
Definition JubeatAppDelegate.m:568
BOOL isNagaCoraMode
Whether the naga/cora collaboration mode is active.
Definition JubeatAppDelegate.h:413
NSString * userAgent
The User-Agent string sent with the game's web requests.
Definition JubeatAppDelegate.h:185
void saveNotification()
Writes pushNotificationList to disk, or deletes the file when the queue is empty.
Definition JubeatAppDelegate.m:595
nullable NSDictionary * popNotification()
Removes queued notifications from the front until one has not expired, and returns it.
Definition JubeatAppDelegate.m:617
void refreshUserAgent()
Rebuilds userAgent, and mirrors the app version into the user defaults on the way.
Definition JubeatAppDelegate.m:641
int challengeDifficulty
The difficulty for the current challenge.
Definition JubeatAppDelegate.h:443
NSString * campaignImageName
The banner image file name for the current campaign.
Definition JubeatAppDelegate.h:332
BOOL bEnableReward
Whether the reward feature is enabled for this session.
Definition JubeatAppDelegate.h:404
int hasNewRecommendNum
The number of unseen recommendation entries.
Definition JubeatAppDelegate.h:497
NSString * gameCenterName
The local player's Game Center alias, or nil when it cannot be had.
Definition JubeatAppDelegate.m:323
void resetCampaignID()
Clears storeCampaignID.
Definition JubeatAppDelegate.m:1161
id storeCampaignID
The campaign selected in the store.
Definition JubeatAppDelegate.h:326
BOOL bEnableAutoPlay
Whether automatic play is enabled.
Definition JubeatAppDelegate.h:399
BOOL isMarkerDirRandom
Whether marker direction is randomised.
Definition JubeatAppDelegate.h:393
BOOL isPadRetina
Whether this is a retina iPad.
Definition JubeatAppDelegate.m:1129
void loadNotification()
Reads the persisted notification queue back into pushNotificationList.
Definition JubeatAppDelegate.m:585
Hosts the game's screens and owns the music-select controller it presents.
Definition RootViewController.h:24