반응형

안녕하세요.

 

플러터로 android 용 앱을 개발하다가 앱이 좀 괜찮으면 iOS로 확장하고 싶은 욕구가 생기겠죠?

그런데 처음부터 iOS를 염두해두고 프로젝트를 만들지 않았다면, 확장을 어떻게 해야 하나 할겁니다.

 

간단하게 확장하는 방법 정리 해봤습니다.

 

 

먼저 빌드할 플랫폼을 선택합니다.

 

terminal에서 다음과 같이 입력하면 되는데요.

 $ flutter config --enable-<platform>

 

ios 의 경우에는  flutter config --enable-ios 라고 입력 합니다.

 

그리고 나서 프로젝트를 재 생성 합니다.

$ flutter create .

을 입력하면 다시 프로젝트가 재 생성됩니다.

 

 

 

사용 예 )

~/$ flutter config --enable-ios
Setting "enable-ios" value to "true".

You may need to restart any open editors for them to read new settings.


~/github/arbot_care (karzia)$ flutter create .
⣟

Recreating project ....
  windows/runner/flutter_window.cpp (created)
  windows/runner/utils.h (created)
  windows/runner/utils.cpp (created)
  windows/runner/runner.exe.manifest (created)
  windows/runner/CMakeLists.txt (created)
  windows/runner/win32_window.h (created)
  windows/runner/Runner.rc (created)
  windows/runner/win32_window.cpp (created)
  windows/runner/resources/app_icon.ico (created)
  windows/runner/main.cpp (created)
  windows/runner/resource.h (created)
  windows/runner/flutter_window.h (created)
  windows/flutter/CMakeLists.txt (created)
  windows/.gitignore (created)
  windows/CMakeLists.txt (created)
  arbot_care.iml (created)
  web/favicon.png (created)
  web/index.html (created)
  web/manifest.json (created)
  web/icons/Icon-maskable-512.png (created)
  web/icons/Icon-192.png (created)
  web/icons/Icon-maskable-192.png (created)
  web/icons/Icon-512.png (created)
  android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created)
  android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created)
  android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created)
  android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created)
  android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created)
  android/app/src/main/kotlin/io/netplant/arbot_care/MainActivity.kt (created)
  android/arbot_care_android.iml (created)
  ios/RunnerTests/RunnerTests.swift (created)
  .idea/runConfigurations/main_dart.xml (created)
  .idea/libraries/KotlinJavaRuntime.xml (created)
  linux/main.cc (created)
  linux/my_application.h (created)
  linux/my_application.cc (created)
  linux/flutter/CMakeLists.txt (created)
  linux/.gitignore (created)
  linux/CMakeLists.txt (created)
Resolving dependencies... 
Got dependencies.
Wrote 42 files.

All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev

 

 

참고로 지원 되는 플랫폼 목록은 다음과 같습니다.

 

--enable-web Enable Flutter for web. This setting will take effect on the master, dev, beta, and stable channels
--no-enable-web Disable Flutter for web. This setting will take effect on the master, dev, beta, and stable channels
--enable-linux-desktop Enable beta-quality support for desktop on Linux. This setting will take effect on the master, dev, beta, and stable channels. Newer beta versions are available on the beta channel
--no-enable-linux-desktop Disable beta-quality support for desktop on Linux. This setting will take effect on the master, dev, beta, and stable channels. Newer beta versions are available on the beta channel
--enable-macos-desktop Enable beta-quality support for desktop on macOS. This setting will take effect on the master, dev, beta, and stable channels. Newer beta versions are available on the beta channel
--no-enable-macos-desktop Disable beta-quality support for desktop on macOS. This setting will take effect on the master, dev, beta, and stable channels. Newer beta versions are available on the beta channel
--enable-windows-desktop Enable beta-quality support for desktop on Windows. This setting will take effect on the master, dev, beta, and stable channels. Newer beta versions are available on the beta channel
--no-enable-windows-desktop Disable beta-quality support for desktop on Windows. This setting will take effect on the master, dev, beta, and stable channels. Newer beta versions are available on the beta channel
--enable-android Enable Flutter for Android. This setting will take effect on the master, dev, beta, and stable channels
--no-enable-android Disable Flutter for Android. This setting will take effect on the master, dev, beta, and stable channels
--enable-ios Enable Flutter for iOS. This setting will take effect on the master, dev, beta, and stable channels
--no-enable-ios Disable Flutter for iOS. This setting will take effect on the master, dev, beta, and stable channels
--enable-fuchsia Enable Flutter for Fuchsia. This setting will take effect on the master channel
--no-enable-fuchsia Disable Flutter for Fuchsia. This setting will take effect on the master channel

 

enable 시킬때는 --enable-<platform> 을 사용하고 disable 시킬때는 --no-enable-<platform> 을 이용합니다.

(disable이 아니네요 ^^;;;)

 

 

 

해피코딩 !!

반응형

Tizen 개발 툴중에 CLI라는 것이 있습니다.


Command Line으로 조작할 수 있도록 제공하는 기능인데요.


자세한 내용은 아래 page로 들어가 보시면 확인 할 수 있습니다.

https://developer.tizen.org/development/tools/native-tools/command-line-interface




Tizen IDE에서 현재 프로젝트를 CLI 로 Export 시킬 수 있는 메뉴가 있습니다. (Export to CLI project를 선택하면 됩니다.)



cli를 실행시킬수 있는 프로그램은  <Tizen SDK>/tools/ide/bin 에 위치 합니다.

실행 명령어는 tizen 입니다.


ex) tizen build-native -a arm -c gcc -C Debug 

       tizen tizen-native -a x86 -c gcc -C Debug




build 형식


  tizen build-native [-a {x86|arm}] [-c {gcc|llvm}] 
                     [-C {Debug|Release}] [--]

  • -a, --arch:

    Specifies the architecture type.

  • -c, --compiler:

    Specifies the compiler. You can use this option with the following compiler versions: gcc-4.9 and llvm-3.6

  • -C, --configuration:

    Specifies the build configuration.

  • --:

    Specifies the project directory.



create 형식
  tizen create native-project [-p <profile name>] [-t <predefined template>] 
                              [-n <project name>] [-- <project location>]

  • -p, --profile:

    Specifies the profile name.

  • -t, --template:

    Specifies the template name.

  • -n, --name:

    Specifies the project name.

  • --:

    Specifies the destination directory where the project is created.



  

Tizen SDK의 ide가 아닌 다른 IDE나 editor를  사용한다면 CLI를 이용해서 build 까지 customizing 해서 사용할 수 있습니다.



'tizen' 카테고리의 다른 글

EFL: event flow control (이벤트 흐름 제어)  (0) 2016.08.25
tpk install, 설치  (0) 2014.05.28
Tizen::Content::ContentSearch 사용하기  (1) 2010.05.19

+ Recent posts