简体   繁体   中英

How do I use binary modules in Kivy or BeeWare to create an iOS app?

I am trying to make an IOS app using either Kivy or BeeWare that use the dlib , opencv-python , imutils , and scipy libraries. The libraries are binary (meaning the library have code from another programming language) and can't be compiled by mobile phones (what I know from research). These libraries are very important Python libraries and I need them for my project, so is there a way to use this in my IOS app? Any help will be appreciated.

and can't be compiled by mobile phones (what I know from research)

In general either:

  • the source code can actually be compiled for mobile phones (but usually there's no precompiled binary distribution for that); or
  • the source code can be compiled for mobile phones but only after making minor modifications/fixes (ie it makes assumptions about the platform not applicable to the mobile toolchain); or
  • the source code cannot be compiled for mobile phones without significant non-trivial changes (or it might not be realistically possible at all).

All three of these possibilities are quite common. All of your examples are probably one of the first two possibilities, for instance python-for-android supports opencv and you can see the methodology it uses to patch it here . Similarly it has partial support for scipy.

The iOS build tools you mention have similar methods of supporting non-Python components that need compiling. I think it's likely that all the libraries you want can work, with varying amounts of effort to work out how to build them. However, this is quite complex so if you aren't familiar with the process you'll need to dive into the toolchain programs or try to contact their development communities to see if they can guide you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM