UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    [Guide] Run clickable on macOS

    Scheduled Pinned Locked Moved App Development
    5 Posts 3 Posters 866 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • SanderS Offline
        Sander
        last edited by

        I wanted to use my MacBook Air to develop Ubuntu Touch apps. After a lot of trial and error I've got clickable working. So here's is a guide on how to set up clickable for macOS.

        Install Homebrew
        First off, you'll need to install Homebrew with this command:

        /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
        

        Dependencies
        After installing Homebrew you'll need to install pip3, adb and docker with the following commands (open the macOS terminal):

        brew install python3
        
        brew cask install android-platform-tools
        
        brew cask install docker
        

        After installing Docker, open the Docker application (via Launchpad or by pressing Command + Space and searching for it with spotlight). Click OK in the Docker needs privileged access dialog and enter your user password. A whale icon will appear in the status menu and the symbolic links for docker, docker-compose, docker-credential-osxkeychain and docker-machine are created in /usr/local/bin. Confirm that docker is running, by clicking the icon in the status menu. If it says Docker Desktop is running you're ready to test out clickable! :party_popper:

        Run clickable
        Open the macOS terminal app and cd into the directory you want to store and build your app. Run the command clickable init to create a new app project. cd into your app project folder. Run clickable to build your app and push it to your Ubuntu Touch device through adb!

        Clickable desktop
        clickable desktop is not working. I've installed XQuartz but I get the following error:

        Successfully built package in './test.sanderklootwijk_1.0.0_all.click'.
        non-network local connections being added to access control list
        Mounting device home to /Users/sander/.clickable/home
        docker: Error response from daemon: Mounts denied: 
        The paths /dev/snd and /var/lib/dbus and /run/501/pulse and /home/sander/.pulse
        are not shared from OS X and are not known to Docker.
        You can configure shared paths from Docker -> Preferences... -> File Sharing.
        See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
        .
        ERRO[0000] error waiting for container: context canceled 
        Command exited with non-zero exit status 125, see above for details. This is most likely not a problem with Clickable.
        

        Atom
        Atom with the language-qml and atom-build-clickable packages, works great for developing Ubuntu Touch apps on macOS. Get the Atom text editor here and install language-qml and atom-build-clickable (Atom > preferences > install).

        1 Reply Last reply Reply Quote 3
        • SanderS Offline
          Sander
          last edited by

          For some reason I can't update the post above. But before you're able to run clickable, you'll need to install it of course. I forgot this step in the guide :grinning_face_with_sweat:

          Install clickable with the following command:

          pip3 install git+https://gitlab.com/clickable/clickable.git
          

          Now you'll be able to run clickable!

          1 Reply Last reply Reply Quote 1
          • arubislanderA Offline
            arubislander
            last edited by

            Great work Sander!

            Just curious though, what happens when you configure the folders mentioned in the error message to be shareable to the container in the the docker preferences?

            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
            Happily running Ubuntu Touch
            Google Pixel 3a (20.04 DEV)
            JingPad (24.04 preview)
            Meizu Pro 5 (16.04 DEV)

            SanderS 1 Reply Last reply Reply Quote 1
            • SanderS Offline
              Sander @arubislander
              last edited by

              @arubislander I think it has something to do with pulseaudio (which is not installed by default on macOS). You can install it with homebrew:

              brew install pulseaudio
              

              I've tried to add the paths to Docker, but I get exactly the same error.
              7c9f5c30-4a36-4bc5-bf86-194a26fd1037-image.png

              1 Reply Last reply Reply Quote 0
              • J Offline
                jhayar0719
                last edited by

                another solution is to use limavm with ubuntu instance , then install docker on it

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post