diff options
| author | ruki <[email protected]> | 2026-04-05 17:21:30 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-05 17:21:30 +0800 |
| commit | 4a13e671f0ba99feca8daf4a1706e9bcb4ccfa67 (patch) | |
| tree | 24c57eb099605c9b10e322fdf648f2ba96d4886e /tests/projects/objc/iosapp_framework_rpath/test.lua | |
| parent | 95e7d1658cb820accdc1bea5c79562331be9baf7 (diff) | |
| parent | 9b189a6f1098e55c4ea6d1928644bed4acf5a412 (diff) | |
Merge pull request #7451 from Akaps316/codex/fix-ios-framework-rpath
fix(xcode.application): use the correct framework rpath for iOS apps
Diffstat (limited to 'tests/projects/objc/iosapp_framework_rpath/test.lua')
| -rw-r--r-- | tests/projects/objc/iosapp_framework_rpath/test.lua | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/projects/objc/iosapp_framework_rpath/test.lua b/tests/projects/objc/iosapp_framework_rpath/test.lua new file mode 100644 index 000000000..efc69dbea --- /dev/null +++ b/tests/projects/objc/iosapp_framework_rpath/test.lua @@ -0,0 +1,30 @@ +import("utils.binary.rpath") + +function main(t) + if not is_host("macosx") then + return t:skip("wrong host platform") + end + + os.execv("xmake", {"f", "-p", "iphoneos", "-a", "arm64", "--appledev=simulator", "-c"}) + os.execv("xmake", {"-vD"}) + local appfile = "build/iphoneos/arm64/release/demo.app/demo" + local rpaths = rpath.list(appfile) + local found_ios = false + local found_macos = false + if rpaths then + for _, p in ipairs(rpaths) do + if p == "@executable_path/Frameworks" then + found_ios = true + end + if p == "@executable_path/../Frameworks" then + found_macos = true + end + end + end + if not found_ios then + raise("missing iOS framework rpath @executable_path/Frameworks") + end + if found_macos then + raise("found macOS-style framework rpath in iOS app") + end +end |
