Giter Site home page Giter Site logo

capacitor-testapp's Introduction

Capacitor TestApp

The Capacitor TestApp is used to develop new features and verify bug fixes in Capacitor and the official plugins. It is built with Ionic React.

Setup

  1. Fork and clone this repo.

  2. Install the dependencies.

    npm install

The TestApp is just like any other Ionic React app. See the docs to learn what you can do.

  • ionic build to build web assets
  • ionic serve to run web version in your browser
  • ionic cap sync
  • ionic cap run <platform> (also w/ livereload: just add -l --external flags)

You can also opt-out of the Ionic CLI and use npm scripts and the Capacitor CLI directly:

  • npm run build
  • npm start
  • npx cap sync
  • npx cap run <platform> (no automatic livereload)

Developing Capacitor

New to Capacitor development? Start here.

To use the TestApp to develop Capacitor and official plugins, make sure you have set up the sibling repositories. Clone Capacitor and the plugins repo into the same parent directory.

cd ../
git clone [email protected]:ionic-team/capacitor.git
git clone [email protected]:ionic-team/capacitor-plugins.git

Follow the setup instructions for each repo:

Then, back in this repo, run the following to link the packages in both repos to this app:

npm install
npm run toggle-local

capacitor-testapp's People

Contributors

carlpoole avatar dependabot[bot] avatar elylucas avatar ikeith avatar imhoffd avatar it-mikes avatar itschaced avatar jcesarmobile avatar markemer avatar theproducer avatar thomasvidas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

capacitor-testapp's Issues

Build Fail for the First Time

I have got this error after trying to run ionic capacitor run android


[capacitor] โœ– Running Gradle build - failed!
[capacitor] [error] 
[capacitor]         FAILURE: Build failed with an exception.
[capacitor]         
[capacitor]         * What went wrong:
[capacitor]         Could not open settings generic class cache for settings file '/Users/chrisk8er/Documents/Projects/capacitor-testapp/android/settings.gradle' (/Users/chrisk8er/.gradle/caches/7.0/scripts/4q8mdrtree07u9ffzpsj5y2nh).
[capacitor]         > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 61
[capacitor]         
[capacitor]         * Try:
[capacitor]         Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[capacitor]         
[capacitor]         * Get more help at https://help.gradle.org
[capacitor]         
[capacitor]         BUILD FAILED in 787ms
[capacitor]         
[ERROR] An error occurred while running subprocess capacitor.
        
        capacitor run android --target adb-lzmrqw6llfaymzcu-JcfkWE._adb-tls-connect._tcp... exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

Dev Status

Add code to test Capacitor plugins:

  • Accessibility
  • App
  • Background Task
  • Browser
  • Camera
  • Clipboard
  • Console
  • Device
  • Filesystem
  • Geolocation
  • Haptics
  • Keyboard
  • Local Notifications
  • Modals
  • Motion
  • Network
  • Permissions
  • Push Notifications
  • Share
  • Splash Screen
  • Status Bar
  • Storage
  • Toast
  • WebView

`npm run toggle-local` doesn't work in Windows

Bug Report

Plugin(s)

Not plugin specific, development in repo

Capacitor Version

$ npx cap doctor
Capacitor Doctor

Latest Dependencies:

@capacitor/cli: 3.4.0
@capacitor/core: 3.4.0
@capacitor/android: 3.4.0
@capacitor/ios: 3.4.0

Installed Dependencies:

@capacitor/cli: 3.3.4
@capacitor/android: 3.3.4
@capacitor/core: 3.3.4
@capacitor/ios: 3.3.4

$ npm run toggle-local

> [email protected] toggle-local
> node ./scripts/toggle-local.mjs

Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
    at onErrorNT (node:internal/child_process:477:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Platform(s)

Windows 10 Home
Version 10.0.19044 Build 19044

Current Behavior

fails to run

Expected Behavior

toggle-local script should work

Other Technical Details

$ node -v
v16.13.2

$ npm -v
8.1.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.