mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
ADD: spine-ios support Cocoapods :Static Framework (#2658)
Co-authored-by: liqiang <liqiangbj01@kanyun.com>
This commit is contained in:
parent
19d3d1b29b
commit
4f7fe00427
@ -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'
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user