Crash error(relative file paths not allowed @ rpath/libswift XPC. dylib) on iPhone6s Base Xcode15

Crash occurs on iPhone 6S (13.1.3)
iPhone 6S (13.4.1) is normal.

The specific error causing the crash is as follows:

May 15 17:41:26 iPhone6s APP2(CoreFoundation)[733] : Error loading /var/containers/Bundle/Application/6670703C-C3BA-41D0-8226-615C5770AD73/APP2.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/6670703C-C3BA-41D0-8226-615C5770AD73/APP2.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): relative file paths not allowed ‘@rpath/libswiftXPC.dylib’

Unity Version : 2021.3.37f1.

1 Like

Same,
XS Max, iOS 13.1.3,
Xcode 15.0.1
Unity 2021.3.38

There was no crash with Unity 2021.3.29. Additionally we updated all the plugins like Facebook, Firebase, AppsFlyer etc., so I’m not sure which of it causes the crash now.

May 22 16:38:45 iPhone-XS-QA MyApp(CoreFoundation)[387] <Notice>: Error loading /var/containers/Bundle/Application/99834DD0-4983-46BC-A990-0725895ABFC2/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/99834DD0-4983-46BC-A990-0725895ABFC2/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): relative file paths not allowed '@rpath/libswiftXPC.dylib'

UPD: we checked that this crash is not related to a unity version. Apparently some of the updated plugins causes it

Do you know where the crash occurred in the plugin?
I have upgraded the Unity versions of Facebook (17.0.0) and Firebase (12.0.0).

In our case this crash occurs because of the Facebook plugin. We upgraded it from 14 to 17 version. I have no solution yet.
UPD: We found out, that this crash occurs specifically with the FB SDK v17.0.1. There is no crash with v17.0.0 or v16.0.2 for example.

Hi,

I have found two workarounds for this problem and will share them.

The first is to use ‘install_name_tool’ command to replace the path in this question with a dummy absolute path like below:

(extracting *.ipa)
install_name_tool -change @rpath/libswiftXPC.dylib /dummy/libswiftXPC.dylib Payload/[APPNAME].app/Frameworks/UnityFramework.framework/UnityFramework
(zipping & resigning)

The second is to create an empty libswiftXPC.dylib and place it under the app’s Frameworks directory like below:

(extracting *.ipa)
cp libswiftXPC.dylib Payload/[APPNAME].app/Frameworks/
(zipping & resigning)

Both methods actually solved the problem.

1 Like