Skip to content

Commit 6d0d77f

Browse files
fix: check correctly .framework files
The current check if `.framework` files are dynamically linked frameworks is not working as we pass only the framework name. This breaks all projects as tns-core-modules-widgets have `.framework`, CLI decides it is not dynamically linked and the application cannot run on device. Fix the check to pass the full path to the framework.
1 parent 353a18d commit 6d0d77f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/services/ios-project-service.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
233233
const isDynamicFrameworkBundle = async (bundlePath: string) => {
234234
const frameworkBinaryPath = path.join(bundlePath, frameworkName);
235235

236-
return _.includes((await this.$childProcess.spawnFromEvent("file", [frameworkBinaryPath], "close")).stdout, "dynamically linked");
236+
const fileResult = (await this.$childProcess.spawnFromEvent("file", [frameworkBinaryPath], "close")).stdout;
237+
const isDynamicallyLinked = _.includes(fileResult, "dynamically linked");
238+
return isDynamicallyLinked;
237239
};
238240

239241
if (path.extname(frameworkPath) === ".xcframework") {
@@ -249,7 +251,7 @@ export class IOSProjectService extends projectServiceBaseLib.PlatformProjectServ
249251

250252
return isDynamic;
251253
} else {
252-
return await isDynamicFrameworkBundle(frameworkName);
254+
return await isDynamicFrameworkBundle(frameworkPath);
253255
}
254256
}
255257

0 commit comments

Comments
 (0)