wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
179 stars 28 forks source link

[iOS] How to include ass.framework? #173

Open JulienDev opened 1 day ago

JulienDev commented 1 day ago

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:

dyld[1093]: Library not loaded: @rpath/Ass.framework/Ass Referenced from: /private/var/containers/Bundle/Application/6C96FD15-F54E-41AD-841D-84D353C4F4BC/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/6C96FD15-F54E-41AD-841D-84D353C4F4BC/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/6C96FD15-F54E-41AD-841D-84D353C4F4BC/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/6C96FD15-F54E-41AD-841D-84D353C4F4BC/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/6C96FD15-F54E-41AD-841D-84D353C4F4BC/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/6C96FD15-F54E-41AD-841D-84D353C4F4BC/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/6C96FD15-F54E-41AD-841D-84D353C4F4BC/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/6C96FD15-F54E-41AD-841D-84D353C4F4BC/Runner.app/Frameworks/Ass.framework/Ass' (no such file), '/private/var/containers/Bundle/Application/6C96FD15-F54E-41AD-841D-84D353C4F4BC/Runner.app/Frameworks/Ass.framework/Ass' (no such file) Message from debugger: killed

  • Renamed ass.framework to Ass.framework -> Not working
  • Added ass.framework to the target with embedding -> Can't build due to this error Multiple commands produce '/Users/julien/Library/Developer/Xcode/DerivedData/Runner-djikgrsclqaypsfkeehwwdcbprkp/Build/Products/Debug-iphoneos/Runner.app/Frameworks/Ass.framework' Target 'Runner' (project 'Runner') has copy command from '/Users/julien/projects/iptv-expert/expert/ios/Ass.framework' to '/Users/julien/Library/Developer/Xcode/DerivedData/Runner-djikgrsclqaypsfkeehwwdcbprkp/Build/Products/Debug-iphoneos/Runner.app/Frameworks/Ass.framework' That command depends on command in Target 'Runner' (project 'Runner'): script phase “[CP] Embed Pods Frameworks”

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!

wang-bin commented 1 day 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?

JulienDev commented 1 day ago

This is the only log I get, as it's crashing just before the app is launched on the device

wang-bin commented 1 day ago

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.

JulienDev commented 1 day ago

Let me add some details:

Screenshot 2024-10-27 at 11 24 23
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.

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)