12
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Flutter リリース済みのアプリをアップデートする手順

Last updated at Posted at 2023-03-11

はじめに

iOS、Androidのネイティブ開発ではXcode, Android Studioを使ってアプリのバージョンを上げてストアに申請し、アップデートする流れかと思います。

しかしFlutterに用意されているやり方はちょっと違って、それで最初のうちは混乱しがちでした。。
なので一連の操作の流れをここにまとめたいと思います。

アップデート方法に関してはいろいろなやり方があるっぽいので、この記事は「あくまで私の場合は」と言う点だけご了承お願いします!

※CI/CDを使わない、完全ローカルでの作業となります。

pubspec.yamlを編集

pubspec.yaml内の

version: 1.0.5+4

の部分を変更します。

例えば

 version: ○.○.○+△

iosの場合「○.○.○」の所がversion、「△」がビルド番号

androidの場合「○.○.○」の所がversionName、「△」がversionCode

ビルドして新しいバージョンを反映させる

ここであるあるなのだが、pubspec.yamlを編集したからすぐにバージョン番号が反映されるかと言うと、そんなことはない。。。

「Xcodeでarchiveを作成してもバージョンが変わっていない!!!」と言う感じです。。:sweat:

iOSの場合

flutter pub get
flutter build ios

iosフォルダ内のRunner.xcworkspaceからXcodeを開き

Screenshot 2025-01-08 at 13.36.51.png

Distribution Appボタンからarchiveを作成して送信

Androidの場合

flutter clean
flutter build appbundle

build/app/outputs/bundle/release/の場所にaabファイルが出力されます

もしKeystoreファイルが見つからないエラーが出た場合は、key.propertiesファイルをandroidディレクトリ配下に作成していない可能性があります。

android/key.properties
storePassword=your_password
keyPassword=your_password
keyAlias=key0
storeFile=./keystore
12
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?