| 212 | }); |
| 213 | } |
| 214 | fetch(expirationDurationSeconds?: number): Promise<void> { |
| 215 | let time = 43200000 / 1000; |
| 216 | return new Promise((resolve, reject) => { |
| 217 | if (typeof expirationDurationSeconds === 'number') { |
| 218 | time = expirationDurationSeconds; |
| 219 | } |
| 220 | |
| 221 | NSRemoteConfig().fetch( |
| 222 | this.native, |
| 223 | time, |
| 224 | new org.nativescript.firebase.remote_config.FirebaseRemoteConfig.Callback({ |
| 225 | onSuccess(param0) { |
| 226 | resolve(); |
| 227 | }, |
| 228 | onError(error) { |
| 229 | const err = FirebaseError.fromNative(error); |
| 230 | reject(err); |
| 231 | }, |
| 232 | }) |
| 233 | ); |
| 234 | }); |
| 235 | } |
| 236 | fetchAndActivate(): Promise<boolean> { |
| 237 | this.native.fetchAndActivate(); |
| 238 | return new Promise((resolve, reject) => { |