diff --git a/buildozer/default.spec b/buildozer/default.spec index 52a3c73..9adebae 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -160,6 +160,9 @@ fullscreen = 1 # iOS specific # +# (str) Path to a custom kivy-ios folder +#ios.kivy_ios_dir = ../kivy-ios + # (str) Name of the certificate to use for signing the debug version # Get a list of available identities: buildozer ios list_identities #ios.codesign.debug = "iPhone Developer: ()" diff --git a/buildozer/targets/ios.py b/buildozer/targets/ios.py index 6fff9c5..5f6de92 100644 --- a/buildozer/targets/ios.py +++ b/buildozer/targets/ios.py @@ -92,12 +92,22 @@ class TargetIos(Target): def install_platform(self): cmd = self.buildozer.cmd self.ios_dir = ios_dir = join(self.buildozer.platform_dir, 'kivy-ios') + custom_kivy_ios = self.buildozer.config.getdefault('app', 'ios.kivy_ios_dir') + if custom_kivy_ios: + custom_kivy_ios = join(self.buildozer.root_dir, custom_kivy_ios) if not self.buildozer.file_exists(ios_dir): - cmd('git clone https://github.com/kivy/kivy-ios', - cwd=self.buildozer.platform_dir) + if custom_kivy_ios: + cmd('mkdir -p "{}"'.format(ios_dir)) + cmd('cp -r "{}"/* "{}"/'.format(custom_kivy_ios, ios_dir)) + else: + cmd('git clone https://github.com/kivy/kivy-ios', + cwd=self.buildozer.platform_dir) elif self.platform_update: - cmd('git clean -dxf', cwd=ios_dir) - cmd('git pull origin master', cwd=ios_dir) + if custom_kivy_ios: + cmd('cp -r "{}"/* "{}"/'.format(custom_kivy_ios, ios_dir)) + else: + cmd('git clean -dxf', cwd=ios_dir) + cmd('git pull origin master', cwd=ios_dir) self.ios_deploy_dir = ios_deploy_dir = join(self.buildozer.platform_dir, 'ios-deploy')