Instalace Mac

Po spusteni VMware:

  • nakopirovat ssh klice
  • nakopirovat Xcode
xip -x Xcode_11.xip
mv Xcode.app/ /Applications
sudo xcodebuild -license
  • instalace command line tools
hdiutil attach /Users/host/Command_Line_Tools_for_Xcode_11.dmg
sudo installer -package /Volumes/Command\ Line\ Developer\ Tools/Command\ Line\ Tools.pkg -target /
hdiutil detach /Volumes/Command\ Line\ Developer\ Tools
  • spustit Xcode - nainstaluje si svoje veci
  • instance node
sudo installer -package node-v10.16.3.pkg -target /
  • instance Cordova a Ionic
sudo npm install -g cordova
sudo npm install -g ionic
  • instance Cocoa Pods
sudo gem install cocoapods
pod setup

alternativa, kdyz nechci stahovat cocoa pods repo:

tar cf - .cocoapods | ssh macek "tar xf -"
  • provisioning profily:
mkdir -p Library/MobileDevice/Provisioning\ Profiles
tar cf -  -C Library/MobileDevice "Provisioning Profiles" | ssh macek "tar xf - -C Library/MobileDevice"
  • certificaty
security unlock-keychain -p XXXX
security import ios_development.p12 -k login.keychain -P XXXX -A

neumim zatim automaticky povolit pristup ke vsemu

  • pro build na iOS takto staci
  • instalace Homebrew ?
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • android studio
hdiutil attach /Users/host/android-studio-ide-191.5791312-mac.dmg
cp -rp /Volumes/Android\ Studio\ 3.5.0/Android\ Studio.app /Applications   # nefunguje, radsi to udelat manualne
hdiutil detach /Volumes/Android\ Studio\ 3.5.0

spustit

stahuje sdk, tools, darwin

Preparing "Install Android SDK Tools (revision: 26.1.1)".
Downloading https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip
"Install Android SDK Tools (revision: 26.1.1)" ready.
Installing Android SDK Tools in /Users/host/Library/Android/sdk/tools
"Install Android SDK Tools (revision: 26.1.1)" complete.
"Install Android SDK Tools (revision: 26.1.1)" finished.
Preparing "Install SDK Patch Applier v4 (revision: 1)".
Downloading https://dl.google.com/android/repository/3534162-studio.sdk-patcher.zip
"Install SDK Patch Applier v4 (revision: 1)" ready.
Installing SDK Patch Applier v4 in /Users/host/Library/Android/sdk/patcher/v4
"Install SDK Patch Applier v4 (revision: 1)" complete.
"Install SDK Patch Applier v4 (revision: 1)" finished.
Preparing "Install Android Emulator (revision: 29.2.1)".
Downloading https://dl.google.com/android/repository/emulator-darwin-5889189.zip
java.io.IOException: Cannot download 'https://dl.google.com/android/repository/emulator-darwin-5889189.zip': Read timed out
, response: 200 OK
Warning: An error occurred while preparing SDK package Android Emulator: Cannot download 'https://dl.google.com/android/repository/emulator-darwin-5889189.zip': Read timed out
, response: 200 OK.
"Install Android Emulator (revision: 29.2.1)" failed.
Preparing "Install Android SDK Platform-Tools (revision: 29.0.4)".
Downloading https://dl.google.com/android/repository/platform-tools_r29.0.4-darwin.zip
"Install Android SDK Platform-Tools (revision: 29.0.4)" ready.
Installing Android SDK Platform-Tools in /Users/host/Library/Android/sdk/platform-tools
"Install Android SDK Platform-Tools (revision: 29.0.4)" complete.
"Install Android SDK Platform-Tools (revision: 29.0.4)" finished.
Preparing "Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.1)".
Downloading https://dl.google.com/android/repository/extras/intel/haxm-macosx_v7_5_1.zip
"Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.1)" ready.
Installing Intel x86 Emulator Accelerator (HAXM installer) in /Users/host/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager
"Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.1)" complete.
"Install Intel x86 Emulator Accelerator (HAXM installer) (revision: 7.5.1)" finished.
Preparing "Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)".
Downloading https://dl.google.com/android/repository/build-tools_r29.0.2-macosx.zip
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" ready.
Installing Android SDK Build-Tools 29.0.2 in /Users/host/Library/Android/sdk/build-tools/29.0.2
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" complete.
"Install Android SDK Build-Tools 29.0.2 (revision: 29.0.2)" finished.
Preparing "Install Android SDK Platform 29 (revision: 3)".
Downloading https://dl.google.com/android/repository/platform-29_r03.zip
"Install Android SDK Platform 29 (revision: 3)" ready.
Installing Android SDK Platform 29 in /Users/host/Library/Android/sdk/platforms/android-29
"Install Android SDK Platform 29 (revision: 3)" complete.
"Install Android SDK Platform 29 (revision: 3)" finished.
Preparing "Install Sources for Android 29 (revision: 1)".
Downloading https://dl.google.com/android/repository/sources-29_r01.zip
"Install Sources for Android 29 (revision: 1)" ready.
Installing Sources for Android 29 in /Users/host/Library/Android/sdk/sources/android-29
"Install Sources for Android 29 (revision: 1)" complete.
"Install Sources for Android 29 (revision: 1)" finished.
Parsing /Users/host/Library/Android/sdk/build-tools/29.0.2/package.xml
Parsing /Users/host/Library/Android/sdk/extras/intel/Hardware_Accelerated_Execution_Manager/package.xml
Parsing /Users/host/Library/Android/sdk/patcher/v4/package.xml
Parsing /Users/host/Library/Android/sdk/platform-tools/package.xml
Parsing /Users/host/Library/Android/sdk/platforms/android-29/package.xml
Parsing /Users/host/Library/Android/sdk/sources/android-29/package.xml
Parsing /Users/host/Library/Android/sdk/tools/package.xml
Android SDK is up to date.
  • nainstalovat Javu 8 (Javu 13 mi to 25.9.2019 nebralo)

stahnout z oracle, potrebuje oracle ucet :(

  • nainstalovat gradle
$ tar cf - gradle-4.4.1 | ssh macek "tar xf -"
  • nastavit PATH

V souboru .bash_profile nastavit PATH na
* gradle
* android tools

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
export ANDROID_HOME=/Users/inited/Library/Android/sdk
export ANDROID_SDK_ROOT=/Users/inited/Library/Android/sdk
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/host/bin:/Users/host/apache-maven-3.5.0/bin:/Users/host/Library/Android/sdk/tools:/Users/host/Library/Android/sdk/platform-tools:/Users/host/gradle-4.4.1/bin:/Users/host/Library/Android/sdk/tools/bin
  • doinstalovat potrebna Android SDK

Pri buildu aplikace se vypise, co chybi.

Napr.:

$ sdkmanager "platforms;android-28"

Inspirace:

Není-li uvedeno jinak, obsah této stránky je pod licencí Creative Commons Attribution-ShareAlike 3.0 License