Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/Providers/NativeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Native\Mobile\UI\NativeUIServiceProvider;
use NativePHP\Clipboard\ClipboardServiceProvider;
use NativePHP\MediaPlayer\MediaPlayerServiceProvider;
use Nativephp\MobileOta\OtaServiceProvider;
use S2BR\MobileSplashscreen\MobileSplashscreenServiceProvider;
use Victorycodedev\ToastKit\ToastKitServiceProvider;

Expand Down Expand Up @@ -68,6 +69,7 @@ public function plugins(): array
CallsServiceProvider::class,
PhotosServiceProvider::class,
SkiaServiceProvider::class,
OtaServiceProvider::class,
...(config('devnull.apple_sign_in') ? [NativephpSocialAuthServiceProvider::class] : []),
];
}
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"nativephp/mobile-firebase": "^1.1",
"nativephp/mobile-media-player": "^1.1",
"nativephp/mobile-microphone": "^1.2",
"nativephp/mobile-ota": "^1.0.2",
"nativephp/mobile-secure-storage": "^1.1",
"nativephp/mobile-share": "^1.1",
"nativephp/mobile-skia": "^1.0",
Expand Down
58 changes: 57 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions config/nativephp-ota.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/*
|--------------------------------------------------------------------------
| Over-the-air updates
|--------------------------------------------------------------------------
|
| Only the mode lives here. The plugin's own config fills in the rest from
| what Bifrost writes into the store build.
|
| "silent" checks once per launch in the background, downloads any update
| and applies it the next time the app starts. Nothing is shown on screen.
| The mode is compiled into each store build, so changing it takes a new
| one. A build that Bifrost didn't make skips the check.
|
*/

return [

'mode' => env('NATIVEPHP_OTA_MODE', 'silent'),

];
9 changes: 9 additions & 0 deletions tests/Feature/OtaTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

use App\Providers\NativeServiceProvider;
use Nativephp\MobileOta\OtaServiceProvider;

it('registers the OTA plugin and updates silently when no mode is set', function () {
expect((new NativeServiceProvider(app()))->plugins())->toContain(OtaServiceProvider::class)
->and(config('nativephp-ota.mode'))->toBe('silent');
});