Skip to content

📚 Mobile v1.1 Documentation Updates #178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Jul 13, 2025
Merged

📚 Mobile v1.1 Documentation Updates #178

merged 18 commits into from
Jul 13, 2025

Conversation

shanerbaner82
Copy link
Contributor

Summary

Comprehensive updates to mobile v1.1 documentation improving structure, content, and developer experience.

Key Changes

  • 🗂️ Reorganized documentation structure with dedicated APIs and concepts sections
  • 🔒 Added comprehensive database security guidance covering API-first architecture, Laravel Sanctum integration, and SecureStorage best practices
  • ⚡ Simplified Haptics API documentation to essential examples and usage patterns
  • 🪟 Added Windows performance tip for faster composer installs during compilation
  • 📍 Enhanced geolocation documentation with detailed event handling examples
  • ⚙️ Updated installation guide with platform-specific optimizations

Documentation Structure Changes

  • Moved API references to dedicated /apis/ section
  • Created /concepts/ section for architectural guidance
  • Reorganized content hierarchy for better navigation
  • Added cross-references between related topics

Security Improvements

  • Explained why MySQL/PostgreSQL drivers are intentionally excluded
  • Provided detailed guidance on secure API communication patterns
  • Demonstrated proper token storage using SecureStorage API
  • Added Laravel Sanctum integration examples

Developer Experience

  • Reduced verbose documentation where appropriate (Haptics API)
  • Added practical code examples throughout
  • Improved Windows development workflow with Defender exclusion tip
  • Enhanced error handling and best practices guidance

All changes maintain backward compatibility and improve the overall documentation quality for mobile v1.1 developers.

- Reorganize v1.1 documentation with new APIs and concepts sections
- Add comprehensive database security guidance covering API-first architecture, Laravel Sanctum integration, and SecureStorage best practices
- Simplify Haptics API documentation to essential examples and usage patterns
- Add Windows performance tip for faster composer installs during compilation
- Improve geolocation API documentation with detailed event handling
- Update installation guide with platform-specific optimizations
- Restructure v1.1 content hierarchy for better developer experience
@shanerbaner82 shanerbaner82 requested a review from simonhamp July 7, 2025 02:33
- Merge installation.md: preserve platform requirements from main + Windows performance tip
- Update ShowDocumentationController.php with latest changes
Copy link
Member

@PeteBishwhip PeteBishwhip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good. I'm concerned about the amount of "Old way - Don't do this" kind of docs we have here. I think instead, as I mentioned on this comments we should update the codebase and throw:

user_error('System::camera() should not longer be used. See {{$docLink}} for more information.', E_USER_DEPRECATED);

I think that's smarter else if someone struggles with a correct method, they might just backtrack to old deprecated and unsupported code.

Otherwise, great work man!

@@ -65,7 +64,8 @@ protected function getPageProperties($platform, $version, $page = null): array
$pageProperties = $document->matter();

$versionProperties = YamlFrontMatter::parseFile(resource_path("views/docs/{$platform}/{$version}/_index.md"));
$pageProperties = array_merge($pageProperties, $versionProperties->matter());

$pageProperties = array_merge($versionProperties->matter(), $pageProperties);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily an issue but can you help me understand why the order of arguments were switched here? Was something being overwritten we wasn't expecting? 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually yeah, and maybe you can verify, locally for me every page showed "Mobile" as the title of the document, reversing this fixed it for me. On the website currently it works fine now, not sure what's going on tbh and I didn't switch it back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my end I see the title NativePHP on every page. Looks like the title tag is present in the head twice.

By editing $pageProperties the second title tag does change, but my browser only picks up the first one so I can't see it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might depend on your cache driver, I haven't played with it but saw some code about cacheing if local...

shanerbaner82 and others added 5 commits July 7, 2025 09:38
…ons, and database seeding

- Enhanced deep links documentation with comprehensive platform-specific setup, domain verification, and NFC integration
- Expanded push notifications docs with FCM implementation, platform-specific configurations, and data payload handling
- Added database seeding section explaining how to use migrations for initial data setup
- Updated various documentation files with improved clarity and additional configuration examples
- Fixed broken links and improved navigation structure
- Updated alert() method signature to use 3 parameters (title, message, buttons array)
- Changed buttons parameter from complex objects to simple string arrays
- Updated ButtonPressed event to pass both index and label parameters
- Replaced all example code to use new simplified API
- Added button positioning documentation (negative, neutral, positive)
- Removed old button style configurations
- Added practical examples for 1, 2, and 3 button scenarios
- Added new browser.md documentation for Browser::inApp() method
- Documented OAuth authentication use cases with deep link integration
- Included platform-specific behavior for iOS and Android
- Added complete example showing Livewire component implementation
- Covered security considerations and best practices
- Explained integration with deep links for complete OAuth flows
Copy link
Member

@SRWieZ SRWieZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, sorry I'm a bit harsh in the comments. Please don't take personally

TL;DR: I will remove a bunch of stuff Ai generated.

I gave up after Browser.

But from what I quickly saw from the other APIs, examples are just too long for an API doc.

Seeing all the examples, I think we should emphasize somewhere that we recommend using Livewire.

Comment on lines 110 to 117
## Platform Support

All APIs work on both iOS and Android with platform-appropriate implementations:
- **iOS**: Uses native iOS frameworks and APIs
- **Android**: Uses Android SDK and native libraries
- **Permissions**: Automatically handled with user prompts when required
- **Fallbacks**: Graceful degradation when features aren't available

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless

Suggested change
## Platform Support
All APIs work on both iOS and Android with platform-appropriate implementations:
- **iOS**: Uses native iOS frameworks and APIs
- **Android**: Uses Android SDK and native libraries
- **Permissions**: Automatically handled with user prompts when required
- **Fallbacks**: Graceful degradation when features aren't available

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this useless?

@shanerbaner82
Copy link
Contributor Author

Hey, sorry I'm a bit harsh in the comments. Please don't take personally

TL;DR: I will remove a bunch of stuff Ai generated.

I gave up after Browser.

But from what I quickly saw from the other APIs, examples are just too long for an API doc.

Seeing all the examples, I think we should emphasize somewhere that we recommend using Livewire.

I need harsh soemtimes, the project needs it to be it's best, you aren't hurting my feelings. The reason for the extra examples is based on a few factors, mostly because people need them, ask for them, and want a good place to start. Look at the examples in the Filament docs, people have pointed this out to me in Discord and I agree with them, we can tune it down a bit, sure, but examples are staying to some degree.

We will not "recommend" using Livewire, because this is built to work with Laravel and we will do our best to make sure the developer doesnt have to learn something new (if they don't already know Livewire) just to use our product. We can/should put that we "prefer" Livewire ourselves and all of our docs examples are in Livewire.

shanerbaner82 and others added 6 commits July 10, 2025 11:26
- Add Android-only notes for ICU support across documentation
- Update Dialog API documentation with new alert implementation
- Enhance Geolocation API documentation
- Improve API overview and navigation
- Update Push Notifications API documentation
- Enhance Secure Storage API documentation
- Add database documentation improvements
- Update CI/CD packaging commands with platform limitations
- Ensure consistent platform availability information across docs
- Reduce length by 70% while maintaining all essential information
- Add explicit semantic versioning reference and link
- Adopt Laravel's direct, confident tone and structure
- Focus on practical information developers need
- Remove verbose examples and repetitive explanations
- Maintain mobile-specific versioning concepts (patch vs minor releases)
- Keep OTA compatibility messaging and composer integration guidance
- Add system() method for opening URLs in device's default browser
- Add auth() method for OAuth authentication flows with nativephp:// handling
- Update inApp() method description with platform-specific details
- Add comprehensive use cases for each browser method
- Include platform behavior notes for iOS and Android implementations
- Remove redundant sections and streamline documentation
- Update examples to demonstrate all three browser methods
@simonhamp simonhamp merged commit f0beed1 into main Jul 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants