1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【ReactNative】バージョン管理のいろいろ【iOS/Android】

Posted at

概要

ReactNativeでアプリを作っていく中で、諸々のファイルで管理しているバージョンが多くて、
たまに分からなくなるので備忘としてまとめました。

共通

アプリバージョン

native/package.json
"version": "1.0.0",
native/package-lock.json
"version": "1.0.0",

iOS

Xcode設定のバージョン

DebugBuild用、ReleaseBuild用とわけてバージョン管理をすることができる。
管理しなくてもビルドは可能。

native/ios/app-name-native.xcodeproj/project.pbxproj
// Debug
CURRENT_PROJECT_VERSION = 1;

// Release
CURRENT_PROJECT_VERSION = 1;

アプリバージョンおよびビルドバージョン

AppStoreConnectにアップロードした際は、ビルドバージョン(CFBundleVersion)が見られるため、
ビルドバージョンを重複させてアップロードすることはできない。

native/ios/app-name-native/Info.plist
	<key>CFBundleShortVersionString</key>
	<string>1.0.0</string>

	<key>CFBundleVersion</key>
	<string>1</string>
native/ios/app-name-tvOS/Info.plist
	<key>CFBundleShortVersionString</key>
	<string>1.0.0</string>

	<key>CFBundleVersion</key>
	<string>1</string>
native/ios/app-name-native-tvOSTests/Info.plist
	<key>CFBundleShortVersionString</key>
	<string>1.0.0</string>

	<key>CFBundleVersion</key>
	<string>1</string>

Android

アプリバージョンとバージョンコード

バージョンコードは、iOSのビルドバージョンとほぼ同義。
PlayStoreConsoleへのアップロードのたびにバージョンアップが必要。
(公開前ならリリースを破棄して、バージョンアップせずにアップロードが可能。)

native/android/app/build.gradle
  versionCode 1
  versionName "1.0.0"

CodePush

CodePushを使っているため、configでアプリバージョンを管理。

confing.json
  "versions": {
    "scheme": "app-name://",
    "app": "1.0.0"
  },
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?