Appcelerator / Mac / 開発環境

アプリ Appcelerator CLI 作成

現在のディレクト構成

~ % ls -la
total 112
drwxr-xr-x+ 27 misadmin  staff    864  2  2 14:01 .
drwxr-xr-x   6 root      admin    192  1 22 16:42 ..
-r--------   1 misadmin  staff      7  1 21 09:47 .CFUserTextEncoding
-rw-r--r--@  1 misadmin  staff  10244  1 24 19:42 .DS_Store
drwx------+ 28 misadmin  staff    896  2  2 13:44 .Trash
drwxr-xr-x   8 misadmin  staff    256  2  2 14:01 .appcelerator
drwxr-xr-x   3 misadmin  staff     96  2  2 14:01 .axway
drwx------   3 misadmin  staff     96  2  1 17:22 .config
-rw-r--r--   1 misadmin  staff    307  1 28 20:40 .gitconfig
-rw-r--r--@  1 misadmin  staff     82  1 28 20:40 .gitflow_export
-rw-r--r--   1 misadmin  staff     13 12  3 05:20 .gitignore_global
-rw-r--r--   1 misadmin  staff     27 12  3 05:20 .hgignore_global
-rw-------   1 misadmin  staff     35  2  2 13:50 .lesshst
drwxr-xr-x   5 misadmin  staff    160  2  2 13:52 .npm
-rw-------   1 misadmin  staff    971  1 31 21:41 .viminfo
drwxr-xr-x   4 misadmin  staff    128  1 24 19:05 .vscode
-rw-------   1 misadmin  staff   8305  2  2 12:26 .zsh_history
drwx------  11 misadmin  staff    352  2  2 12:27 .zsh_sessions
-rw-r--r--   1 misadmin  staff     19  1 31 21:41 .zshrc
drwx------+  6 misadmin  staff    192  2  2 14:33 Desktop
drwx------+  5 misadmin  staff    160  1 21 21:01 Documents
drwx------+  7 misadmin  staff    224  1 28 17:46 Downloads
drwx------@ 79 misadmin  staff   2528  2  2 13:14 Library
drwx------+  4 misadmin  staff    128  1 21 21:50 Movies
drwx------+  3 misadmin  staff     96  1 21 09:47 Music
drwx------+  4 misadmin  staff    128  1 21 10:54 Pictures
drwxr-xr-x+  4 misadmin  staff    128  1 21 09:47 Public
~ %                   

アプリプロジェクト作成

appc new --type app --name MyFirstApp --id com.appcelerator.MyFirstApp
~ % appc new --type app --name MyFirstApp --id com.appcelerator.MyFirstApp
Appcelerator Command-Line Interface, version 9.0.1
Copyright (c) 2014-2022, Appcelerator, Inc.  All Rights Reserved.

No Mobile SDK found, downloading ... 
Downloading https://github.com/appcelerator/titanium_mobile/releases/download/10_1_1_GA/mobilesdk-10.1.1.GA-osx.zip
  100% [========================================] 0.0s   

Extracting SDK to /Users/misadmin/Library/Application Support/Titanium
  100% [========================================] 

Setting Titanium SDK 10.1.1.GA as the default.

Titanium SDK 10.1.1.GA successfully installed!

[INFO]  Creating app project
[INFO]  Template directory: /Users/misadmin/Library/Application Support/Titanium/mobilesdk/osx/10.1.1.GA/templates/app/default
[INFO]  Writing tiapp.xml
[INFO]  Project created successfully in 56ms
Finished Downloading & Installing ti.cloudpush
? Would you like to enable native API access with Hyperloop for this app? (Y/n) 

Y を押下する

? Would you like to enable native API access with Hyperloop for this app? Yes
Mobile Backend Services could not be provisioned in the organization - appcelerator02-udissoft-com as it is not enabled for this service. To enable access please adjust your plan through https://billing.axway.com and add Mobile Backend Services capacity.

*** new completed. ***

~ % 

ディレクト確認(MyFirstAppが作成されている)

~ % ls -l
total 0
drwx------+  6 misadmin  staff   192  2  2 14:33 Desktop
drwx------+  5 misadmin  staff   160  1 21 21:01 Documents
drwx------+  7 misadmin  staff   224  1 28 17:46 Downloads
drwx------@ 79 misadmin  staff  2528  2  2 13:14 Library
drwx------+  4 misadmin  staff   128  1 21 21:50 Movies
drwx------+  3 misadmin  staff    96  1 21 09:47 Music
drwxr-xr-x  14 misadmin  staff   448  2  2 15:49 MyFirstApp
drwx------+  4 misadmin  staff   128  1 21 10:54 Pictures
drwxr-xr-x+  4 misadmin  staff   128  1 21 09:47 Public
~ %

アプリを実行し、シュミレーターを起動

~ % cd MyFirstApp 
MyFirstApp % appc run --platform ios
Appcelerator Command-Line Interface, version 9.0.1
Copyright (c) 2014-2022, Appcelerator, Inc.  All Rights Reserved.

2022-2-2 15:59:03

Operating System
  Name                        = macOS
  Version                     = 12.2
  Architecture                = 64bit
  # CPUs                      = 6
  Memory                      = 8589934592

Node.js
  Node.js Version             = 12.22.9
  npm Version                 = 6.14.15

Titanium CLI
  CLI Version                 = 5.3.2

Titanium SDK
  SDK Version                 = 10.1.1.GA
  SDK Path                    = /Users/misadmin/Library/Application Support/Titanium/mobilesdk/osx/10.1.1.GA
  Target Platform             = iphone

Command
  /Users/misadmin/Library/Application Support/fnm/node-versions/v12.22.9/installation/bin/node /Users/misadmin/.appcelerator/install/9.0.1/package/node_modules/titanium/lib/titanium.js build --platform ios --config-file /var/folders/2s/6h_65m396xng6kc1jy7sf9tm0000gn/T/build-1643785139439.json --log-level info --no-banner --project-dir /Users/misadmin/MyFirstApp

[ERROR] Unable to find an iOS Simulator running iOS 15.2.

MyFirstApp %

シュミレーターをインストールしていないのでエラーになるのは当然です。

  • -l traceオプションを使用すると、より多くのログを取得できます。
  • CLIでエラーが発生した場合は、コマンドを実行した現在の作業ディレクトリにappc-problem.logという名前のファイルがあります。このファイルには、問題の解決をサポートするのに役立つ詳細な診断情報が含まれています。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA