Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python kivy xcode 7问题-构建和归档工作正常,但验证失败_Python_Ios_Xcode_Validation_Kivy - Fatal编程技术网

Python kivy xcode 7问题-构建和归档工作正常,但验证失败

Python kivy xcode 7问题-构建和归档工作正常,但验证失败,python,ios,xcode,validation,kivy,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

我已经在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."

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

我将为遇到此问题的未来用户发布解决方案。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')

我也犯了同样的错误,这是因为在我的kivy ios设置中不必要地安装了
pip
ed
py2app
。删除它为我解决了这个问题。

好吧,所以我升级到了新的toolchain.py,它允许我构建并通过验证而不会出错。但是,当我尝试上传到应用商店时,仍然存在一个问题。上载失败,出现以下错误:“错误ITMS-90171:“包结构无效-不允许使用二进制文件“…/lib/python2.7/site packages/kivy/weakproxy.so.o”。您的应用程序不能包含独立的可执行文件或库,但受支持的捆绑包的CbundleExecutable除外…”有一些错误。是否有其他人遇到此错误?