KivyXcode7发布构建和归档工作正常,但验证失败

2024-04-24 08:41:54 发布

您现在位置:Python中文网/ 问答频道 /正文

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

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


Tags: orininfo应用程序消息错误findfamily
1条回答
网友
1楼 · 发布于 2024-04-24 08:41:54

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

相关问题 更多 >