python - kivy xcode 7 问题 - 构建和存档有效,但验证失败

标签 python ios xcode validation kivy

我在 kivy 上创建了一个 iOS 应用程序。在 xcode 7 中构建和归档应用程序后,我无法验证该应用程序。

具体来说,验证失败并显示以下错误消息:

"Couldn't find platform family in Info.plist CFBundleSupportedPlatforms or Mach-O LC_VERSION_MIN for audio_sdl2.so.o"

消息还写着:

"Unable to validate your application.
The archive is invalid. /var/folders/blahblahblah/Packages/myfile.ipa does not exist."

一段时间以来,我一直在尝试解决这个问题,但没有任何运气。有谁知道这里发生了什么或者其他人遇到过这个问题?这是工具链问题吗?

最佳答案

我会为遇到此问题的 future 用户发布解决方案。看起来 kivy-ios 中的“dist”文件夹有 30 个或更多的 .so.o 文件分散在其中,这些文件是构建共享库时遗留下来的。如果您进入并简单地删除这些 .so.o 文件,您就可以成功验证并将您的应用上传到应用商店。

您可以通过在您的 kivy-ios 文件夹中运行以下脚本来解决这个问题:

def kivy_ios_clean(file_ext, dir_to_clean, collection_dir='cleanup_collection'):
    '''
    inputs:
    - file_ext = extension of the file that you want to move out of kivy-ios (ex: .so.o)
    - dir_to_clean = name of directory that needs cleaning

    other:
    - collection_dir = name of directory where all of the removed files will be collected (feel free to modify this script to delete files instead, I implemented it this way so you could see everything...)
    '''
    import os, shutil

    # Make folder for .so.o collection:
    if not os.path.exists(collection_dir):
        os.makedirs(collection_dir)

    # Parse the directory, move the files with the extension of interest to the collection folder
    for root, dirs, files in os.walk(dir_to_clean):
        for i in files:
            if file_ext in i:
                shutil.move(root+'/'+i, collection_dir)

kivy_ios_clean('.so.o', 'dist')

关于python - kivy xcode 7 问题 - 构建和存档有效,但验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37191953/

相关文章:

ios - UITabBarController Tab Modal Presentation -Swift2 OS

ios - 通过购买和恢复删除广告 - Swift

objective-c - 是否可以以非编程方式查看核心数据表中的条目?

swift - 第一次启动应用程序 xcode 时出现黑屏

python - Python中如何动态加载类并调用方法?

python - 单击按钮时中断

python - mongodb到python稀疏矩阵,如何让它更快?

ios - 键入文本字段时如何执行事件

python - 阻止apache运行python脚本

xcode - KIF 测试失败 - View 未启用交互