File tree Expand file tree Collapse file tree 3 files changed +8
-18
lines changed Expand file tree Collapse file tree 3 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,8 @@ - (NSError *_Nullable)mapFetchReleasesError:(NSError *)error {
247
247
message: @" Failed to fetch releases for unknown reason." ];
248
248
}
249
249
250
- - (void )fetchNewLatestRelease : (FIRAppDistributionUpdateCheckCompletion)completion {
250
+ - (void )fetchNewLatestRelease : (void (^)(FIRAppDistributionRelease *_Nullable release,
251
+ NSError *_Nullable error))completion {
251
252
[FIRFADApiService
252
253
fetchReleasesWithCompletion: ^(NSArray *_Nullable releases, NSError *_Nullable error) {
253
254
if (error) {
@@ -283,7 +284,8 @@ - (void)fetchNewLatestRelease:(FIRAppDistributionUpdateCheckCompletion)completio
283
284
}];
284
285
}
285
286
286
- - (void )checkForUpdateWithCompletion : (FIRAppDistributionUpdateCheckCompletion)completion {
287
+ - (void )checkForUpdateWithCompletion : (void (^)(FIRAppDistributionRelease *_Nullable release,
288
+ NSError *_Nullable error))completion {
287
289
FIRFADInfoLog (@" CheckForUpdateWithCompletion" );
288
290
if ([self isTesterSignedIn ]) {
289
291
[self fetchNewLatestRelease: completion];
Original file line number Diff line number Diff line change 17
17
18
18
NS_ASSUME_NONNULL_BEGIN
19
19
20
- /* *
21
- * @related AppDistributionError
22
- *
23
- * The completion handler invoked when the new build request returns.
24
- * If the call fails we return the appropriate `error code`, described by
25
- * `AppDistributionError`.
26
- *
27
- * @param release The new release that is available to be installed.
28
- * @param error The error describing why the new build request failed.
29
- */
30
- typedef void (^FIRAppDistributionUpdateCheckCompletion)(
31
- FIRAppDistributionRelease *_Nullable release, NSError *_Nullable error)
32
- NS_SWIFT_NAME(AppDistributionUpdateCheckCompletion);
33
-
34
20
/* *
35
21
* The Firebase App Distribution API provides methods to check for update to
36
22
* the app and returns information that enables updating the app.
@@ -58,7 +44,8 @@ NS_SWIFT_NAME(AppDistribution)
58
44
/* *
59
45
* Check to see whether a new distribution is available
60
46
*/
61
- - (void )checkForUpdateWithCompletion:(FIRAppDistributionUpdateCheckCompletion)completion
47
+ - (void )checkForUpdateWithCompletion:
48
+ (void (^)(FIRAppDistributionRelease *_Nullable release, NSError *_Nullable error))completion
62
49
NS_SWIFT_NAME (checkForUpdate(completion:));
63
50
64
51
/* *
Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ @interface FIRAppDistribution (PrivateUnitTesting)
35
35
36
36
- (instancetype )initWithApp : (FIRApp *)app appInfo : (NSDictionary *)appInfo ;
37
37
38
- - (void )fetchNewLatestRelease : (FIRAppDistributionUpdateCheckCompletion)completion ;
38
+ - (void )fetchNewLatestRelease : (void (^)(FIRAppDistributionRelease *_Nullable release,
39
+ NSError *_Nullable error))completion ;
39
40
40
41
- (NSError *)mapFetchReleasesError : (NSError *)error ;
41
42
You can’t perform that action at this time.
0 commit comments