README.md in cocoapods-flutter-dt-0.0.4 vs README.md in cocoapods-flutter-dt-0.0.6

- old
+ new

@@ -1,53 +1,89 @@ # cocoapods-flutter -cocoapods plugin for integration Flutter easily. +Cocoapods plugin for Flutter project integration. ## Installation **Precondition** -Before you use `cocoapods-flutter`, make sure binary server and archive CI tool is ready. I provide you an archive tool and a binary server. Click link below and redirect to another repository. +Before you use `cocoapods-flutter`, make sure binary server is ready. I provide you a simple binary server. Click link below and redirect to another repository. + [BinaryServer](https://github.com/NicolasKim/binary_server.git) -[FlutterArchiveTool](https://github.com/NicolasKim/flutter_archive.git) + **Gem install** ``` -$ gem install cocoapods-flutter +$ gem install cocoapods-flutter-dt ``` Or download source code build gem on your own ``` -$ gem install cocoapods-flutter.gem +$ gem install cocoapods-flutter-dt.gem ``` **Config environment** ``` $ export FLUTTER_BINARY_SERVER_BASEURL=https://www.example.com ``` Here is simple [binary server](https://github.com/NicolasKim/binary_server.git) + ## Usage + + +### Archive + +```shell script +$ cd flutter project +$ pod flutter archive package_name 0.0.1 --repo=cocoapods --wrapper=flutterw --sources=https://github.com/private_spec_repo.git,https://github.com/Cocoapods/Specs.git +``` + + +There is more options +```shell script +$ pod flutter archive --help +--repo podspec repo +--sources podspec sources +--upgrade pub upgrade +--wrapper Default is flutter +--flutterversion FlutterSDK version +--buildrun run build-runner +``` +If you need to customize the .ios/Podfile, you can create a file name of 'local_podfile', the tool will use this file in first priority. + +### Use + In Podfile +``` +plugin 'cocoapods-flutter-dt' +``` +#### Case 1 +Use binary of flutter, In this case, tool will download code from binary server. +```ruby +flutter_pod 'package_name', '0.0.1', :mode=>'debug/release' +``` -### Case 1 +#### Case 2 +Use local flutter project, compile dart code every time when you build native code ```ruby -flutter_pod 'package_name', '0.0.1', :mode=>'debug/release', :sdk_version=>'1.12.13' +flutter_pod 'package_name', '0.0.1',:mode=>'debug/release', :path=>'local path of pubspec file' ``` -**package_name** -Name of package -**:sdk_version** -Flutter sdk version,default is 1.12.13 -**:mode** -Download binary package of version of debug/release from binary server. On mode debug, of course you can attach, and on mode release, yeah it is just release. -### Case 2 +#### Case 3 +Pull flutter project from git repository. In this case, the tool will pull the flutter project into native project root directory and create framework when you pod install or update ```ruby -flutter_pod 'PACKAGE_NAME', :path=>'local/module/path' +flutter_pod 'package_name', '0.0.1', :mode=>'debug/release', :git=>{ + +:url=>'http://github.com/flutter/package_name.git', + +:ref=>'master', + +:wrapper => 'flutterw' + +} ``` -**:path** -Local path of module and `pod install` \ No newline at end of file