iTunes Connect: Error ITMS-90171: Invalid Bundle Structure

1,078 views
Skip to first unread message

Cody

unread,
May 22, 2016, 12:06:19 AM5/22/16
to Kivy users support
Hey all,

I'm currently working on an app to be released on the Apple and Android markets, but have run into a problem with submitting a build to iTunes Connect. Specifically, I get several ITMS-90171 errors ( Invalid Bundle Structure ). It looks like several executable files are getting added along with my app, including:

myapp/lib/python2.7/site-packages/kivy/graphics/svg.so.o

myapp/lib/python2.7/site-packages/kivy/core/text/text_layout.so.o

myapp/lib/python2.7/site-packages/kivy/graphics/gl_instructions.so.o

and so on.

Would anyone be able to point me in the right direction of fixing this? It looks like these are included as a part of the "Copy Bundle Resources" build phase as the directory lib/ is listed there. Just really don't know what to do from there. I've removed the directory before, which does allow for submission to iTunes Connect, but then the app fails to run when tested. I think my next step is to make a full copy of the directory and just remove all offending .so.o files. Will that break anything? Thoughts?

Thanks!

Michael Vincent

unread,
May 22, 2016, 12:00:07 PM5/22/16
to Kivy users support
So I've been trying to troubleshoot the exact same problem for the last 10 days without much luck. It appears to be a problem with the toolchain in kivy-ios and Xcode 7.3.1. I submitted a code-level support request with Apple and their only response was to contact the third party development group (kivy) regarding the issue because there isn't anything they can do really.

By the way, deleting the python library from "Copy Bundle Resources" would definitely make the app crash during Apple's review process, there's no doubt about it. The .so.o files are required shared libraries and deleting them would cause the same problem.

I'm afraid the only solution is to fix the toolchain to address these issues (someone correct me if I'm mistaken here). Specifically, the toolchain needs to be updated such that the app not only builds successfully in Xcode, but it also successfully validates and uploads to iTunes Connect. 

Currently, building the app works and it even runs on my phone. I can even get the app to validate in most cases. However, the app cannot be uploaded to iTunes Connect and without this capability, an iOS app cannot be currently developed with kivy - this is a major issue and needs to be addressed. 

ZenCODE

unread,
May 23, 2016, 3:13:38 PM5/23/16
to Kivy users support
Hey

Hit this today myself with validation. What worked for me was writing a script that removes these ".so.o" files as they appear to be left over from building. ".so" files are the shared libraries and it seems the "so.o" should have been cleaned. I removed them and the app still works find, You need to remove them the the dist folder,

I will look into fixing that soon but in the meantime, removing these files should fix it?

Cheers

ZenCODE

unread,
May 23, 2016, 6:11:54 PM5/23/16
to Kivy users support
p.s. Have created a ticket for this.

https://github.com/kivy/kivy-ios/issues/193

Michael Vincent

unread,
May 23, 2016, 7:15:16 PM5/23/16
to Kivy users support
Thanks Zencode! Did you create a dynamic script for this that you'd be willing to share? 

Also in xcode are you getting the following warnings?:

"Directory not found for option '-L/.../kivy-ios/myapp-ios/.../build/lib'"

"Directory not found for option '-F/.../kivy-ios/dist/frameworks'"

ZenCODE

unread,
May 24, 2016, 2:06:42 AM5/24/16
to Kivy users support
Sure :-) Joust change the path to your kivy-ios/dist folder.

import os
from os.path import isdir, join


# path = '/Users/camy/Library/Developer/Xcode/Archives/2016-05-23/'
path = '/Users/camy/kivy/kivy-ios/kivy-ios/dist/'

def clean_folder(folder, file_type):
for file_name in os.listdir(folder):
item = join(folder, file_name)
if isdir(item):
clean_folder(item, file_type)
else:
if file_name[-len(file_type):] == file_type:
print "Removing ", file_name
# os.remove(item)


clean_folder(path, ".so.o")
print "Starting clean..."

Michael Vincent

unread,
May 24, 2016, 11:38:47 AM5/24/16
to Kivy users support
Thanks again Zencode, you're awesome. I can also confirm that I followed your advice, removed the .so.o files from the dist folder, and was able to upload my app to the app store for review. 

I didn't check this to see if you added a response prior to making a script myself, but here is another version of the script in case anyone cares. Just throw this in the kivy-ios folder and run it:

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')



ZenCODE

unread,
May 24, 2016, 4:32:35 PM5/24/16
to Kivy users support
:-)

Cody

unread,
Jun 20, 2016, 10:50:33 PM6/20/16
to Kivy users support
Sorry I'm late to the party... I thought I would receive some sort of notification that my thread had been responded to but I didn't and so forgot about it entirely. Thanks so much for the conversation guys. Removing the files definitely did the trick. Glad to see that a ticket was opened and hopefully this gets officially addressed. Cool on the workaround :)

On Tuesday, May 24, 2016 at 4:32:35 PM UTC-4, ZenCODE wrote:
:-)
Reply all
Reply to author
Forward
0 new messages