Closed JulienDev closed 2 weeks ago
I don't know why it's looking for Ass.framework
, it should be ass.framework
. Can you enable the log and show me complete log?
This is the only log I get, as it's crashing just before the app is launched on the device
did you enable the log following the issue template? if no ass.framework, it should not crash, just no subtitle rendered. debugging in lldb or xcode is also required for crash.
Let me add some details:
flutter: mdk.FINE: 11:15:56.315: Failed to load libass runtime
flutter: mdk.FINE: 11:15:56.315: symbol not found: ass_library_init
Full Logs: https://pastebin.com/zbLD8Tfp.
Embed without signing
or Embed & Sign
:
When the app is launchign, the app is crashing instantly. There is no dart log printed in the console.
dyld[1969]: Library not loaded: @rpath/Ass.framework/Ass Referenced from:
/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Runner.debug.dylib Reason: tried: '/usr/lib/swift/Ass.framework/Ass' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Ass.framework/Ass' (no such file), '/usr/lib/swift/Ass.framework/Ass' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Ass.framework/Ass' (no such file), '/usr/lib/swift/Ass.framework/Ass' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/9A0F882A-350D-4874-8233-549723759051/Runner.app/Frameworks/Ass.framework/Ass' (no such file)
I run ios example on my m1 mac, can't reproduce your crash if Embed & Sign
. Run otool -L $app_executable
shows @rpath/ass.framework/ass (compatibility version 9.0.0, current version 0.17.2)
but not Ass.framework
. If I add environment variables DYLD_PRINT_LIBRARIES
with value 1
in xcode->product->scheme->edit scheme->run->arguments->environment variables, console shows all libraries try to load, including ass.framework
:
dyld[87478]: <368D5F50-8435-3AE6-A8F3-9BB44045441F> /private/var/folders/cm/zh7xx2js7kq1gjvvjr_lx7hc0000gn/X/F9E10E5D-0AFF-5C40-A58E-C4DE1D9A74A6/d/Wrapper/Runner.app/Frameworks/ass.framework/ass
Thanks for you investigation @wang-bin
Now I understand the issue. In my app I'm embedding two players, media-kit and fvp so the user can select the player he prefers to use. It looks like media-kit is looking for a libass under Ass.framework/Ass
name while fvp needs ass.framework/ass
.
When I remove media-kit from the project, the app is able to launch successfully and FVP subtitles are displayed.
Do you have a solution in mind to make it work? I really want to keep both players in my app. I tried to create a symbolic link but it's not possible on MacOS:
ln -s ass.framework/ass Ass.framework/Ass
ln: Ass.framework/Ass: File exists
media-kit provides Ass.framework, dont delete it. if you want to use ass.framework for media kit, copy to Ass.framework, and use install_name_tool to change id of Ass.framework/Ass. if your filesystem is case insensitive, the only solution is using the same name in both projects, i can try to add Ass.framework as a dependency
Not sure to understand the install_name_tool solution but yes indeed, could be great if Ass.framework could be used by FVP too.
Btw I didn't delete Ass.framework, I think xcode removed it automatically when he noticed that I'm embedding Ass and ass
upgrade the dependencies, then should be compatible eith Ass.framework, and ass.framework is not required in your case
Sorry for the delay, it works perfectly, thank you so much!
Describe the bug I want to be able to display subtitles on iOS but I cannot make it work. I followed the readme documentation, and tried to include libass framework but unfortunately I didn't succeed.
For example, I tried to:
I'm not sure what I'm doing wrong. Could you please provide a guide on how to make it work on iOS? Or could you integrate it in the example app? Btw, what's the reason for not including libass directly in the iOS lib?
Thanks for your support!