Skip to content

Commit

Permalink
Try to fix bundle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Prokop committed Nov 1, 2015
1 parent c6c429d commit 0f53602
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 118 deletions.
4 changes: 2 additions & 2 deletions StarryStars.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'StarryStars'
s.version = '0.0.2'
s.version = '0.0.3'
s.license = 'MIT'
s.summary = 'iOS GUI library for displaying and editing ratings'
s.homepage = 'https://github.com/peterprokop/SwiftOverlays'
Expand All @@ -9,5 +9,5 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'
s.requires_arc = 'true'
s.source_files = 'StarryStars/*.swift'
s.resource_bundle = { 'StarryStars' => 'StarryStars/Assets.xcassets' }
s.resource_bundle = { 'StarryStars' => 'StarryStars/Resource/*.*' }
end
38 changes: 0 additions & 38 deletions StarryStars/Assets.xcassets/AppIcon.appiconset/Contents.json

This file was deleted.

6 changes: 0 additions & 6 deletions StarryStars/Assets.xcassets/Contents.json

This file was deleted.

21 changes: 0 additions & 21 deletions StarryStars/Assets.xcassets/starBig.imageset/Contents.json

This file was deleted.

21 changes: 0 additions & 21 deletions StarryStars/Assets.xcassets/starBigHalf.imageset/Contents.json

This file was deleted.

21 changes: 0 additions & 21 deletions StarryStars/Assets.xcassets/starBigOff.imageset/Contents.json

This file was deleted.

11 changes: 7 additions & 4 deletions StarryStars/RatingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,19 @@ public class RatingView: UIView {
}

func customInit() {
let bundle = NSBundle(forClass: RatingView.self)
var bundle = NSBundle(identifier: "StarryStars")
if bundle == nil {
bundle = NSBundle(forClass: RatingView.self)
}

if offImage == nil {
offImage = UIImage(named: "starBigOff", inBundle: bundle, compatibleWithTraitCollection: self.traitCollection)
offImage = UIImage(named: "starryStars_off", inBundle: bundle, compatibleWithTraitCollection: self.traitCollection)
}
if onImage == nil {
onImage = UIImage(named: "starBig", inBundle: bundle, compatibleWithTraitCollection: self.traitCollection)
onImage = UIImage(named: "starryStars_on", inBundle: bundle, compatibleWithTraitCollection: self.traitCollection)
}
if halfImage == nil {
halfImage = UIImage(named: "starBigHalf", inBundle: bundle, compatibleWithTraitCollection: self.traitCollection)
halfImage = UIImage(named: "starryStars_half", inBundle: bundle, compatibleWithTraitCollection: self.traitCollection)
}

guard let offImage = offImage else {
Expand Down
File renamed without changes
File renamed without changes
24 changes: 20 additions & 4 deletions StarryStarsExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
0D2DE7151BE5F23E005DBFEC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0D2DE70B1BE5F23E005DBFEC /* LaunchScreen.storyboard */; };
0D2DE7161BE5F23E005DBFEC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0D2DE70D1BE5F23E005DBFEC /* Main.storyboard */; };
0D2DE7191BE5F23E005DBFEC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D2DE7121BE5F23E005DBFEC /* ViewController.swift */; };
0D2DE71F1BE5F83C005DBFEC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0D2DE71D1BE5F83C005DBFEC /* Assets.xcassets */; };
0D2DE7201BE5F83C005DBFEC /* RatingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D2DE71E1BE5F83C005DBFEC /* RatingView.swift */; };
0D98B9B81BE60BDB00D89929 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 0D98B9B51BE60BDB00D89929 /* [email protected] */; };
0D98B9B91BE60BDB00D89929 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 0D98B9B61BE60BDB00D89929 /* [email protected] */; };
0D98B9BA1BE60BDB00D89929 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 0D98B9B71BE60BDB00D89929 /* [email protected] */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -21,8 +23,10 @@
0D2DE70E1BE5F23E005DBFEC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
0D2DE70F1BE5F23E005DBFEC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0D2DE7121BE5F23E005DBFEC /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
0D2DE71D1BE5F83C005DBFEC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
0D2DE71E1BE5F83C005DBFEC /* RatingView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RatingView.swift; sourceTree = "<group>"; };
0D98B9B51BE60BDB00D89929 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
0D98B9B61BE60BDB00D89929 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
0D98B9B71BE60BDB00D89929 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
0DEBD39B1BDA134D00FC7856 /* StarryStarsExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StarryStarsExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -52,12 +56,22 @@
0D2DE71C1BE5F83C005DBFEC /* StarryStars */ = {
isa = PBXGroup;
children = (
0D2DE71D1BE5F83C005DBFEC /* Assets.xcassets */,
0D98B9B41BE60BDB00D89929 /* Resource */,
0D2DE71E1BE5F83C005DBFEC /* RatingView.swift */,
);
path = StarryStars;
sourceTree = "<group>";
};
0D98B9B41BE60BDB00D89929 /* Resource */ = {
isa = PBXGroup;
children = (
0D98B9B51BE60BDB00D89929 /* [email protected] */,
0D98B9B61BE60BDB00D89929 /* [email protected] */,
0D98B9B71BE60BDB00D89929 /* [email protected] */,
);
path = Resource;
sourceTree = "<group>";
};
0DEBD3921BDA134D00FC7856 = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -132,9 +146,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0D98B9B81BE60BDB00D89929 /* [email protected] in Resources */,
0D2DE7161BE5F23E005DBFEC /* Main.storyboard in Resources */,
0D2DE71F1BE5F83C005DBFEC /* Assets.xcassets in Resources */,
0D98B9BA1BE60BDB00D89929 /* [email protected] in Resources */,
0D2DE7151BE5F23E005DBFEC /* LaunchScreen.storyboard in Resources */,
0D98B9B91BE60BDB00D89929 /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion StarryStarsExample/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="starCount">
<integer key="value" value="7"/>
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="rating">
<real key="value" value="2.5"/>
Expand Down

0 comments on commit 0f53602

Please sign in to comment.