Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App is crashing on iOS 17.0 + #359

Open
kkkkkkkkNight opened this issue Dec 16, 2023 · 1 comment
Open

App is crashing on iOS 17.0 + #359

kkkkkkkkNight opened this issue Dec 16, 2023 · 1 comment

Comments

@kkkkkkkkNight
Copy link

kkkkkkkkNight commented Dec 16, 2023

(lldb) po [kCacheScheme stringByAppendingString:[url absoluteString]]
VIMediaCache_:http://xxx.mp4

(lldb) po [NSURL URLWithString:[kCacheScheme stringByAppendingString:[url absoluteString]]]
nil

open var avURLAsset: AVURLAsset {
    get {
        guard !url.isFileURL, url.pathExtension != "m3u8" else {
            return AVURLAsset(url: url)
        }
        return BMPlayerManager.asset(for: self)    **/// crash  , because asset = nil**
    }
}
@kkkkkkkkNight
Copy link
Author

@implementation VIResourceLoaderManager (Convenient)

  • (NSURL *)assetURLWithURL:(NSURL *)url {
    if (!url) {
    return nil;
    }

    NSURL *assetURL = [NSURL URLWithString:[kCacheScheme stringByAppendingString:[url absoluteString]]];
    return assetURL;

    /// crash,
    /// static NSString *kCacheScheme = @"VIMediaCache_:" to ---> @"VIMediaCache:"
    /// done!

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant