File tree Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Expand file tree Collapse file tree 1 file changed +72
-0
lines changed Original file line number Diff line number Diff line change
1
+ # 1. Setup a kivy-ios environment and create a project
2
+
3
+ [ https://github.com/kivy/kivy-ios#kivy-for-ios ] ( https://github.com/kivy/kivy-ios#kivy-for-ios )
4
+
5
+ [ https://youtu.be/Etk4ky18Xb0 ] ( https://youtu.be/Etk4ky18Xb0 )
6
+
7
+ ``` shell
8
+ mkdir my_ios_folder
9
+ cd my_ios_folder
10
+
11
+ python3.10 -m venv venv
12
+ . venv/bin/activate
13
+
14
+ pip install git+https://github.com/PythonSwiftLink/kivy-ios
15
+ pip install git+https://github.com/PythonSwiftLink/SwiftTools
16
+
17
+ deactivate
18
+ ```
19
+
20
+
21
+ ```
22
+ . venv/bin/activate
23
+
24
+ toolchain build swiftonize
25
+ toolchain build pythonswiftcore
26
+ toolchain build python3
27
+ toolchain build kivy
28
+ ```
29
+
30
+
31
+
32
+ ##### temporary test folder for this tutorial
33
+
34
+ ```
35
+ mkdir py_src
36
+ touch py_src/main.py
37
+
38
+ toolchain create my_app py_src
39
+ toolchain xcode my_app-ios
40
+ ```
41
+
42
+
43
+
44
+ everytime u add a new wrapper.py to wrapper_sources inside ** my_app-ios/**
45
+
46
+ run this:
47
+
48
+ ```
49
+ toolchain update my_app-ios
50
+ ```
51
+
52
+
53
+
54
+ Xcode will automatic generate new .swift versions of your wrappers.py when u run build in xcode
55
+
56
+ so toolchain update only needed to add all new wrappers.swift the first time you build it.
57
+
58
+
59
+
60
+ Swift versions of the plyer lib, more coming later on.
61
+
62
+ [ https://github.com/PythonSwiftLink/SwiftTools/tree/main/src/swift_tools/plyer ] ( https://github.com/PythonSwiftLink/SwiftTools/tree/main/src/swift_tools/plyer )
63
+
64
+ other kinds of swift wraps:
65
+
66
+ https://github.com/PythonSwiftLink/SwiftTools/tree/main/src/swift_tools/standard
67
+
68
+ examples of wrapping an existing apple class directly
69
+
70
+ https://github.com/PythonSwiftLink/SwiftTools/tree/main/src/swift_tools/apple
71
+
72
+ [ ![ "Buy Me A Coffee"] ( https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png )] ( https://www.buymeacoffee.com/psychowasp )
You can’t perform that action at this time.
0 commit comments