Setup Library for Multiplatform Dev kit ElixirDesktop https://github.com/elixir-desktop/desktop
Using Erlang version 27.3.4 Therefore, the build environment must be the same
brew install wxwidgets@3.2 openssl@3
export KERL_CONFIGURE_OPTIONS="--without-javac --with-ssl=$(brew --prefix openssl@3) --with-wx-config=$(brew --prefix wxwidgets@3.2)/bin/wx-config-3.2"
asdf install erlang 27.3.4
asdf install elixir 1.19.3-otp-27
brew install carthage xcodegen
If available in Hex, the package can be installed
by adding desktop_setup to your list of dependencies in mix.exs:
def deps do
[
{:desktop_setup, github: "thehaigo/desktop_setup", only: :dev}
]
endinstall to your phoenix app and run it
mix desktop.install
mix desktop.setup.ios
cd native/ios
open [your app name].xcodeproj
build from Xcode
if happen build error
try ./run_mix at console
mix desktop.setup.android
open from Android Studio build from Android Studio
if happen build error
try ./app/run_mix at console
- Dektop app setup
- iOS App setup
- Android App setup
- update Android Erlang 25 -> 26
- update Android Erlang 26 -> 27
If you use postgresql, add the following to config/prod.exs
config :[your app name], [your app module name].Repo,
username: "postgres",
password: "postgres",
database: "[your_app_name]_dev",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: 10
if Mix.target() == :ios do
config :[your app name], [your app module name].Repo, hostname: "127.0.0.1"
end
if Mix.target() == :android do
config :[your app name], [your app module name].Repo, hostname: "10.0.2.2"
end
After creating a new migration file, run the following command.
mix desktop.migrations.convert
There is no XCFramework found at 'ios/Carthage/Build/ZIPFoundation.xcframework'.
cd native/ios
carthage update --platform iOS --use-xcframeworks
Sandbox: bash(39046) deny(1) file-read-data
- open xcode genereted ios project
- select Build Settings
- Build Options -> User Script Sandboxins -> Yes
Error running 'app'
/dev/kvm device: permission denied. Grant current user
access to /dev/kvm
sudo chown $USER /dev/kvm
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/desktop_setup.