Skip to content

Commit

Permalink
update and refine spec and resource loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Mar 17, 2015
1 parent 007a945 commit fc581c8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 25 deletions.
39 changes: 22 additions & 17 deletions JSQMessagesViewController.podspec
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
Pod::Spec.new do |s|
s.name = 'JSQMessagesViewController'
s.version = '7.0.0'
s.summary = 'An elegant messages UI library for iOS.'
s.homepage = 'http://jessesquires.github.io/JSQMessagesViewController'
s.license = 'MIT'
s.screenshots = ['https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot0.png',
'https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot1.png',
'https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot2.png',
'https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot3.png']
s.author = { 'Jesse Squires' => '[email protected]' }
s.social_media_url = 'https://twitter.com/jesse_squires'
s.source = { :git => 'https://github.com/jessesquires/JSQMessagesViewController.git', :tag => s.version }
s.platform = :ios, '7.0'
s.source_files = 'JSQMessagesViewController/**/*.{h,m}'
s.resources = 'JSQMessagesViewController/Assets/JSQMessagesAssets.bundle', 'JSQMessagesViewController/**/*.{xib}'
s.frameworks = 'QuartzCore', 'CoreGraphics', 'CoreLocation', 'MapKit', 'UIKit', 'Foundation'
s.requires_arc = true
s.name = 'JSQMessagesViewController'
s.version = '7.0.0'
s.summary = 'An elegant messages UI library for iOS.'
s.homepage = 'http://jessesquires.github.io/JSQMessagesViewController'
s.license = 'MIT'
s.platform = :ios, '7.0'

s.author = { 'Jesse Squires' => '[email protected]' }
s.social_media_url = 'https://twitter.com/jesse_squires'

s.screenshots = ['https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot0.png',
'https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot1.png',
'https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot2.png',
'https://raw.githubusercontent.com/jessesquires/JSQMessagesViewController/develop/Screenshots/screenshot3.png']

s.source = { :git => 'https://github.com/jessesquires/JSQMessagesViewController.git', :tag => s.version }
s.source_files = 'JSQMessagesViewController/**/*.{h,m}'

s.resources = ['JSQMessagesViewController/Assets/JSQMessagesAssets.bundle', 'JSQMessagesViewController/**/*.{xib}']

s.frameworks = 'QuartzCore', 'CoreGraphics', 'CoreLocation', 'MapKit', 'UIKit', 'Foundation'
s.requires_arc = true

s.dependency 'JSQSystemSoundPlayer', '~> 2.0.1'
end
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import "JSQSystemSoundPlayer+JSQMessages.h"

#import "JSQMessagesViewController.h"
#import "NSBundle+JSQMessages.h"


static NSString * const kJSQMessageReceivedSoundName = @"message_received";
Expand Down Expand Up @@ -57,7 +57,7 @@ + (void)jsq_playSoundFromJSQMessagesBundleWithName:(NSString *)soundName asAlert
NSString *originalPlayerBundleIdentifier = [JSQSystemSoundPlayer sharedPlayer].bundle.bundleIdentifier;

// search for sounds in this library's bundle
[JSQSystemSoundPlayer sharedPlayer].bundle = [NSBundle bundleForClass:[JSQMessagesViewController class]];
[JSQSystemSoundPlayer sharedPlayer].bundle = [NSBundle jsq_messagesBundle];

NSString *fileName = [NSString stringWithFormat:@"JSQMessagesAssets.bundle/Sounds/%@", soundName];

Expand Down
10 changes: 4 additions & 6 deletions JSQMessagesViewController/Categories/UIImage+JSQMessages.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#import "UIImage+JSQMessages.h"

#import "JSQMessagesViewController.h"
#import "NSBundle+JSQMessages.h"


@implementation UIImage (JSQMessages)
Expand Down Expand Up @@ -50,11 +50,9 @@ - (UIImage *)jsq_imageMaskedWithColor:(UIColor *)maskColor

+ (UIImage *)jsq_bubbleImageFromBundleWithName:(NSString *)name
{
NSString *imagePath = [[NSBundle bundleForClass:[JSQMessagesViewController class]]
pathForResource:[NSString stringWithFormat:@"JSQMessagesAssets.bundle/Images/%@", name]
ofType:@"png"];

return [UIImage imageWithContentsOfFile:imagePath];
NSBundle *bundle = [NSBundle jsq_messagesAssetBundle];
NSString *path = [bundle pathForResource:name ofType:@"png" inDirectory:@"Images"];
return [UIImage imageWithContentsOfFile:path];
}

+ (UIImage *)jsq_bubbleRegularImage
Expand Down

0 comments on commit fc581c8

Please sign in to comment.