Skip to content

Commit

Permalink
chore: ios account for period in filename
Browse files Browse the repository at this point in the history
  • Loading branch information
HayesGordon committed Feb 4, 2025
1 parent 56d2832 commit 554fd77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/RiveReactNativeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ class RiveReactNativeView: RCTView, RivePlayerDelegate, RiveStateMachineDelegate

private func splitFileNameAndExtension(fileName: String) -> (name: String?, ext: String?)? {
let components = fileName.split(separator: ".")
let name = (fileName as NSString).deletingPathExtension;
let fileExtension = (fileName as NSString).pathExtension;
guard components.count == 2 else { return nil }
return (name: String(components[0]), ext: String(components[1]))
return (name: name, ext: fileExtension)
}

private func loadResourceAsset(sourceAsset: String, path: String?, listener: @escaping (Data) -> Void) {
Expand Down

0 comments on commit 554fd77

Please sign in to comment.