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
197 stars 31 forks source link

This package breaks MacOS signing #105

Closed CaptainDario closed 4 months ago

CaptainDario commented 4 months ago

Describe the bug I am currently trying to switch my app's media playback package to this one. However, I am encountering some difficulties. In particular, When I add this package to my pubspec.yaml, I cannot compile on MacOS anymore.

Expected behavior I can compile my app.

Log

[ +156 ms] dyld[26806]: Library not loaded: @rpath/libisar.dylib
[        ]   Referenced from: <1227FC6C-938E-3E70-B654-3E0B988708B6> /Users/dario/dev/DaKanji/da_kanji/build/macos/Build/Products/Debug/DaKanji.app/Contents/MacOS/DaKanji
[        ]   Reason: tried: '/usr/lib/swift/libisar.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/libisar.dylib' (no such file), '/Users/dario/dev/DaKanji/da_kanji/build/macos/Build/Products/Debug/DaKanji.app/Contents/Frameworks/libisar.dylib' (code signature invalid in <FAB35E9D-77DF-32B5-A080-7F4AF60864DF> '/Users/dario/dev/DaKanji/da_kanji/build/macos/Build/Products/Debug/DaKanji.app/Contents/Frameworks/libisar.dylib' (errno=1) sliceOffset=0x00004000, codeBlobOffset=0x000FBED0, codeBlobSize=0x00006B10), '/Users/dario/dev/DaKanji/da_kanji/build/macos/Build/Products/Debug/DaKanji.app/Contents/MacOS/Frameworks/libisar.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libisar.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libisar.dylib' (no such file), '/usr/lib/swift/libisar.dylib' (no such file, not in dyld cache), '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/libisar.dylib' (no such file), '/Users/dario/dev/DaKanji/da_kanji/build/macos/Build/Products/Debug/DaKanji.app/Contents/Frameworks/libisar.dylib' (code signature invalid in <FAB35E9D-77DF-32B5-A080-7F4AF60864DF> '/Users/dario/dev/DaKanji/da_kanji/build/macos/Build/Products/Debug/DaKanji.app/Contents/Frameworks/libisar.dylib' (errno=1) sliceOffset=0x00004000, codeBlobOffset=0x000FBED0, codeBlobSize=0x00006B10), '/Users/dario/dev/DaKanji/da_kanji/build/macos/Build/Products/Debug/DaKanji.app/Contents/MacOS/Frameworks/libisar.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libisar.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libisar.dylib' (no such file)
[   +2 ms] "flutter run" took 63,775ms.

I added the full compilation output as a file.

out.txt

CaptainDario commented 4 months ago

When regenerating the macos project, it is possible to compile the app. But when I add app linking back into the manifest, this error appears

dev/DaKanji/da_kanji/macos/Runner.xcodeproj: error: "Runner" has entitlements that require signing with a development certificate. Enable development signing in the Signing & Capabilities editor. (in target 'Runner' from project 'Runner')
** BUILD FAILED **

When I then enable development signing in XCode, the previous error appears.

CaptainDario commented 4 months ago

Without adding fvp to my app the app runs fine, so I assume that the problem is related to this package even though the error mentions the isar package. Even just by removing fvp from my project it works again.

wang-bin commented 4 months ago

I guess a codesign option in my dependency breaks other dylibs. Can you try fvp master branch code

CaptainDario commented 4 months ago

Thank you for always helping so fast!

Using

fvp:  
    git:
      url: https://github.com/wang-bin/fvp
      branch: master

I am getting this

Error: The pod "mdk" required by the plugin "fvp" requires a higher minimum iOS deployment version than the plugin's reported minimum version.
To build, remove the plugin "fvp", or contact the plugin's developers for assistance.

I do not understand why running on MacOS requires something related to iOS?

CaptainDario commented 4 months ago

Running pod install manually

macos % pod install
Analyzing dependencies
make: Nothing to be done for `all'.
make: Nothing to be done for `all'.
media_kit: INFO: package:media_kit_libs_macos_video found
make: Nothing to be done for `all'.
media_kit: INFO: package:media_kit_libs_macos_video found
[!] CocoaPods could not find compatible versions for pod "mdk":
  In snapshot (Podfile.lock):
    mdk (= 0.28.0, ~> 0.28.0)

  In Podfile:
    fvp (from `Flutter/ephemeral/.symlinks/plugins/fvp/darwin`) was resolved to 0.17.0, which depends on
      mdk (~> 0.29.1)

Specs satisfying the `mdk (= 0.28.0, ~> 0.28.0), mdk (~> 0.29.1)` dependency were found, but they required a higher minimum deployment target.
wang-bin commented 4 months ago

I don't know why no error before, no higher minimum deployment target change. checkout master branch again

CaptainDario commented 4 months ago

Pod install --repo-update Made it install, maybe it would work with this previous commit too. I will check and report back.

It also seems like it is now compiling.

CaptainDario commented 4 months ago

Commit b6020e5e0fe573a762f2c5ea27d2ce07c4f4b4c4 can also be installed when using pod install --repo-update. Sorry I did not know this.

CaptainDario commented 4 months ago

Thanks! It is working now!