This commit is contained in:
Kevin Renskers
2012-12-18 22:27:36 +00:00
parent b55e1ebce4
commit 1f5f9dcbc0
23 changed files with 837 additions and 3 deletions

2
AUTHORS Normal file
View File

@@ -0,0 +1,2 @@
PRIMARY AUTHORS
Kevin Renskers - https://github.com/kevinrenskers

2
CHANGELOG Normal file
View File

@@ -0,0 +1,2 @@
0.1.0 - December 18, 2012
- First public release on CocoaPods.

15
Example/AppDelegate.h Normal file
View File

@@ -0,0 +1,15 @@
//
// AppDelegate.h
// Example
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end

21
Example/AppDelegate.m Normal file
View File

@@ -0,0 +1,21 @@
//
// AppDelegate.m
// Example
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import "AppDelegate.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
@end

BIN
Example/Default-568h@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
Example/Default.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
Example/Default@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>is.gangverk.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@@ -0,0 +1,14 @@
//
// Prefix header for all source files of the 'Example' target in the 'Example' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

View File

@@ -0,0 +1,479 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
0AD6F3601680DCD400E13802 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AD6F35F1680DCD400E13802 /* UIKit.framework */; };
0AD6F3621680DCD400E13802 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AD6F3611680DCD400E13802 /* Foundation.framework */; };
0AD6F3641680DCD400E13802 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AD6F3631680DCD400E13802 /* CoreGraphics.framework */; };
0AD6F37E1680DCD400E13802 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AD6F37D1680DCD400E13802 /* SenTestingKit.framework */; };
0AD6F37F1680DCD400E13802 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AD6F35F1680DCD400E13802 /* UIKit.framework */; };
0AD6F3801680DCD400E13802 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0AD6F3611680DCD400E13802 /* Foundation.framework */; };
0AD6F3881680DCD400E13802 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3861680DCD400E13802 /* InfoPlist.strings */; };
0AD6F38B1680DCD400E13802 /* ExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AD6F38A1680DCD400E13802 /* ExampleTests.m */; };
0AD6F3AF1680DDD000E13802 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3A21680DDD000E13802 /* InfoPlist.strings */; };
0AD6F3B01680DDD000E13802 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AD6F3A51680DDD000E13802 /* AppDelegate.m */; };
0AD6F3B11680DDD000E13802 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3A61680DDD000E13802 /* Default-568h@2x.png */; };
0AD6F3B21680DDD000E13802 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3A71680DDD000E13802 /* Default.png */; };
0AD6F3B31680DDD000E13802 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3A81680DDD000E13802 /* Default@2x.png */; };
0AD6F3B51680DDD000E13802 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AD6F3AE1680DDD000E13802 /* main.m */; };
0AD6F3B91680DE0600E13802 /* GVUserDefaults.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AD6F3B81680DE0600E13802 /* GVUserDefaults.m */; };
0AD6F3C41680DF3900E13802 /* GVUserDefaults+Mine.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AD6F3C31680DF3800E13802 /* GVUserDefaults+Mine.m */; };
0AD6F3DD168123C900E13802 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3DA168123C800E13802 /* CHANGELOG */; };
0AD6F3DE168123C900E13802 /* GVUserDefaults.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3DB168123C800E13802 /* GVUserDefaults.podspec */; };
0AD6F3DF168123C900E13802 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 0AD6F3DC168123C800E13802 /* README.md */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
0AD6F3811680DCD400E13802 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 0AD6F3521680DCD400E13802 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 0AD6F35A1680DCD400E13802;
remoteInfo = Example;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
0AD6F35B1680DCD400E13802 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
0AD6F35F1680DCD400E13802 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
0AD6F3611680DCD400E13802 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
0AD6F3631680DCD400E13802 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
0AD6F37C1680DCD400E13802 /* ExampleTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
0AD6F37D1680DCD400E13802 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; };
0AD6F3851680DCD400E13802 /* ExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ExampleTests-Info.plist"; sourceTree = "<group>"; };
0AD6F3871680DCD400E13802 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
0AD6F3891680DCD400E13802 /* ExampleTests.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExampleTests.h; sourceTree = "<group>"; };
0AD6F38A1680DCD400E13802 /* ExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExampleTests.m; sourceTree = "<group>"; };
0AD6F3A31680DDD000E13802 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = "<group>"; };
0AD6F3A41680DDD000E13802 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; };
0AD6F3A51680DDD000E13802 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = SOURCE_ROOT; };
0AD6F3A61680DDD000E13802 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = SOURCE_ROOT; };
0AD6F3A71680DDD000E13802 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = SOURCE_ROOT; };
0AD6F3A81680DDD000E13802 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = SOURCE_ROOT; };
0AD6F3A91680DDD000E13802 /* Example-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Example-Info.plist"; sourceTree = SOURCE_ROOT; };
0AD6F3AA1680DDD000E13802 /* Example-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Example-Prefix.pch"; sourceTree = SOURCE_ROOT; };
0AD6F3AE1680DDD000E13802 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; };
0AD6F3B71680DE0600E13802 /* GVUserDefaults.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GVUserDefaults.h; sourceTree = "<group>"; };
0AD6F3B81680DE0600E13802 /* GVUserDefaults.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GVUserDefaults.m; sourceTree = "<group>"; };
0AD6F3C21680DF3800E13802 /* GVUserDefaults+Mine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GVUserDefaults+Mine.h"; sourceTree = "<group>"; };
0AD6F3C31680DF3800E13802 /* GVUserDefaults+Mine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GVUserDefaults+Mine.m"; sourceTree = "<group>"; };
0AD6F3DA168123C800E13802 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CHANGELOG; path = ../CHANGELOG; sourceTree = "<group>"; };
0AD6F3DB168123C800E13802 /* GVUserDefaults.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = GVUserDefaults.podspec; path = ../GVUserDefaults.podspec; sourceTree = "<group>"; };
0AD6F3DC168123C800E13802 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
0AD6F3581680DCD400E13802 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0AD6F3601680DCD400E13802 /* UIKit.framework in Frameworks */,
0AD6F3621680DCD400E13802 /* Foundation.framework in Frameworks */,
0AD6F3641680DCD400E13802 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0AD6F3781680DCD400E13802 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0AD6F37E1680DCD400E13802 /* SenTestingKit.framework in Frameworks */,
0AD6F37F1680DCD400E13802 /* UIKit.framework in Frameworks */,
0AD6F3801680DCD400E13802 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
0AD6F3501680DCD400E13802 = {
isa = PBXGroup;
children = (
0AD6F3B61680DE0600E13802 /* GVUserDefaults */,
0AD6F3651680DCD400E13802 /* Example */,
0AD6F3831680DCD400E13802 /* ExampleTests */,
0AD6F35E1680DCD400E13802 /* Frameworks */,
0AD6F35C1680DCD400E13802 /* Products */,
0AD6F3DA168123C800E13802 /* CHANGELOG */,
0AD6F3DB168123C800E13802 /* GVUserDefaults.podspec */,
0AD6F3DC168123C800E13802 /* README.md */,
);
sourceTree = "<group>";
};
0AD6F35C1680DCD400E13802 /* Products */ = {
isa = PBXGroup;
children = (
0AD6F35B1680DCD400E13802 /* Example.app */,
0AD6F37C1680DCD400E13802 /* ExampleTests.octest */,
);
name = Products;
sourceTree = "<group>";
};
0AD6F35E1680DCD400E13802 /* Frameworks */ = {
isa = PBXGroup;
children = (
0AD6F35F1680DCD400E13802 /* UIKit.framework */,
0AD6F3611680DCD400E13802 /* Foundation.framework */,
0AD6F3631680DCD400E13802 /* CoreGraphics.framework */,
0AD6F37D1680DCD400E13802 /* SenTestingKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
0AD6F3651680DCD400E13802 /* Example */ = {
isa = PBXGroup;
children = (
0AD6F3C21680DF3800E13802 /* GVUserDefaults+Mine.h */,
0AD6F3C31680DF3800E13802 /* GVUserDefaults+Mine.m */,
0AD6F3A41680DDD000E13802 /* AppDelegate.h */,
0AD6F3A51680DDD000E13802 /* AppDelegate.m */,
0AD6F3A61680DDD000E13802 /* Default-568h@2x.png */,
0AD6F3A71680DDD000E13802 /* Default.png */,
0AD6F3A81680DDD000E13802 /* Default@2x.png */,
0AD6F3A91680DDD000E13802 /* Example-Info.plist */,
0AD6F3AA1680DDD000E13802 /* Example-Prefix.pch */,
0AD6F3AE1680DDD000E13802 /* main.m */,
0AD6F3A11680DDD000E13802 /* en.lproj */,
);
name = Example;
sourceTree = SOURCE_ROOT;
};
0AD6F3831680DCD400E13802 /* ExampleTests */ = {
isa = PBXGroup;
children = (
0AD6F3891680DCD400E13802 /* ExampleTests.h */,
0AD6F38A1680DCD400E13802 /* ExampleTests.m */,
0AD6F3841680DCD400E13802 /* Supporting Files */,
);
path = ExampleTests;
sourceTree = "<group>";
};
0AD6F3841680DCD400E13802 /* Supporting Files */ = {
isa = PBXGroup;
children = (
0AD6F3851680DCD400E13802 /* ExampleTests-Info.plist */,
0AD6F3861680DCD400E13802 /* InfoPlist.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
0AD6F3A11680DDD000E13802 /* en.lproj */ = {
isa = PBXGroup;
children = (
0AD6F3A21680DDD000E13802 /* InfoPlist.strings */,
);
path = en.lproj;
sourceTree = SOURCE_ROOT;
};
0AD6F3B61680DE0600E13802 /* GVUserDefaults */ = {
isa = PBXGroup;
children = (
0AD6F3B71680DE0600E13802 /* GVUserDefaults.h */,
0AD6F3B81680DE0600E13802 /* GVUserDefaults.m */,
);
name = GVUserDefaults;
path = ../GVUserDefaults;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
0AD6F35A1680DCD400E13802 /* Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0AD6F38E1680DCD400E13802 /* Build configuration list for PBXNativeTarget "Example" */;
buildPhases = (
0AD6F3571680DCD400E13802 /* Sources */,
0AD6F3581680DCD400E13802 /* Frameworks */,
0AD6F3591680DCD400E13802 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = Example;
productName = Example;
productReference = 0AD6F35B1680DCD400E13802 /* Example.app */;
productType = "com.apple.product-type.application";
};
0AD6F37B1680DCD400E13802 /* ExampleTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 0AD6F3911680DCD400E13802 /* Build configuration list for PBXNativeTarget "ExampleTests" */;
buildPhases = (
0AD6F3771680DCD400E13802 /* Sources */,
0AD6F3781680DCD400E13802 /* Frameworks */,
0AD6F3791680DCD400E13802 /* Resources */,
0AD6F37A1680DCD400E13802 /* ShellScript */,
);
buildRules = (
);
dependencies = (
0AD6F3821680DCD400E13802 /* PBXTargetDependency */,
);
name = ExampleTests;
productName = ExampleTests;
productReference = 0AD6F37C1680DCD400E13802 /* ExampleTests.octest */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0AD6F3521680DCD400E13802 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0450;
ORGANIZATIONNAME = Gangverk;
};
buildConfigurationList = 0AD6F3551680DCD400E13802 /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 0AD6F3501680DCD400E13802;
productRefGroup = 0AD6F35C1680DCD400E13802 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
0AD6F35A1680DCD400E13802 /* Example */,
0AD6F37B1680DCD400E13802 /* ExampleTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
0AD6F3591680DCD400E13802 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0AD6F3AF1680DDD000E13802 /* InfoPlist.strings in Resources */,
0AD6F3B11680DDD000E13802 /* Default-568h@2x.png in Resources */,
0AD6F3B21680DDD000E13802 /* Default.png in Resources */,
0AD6F3B31680DDD000E13802 /* Default@2x.png in Resources */,
0AD6F3DD168123C900E13802 /* CHANGELOG in Resources */,
0AD6F3DE168123C900E13802 /* GVUserDefaults.podspec in Resources */,
0AD6F3DF168123C900E13802 /* README.md in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0AD6F3791680DCD400E13802 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0AD6F3881680DCD400E13802 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
0AD6F37A1680DCD400E13802 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
0AD6F3571680DCD400E13802 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0AD6F3B01680DDD000E13802 /* AppDelegate.m in Sources */,
0AD6F3B51680DDD000E13802 /* main.m in Sources */,
0AD6F3B91680DE0600E13802 /* GVUserDefaults.m in Sources */,
0AD6F3C41680DF3900E13802 /* GVUserDefaults+Mine.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0AD6F3771680DCD400E13802 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0AD6F38B1680DCD400E13802 /* ExampleTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
0AD6F3821680DCD400E13802 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 0AD6F35A1680DCD400E13802 /* Example */;
targetProxy = 0AD6F3811680DCD400E13802 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
0AD6F3861680DCD400E13802 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
0AD6F3871680DCD400E13802 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
0AD6F3A21680DDD000E13802 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
0AD6F3A31680DDD000E13802 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
0AD6F38C1680DCD400E13802 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
0AD6F38D1680DCD400E13802 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
0AD6F38F1680DCD400E13802 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Example-Prefix.pch";
INFOPLIST_FILE = "Example-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
0AD6F3901680DCD400E13802 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Example-Prefix.pch";
INFOPLIST_FILE = "Example-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
0AD6F3921680DCD400E13802 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Example-Prefix.pch";
INFOPLIST_FILE = "ExampleTests/ExampleTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = octest;
};
name = Debug;
};
0AD6F3931680DCD400E13802 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
FRAMEWORK_SEARCH_PATHS = (
"\"$(SDKROOT)/Developer/Library/Frameworks\"",
"\"$(DEVELOPER_LIBRARY_DIR)/Frameworks\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Example/Example-Prefix.pch";
INFOPLIST_FILE = "ExampleTests/ExampleTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = octest;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
0AD6F3551680DCD400E13802 /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
0AD6F38C1680DCD400E13802 /* Debug */,
0AD6F38D1680DCD400E13802 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
0AD6F38E1680DCD400E13802 /* Build configuration list for PBXNativeTarget "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
0AD6F38F1680DCD400E13802 /* Debug */,
0AD6F3901680DCD400E13802 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
0AD6F3911680DCD400E13802 /* Build configuration list for PBXNativeTarget "ExampleTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
0AD6F3921680DCD400E13802 /* Debug */,
0AD6F3931680DCD400E13802 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0AD6F3521680DCD400E13802 /* Project object */;
}

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>is.gangverk.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@@ -0,0 +1,13 @@
//
// ExampleTests.h
// ExampleTests
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import <SenTestingKit/SenTestingKit.h>
@interface ExampleTests : SenTestCase
@end

View File

@@ -0,0 +1,48 @@
//
// ExampleTests.m
// ExampleTests
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import "ExampleTests.h"
#import "GVUserDefaults+Mine.h"
@implementation ExampleTests
- (void)setUp {
[super setUp];
NSDictionary *defaults = @{
@"NSUSerDefault:userName": @"default",
@"NSUSerDefault:userId": @1
};
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
}
- (void)tearDown {
// Tear-down code here.
[super tearDown];
}
- (void)testDefaults {
STAssertEquals([GVUserDefaults standardUserDefaults].userName, @"default", @"username equals default");
STAssertEquals([GVUserDefaults standardUserDefaults].userId, @1, @"userId equals 1");
}
- (void)testSetters {
[GVUserDefaults standardUserDefaults].userName = @"changed";
[GVUserDefaults standardUserDefaults].userId = @2;
STAssertEquals([GVUserDefaults standardUserDefaults].userName, @"changed", @"username equals changed");
STAssertEquals([GVUserDefaults standardUserDefaults].userId, @2, @"userId equals 2");
}
- (void)testGetters {
STAssertEquals([GVUserDefaults standardUserDefaults].userName, [[NSUserDefaults standardUserDefaults] objectForKey:@"NSUSerDefault:userName"], @"username equals username");
STAssertEquals([GVUserDefaults standardUserDefaults].userId, [[NSUserDefaults standardUserDefaults] objectForKey:@"NSUSerDefault:userId"], @"userId equals userId");
}
@end

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@@ -0,0 +1,16 @@
//
// GVUserDefaults+Mine.h
// GVUserDefaults
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import "GVUserDefaults.h"
@interface GVUserDefaults (Mine)
@property NSString *userName;
@property NSNumber *userId;
@end

View File

@@ -0,0 +1,20 @@
//
// GVUserDefaults+Mine.m
// GVUserDefaults
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import "GVUserDefaults+Mine.h"
@implementation GVUserDefaults (Mine)
- (NSString *)prefix {
return @"NSUSerDefault:";
}
@dynamic userName;
@dynamic userId;
@end

View File

@@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

18
Example/main.m Normal file
View File

@@ -0,0 +1,18 @@
//
// main.m
// Example
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

13
GVUserDefaults.podspec Normal file
View File

@@ -0,0 +1,13 @@
Pod::Spec.new do |s|
s.name = "GVUserDefaults"
s.version = "0.1.0"
s.summary = "NSUserDefaults access via properties."
s.homepage = "https://github.com/gangverk/GVUserDefaults"
s.license = 'MIT'
s.author = { "Kevin Renskers" => "info@mixedcase.nl" }
s.source = { :git => "https://github.com/gangverk/GVUserDefaults.git", :tag => s.version.to_s }
s.ios.deployment_target = '4.0'
s.osx.deployment_target = '10.6'
s.source_files = 'GVUserDefaults/*.{h,m}'
s.requires_arc = true
end

View File

@@ -0,0 +1,15 @@
//
// GVUserDefaults.h
// GVUserDefaults
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface GVUserDefaults : NSObject
+ (GVUserDefaults *)standardUserDefaults;
@end

View File

@@ -0,0 +1,62 @@
//
// GVUserDefaults.m
// GVUserDefaults
//
// Created by Kevin Renskers on 18-12-12.
// Copyright (c) 2012 Gangverk. All rights reserved.
//
#import "GVUserDefaults.h"
#import <objc/runtime.h>
@implementation GVUserDefaults
+ (GVUserDefaults *)standardUserDefaults {
static dispatch_once_t pred;
static GVUserDefaults *sharedInstance = nil;
dispatch_once(&pred, ^{ sharedInstance = [[self alloc] init]; });
return sharedInstance;
}
+ (BOOL)resolveInstanceMethod:(SEL)aSEL {
NSString *method = NSStringFromSelector(aSEL);
if ([method isEqualToString:@"prefix"]) {
// Prevent endless loop for possibly non-existing prefix method
return [super resolveInstanceMethod:aSEL];
}
if ([method hasPrefix:@"set"]) {
class_addMethod([self class], aSEL, (IMP) accessorSetter, "v@:@");
return YES;
} else {
class_addMethod([self class], aSEL, (IMP) accessorGetter, "@@:");
return YES;
}
}
- (NSString *)getPrefix {
if ([self respondsToSelector:@selector(prefix)]) {
return [self performSelector:@selector(prefix)];
}
return @"";
}
id accessorGetter(id self, SEL _cmd) {
NSString *key = [NSString stringWithFormat:@"%@%@", [self getPrefix], NSStringFromSelector(_cmd)];
return [[NSUserDefaults standardUserDefaults] objectForKey:key];
}
void accessorSetter(id self, SEL _cmd, id newValue) {
NSString *method = NSStringFromSelector(_cmd);
NSString *key = [[method stringByReplacingCharactersInRange:NSMakeRange(0, 3) withString:@""] stringByReplacingOccurrencesOfString:@":" withString:@""];
key = [key stringByReplacingCharactersInRange:NSMakeRange(0,1) withString:[[key substringToIndex:1] lowercaseString]];
key = [NSString stringWithFormat:@"%@%@", [self getPrefix], key];
// Set value of the key anID to newValue
[[NSUserDefaults standardUserDefaults] setObject:newValue forKey:key];
[[NSUserDefaults standardUserDefaults] synchronize];
}
@end

19
LICENSE Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2012 Gangverk ehf. http://gangverk.is
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,4 +1,17 @@
GVUserDefaults
==============
# GVUserDefaults - NSUserDefaults access via properties
NSUserDefaults access via properties.
## Issues and questions
Have a bug? Please [create an issue on GitHub](https://github.com/gangverk/GVUserDefaults/issues)!
## Contributing
GVUserDefaults is an open source project and your contribution is very much appreciated.
1. Check for [open issues](https://github.com/gangverk/GVUserDefaults/issues) or [open a fresh issue](https://github.com/gangverk/GVUserDefaults/issues/new) to start a discussion around a feature idea or a bug.
2. Fork the [repository on Github](https://github.com/gangverk/GVUserDefaults) and make your changes on the **develop** branch (or branch off of it).
3. Make sure to add yourself to AUTHORS and send a pull request.
## License
GVUserDefaults is available under the MIT license. See the LICENSE file for more info.