nativephp/mobile-system 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nativephp/mobile-system

最新稳定版本:0.0.1

Composer 安装命令:

composer require nativephp/mobile-system

包简介

System-level operations for NativePHP Mobile

README 文档

README

System-level operations for NativePHP Mobile apps.

Overview

The System API provides access to system-level functionality like opening the app's settings page.

Installation

composer require nativephp/mobile-system

Usage

PHP (Livewire/Blade)

use Native\Mobile\Facades\System;

// Open app settings (useful when user denied permissions)
System::openAppSettings();

JavaScript (Vue/React/Inertia)

import { system } from '#nativephp';

// Open app settings
await system.openAppSettings();

Methods

openAppSettings(): array

Opens the app's settings screen in the device settings. This is useful when a user has denied a permission and you want to direct them to the settings to grant it.

Returns: { success: true }

Use Cases

Handling Denied Permissions

use Native\Mobile\Facades\Camera;
use Native\Mobile\Facades\System;

public function takePhoto()
{
    $result = Camera::getPhoto();

    if (isset($result['error']) && str_contains($result['error'], 'permission')) {
        // Permission denied, offer to open settings
        $this->showPermissionDialog = true;
    }
}

public function openSettings()
{
    System::openAppSettings();
}

License

MIT

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Kotlin

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-03