From d5ecf4bdaa6d7ff02325b38616879c85d95006d8 Mon Sep 17 00:00:00 2001 From: Joel Arvidsson Date: Wed, 20 May 2015 18:23:04 +0200 Subject: [PATCH] Added project structure. --- .gitignore | 25 ++- RNKeychain.xcodeproj/project.pbxproj | 270 ++++++++++++++++++++++++++ RNKeychainManager/RNKeychainManager.h | 14 ++ RNKeychainManager/RNKeychainManager.m | 20 ++ index.ios.js | 12 ++ package.json | 34 ++++ 6 files changed, 372 insertions(+), 3 deletions(-) create mode 100644 RNKeychain.xcodeproj/project.pbxproj create mode 100644 RNKeychainManager/RNKeychainManager.h create mode 100644 RNKeychainManager/RNKeychainManager.m create mode 100644 index.ios.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 123ae94..bfd73fa 100644 --- a/.gitignore +++ b/.gitignore @@ -13,9 +13,6 @@ lib-cov # Coverage directory used by tools like istanbul coverage -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - # node-waf configuration .lock-wscript @@ -25,3 +22,25 @@ build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git node_modules + +# OSX +.DS_Store + +# Xcode +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace diff --git a/RNKeychain.xcodeproj/project.pbxproj b/RNKeychain.xcodeproj/project.pbxproj new file mode 100644 index 0000000..6ed08fa --- /dev/null +++ b/RNKeychain.xcodeproj/project.pbxproj @@ -0,0 +1,270 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 5D82368F1B0CE3CB005A9EF3 /* RNKeychainManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D82368C1B0CE2A6005A9EF3 /* RNKeychainManager.m */; }; + 5D8236911B0CE3D6005A9EF3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D8236901B0CE3D6005A9EF3 /* Security.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 5D82366D1B0CE05B005A9EF3 /* Copy Files */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "include/$(PRODUCT_NAME)"; + dstSubfolderSpec = 16; + files = ( + ); + name = "Copy Files"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 5D82366F1B0CE05B005A9EF3 /* libRNKeychain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNKeychain.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 5D82368B1B0CE2A6005A9EF3 /* RNKeychainManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNKeychainManager.h; sourceTree = ""; }; + 5D82368C1B0CE2A6005A9EF3 /* RNKeychainManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNKeychainManager.m; sourceTree = ""; }; + 5D8236901B0CE3D6005A9EF3 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5D82366C1B0CE05B005A9EF3 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5D8236911B0CE3D6005A9EF3 /* Security.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5D8236661B0CE05B005A9EF3 = { + isa = PBXGroup; + children = ( + 5D8236901B0CE3D6005A9EF3 /* Security.framework */, + 5D82368A1B0CE2A6005A9EF3 /* RNKeychainManager */, + 5D8236701B0CE05B005A9EF3 /* Products */, + ); + sourceTree = ""; + wrapsLines = 0; + }; + 5D8236701B0CE05B005A9EF3 /* Products */ = { + isa = PBXGroup; + children = ( + 5D82366F1B0CE05B005A9EF3 /* libRNKeychain.a */, + ); + name = Products; + sourceTree = ""; + }; + 5D82368A1B0CE2A6005A9EF3 /* RNKeychainManager */ = { + isa = PBXGroup; + children = ( + 5D82368B1B0CE2A6005A9EF3 /* RNKeychainManager.h */, + 5D82368C1B0CE2A6005A9EF3 /* RNKeychainManager.m */, + ); + path = RNKeychainManager; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5D82366E1B0CE05B005A9EF3 /* RNKeychain */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5D8236831B0CE05B005A9EF3 /* Build configuration list for PBXNativeTarget "RNKeychain" */; + buildPhases = ( + 5D82366B1B0CE05B005A9EF3 /* Sources */, + 5D82366C1B0CE05B005A9EF3 /* Frameworks */, + 5D82366D1B0CE05B005A9EF3 /* Copy Files */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RNKeychain; + productName = RNKeychain; + productReference = 5D82366F1B0CE05B005A9EF3 /* libRNKeychain.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5D8236671B0CE05B005A9EF3 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0630; + ORGANIZATIONNAME = "Joel Arvidsson"; + TargetAttributes = { + 5D82366E1B0CE05B005A9EF3 = { + CreatedOnToolsVersion = 6.3.1; + }; + }; + }; + buildConfigurationList = 5D82366A1B0CE05B005A9EF3 /* Build configuration list for PBXProject "RNKeychain" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 5D8236661B0CE05B005A9EF3; + productRefGroup = 5D8236701B0CE05B005A9EF3 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5D82366E1B0CE05B005A9EF3 /* RNKeychain */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 5D82366B1B0CE05B005A9EF3 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5D82368F1B0CE3CB005A9EF3 /* RNKeychainManager.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 5D8236811B0CE05B005A9EF3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 5D8236821B0CE05B005A9EF3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5D8236841B0CE05B005A9EF3 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../React/**", + "$(SRCROOT)/../react-native/React/**", + "$(SRCROOT)/node_modules/react-native/React/**", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 5D8236851B0CE05B005A9EF3 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../../React/**", + "$(SRCROOT)/../react-native/React/**", + "$(SRCROOT)/node_modules/react-native/React/**", + ); + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5D82366A1B0CE05B005A9EF3 /* Build configuration list for PBXProject "RNKeychain" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5D8236811B0CE05B005A9EF3 /* Debug */, + 5D8236821B0CE05B005A9EF3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5D8236831B0CE05B005A9EF3 /* Build configuration list for PBXNativeTarget "RNKeychain" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5D8236841B0CE05B005A9EF3 /* Debug */, + 5D8236851B0CE05B005A9EF3 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 5D8236671B0CE05B005A9EF3 /* Project object */; +} diff --git a/RNKeychainManager/RNKeychainManager.h b/RNKeychainManager/RNKeychainManager.h new file mode 100644 index 0000000..0285eaf --- /dev/null +++ b/RNKeychainManager/RNKeychainManager.h @@ -0,0 +1,14 @@ +// +// RNKeychainManager.h +// RNKeychainManager +// +// Created by Joel Arvidsson on 2015-05-20. +// Copyright (c) 2015 Joel Arvidsson. All rights reserved. +// + +#import "RCTBridgeModule.h" +#import "RCTLog.h" + +@interface RNKeychainManager : NSObject + +@end diff --git a/RNKeychainManager/RNKeychainManager.m b/RNKeychainManager/RNKeychainManager.m new file mode 100644 index 0000000..b922ed5 --- /dev/null +++ b/RNKeychainManager/RNKeychainManager.m @@ -0,0 +1,20 @@ +// +// RNKeychainManager.m +// RNKeychainManager +// +// Created by Joel Arvidsson on 2015-05-20. +// Copyright (c) 2015 Joel Arvidsson. All rights reserved. +// + +#import +#import "RNKeychainManager.h" +#import "RCTConvert.h" +#import "RCTBridge.h" + +@implementation RNKeychainManager + +@synthesize bridge = _bridge; +RCT_EXPORT_MODULE(); + + +@end diff --git a/index.ios.js b/index.ios.js new file mode 100644 index 0000000..2a08190 --- /dev/null +++ b/index.ios.js @@ -0,0 +1,12 @@ +/** + * @providesModule KeychainIOS + */ +'use strict'; + +var RNKeychainManager = require('NativeModules').RNKeychainManager; + +var Keychain = { + +}; + +module.exports = Keychain; diff --git a/package.json b/package.json new file mode 100644 index 0000000..c42f85e --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "react-native-keychain", + "version": "0.1.0", + "description": "Keychain Access for React Native", + "main": "index.ios.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "react-native", + "react-component", + "react-native-component", + "react", + "mobile", + "ios", + "keychain" + ], + "author": { + "name": "Joel Arvidsson", + "email": "joel@oblador.se" + }, + "homepage": "https://github.com/oblador/react-native-keychain", + "bugs": { + "url": "https://github.com/oblador/react-native-keychain/issues" + }, + "repository": { + "type": "git", + "url": "git://github.com/oblador/react-native-keychain.git" + }, + "license": "MIT", + "peerDependencies": { + "react-native": "^0.4.0" + } +}