XCODE工程名称与想要的APP名称 不一样怎么办?/修改APP 名称

本文提供了详细的步骤来指导开发者如何在Xcode中更改iOS应用的显示名称,包括更新Info.plist文件中的Bundle Display Name和Bundle Name,同时强调了不要更改Bundle Identifier的重要性。
iOS应用在设备上的显示名称比较重要,它必须和提交程序信息时的一致,如果不一致那么你的软件将被驳回

下面是APPLE的工作人员EMAIL给我的建议:

To change the installed application name, in Xcode:

1. Select your Target on the left side under Groups & Files
2. Select File > Get Info
3. Select the Build tab
4. From the Configurations popup, select All Configurations
5. In the search box, type in "product name"
6. Double-click the entry field and type in the new name of your product, and select OK.
7. In your Info.plist, change your Bundle Display Name and your Bundle Name appropriately.
8. Do a clean build (Build > Clean all targets; Build > Build) 

Once you’ve completed these steps, you should have a newly built binary in the Products folder. It is important not to change your Bundle Identifier which is used to uniquely identify your application in the App Store. Changing the Bundle Identifier will prevent users from upgrading, and effectively introduce a new application rather than an update.

If necessary, be sure to update the application name in iTunes Connect, as well as in any other metadata references or screenshots.

If you have any questions about this response, or would like to discuss it further, please feel free to reply to this email. We look forward to reviewing your revised app.

Best Regards,

App Review Team
iPhone Developer Program

### 如何实现自定义URL Scheme打开App 要实现类似于 `weixin://` 的自定义 URL Scheme 功能,开发者可以通过配置应用的深层链接(Deep Linking)功能来完成。以下是关于如何实现这一功能的关键点: #### 1. 配置 App 支持 URL Scheme 在开发阶段,需要为应用程序注册一个或多个自定义的 URL Schemes。这一步骤因平台而异。 - **iOS 平台**: 在 Xcode 中编辑项目的 `Info.plist` 文件,添加一个新的键 `CFBundleURLTypes`,并为其设置相应的值。例如: ```xml <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>com.example.myapp</string> <key>CFBundleURLSchemes</key> <array> <string>mycustomscheme</string> </array> </dict> </array> ``` 这样,当用户点击形如 `mycustomscheme://...` 的链接时,系统会尝试启动该应用[^1]。 - **Android 平台**: 在 AndroidManifest.xml 文件中声明 `<intent-filter>` 来处理特定的 URI 方案。例如: ```xml <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="mycustomscheme" /> </intent-filter> </activity> ``` #### 2. 实现跳转逻辑 一旦 App 被成功唤起,就需要解析传入的 URL 参数,并执行相应操作。具体来说,在 iOS Android 上分别有以下方法捕获解析 URL 请求: - **iOS**: 可以重写 AppDelegate 方法 `- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options` 或者使用 SceneDelegate 提供的新 API。 - **Android**: 在 Activity 的 `onCreate()` 或其他生命周期回调函数中调用 `getIntent().getData()` 获取传递过来的数据对象 Uri。 #### 3. 测试验证 为了确保整个流程正常工作,建议进行全面测试,包括但限于以下几个方面: - 不同设备型号下的兼容性; - 各种网络环境中的表现差异; - 用户未安装目标 APP 场景下行为是否合理友好提示等。 ```java // 示例代码:Android 接收 Intent 数据 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // 获取意图数据 Intent intent = getIntent(); Uri data = intent.getData(); if(data != null){ String scheme = data.getScheme(); // e.g., 'http', 'https' String host = data.getHost(); // 主机名部分 List<String> params = data.getPathSegments(); // 路径片段列表 Log.d("CustomUrl", "Received custom url:" + data.toString()); processDeepLink(scheme,host,params); // 自定义业务逻辑处理 } } ``` ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值