Originally published on php-apps.learnio.dev — part of the Using Native PHP course. View this lesson on the original site.

Before you take the chapter quiz, review the points below. They summarise what you set up in this chapter — your OS and toolchain choices, NativePHP config from Chapter 1, and the dev commands you will use through the rest of the course.

Operating system constraints

Choosing the right operating system can greatly influence your development experience:

  • MacOS: Offers a Unix-based architecture, ideal for PHP development, but comes at a higher hardware cost.
  • Windows: Widely used with many IDE options, but lacks WSL, which can limit Linux tool compatibility.
  • Linux: Open-source and robust, but may present a steep learning curve for new users.
flowchart TD
    A[Operating Systems] --> B[MacOS]
    A --> C[Windows]
    A --> D[Linux]
    B --> E[Pros: Unix-based, Xcode]
    B --> F[Cons: High cost]
    C --> G[Pros: Wide software support]
    C --> H[Cons: No WSL]
    D --> I[Pros: Open-source, robust]
    D --> J[Cons: Learning curve]

Version compatibility

Ensuring that your PHP, Composer, and Node.js versions are compatible is vital:

  • Check installed versions using commands like php -v, composer -V, and node -v.
  • Install specific versions using package managers or tools like nvm for Node.js.

Development environment choices

We compared Laravel Herd and manual PHP installations:

  • Laravel Herd: Quick setup with a pre-configured stack, ideal for beginners.
  • Manual PHP Installation: Offers greater control over configurations, suited for advanced users.

Setting up development tools

We discussed setting up Xcode for iOS development and Android Studio for Android applications. Key steps include:

  • Installing necessary SDKs and tools.
  • Enabling USB debugging for device testing.

Key commands recap

  • To install PHP on MacOS: brew install php
  • To check PHP version: php -v
  • To create a new Laravel project with Herd: herd new my-project
  • To run the native:jump command: php artisan native:jump --no-serve

Remember

  • Choose your operating system based on your development needs and budget.
  • Always ensure compatibility between PHP, Composer, and Node.js versions.
  • Familiarise yourself with the commands necessary for setting up and managing your development environment.
  • Use tools like Laravel Herd for quick setups, or opt for manual installations for more control.

By following these guidelines, you can establish a solid foundation for your NativePHP Mobile development journey.

From Using Native PHP — Environment setup and development workflow