Release 0.1.0

This commit is contained in:
Giuseppe Nucifora 2015-07-07 16:35:01 +02:00
parent 245d3c4c7d
commit 3ec61af8a6
5 changed files with 55 additions and 27 deletions

View File

@ -37,7 +37,7 @@
/* Begin PBXFileReference section */
1DD359B387438B2D4450388A /* Pods_NSString_Helper_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NSString_Helper_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58A195388D20070C39A /* NSString-Helper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = "NSString-Helper.app"; path = "NSString-Helper_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58A195388D20070C39A /* NSString-Helper_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "NSString-Helper_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
@ -50,7 +50,7 @@
6003F5A5195388D20070C39A /* NSStringHelperViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSStringHelperViewController.h; sourceTree = "<group>"; };
6003F5A6195388D20070C39A /* NSStringHelperViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NSStringHelperViewController.m; sourceTree = "<group>"; };
6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
6003F5AE195388D20070C39A /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = Tests.xctest; path = "NSString-Helper_Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
6003F5AE195388D20070C39A /* NSString-Helper_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "NSString-Helper_Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; };
6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@ -108,8 +108,8 @@
6003F58B195388D20070C39A /* Products */ = {
isa = PBXGroup;
children = (
6003F58A195388D20070C39A /* NSString-Helper.app */,
6003F5AE195388D20070C39A /* Tests.xctest */,
6003F58A195388D20070C39A /* NSString-Helper_Example.app */,
6003F5AE195388D20070C39A /* NSString-Helper_Tests.xctest */,
);
name = Products;
sourceTree = "<group>";
@ -213,7 +213,7 @@
);
name = "NSString-Helper_Example";
productName = "NSString-Helper";
productReference = 6003F58A195388D20070C39A /* NSString-Helper.app */;
productReference = 6003F58A195388D20070C39A /* NSString-Helper_Example.app */;
productType = "com.apple.product-type.application";
};
6003F5AD195388D20070C39A /* NSString-Helper_Tests */ = {
@ -234,7 +234,7 @@
);
name = "NSString-Helper_Tests";
productName = "NSString-HelperTests";
productReference = 6003F5AE195388D20070C39A /* Tests.xctest */;
productReference = 6003F5AE195388D20070C39A /* NSString-Helper_Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */

View File

@ -15,6 +15,11 @@
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
@ -50,4 +55,4 @@
"version" : 1,
"author" : "xcode"
}
}
}

View File

@ -1,28 +1,13 @@
#
# Be sure to run `pod lib lint NSString-Helper.podspec' to ensure this is a
# valid spec and remove all comments before submitting the spec.
#
# Any lines starting with a # are optional, but encouraged
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = "NSString-Helper"
s.version = "0.1.0"
s.summary = "A short description of NSString-Helper."
s.description = <<-DESC
An optional longer description of NSString-Helper
* Markdown format.
* Don't worry about the indent, we strip it!
DESC
s.homepage = "https://github.com/<GITHUB_USERNAME>/NSString-Helper"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.summary = "NSString-Helper is usefull helper to validate email NSSString"
s.homepage = "https://github.com/giuseppenucifora/NSString-Helper"
# s.screenshots = ""
s.license = 'MIT'
s.author = { "Giuseppe Nucifora" => "me@giuseppenucifora.com" }
s.source = { :git => "https://github.com/<GITHUB_USERNAME>/NSString-Helper.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.source = { :git => "https://github.com/giuseppenucifora/NSString-Helper.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/giuseppenuc'
s.platform = :ios, '7.0'
s.requires_arc = true

View File

@ -0,0 +1,15 @@
//
// NSString+Helper.h
//
//
// Created by Giuseppe Nucifora on 02/07/15.
// Copyright (c) 2015 Giuseppe Nucifora All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (Helper)
- (BOOL) validateEmail;
@end

View File

@ -0,0 +1,23 @@
//
// NSString+Helper.m
//
//
// Created by Giuseppe Nucifora on 02/07/15.
// Copyright (c) 2015 Giuseppe Nucifora All rights reserved.
//
#import "NSString+Helper.h"
@implementation NSString (Helper)
- (BOOL) validateEmail
{
BOOL stricterFilter = YES;
NSString *stricterFilterString = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}";
NSString *laxString = @".+@.+\\.[A-Za-z]{2}[A-Za-z]*";
NSString *emailRegex = stricterFilter ? stricterFilterString : laxString;
NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegex];
return [emailTest evaluateWithObject:self];
}
@end