搜尋套件、儲存庫與 APP 分類

套件詳情v1.5.0

change_app_package_name

使用單一指令變更應用程式套件名稱。自動更新 AndroidManifest、build.gradle、MainActivity 檔案,並將 MainActivity 檔案移動至新的目錄結構。

AndroidiOSmacOSWindowsLinux
近 30 天下載
19萬
喜歡數
1950
Pub 分數
130

安裝套件

flutter pub add change_app_package_name

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個 Flutter 套件,透過單一指令簡化變更應用程式套件名稱的過程。它會自動更新 AndroidManifest.xml、build.gradle 檔案以及 MainActivity,同時將 MainActivity 移動至新的目錄結構。專為需要在多個平台高效重新品牌或重構應用程式套件名稱的開發者設計。此工具確保一致性,並在遷移過程中減少手動錯誤。

適用情境

  • 重新品牌化現有應用
  • 重構應用結構
  • 遷移到新的套件命名空間
  • 準備將應用以新名稱發布
  • 簡化多平台套件更新

主要特色

  • 單個命令執行
  • 自動文件更新
  • 目錄結構調整
  • 跨平台支援(Android、iOS、macOS、Windows、Linux)
  • 在重新命名期間保留應用功能

適合對象

  • Flutter 開發人員管理應用品牌
  • Teams 重構應用架構
  • 開發人員為發布新身分的應用程式做準備
  • 那些尋求在套件名稱變更中實現自動化的使用者

使用建議

  • 使用前備份專案
  • 確保不存在自定義套件引用
  • 驗證重命名後的應用功能
  • 檢查第三方外掛相容性
  • 執行後建議進行手動審查

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Change App Package Name for Flutter

Change App Package Name with single command. It makes the process very easy and fast.

What It does?

  • [x] Update AndroidManifest.xml files for release, debug & profile
  • [x] Update build.gradle file
  • [x] Update MainActivity file. Both java & kotlin supported.
  • [x] Move MainActivity file to new package directory structure
  • [x] Delete old package name directory structure.
  • [x] Update Product Bundle Identifier in iOS.
    • if you have customized CFBundleIdentifier in Info.plist, it will not be updated. You have to update it manually.
  • [x] Specify which platform they want to rename the package for.

How to Use?

Add Change App Package Name to your pubspec.yaml in dev_dependencies: section.

dev_dependencies: 
  change_app_package_name: ^1.4.0

or run this command

flutter pub add -d change_app_package_name

Not migrated to null safety yet? use old version like this

dev_dependencies: 
  change_app_package_name: ^1.4.0

Update dependencies

flutter pub get

Run this command to change the package name for both platforms.

dart run change_app_package_name:main com.new.package.name

To rename only Android:

dart run change_app_package_name:main com.new.package.name --android

To rename only IOS:

dart run change_app_package_name:main com.new.package.name --ios

Where com.new.package.name is the new package name that you want for your app. replace it with any name you want.

Meta

Atiq Samtia– @AtiqSamtia – me@atiqsamtia.com

Distributed under the MIT license.

https://github.com/atiqsamtia/change_app_package_name

Contributing

  1. Fork it (https://github.com/atiqsamtia/change_app_package_name/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

所屬分類

原始碼儲存庫

使用此套件的專案