diff --git a/Spine.podspec b/Spine.podspec index 8842c989e..8c67181ad 100644 --- a/Spine.podspec +++ b/Spine.podspec @@ -14,13 +14,17 @@ Spine runtimes for iOS. s.license = { :file => 'LICENSE' } s.source = { :git => 'https://github.com/esotericsoftware/spine-runtimes.git', :branch => '4.2' } - s.source_files = 'spine-ios/Sources/Spine/**/*.{swift,metal}' + s.source_files = 'spine-ios/Sources/Spine/**/*.{swift}' s.platform = :ios, '13.0' s.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp/include" "$(PODS_ROOT)/SpineCppLite/spine-cpp/spine-cpp-lite"' } + s.resource_bundles = { + 'SpineBundle' => ['spine-ios/Sources/Spine/**/*.{metal}'] + } + s.swift_version = '5.0' s.dependency 'SpineCppLite' s.dependency 'SpineShadersStructs' diff --git a/spine-ios/Sources/Spine/Metal/SpineRenderer.swift b/spine-ios/Sources/Spine/Metal/SpineRenderer.swift index 04ce6d951..b9692cdca 100644 --- a/spine-ios/Sources/Spine/Metal/SpineRenderer.swift +++ b/spine-ios/Sources/Spine/Metal/SpineRenderer.swift @@ -61,7 +61,8 @@ internal final class SpineRenderer: NSObject, MTKViewDelegate { #if SWIFT_PACKAGE // SPM bundle = .module #else // CocoaPods - bundle = Bundle(for: SpineRenderer.self) + let bundleURL = Bundle(for: SpineRenderer.self).url(forResource: "SpineBundle", withExtension: "bundle") + bundle = Bundle(url: bundleURL!)! #endif let defaultLibrary = try device.makeDefaultLibrary(bundle: bundle)