This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pod::Spec.new do |s| | |
s.name = 'SDK' | |
s.version = '1.0.0' | |
s.license = 'Commercial' | |
s.summary = 'SDK summary' | |
s.homepage = 'https://sdkhomepage.com/' | |
s.author = { 'SDK author' => 'https://sdkauthor.com/' } | |
s.source = { :git => '~/Desktop/SDK' } | |
s.platform = :ios | |
s.source_files = '**/*.h' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <objc/runtime.h> | |
//iPhone4's wallpaper size in iOS7 | |
#define kWallpaperSizeNomal CGSizeMake(370.0,598.0) | |
//iPhone5's wallpaper size in iOS7 | |
#define kWallpaperSizeSpec CGSizeMake(372.0,696.0) | |
//esay to get the string value of patameter's name. | |
#define NameStringOfParam(param) [NSString stringWithFormat:@"%s", #param] | |
//add accessor(setter getter) for category by define. | |
#define SYNTHESIZE_CATEGORY_OBJ_PROPERTY(propertyGetter, propertySetter) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@impelementaton NSString(Utils) | |
+ (uint64_t)sizeAtPath:(NSString *)filePath diskMode:(BOOL)diskMode | |
{ | |
uint64_t totalSize = 0; | |
NSMutableArray *searchPaths = [NSMutableArray arrayWithObject:filePath]; | |
while ([searchPaths count] > 0) | |
{ | |
@autoreleasepool | |
{ | |
NSString *fullPath = [searchPaths objectAtIndex:0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <dlfcn.h> | |
- (NSMutableArray *)browseInstalled | |
{ | |
NSMutableArray *installedArray = installedApplications(); | |
return installedArray; | |
} | |
typedef NSDictionary *(*PMobileInstallationLookup)(NSDictionary *params, id callback_unknown_usage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
git filter-branch --env-filter ' | |
OLD_EMAIL="your-old-email@example.com" | |
CORRECT_NAME="Your Correct Name" | |
CORRECT_EMAIL="your-correct-email@example.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#First of all, create a new plist file named 'channnel.plist' and refer into your project. | |
#Second, move codes below in 'didFinishLaunchingWithOptions' | |
#NSString * channelPath = [[NSBundle mainBundle] pathForResource:@"channel" ofType:@"plist"]; | |
#NSDictionary*channelDic= [NSDictionary dictionaryWithContentsOfFile:channelPath]; | |
#NSString * channelIdentify = [channelDic objectForKey:@"channel"]; | |
#[MobClick startWithAppkey:UMENG_KEY reportPolicy:BATCH channelId:channelIdentify]; | |
#last step, 'cd' into the folder where xxx.ipa is there. | |
#generally, it's the name of scheme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//.m文件的行数 | |
find . -name "*.m" | xargs wc -l | |
//.m .h .xib .c 文件内容总行数 | |
find . -name "*.m" -or -name "*.h" -or -name "*.xib" -or -name "*.c" |xargs grep -v "^$"|wc -l |
OlderNewer