diff --git a/.ci/test_project.sh b/.ci/test_project.sh index accb4537..93bed686 100755 --- a/.ci/test_project.sh +++ b/.ci/test_project.sh @@ -5,7 +5,14 @@ set -eo pipefail toolchain create Touchtracer kivy-ci-clone/examples/demo/touchtracer +# Build for iOS xcodebuild -project touchtracer-ios/touchtracer.xcodeproj \ -scheme touchtracer \ -destination generic/platform=iOS\ - clean build CODE_SIGNING_ALLOWED=NO | xcpretty \ No newline at end of file + clean build CODE_SIGNING_ALLOWED=NO | xcpretty + +# Build for iOS Simulator +xcodebuild -project touchtracer-ios/touchtracer.xcodeproj \ + -scheme touchtracer \ + -destination 'generic/platform=iOS Simulator' \ + clean build CODE_SIGNING_ALLOWED=NO ARCHS=$(arch) | xcpretty \ No newline at end of file diff --git a/kivy_ios/recipes/zbarlight/__init__.py b/kivy_ios/recipes/zbarlight/__init__.py index d503d045..d7be0296 100755 --- a/kivy_ios/recipes/zbarlight/__init__.py +++ b/kivy_ios/recipes/zbarlight/__init__.py @@ -12,7 +12,8 @@ class ZbarLightRecipe(Recipe): url = "https://github.com/Polyconseil/zbarlight/archive/{version}.tar.gz" library = "zbarlight.a" depends = ["hostpython3", "python3", "libzbar"] - pbx_libraries = ["libz", "libbz2", "libc++", "libsqlite3", "CoreMotion"] + pbx_libraries = ["libz", "libbz2", "libc++", "libsqlite3"] + pbx_frameworks = ["CoreMotion"] include_per_platform = True def get_zbar_env(self, plat): diff --git a/kivy_ios/toolchain.py b/kivy_ios/toolchain.py index 471755e2..ea5c4a5e 100755 --- a/kivy_ios/toolchain.py +++ b/kivy_ios/toolchain.py @@ -1322,7 +1322,6 @@ def update_pbxproj(filename, pbx_frameworks=None): logger.info("Analysis of {}".format(filename)) project = XcodeProject.load(filename) - sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip() group = project.get_or_create_group("Frameworks") g_classes = project.get_or_create_group("Classes") @@ -1333,8 +1332,9 @@ def update_pbxproj(filename, pbx_frameworks=None): f_path = join(ctx.dist_dir, "frameworks", framework_name) else: logger.info("Ensure {} is in the project (pbx_frameworks, system)".format(framework)) - f_path = join(sysroot, "System", "Library", "Frameworks", - "{}.framework".format(framework)) + # We do not need to specify the full path to the framework, as + # Xcode will search for it in the SDKs. + f_path = framework_name project.add_file( f_path, parent=group, @@ -1346,13 +1346,11 @@ def update_pbxproj(filename, pbx_frameworks=None): ), ) for library in pbx_libraries: - logger.info("Ensure {} is in the project (pbx_libraries, dylib+tbd)".format(library)) - f_path = join(sysroot, "usr", "lib", - "{}.dylib".format(library)) - project.add_file(f_path, parent=group, tree="DEVELOPER_DIR", force=False) - f_path = join(sysroot, "usr", "lib", - "{}.tbd".format(library)) - project.add_file(f_path, parent=group, tree="DEVELOPER_DIR", force=False) + library_name = f"{library}.tbd" + logger.info("Ensure {} is in the project (pbx_libraries, tbd)".format(library)) + # We do not need to specify the full path to the library, as + # Xcode will search for it in the SDKs. + project.add_file(library_name, parent=group, tree="DEVELOPER_DIR", force=False) for xcframework in xcframeworks: logger.info("Ensure {} is in the project (xcframework)".format(xcframework)) project.add_file(