OGeek|极客世界-中国程序员成长平台

标题: ios - Titanium ,使用包含 -> & 的名称验证 iOS 应用程序 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 11:56
标题: ios - Titanium ,使用包含 -> & 的名称验证 iOS 应用程序

用钛开发的应用程序

我必须发布一个名为 Pizze&Altro 的应用程序

问题出在应用名称中包含的&

文件 tiapp.xml 给了我错误,然后我把名字写成这样: enter image description here (问题1解决了)

但是,在使用 xCode 验证应用程序期间,我发现自己遇到了这个错误(问题 2)

enter image description here

我尝试了这个解决方案:https://developer.appcelerator.com/question/147989/invalid-url-scheme-when-validating-app ,我通过编辑此部分复制了应用程序目录中的 Info.plist 文件,如下所示:

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>--.--.--</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>izze&amp;Altro</string>
        </array>
    </dict>
</array>

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>--.--.--</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>izze&Altro</string>
        </array>
    </dict>
</array>

但我总是发现自己在错误面前



Best Answer-推荐答案


我通过使用本地化解决了我的一个应用程序中的这个特殊问题:

第 1 步:在您的 tiapp.xml 中,使用不带任何特殊符号的名称:

<name>izze Altro</name>

第 2 步:创建 i18n/en/app.xml 并包含以下内容(注意 i18n 应该与 Resources 在同一目录中;它不应该在里面资源本身):

<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <string name="appname">izze&Altro</string>
</resources>

第 3 步:清理项目,然后再次尝试发布。

有关相同信息,请参阅 Appcelerator 的此博客文章,以及有关如何为 Android 执行相同操作的信息(您没有询问或标记 Android,因此我没有直接包含该信息): http://www.appcelerator.com/blog/2012/02/internationalization-of-app-names/

关于ios - Titanium ,使用包含 -> & 的名称验证 iOS 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26129689/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4