Skip to content

Commit

Permalink
Merge pull request #66 from Automattic/issue/bundle-fix
Browse files Browse the repository at this point in the history
Fix import of `xcassets` to resources bundles in `podspec`
  • Loading branch information
pmusolino committed Jan 28, 2022
2 parents 6c07455 + 3c3f722 commit 2326a55
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Gridicons.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pod::Spec.new do |s|
s.name = 'Gridicons'
s.version = '1.1.0'
s.version = '1.2.0'

s.summary = 'Gridicons is a tiny framework which generates Gridicon images at any resolution.'
s.description = <<-DESC
Expand All @@ -21,7 +21,7 @@ Pod::Spec.new do |s|
s.source = { git: 'https://github.com/Automattic/Gridicons-iOS.git', tag: s.version.to_s }
s.source_files = 'Gridicons/Gridicons/**/*.swift'
s.resource_bundles = {
Gridicons: [
GridiconsAssets: [
'Gridicons/Gridicons/*.{xcassets}'
]
}
Expand Down
2 changes: 1 addition & 1 deletion Gridicons.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extension {{enumName}} {
var icon: UIImage {
var bundle = Bundle(for: BundleToken.self)

if let url = bundle.url(forResource: "Gridicons", withExtension: "bundle"),
if let url = bundle.url(forResource: "GridiconsAssets", withExtension: "bundle"),
let assetBundle = Bundle(url: url) {
// When loaded through CocoaPods, assets reside in a separate resource bundle
bundle = assetBundle
Expand Down
2 changes: 1 addition & 1 deletion Gridicons/Gridicons/GridiconsGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ extension GridiconType {
var icon: UIImage {
var bundle = Bundle(for: BundleToken.self)

if let url = bundle.url(forResource: "Gridicons", withExtension: "bundle"),
if let url = bundle.url(forResource: "GridiconsAssets", withExtension: "bundle"),
let assetBundle = Bundle(url: url) {
// When loaded through CocoaPods, assets reside in a separate resource bundle
bundle = assetBundle
Expand Down

0 comments on commit 2326a55

Please sign in to comment.