Open meow464 opened 3 years ago
The .a
files are added by the update_pbxproj()
function
for recipe in Recipe.list_recipes():
# Some code here
pbx_frameworks.extend(recipe.pbx_frameworks)
pbx_libraries.extend(recipe.pbx_libraries)
libraries.extend(recipe.dist_libraries)
frameworks.extend(recipe.frameworks)
The called function list_recipes()
:
def list_recipes(cls, **kwargs):
skip_list = kwargs.pop("skip_list", ['__pycache__'])
recipes_dir = join(dirname(__file__), "recipes")
for name in sorted(listdir(recipes_dir)):
fn = join(recipes_dir, name)
if isdir(fn) and name not in skip_list:
yield name
As you can see, the list_recipes()
function reads the recipes directly form kivy_ios/recipes
and completely ignores any --add-custom-recipe
argument that might have been passed.
Solution: The update command already accepts a --add-framework
parameters, might as well accept --add-custom-recipe
. Now the user needs to run: toolchain build myrecipe --add-custom-recipe /path/to/myrecipe
AND toolchain update xcodeproj myrecipe --add-custom-recipe /path/to/myrecipe
.
I will make a pull request.
it doesn't look like this was ever accepted, because I still find myself copying my recipe manually into the kivy_ios module:
$VIRTUAL_ENV/lib/python3.9/site-packages/kivy_ios/recipes/myapp/__init__.py
Versions
We were able to test on those versions but it probably affects any version.
Describe the bug
toolchain build myrecipe --add-custom-recipe /path/to/myrecipe
builds the recipe correctly but doesn't add the.a
file to the XCode project. If you drag and drop it underFrameworks
then everything just works.To Reproduce
toolchain build myrecipe --add-custom-recipe /path/to/myrecipe
You can use this simple recipe to test it. It's a simple Cython recipe that queries the iOS version.Expected behavior The
.a
file should be automatically added under theFrameworks
folder in the XCode project.Logs