MillmanY / MMPlayerView

Custom AVPlayerLayer on view and transition player with good effect like youtube and facebook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POD 6.0.0 | iOS 12.4 | iPhone X | Crash

mohitAppRinger opened this issue · comments

I am getting this error on iPhone X running on 12.4
Pod Version: 6.0.0

  1. dyld: Library not loaded: /System/Library/Frameworks/SwiftUI.framework/SwiftUI
    Referenced from: /Users/admin/Library/Developer/CoreSimulator/Devices/91FF750A-45B8-4138-ABF1-1117E9988D77/data/Containers/Bundle/Application/DAA0FAA8-D3FF-4939-A24B-AB02394740E6/Demo.app/Frameworks/MMPlayerView.framework/MMPlayerView
    Reason: no suitable image found. Did find:
    /System/Library/Frameworks/SwiftUI.framework/SwiftUI: mach-o, but not built for iOS simulator

  2. dyld: Library not loaded: /System/Library/Frameworks/Combine.framework/Combine
    Referenced from: /Users/admin/Library/Developer/CoreSimulator/Devices/5746FD20-7D06-4F52-981D-1032A12D3380/data/Containers/Bundle/Application/DCA2614D-E4DC-4C77-85EB-13A8B98C41DF/Demo.app/Frameworks/MMPlayerView.framework/MMPlayerView
    Reason: no suitable image found. Did find:
    /System/Library/Frameworks/Combine.framework/Combine: mach-o, but not built for iOS simulator

Fix this issue on 6.0.1
I found if you use "onTapGesture" in code, it will be crash when build.

Its a bug for apple

I solved the mentioned issues via added
Step1: AVFoundation, SwiftUI and Combine Framework in Build Phases -> Link Binary With Libraries

Step2: In Build Settings -> Other Linker Flags -> -weak_framework Combine
-weak_framework AVfoundation

This solved the issue for me.

I am not using "onTapGesture" in my app.

I implement my step in demo app and will not crash, I will try you solution