File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,23 @@ PF_TV_UNAVAILABLE PF_WATCH_UNAVAILABLE @interface PFInstallation : PFObject<PFSu
4444/* *
4545 Gets the currently-running installation from disk and returns an instance of it.
4646
47- If this installation is not stored on disk, returns a `PFInstallation`
48- with `deviceType` and `installationId` fields set to those of the
49- current installation.
47+ If this installation is not stored on disk this method will create a new `PFInstallation`
48+ with `deviceType` and `installationId` fields set to those of the current installation.
5049
5150 @result Returns a `PFInstallation` that represents the currently-running installation.
5251 */
5352+ (instancetype )currentInstallation ;
5453
54+ /* *
55+ *Asynchronously* loads the currently-running installation from disk and returns an instance of it.
56+
57+ If this installation is not stored on disk this method will create a new `PFInstallation`
58+ with `deviceType` and `installationId` fields set to those of the current installation.
59+
60+ @result Returns a task that incapsulates the current installation.
61+ */
62+ + (BFTask<__kindof PFInstallation *> *)getCurrentInstallationInBackground ;
63+
5564// /--------------------------------------
5665#pragma mark - Installation Properties
5766// /--------------------------------------
Original file line number Diff line number Diff line change @@ -132,8 +132,11 @@ + (PFQuery *)query {
132132// /--------------------------------------
133133
134134+ (instancetype )currentInstallation {
135- BFTask *task = [[self _currentInstallationController ] getCurrentObjectAsync ];
136- return [task waitForResult: nil withMainThreadWarning: NO ];
135+ return [[self getCurrentInstallationInBackground ] waitForResult: nil withMainThreadWarning: NO ];
136+ }
137+
138+ + (BFTask<__kindof PFInstallation *> *)getCurrentInstallationInBackground {
139+ return [[self _currentInstallationController ] getCurrentObjectAsync ];
137140}
138141
139142// /--------------------------------------
You can’t perform that action at this time.
0 commit comments