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

The store's root tab container and shared purchase, download, and agreement coordinator. More...

#include <StoreViewController.h>

Inheritance diagram for StoreViewController:
Collaboration diagram for StoreViewController:

Instance Methods

(instancetype) - init
 Builds the four child controllers, wraps each in a navigation controller, and installs them as the tab bar's view controllers.
(void) - firstStoreItemLoad
 Reads the startup parameters and opens the deep-linked genre or pack (and, when present, a campaign) in the appropriate child tab.
(void) - loadInitialStoreInfo
 Re-enables interaction and either provisions a missing editor id or builds the licence-agreement gate over the store.
(void) - loadView
 Builds the tab container's view, the dimming cover, and the modal dialog sized for the device idiom.
(void) - storeEnd:
 Closes the pack browser and asks the root controller to end the store.
(void) - showModalDialog:
 Fades the dimming cover and modal dialog in, starting the spinner and enabling the abort button on completion.
(void) - hideModalDialog
 Fades the dimming cover and modal dialog out, stopping the spinner and unmounting the dialog on completion.
(void) - startDownloadMusics:
 Registers a purchased pack's tunes with the music-list manager and downloads any tune files not already present, driving the modal dialog's progress.
(void) - startDownloadExtendMusics:
 Registers a pack's extend tunes and downloads any extend files not already present, driving the modal dialog's progress.
(void) - performRestore:
 Raises the "restore purchases?" confirmation alert.
(void) - detailViewStartRedownload:
 Child redownload callback: records the pack and raises the "already purchased, download?" confirmation alert.
(BOOL) - checkAttainLimitPurchase:
 Whether buying a product would exceed the player's purchase limit, raising the appropriate age-registration or limit-reached alert when it does.
(void) - detailViewStartPurchase:
 Child purchase callback: records the pack and, unless it is unpurchasable or over the limit, shows the modal dialog and begins the purchase.
(void) - detailViewStartExtendDownload:
 Child extend-download callback: shows the modal dialog and downloads the pack's extend files.
(void) - purchaseSucceeded:
 A purchase completed: starts the pack's download and refreshes the purchased and campaign-unlock lists.
(void) - purchaseFailed:error:
 A purchase failed: hides the modal dialog and shows the failure or cancellation message.
(void) - restoreSucceeded
 A restore completed: clears the purchase delegate, hides the dialog, and shows the restore-complete alert.
(void) - restoreFailed:
 A restore failed: clears the purchase delegate, hides the dialog, and shows the message.
(void) - restoreNothing
 A restore found nothing to restore: hides the dialog and tells the player.
(void) - firstRestore
 Shows the modal dialog and begins a purchase restore.
(void) - alertSelect:
 An alert button was tapped: acts on the alert identified by the info dictionary's tag.
(void) - storeDialogCancel:
 The modal dialog's abort button was pressed: cancels the download and updates the pack's purchase state.
(void) - downloadManagerStartTask:
 A download task started: shows the downloading tune's name in the modal dialog.
(void) - downloadManagerCompleted:
 The download queue completed: drops the manager and hides the modal dialog.
(void) - downloadManagerFailed:
 The download queue failed: drops the manager and updates the pack's purchase state.
(void) - downloadManagerProceed:
 A download task made progress: drives the modal dialog's progress bar.
(void) - openDetail:
 Closes any open alert, opens the pack browser's detail for a pack, and switches to the store tab.
(void) - openCampaignDetail:
 Closes any open alert, opens the campaign page's detail for a campaign, and switches to the campaign tab.
(void) - storeClose
 Closes every child's store view and any open alert.
(void) - becomeCoverView
 Fades the licence-agreement cover in.
(void) - resignCoverView
 Fades the licence-agreement cover out.
(void) - dispErrorLabel:
 Adds a centred error label to the licence-agreement cover and fades the cover in.
(void) - agreementSuccess:
 Licence-agreement success: registers the player's total purchase or age limit through a signed session request.
(void) - agreementFailed:
 Licence-agreement fade-out failure: fades the agreement view out and ends the store.
(void) - becomePolicyAgreement:
 Licence-agreement gate raised: fades the cover in.
(void) - agreementError:msgStr:
 Licence-agreement error: adds a centred error label to the cover and fades it in.
(void) - downloaderFinished:
 A request finished: dispatches on the downloader's tag to handle its JSON response.
(void) - downloaderError:
 A request failed: alerts the player when it was the mission-achievement check.
(void) - successIDDownload:
 The editor identity downloaded: drops the manager and builds the store's child screens.
(void) - errorIDDownload:msgStr:
 The editor-identity download failed: shows the message to the player.
(void) - createStoreMissionDownloader
 Builds the mission-achievement-check session downloader for the challenge missions that are unlocked-by-purchase and not yet cleared, when challenge mode is on.
(void) - didReceiveMemoryWarning
 Handles a low-memory warning.
(void) - viewWillAppear:
 The view is about to appear.
(void) - viewDidAppear:
 The view has appeared.
(void) - viewWillDisappear:
 The view is about to disappear.
(void) - viewDidDisappear:
 The view has disappeared.
(BOOL) - shouldAutorotateToInterfaceOrientation:
 Whether the screen may rotate to an orientation.
(UIInterfaceOrientationMask) - supportedInterfaceOrientations
 The orientations the screen supports.
(BOOL) - shouldAutorotate
 Whether the screen rotates.
Instance Methods inherited from <PurchaseManagerDelegate>
(void) - purchaseFailed:error:
 A purchase failed.
(void) - purchaseSucceeded:
 A purchase was verified.
Instance Methods inherited from <AlertViewManagerDelegate>
(void) - alertClose:
 Sent when a UIAlertController -based alert finishes dismissing.
Instance Methods inherited from <StoreDialogViewDelegate>
(void) - storeDialogCancel:
 Sent when the abort button is pressed.
Instance Methods inherited from <DownloaderDelegate>
(void) - downloaderProceed:
 Sent periodically as data arrives, and once more on completion.
(void) - downloaderFinished:
 Sent when the request completes.
(void) - downloaderError:
 Sent when the request fails.
Instance Methods inherited from <StoreParentViewController>
(void) - showModalDialog:
 Shows the modal download dialog over the given sender.
Instance Methods inherited from <StoreDetailViewControllerDelegate>
(void) - detailViewStartPurchase:
 Sent when the purchase button is tapped for a pack that is not yet owned.
(void) - detailViewStartRedownload:
 Sent when the purchase button is tapped for an owned pack that must be redownloaded.

Properties

NSDictionary * startupParameters
 The deep-link parameters used to pre-open a genre, pack, or campaign.
StoreDialogView * modalDialog
 The shared modal progress panel behind the dimming cover.
Properties inherited from <StoreParentViewController>
StoreDialogView * modalDialog
 The shared modal progress/download dialog panel, or nil before it is built.

Detailed Description

The store's root tab container and shared purchase, download, and agreement coordinator.

Method Documentation

◆ agreementError:msgStr:

- (void) agreementError: (nullable id) sender
msgStr: (nullable NSString *) msg 

Licence-agreement error: adds a centred error label to the cover and fades it in.

Parameters
senderThe agreement view; unused.
msgThe error message; a localised network-error message is substituted when nil .
Ghidra address:
0x8ff68

◆ agreementFailed:

- (void) agreementFailed: (nullable id) sender

Licence-agreement fade-out failure: fades the agreement view out and ends the store.

Parameters
senderThe agreement view.
Ghidra address:
0x8fda4

◆ agreementSuccess:

- (void) agreementSuccess: (nullable id) sender

Licence-agreement success: registers the player's total purchase or age limit through a signed session request.

Parameters
senderThe agreement view; unused.
Ghidra address:
0x8ee9c

◆ alertSelect:

- (void) alertSelect: (nonnull NSDictionary *) info

An alert button was tapped: acts on the alert identified by the info dictionary's tag.

Parameters
infoThe alert's result, carrying the tapped button and the alert's tag.
Ghidra address:
0x8d850

Reimplemented from <AlertViewManagerDelegate>.

◆ becomeCoverView

- (void) becomeCoverView

Fades the licence-agreement cover in.

Ghidra address:
0x8e9bc
Ghidra address:
0x8eab8
Ghidra address:
0x8eb04

◆ becomePolicyAgreement:

- (void) becomePolicyAgreement: (nullable id) sender

Licence-agreement gate raised: fades the cover in.

Parameters
senderThe agreement view; unused.
Ghidra address:
0x8ff5c

◆ checkAttainLimitPurchase:

- (BOOL) checkAttainLimitPurchase: (nullable SKProduct *) product

Whether buying a product would exceed the player's purchase limit, raising the appropriate age-registration or limit-reached alert when it does.

Parameters
productThe StoreKit product about to be purchased.
Returns
YES when the limit alert was raised, NO when the purchase may proceed.
Ghidra address:
0x8c218

◆ createStoreMissionDownloader

- (void) createStoreMissionDownloader

Builds the mission-achievement-check session downloader for the challenge missions that are unlocked-by-purchase and not yet cleared, when challenge mode is on.

Ghidra address:
0x901e0

◆ detailViewStartExtendDownload:

- (void) detailViewStartExtendDownload: (nullable StorePackInfo *) packInfo

Child extend-download callback: shows the modal dialog and downloads the pack's extend files.

Parameters
packInfoThe pack being extended.
Ghidra address:
0x8c974

Reimplemented from <StoreDetailViewControllerDelegate>.

◆ detailViewStartPurchase:

- (void) detailViewStartPurchase: (nullable StoreDetailViewControllerV2 *) packInfo

Child purchase callback: records the pack and, unless it is unpurchasable or over the limit, shows the modal dialog and begins the purchase.

Parameters
packInfoThe detail controller reporting the purchase.
Ghidra address:
0x8c594

◆ detailViewStartRedownload:

- (void) detailViewStartRedownload: (nullable StoreDetailViewControllerV2 *) packInfo

Child redownload callback: records the pack and raises the "already purchased, download?" confirmation alert.

Parameters
packInfoThe detail controller reporting the redownload.
Ghidra address:
0x8bf88

◆ didReceiveMemoryWarning

- (void) didReceiveMemoryWarning

Handles a low-memory warning.

Ghidra address:
0x90634

◆ dispErrorLabel:

- (void) dispErrorLabel: (nullable NSString *) msg

Adds a centred error label to the licence-agreement cover and fades the cover in.

Parameters
msgThe message; a localised network-error message is substituted when nil .
Ghidra address:
0x8ec24

◆ downloaderError:

- (void) downloaderError: (nullable id) downloader

A request failed: alerts the player when it was the mission-achievement check.

Parameters
downloaderThe downloader reporting the failure.
Ghidra address:
0x8f8b8

◆ downloaderFinished:

- (void) downloaderFinished: (nullable id) downloader

A request finished: dispatches on the downloader's tag to handle its JSON response.

Parameters
downloaderThe downloader reporting the result.
Ghidra address:
0x8f170

◆ downloadManagerCompleted:

- (void) downloadManagerCompleted: (nonnull StoreDownloadManager *) manager

The download queue completed: drops the manager and hides the modal dialog.

Parameters
managerThe download manager reporting completion.
Ghidra address:
0x8e350

Reimplemented from <StoreDownloadManagerDelegate>.

◆ downloadManagerFailed:

- (void) downloadManagerFailed: (nonnull StoreDownloadManager *) manager

The download queue failed: drops the manager and updates the pack's purchase state.

Parameters
managerThe download manager reporting the failure.
Ghidra address:
0x8e38c

Reimplemented from <StoreDownloadManagerDelegate>.

◆ downloadManagerProceed:

- (void) downloadManagerProceed: (nonnull StoreDownloadManager *) manager

A download task made progress: drives the modal dialog's progress bar.

Parameters
managerThe download manager reporting progress.
Ghidra address:
0x8e5f8

Reimplemented from <StoreDownloadManagerDelegate>.

◆ downloadManagerStartTask:

- (void) downloadManagerStartTask: (nonnull StoreDownloadManager *) manager

A download task started: shows the downloading tune's name in the modal dialog.

Parameters
managerThe download manager reporting the task.
Ghidra address:
0x8e0c4

Reimplemented from <StoreDownloadManagerDelegate>.

◆ errorIDDownload:msgStr:

- (void) errorIDDownload: (nullable id) manager
msgStr: (nullable NSString *) msg 

The editor-identity download failed: shows the message to the player.

Parameters
managerThe editor-ID manager reporting the failure.
msgThe message to show; the default network-error text when nil or empty.
Ghidra address:
0x89cd4

Reimplemented from <EditorIDManagerDelegate>.

◆ firstRestore

- (void) firstRestore

Shows the modal dialog and begins a purchase restore.

Ghidra address:
0x8d6c8

Reimplemented from <StoreParentViewController>.

◆ firstStoreItemLoad

- (void) firstStoreItemLoad

Reads the startup parameters and opens the deep-linked genre or pack (and, when present, a campaign) in the appropriate child tab.

Ghidra address:
0x89848

◆ hideModalDialog

- (void) hideModalDialog

Fades the dimming cover and modal dialog out, stopping the spinner and unmounting the dialog on completion.

Ghidra address:
0x8a958
Ghidra address:
0x8ab68
Ghidra address:
0x8abb4

Reimplemented from <StoreParentViewController>.

◆ init

- (instancetype) init

Builds the four child controllers, wraps each in a navigation controller, and installs them as the tab bar's view controllers.

Returns
The initialised container.
Ghidra address:
0x89460
Ghidra address:
0x89460

◆ loadInitialStoreInfo

- (void) loadInitialStoreInfo

Re-enables interaction and either provisions a missing editor id or builds the licence-agreement gate over the store.

Ghidra address:
0x899ec

◆ loadView

- (void) loadView

Builds the tab container's view, the dimming cover, and the modal dialog sized for the device idiom.

Ghidra address:
0x8a188

◆ openCampaignDetail:

- (void) openCampaignDetail: (nullable NSNumber *) campaignID

Closes any open alert, opens the campaign page's detail for a campaign, and switches to the campaign tab.

Parameters
campaignIDThe campaign identifier, boxed.
Ghidra address:
0x8e7cc

◆ openDetail:

- (void) openDetail: (nullable NSNumber *) packID

Closes any open alert, opens the pack browser's detail for a pack, and switches to the store tab.

Parameters
packIDThe pack identifier, boxed.
Ghidra address:
0x8e680

Reimplemented from <StoreParentViewController>.

◆ performRestore:

- (void) performRestore: (nullable id) sender

Raises the "restore purchases?" confirmation alert.

Parameters
senderThe sender; unused.
Ghidra address:
0x8bd3c

◆ purchaseFailed:error:

- (void) purchaseFailed: (nullable NSString *) productID
error: (nullable NSError *) error 

A purchase failed: hides the modal dialog and shows the failure or cancellation message.

Parameters
productIDThe product that failed.
errorThe failure, distinguishing a cancellation from a genuine error by its domain.
Ghidra address:
0x8cb0c

◆ purchaseSucceeded:

- (void) purchaseSucceeded: (nullable NSString *) productID

A purchase completed: starts the pack's download and refreshes the purchased and campaign-unlock lists.

Parameters
productIDThe purchased product's identifier, mapped to a pack ID to download.
Ghidra address:
0x8c9fc

◆ resignCoverView

- (void) resignCoverView

Fades the licence-agreement cover out.

Ghidra address:
0x8eb08
Ghidra address:
0x8ebd4
Ghidra address:
0x8ec20

◆ restoreFailed:

- (void) restoreFailed: (nullable NSError *) error

A restore failed: clears the purchase delegate, hides the dialog, and shows the message.

Parameters
errorThe failure, distinguishing a cancellation from a genuine error.
Ghidra address:
0x8d288

◆ restoreNothing

- (void) restoreNothing

A restore found nothing to restore: hides the dialog and tells the player.

Ghidra address:
0x8d4e4

Reimplemented from <PurchaseManagerDelegate>.

◆ restoreSucceeded

- (void) restoreSucceeded

A restore completed: clears the purchase delegate, hides the dialog, and shows the restore-complete alert.

The lists refresh when that alert is dismissed.

Ghidra address:
0x8d08c
Ghidra address:
0x8d08c

Reimplemented from <PurchaseManagerDelegate>.

◆ shouldAutorotate

- (BOOL) shouldAutorotate

Whether the screen rotates.

Returns
Always YES.
Ghidra address:
0x90764
Ghidra address:
0x90764

◆ shouldAutorotateToInterfaceOrientation:

- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation

Whether the screen may rotate to an orientation.

Parameters
interfaceOrientationThe orientation asked about.
Returns
YES for the two portrait orientations, NO otherwise.
Ghidra address:
0x9074c
Ghidra address:
0x9074c

◆ showModalDialog:

- (void) showModalDialog: (nullable id< StoreDialogViewDelegate >) delegate

Fades the dimming cover and modal dialog in, starting the spinner and enabling the abort button on completion.

Parameters
delegateThe object told when the panel's abort button is pressed.
Ghidra address:
0x8a604

◆ startDownloadExtendMusics:

- (void) startDownloadExtendMusics: (int) packID

Registers a pack's extend tunes and downloads any extend files not already present, driving the modal dialog's progress.

Parameters
packIDThe pack identifier being extended.
Ghidra address:
0x8b5cc
Ghidra address:
0x8b5cc

◆ startDownloadMusics:

- (void) startDownloadMusics: (int) packID

Registers a purchased pack's tunes with the music-list manager and downloads any tune files not already present, driving the modal dialog's progress.

Parameters
packIDThe purchased pack identifier.
Ghidra address:
0x8ac90
Ghidra address:
0x8ac90

◆ storeClose

- (void) storeClose

Closes every child's store view and any open alert.

Ghidra address:
0x8e918

◆ storeDialogCancel:

- (void) storeDialogCancel: (nullable id) dialogView

The modal dialog's abort button was pressed: cancels the download and updates the pack's purchase state.

Parameters
dialogViewThe dialog whose abort button was pressed.
Ghidra address:
0x8dfa8

◆ storeEnd:

- (void) storeEnd: (nullable id) sender

Closes the pack browser and asks the root controller to end the store.

Parameters
senderThe sender; unused.
Ghidra address:
0x8a584

Reimplemented from <StoreParentViewController>.

◆ successIDDownload:

- (void) successIDDownload: (nullable id) manager

The editor identity downloaded: drops the manager and builds the store's child screens.

Parameters
managerThe editor-ID manager reporting the result.
Ghidra address:
0x89f10

Reimplemented from <EditorIDManagerDelegate>.

◆ supportedInterfaceOrientations

- (UIInterfaceOrientationMask) supportedInterfaceOrientations

The orientations the screen supports.

Returns
Both portrait orientations.
Ghidra address:
0x9075c
Ghidra address:
0x9075c

◆ viewDidAppear:

- (void) viewDidAppear: (BOOL) animated

The view has appeared.

Parameters
animatedWhether the appearance was animated.
Ghidra address:
0x906a4
Ghidra address:
0x906a4

◆ viewDidDisappear:

- (void) viewDidDisappear: (BOOL) animated

The view has disappeared.

Parameters
animatedWhether the disappearance was animated.
Ghidra address:
0x90714
Ghidra address:
0x90714

◆ viewWillAppear:

- (void) viewWillAppear: (BOOL) animated

The view is about to appear.

Parameters
animatedWhether the appearance is animated.
Ghidra address:
0x9066c
Ghidra address:
0x9066c

◆ viewWillDisappear:

- (void) viewWillDisappear: (BOOL) animated

The view is about to disappear.

Parameters
animatedWhether the disappearance is animated.
Ghidra address:
0x906dc
Ghidra address:
0x906dc

Property Documentation

◆ modalDialog

- (StoreDialogView*) modalDialog
readnonatomicstrong

The shared modal progress panel behind the dimming cover.

Ghidra address:
0x907c8 (getter)

◆ startupParameters

- (NSDictionary*) startupParameters
readwritenonatomicstrong

The deep-link parameters used to pre-open a genre, pack, or campaign.

Held strongly.

Ghidra address:
0x907a4 (getter)
Ghidra address:
0x907b4 (setter)

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