Merge pull request #795 from hackalog/use_ios_frameworks

Support the --add-frameworks flag in kivy-ios
This commit is contained in:
Mathieu Virbel 2019-01-31 15:05:03 +01:00 committed by GitHub
commit 74e26fe6f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,15 +161,19 @@ class TargetIos(Target):
app_name = self.buildozer.namify(self.buildozer.config.get('app', app_name = self.buildozer.namify(self.buildozer.config.get('app',
'package.name')) 'package.name'))
ios_frameworks = self.buildozer.config.getlist('app', 'ios.frameworks', '')
frameworks_cmd = ''
for framework in ios_frameworks:
frameworks_cmd += '--add-framework={} '.format(framework)
self.app_project_dir = join(self.ios_dir, '{0}-ios'.format(app_name.lower())) self.app_project_dir = join(self.ios_dir, '{0}-ios'.format(app_name.lower()))
if not self.buildozer.file_exists(self.app_project_dir): if not self.buildozer.file_exists(self.app_project_dir):
self.buildozer.cmd('./toolchain.py create {0} {1}'.format( create_cmd = './toolchain.py create {0}{1} {2}'.format(frameworks_cmd, app_name,
app_name, self.buildozer.app_dir), self.buildozer.app_dir)
cwd=self.ios_dir) self.buildozer.cmd(create_cmd, cwd=self.ios_dir)
else: else:
self.buildozer.cmd('./toolchain.py update {0}-ios'.format( update_cmd = './toolchain.py update {0}{1}-ios'.format(frameworks_cmd, app_name)
app_name), self.buildozer.cmd(update_cmd, cwd=self.ios_dir)
cwd=self.ios_dir)
# fix the plist # fix the plist
plist_fn = '{}-Info.plist'.format(app_name.lower()) plist_fn = '{}-Info.plist'.format(app_name.lower())