xcode project wrapper around the Elixir TodoApp Desktop app to run on iOS

Overview

TodoApp iOS: An iOS Sample App

This xcode project wraps the Desktop Sample App to run on an iPhone.

How to build & run

  1. Install xcode from the app store.

  2. Install brew, elixir, git, carthage, npm

    brew install elixir carthage git npm

  3. fork / git clone this project to your local disk:

    git clone https://github.com/elixir-desktop/ios-example-app.git

  4. Build the dependencies:

    cd ios-example-app && carthage update --use-xcframeworks

  5. Open the ios-example-app project with xcode

  6. Start the App

Known todos

Can only emulate on Apple M1 and on real iPhones

The bundled binaries are only for the real iPhone as well as the Apple M1 mac machines. If you've got an intel based x86 mac the emulator won't run at the moment.

Menus and other integration not yet available

This sample only launch the elixir app and shows it in a WKWebView. There is no integration yet with the iOS Clipboard, sharing or other OS capabilities. They can though easily be added to the Bridge.swift file when needed.

Other notes

  • The Erlang runtime is for ease of use embedded in this example git repository. The native runtimes for M1 and iPhoneOS and the exqlite nif are are generated using the Desktop Runtime repository.

  • iOS specific settings, icons and metadata are all contained in this xcode wrapper project.

  • Bridge.swift and the native library are doing most of the wrapping of the Elixir runtime.

Screenshots

App

Architecture

Nearly identical to the Android version

Comments
  • Fail to build on macOS 12.6, Xcode 14.0 and iOS 16.0

    Fail to build on macOS 12.6, Xcode 14.0 and iOS 16.0

    My environment is:

    • M2 Macbook Air
    • macOS 12.6
    • Xcode 14.0
    • iOS 16.0

    I did the following steps:

    1. I built Erlang/OTP 25.0.4 with export DED_LDFLAGS_CONFTEST="-bundle" with asdf
    2. git clone https://github.com/elixir-desktop/ios-example-app.git
    3. cd ios-example-app
    4. carthage update --platform ios --use-xcframeworks --no-use-binaries --new-resolver (According to this issue: https://github.com/Carthage/Carthage/issues/2615)
    5. open todoapp.xcodeproj
    6. Fix an issue of Bundle Identifier
    7. Connect my iPhone (iOS 16.0) and set the target to it
    8. Build

    But, I got the error: error build: Command PhaseScriptExecution failed with a nonzero exit code.

    I found the issue https://github.com/elixir-desktop/ios-example-app/issues/3, but I feel my issue may be different to it.

    opened by zacky1972 9
  • /Users/zuzannakowal/projects/24.beta/activate: No such file or directory

    /Users/zuzannakowal/projects/24.beta/activate: No such file or directory

    Hi! I've heard about the project in Thinking Elixir podcast.

    I wanted to try it and when building I am getting the following error:

    /Users/zuzannakowal/Library/Developer/Xcode/DerivedData/todoapp-brtxmrwciyidivgfgljugmuxqxyc/Build/Intermediates.noindex/todoapp.build/Debug-iphonesimulator/todoapp.build/Script-EC8A1FD6270B4EF900054F1C.sh: line 7: /Users/zuzannakowal/projects/24.beta/activate: No such file or directory
    Command PhaseScriptExecution failed with a nonzero exit code
    

    It might be an error with my setup. I am an elixir developer and just freshly installed xcode.

    opened by tomekowal 4
  • Support current version of asdf

    Support current version of asdf

    There's possibly a more elegant way to do this but it should do the job.

    I moved everything out of the xcode script into run_mix so that it versions a little nicer. Possibly there's some reason for using the two different locations, happy to move it back if that's the case.

    opened by opsb 1
  • support elixir through asdf

    support elixir through asdf

    building couldn't find any elixir installed.. adding this to shell script (below the nvm line) makes it pick up asdf installed elixir/erlang [ -s "$HOME/.asdf/asdf.sh" ] && \. $HOME/.asdf/asdf.sh # This loads asdf

    opened by petermm 1
  • refactor: Get the Bundle Identifier from config

    refactor: Get the Bundle Identifier from config

    This section is hard-coded

    https://github.com/elixir-desktop/ios-example-app/blob/main/todoapp/Bridge.swift#L41

            home = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask)[0].appendingPathComponent("io.elixirdesktop.example")
    
    opened by RyoWakabayashi 0
  • Get the Bundle Identifier from config

    Get the Bundle Identifier from config

    This section is hard-coded

    https://github.com/elixir-desktop/ios-example-app/blob/main/todoapp/Bridge.swift#L41

            home = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask)[0].appendingPathComponent("io.elixirdesktop.example")
    
    opened by RyoWakabayashi 0
Owner
elixir-desktop
libraries and tools to create desktop apps with elixir and liveview (Windows, Linux, macOS, Android)
elixir-desktop
💡 A light Swift wrapper around Objective-C Runtime

A light wrapper around Objective-C Runtime. What exactly is lumos? lumos as mentioned is a light wrapper around objective-c runtime functions to allow

Suyash Shekhar 139 Dec 19, 2022
A type-safe auto-generated Swift wrapper around fluentui-emoji

fluentui-emoji.swift A type-safe auto-generated Swift wrapper around fluentui-emoji. Usage Requirements iOS 13+ macOS 10.15+ tvOS 13+ watchOS 6+ Insta

Yubo Qin 11 Dec 27, 2022
A Swift iOS application designed to help DMs / GMs run tabletop RPGs

Project Overview This project is a work in progress iOS app designed to help Dungeon Masters run tabletop role playing games. It is meant as an explor

null 0 Nov 30, 2021
Abusing dlopen to load & run mach binaries on iOS

MobileTerminal Proof-of-concept for sandboxed Terminal environment for iOS. Uses dlopen() to load mach binaries as libraries, then finds & calls main(

Steven Troughton-Smith 184 Dec 18, 2022
A simple App to Track the status of Covid-19 around the World. Using SwiftUI and GraphQL

CovidUI CovidUI is a simple App to Track the status of Covid-19 around the World. This is a simple App I made to track the spread of Covid-19 for me a

Mathias Quintero 77 Dec 14, 2022
You can share and communicate with developers around the world through the Fabula app.

FabulaItemsProvider This is the source package for the Fabula project. You can share and communicate with developers around the world through the Fabu

jasu 231 Dec 31, 2022
The Xcode project for my COSC4355 Weather App

Open WeatherApp_Baji_Adib in Xcode to view An iOS application that provides weather information on the same level of detail as a native weather app Di

null 0 Dec 3, 2021
Want to know the current weather around the globe? Clima has your back!

Clima (a weather app) Dreaming about going on vacation somewhere? Use Clima to find real time weather from around the world or use your GPS to get loc

null 0 Dec 27, 2021
Single Webview project for xcode in swift

Single Webview project for xcode in swift An xcode project that with single webview(UIWebView) that opens external URL, for hybrid web app debug or te

null 0 Dec 11, 2021
Icons generator for XCode assets project

SwiftUI-PictGen Icons generator for XCode assets project. Small project in Swift

Laurent Llexti 0 Dec 29, 2021
Don't start from scratch, start from Here! This is a starter project for iOS projects. It contains all the basic configurations and common libraries for your project.

Starter-iOS Don't start from scratch, start from Here! This is a starter project for iOS projects. It contains all the basic configurations and common

Shaban Kamel 6 May 24, 2022
NewsAPI-Project - News API Project For iOS

NewsAPI-Project Es necesario descargar y realizar un pod install para ejecutar e

Álvaro Ferrández 0 Feb 3, 2022
Weather-app - Created a simple weather app on Xcode using SwiftUI, only shows one location

weather-app Created a simple weather app on Xcode using SwiftUI, only shows one

Rahul Kadiyala 1 Feb 11, 2022
A SwiftUI app that reads iOS/watchOS/tvOS device model information from Xcode you select.

iVariant A SwiftUI app that reads iOS/watchOS/tvOS device model information from Xcode you select. Preview License iVariant is licensed under MIT. Cop

Lakr Aream 20 Aug 4, 2022
Basic calculator app for iOS devices using Swift 3 and Xcode

iOS Calculator App Basic calculator app for iOS devices using Swift 3 and Xcode. Created for learning purpose. How to use Just download source code an

null 1 Jan 12, 2022
A SwiftUI dynamic property wrapper for fetching media from your photo library. (iOS, tvOS, macOS)

Media Also available as a part of my SwiftUI+ Collection – just add it to Xcode 13+ A package for simplifying the user of the camera and the user's ph

SwiftUI+ 20 Nov 16, 2022
SwiftUI MovieDB prototype app built with Xcode 11 Beta & macOS 10.15 Catalina

SwiftUI MovieDB iOS 13 App SwiftUI MovieDB prototype app built with Xcode 11 Beta & macOS 10.15 Catalina Requirements macOS 10.15 Catalina Xcode 11 Be

Alfian Losari 297 Dec 17, 2022
Simple alternate app icons with Xcode 13 and SwiftUI

XCode 13 Alternate App Icons Preamble With the beta of XCode 13 creating alternate app icons is now much simpler and requires much less manual steps t

Jake Nelson 23 Jul 19, 2022
Companion app and XCode extension for adding SwiftUI recipes to your code.

SwiftUI Recipes Companion Free Companion app and XCode extension for adding SwiftUI recipes to your code. Choose from a rich selection of SwiftUI reci

Gordan Glavaš 17 Nov 20, 2022