cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
8.4k stars 1.96k forks source link

Cocos Creator 3.6.2 iOS platform engine's JavaScript code containing the keyword 'ALIPAY' may result in App Store rejection by Apple. #16161

Open Jameswain opened 1 year ago

Jameswain commented 1 year ago

Cocos Creator version

3.6.2

System information

iOs 15.4

Issue description

我用cocos creator 3.6.2 创建一个空的cocos工程,编译一个IOS平台,编译出来的js代码里包含在ALIPAY相关的字符串,我编译的IOS平台,理论上来说不应该包含任何其他渠道的小游戏平台相关的代码才对,在苹果商店如果有ALIPAY相关的字符串,会导致被拒审,希望cocos大佬们处理一下这个问题。 在build/ios/data/src/cocos-js/instantiated-672c7613.js这个文件,除了ALIPAY还有很多像CC_OPPO、CC_HUAWEI等等跟IOS不相关渠道的关键字。

Relevant error log output

No response

Steps to reproduce

  1. 用 cocos creator 3.6.2 创建一个Empty(3D)工程
  2. 打开构建构建发布面板
  3. 选择发布平台为IOS进行构建
  4. 构建成功后打开build/ios文件夹使用vscode进行搜索ALIPAY关键字

Minimal reproduction project

NewProject.zip

minggo commented 1 year ago

Thanks for feedback. Please use english in future. Thanks.

dumganhar commented 11 months ago

If we rename the platform variable, it will break the compatibility since developer may write some code like

if (CC_ALIPAY) { // CC_ALIPAY will be undefined if we rename it to CC_ALIPYA
   // Do something with alipay platform
} else if (CC_OPPO) {
   // Do something with oppo mini game platform
}
dumganhar commented 4 months ago

No idea how to achieve this, maybe a postprocess of building script to replace 'ALIPAY' to something else.