简体   繁体   English

(Flutter 和 Mac)可以创建一个新项目来升级现有应用程序吗?

[英]( Flutter and Mac ) Possible to create a new project to upgrade an existing app?

I have an app in production, all worked good, but after apple forced to upgrade Xcode to run the app I started to face some issues and no one has found the solution to it yet, my business is in trouble because of this and I need a quick solution to it.我有一个生产中的应用程序,一切正常,但是在苹果强制升级 Xcode 以运行该应用程序后,我开始遇到一些问题,但没有人找到解决方案,因此我的业务陷入困境,我需要一个快速的解决方案。

I have a question ( for mac/appstore context):我有一个问题(对于 mac/appstore 上下文):

I succeeded to get around my run issue by creating a new project.我通过创建一个新项目成功地解决了我的运行问题。 I would like to know if there is a way using which I can link this new flutter project to older projet who contain the app which is in production and create a new release?我想知道是否有一种方法可以将这个新的 flutter 项目链接到包含正在生产中的应用程序并创建新版本的旧项目?

I think it needs to have the same我认为它需要有相同的

  • Bundle name捆绑包名称
  • Bundle identifier signing certificate捆绑标识符签名证书
  • Also perhaps older archives from original project etc也可能是来自原始项目的旧档案等

All these things tell me it's not possible:( but perhaps I'm wrong所有这些事情告诉我这是不可能的:(但也许我错了

I would suggest saving the project in version control, delete the current macos and build folder and regenerate it with flutter create.我建议将项目保存在版本控制中,删除当前的macosbuild文件夹并使用flutter create. Then you can add back the code and config you had before in xcode.然后您可以在 xcode 中添加回之前的代码和配置。 This way you will keep your current flutter project but with a new xcode macos project.这样,您将保留当前的 flutter 项目,但使用新的 xcode macos 项目。

Before that, you might wanna try if calling flutter clean solves this problem.在此之前,您可能想尝试调用flutter clean是否可以解决此问题。 It also cleans the Xcode project.它还清理 Xcode 项目。

For keeping the app you just need to have the same bundle id and a valid signing certificate.为了保留应用程序,您只需要具有相同的捆绑 ID 和有效的签名证书。 https://developer.apple.com/forums/thread/39216 https://developer.apple.com/forums/thread/39216

I don't think you have to create a new project.我认为您不必创建一个新项目。

All you have to do is delete the relevant config for the platform.您所要做的就是删除平台的相关配置。

In the case of ios development, you can simply rm -rf ios In the case of android development, you can simply rm -rf android在ios开发的情况下,可以简单的rm -rf ios在android开发的情况下,可以简单的rm -rf android

Be sure to upgrade Xcode & flutter upgrade and navigate to the project and run flutter create.请务必升级Xcodeflutter upgrade并导航到项目并运行flutter create.

Then you can build again.然后你可以再次构建。 flutter build ios

You can do flutter clean to be sure that you don't leave anything behind or just get rid of the build .你可以做flutter clean以确保你不会留下任何东西或只是摆脱build

This will reinitialize the platform specifics you are missing.这将重新初始化您缺少的平台细节。

After that, you can port back the ios and/or android specific configurations such as bundle id and certificates.之后,您可以移植回ios和/或android特定配置,例如捆绑 ID 和证书。

Note: Please take a backup of the project (git would be better).注意:请备份项目(git会更好)。 Just make a new branch for the new version git checkout -b v2 .只需为新版本git checkout -b v2创建一个新分支。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM