跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[问与答] 同一个项目具有多种不同的发行版,应该如何管理代码与产物?

发表于
比如我手上现在有一个 App 项目,现在同时有国内版和国外版两种版本,以及 android 和 ios 两个平台,所以一共具有 4 种不同的发行版,如何才能正确的管理和维护项目的代码和产物呢?



该项目具有以下的特性



- 是使用 ReactNative 开发的 App 项目,所以 android 和 ios 的代码是在同一个项目里

- 国服和国际服使用了不同的原生 SDK ,因此原生代码不同

- 国服和国际服使用了不同的包名,图标,签名等

- 国服和国际服使用了不同的服务端

- 国服和国际服有大量相同的逻辑代码和相同的页面 UI 组件,但在各种各样的细节地方有区别,例如同一个组件在两个服调用的接口不同,数据结构不同

- 两个服因为服务端不同,导致服务端的接口版本也不同,发版时间也不同



暂时想到的好像就只有这么多了,现在项目是所有代码都在一起,通过不同的环境变量来判断,项目里的状态管理已经一团糟了,经常改了国际服的逻辑,结果导致国服版本出问题之类



还有个问题就是两个服用了不同的 npm 库,最后导致打出来的原生包包含了两个服所有的 sdk 文件,产物体积变得非常巨大



不知道各位大佬有没有遇到类似的问题,有没有好的解决方案

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.