Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional keys to check for url schemes in universal apps. #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions collectIPAMetaData.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,15 @@ def process_ipa(ipa_filename, verbose = False):

plist_values = dict((k, parse.info_plist_data[k]) for k in plist_keys if k in parse.info_plist_data)

url_schemes = []
for url_type in parse.info_plist_data.get('CFBundleURLTypes', []):
for url_scheme in url_type.get('CFBundleURLSchemes', []):
url_schemes.append(url_scheme)

url_schemes_set = set([])
url_scheme_keys = ['CFBundleURLTypes', 'CFBundleURLTypes~iphone', 'CFBundleURLTypes~ipad']
for url_scheme_key in url_scheme_keys:
for url_type in parse.info_plist_data.get(url_scheme_key, []):
for url_scheme in url_type.get('CFBundleURLSchemes', []):
url_schemes_set.add(url_scheme)

result = plist_values.copy()
result['url_schemes'] = url_schemes
result['url_schemes'] = list(url_schemes_set)
result['item_id'] = parse.itunes_meta_data['itemId']
result['name'] = parse.itunes_meta_data['itemName']

Expand Down