Fix ios react-native link

This commit is contained in:
Mathieu Acthernoene 2017-03-30 01:31:43 +02:00
parent 9c07bb2101
commit 7bd5250051
9 changed files with 286 additions and 584 deletions

View File

@ -2,16 +2,16 @@ require 'json'
version = JSON.parse(File.read('package.json'))["version"]
Pod::Spec.new do |s|
s.name = "RNI18n"
s.version = version
s.homepage = "https://github.com/AlexanderZaytsev/react-native-i18n"
s.summary = "React Native + i18n.js"
s.license = "MIT"
s.author = { "Alexander Zaytsev" => "alexander@say26.com" }
s.platform = :ios, "7.0"
s.source = { git: "https://github.com/AlexanderZaytsev/react-native-i18n.git", tag: s.version.to_s }
s.source_files = 'RNI18n/*.{h,m}'
s.preserve_paths = "**/*.js"
s.name = "RNI18n"
s.version = version
s.description = "https://github.com/AlexanderZaytsev/react-native-i18n"
s.summary = "React Native + i18n.js"
s.license = "MIT"
s.author = { "Alexander Zaytsev" => "alexander@say26.com" }
s.platform = :ios, "7.0"
s.source = { git: "https://github.com/AlexanderZaytsev/react-native-i18n.git", tag: s.version.to_s }
s.source_files = "ios/**/*.{h,m}"
s.requires_arc = true
s.dependency 'React'
s.dependency "React"
end

View File

@ -1,521 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
CDD7BF7C1B2D5125006FDA75 /* RNI18n.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CDD7BF7B1B2D5125006FDA75 /* RNI18n.h */; };
CDD7BF7E1B2D5125006FDA75 /* RNI18n.m in Sources */ = {isa = PBXBuildFile; fileRef = CDD7BF7D1B2D5125006FDA75 /* RNI18n.m */; };
CDD7BF841B2D5126006FDA75 /* libRNI18n.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDD7BF781B2D5125006FDA75 /* libRNI18n.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
1A54B20B1E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192;
remoteInfo = React;
};
1A54B20D1E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 2D2A28131D9B038B00D4039D;
remoteInfo = "React-tvOS";
};
1A54B20F1E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3C059A1DE3340900C268FA;
remoteInfo = yoga;
};
1A54B2111E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3C06751DE3340C00C268FA;
remoteInfo = "yoga-tvOS";
};
1A54B2131E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4;
remoteInfo = cxxreact;
};
1A54B2151E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4;
remoteInfo = "cxxreact-tvOS";
};
1A54B2171E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4;
remoteInfo = jschelpers;
};
1A54B2191E1E5E84000AD278 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4;
remoteInfo = "jschelpers-tvOS";
};
CDD7BF851B2D5126006FDA75 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = CDD7BF701B2D5125006FDA75 /* Project object */;
proxyType = 1;
remoteGlobalIDString = CDD7BF771B2D5125006FDA75;
remoteInfo = RNI18n;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
CDD7BF761B2D5125006FDA75 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
CDD7BF7C1B2D5125006FDA75 /* RNI18n.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1A54B2001E1E5E84000AD278 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
CDD7BF781B2D5125006FDA75 /* libRNI18n.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNI18n.a; sourceTree = BUILT_PRODUCTS_DIR; };
CDD7BF7B1B2D5125006FDA75 /* RNI18n.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNI18n.h; sourceTree = "<group>"; };
CDD7BF7D1B2D5125006FDA75 /* RNI18n.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNI18n.m; sourceTree = "<group>"; };
CDD7BF831B2D5126006FDA75 /* RNI18nTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RNI18nTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
CDD7BF751B2D5125006FDA75 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
CDD7BF801B2D5126006FDA75 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
CDD7BF841B2D5126006FDA75 /* libRNI18n.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
1A54B1E41E1E5BED000AD278 /* Frameworks */ = {
isa = PBXGroup;
children = (
1A54B2001E1E5E84000AD278 /* React.xcodeproj */,
);
name = Frameworks;
sourceTree = "<group>";
};
1A54B2011E1E5E84000AD278 /* Products */ = {
isa = PBXGroup;
children = (
1A54B20C1E1E5E84000AD278 /* libReact.a */,
1A54B20E1E1E5E84000AD278 /* libReact.a */,
1A54B2101E1E5E84000AD278 /* libyoga.a */,
1A54B2121E1E5E84000AD278 /* libyoga.a */,
1A54B2141E1E5E84000AD278 /* libcxxreact.a */,
1A54B2161E1E5E84000AD278 /* libcxxreact.a */,
1A54B2181E1E5E84000AD278 /* libjschelpers.a */,
1A54B21A1E1E5E84000AD278 /* libjschelpers.a */,
);
name = Products;
sourceTree = "<group>";
};
CDD7BF6F1B2D5125006FDA75 = {
isa = PBXGroup;
children = (
CDD7BF7A1B2D5125006FDA75 /* RNI18n */,
CDD7BF791B2D5125006FDA75 /* Products */,
1A54B1E41E1E5BED000AD278 /* Frameworks */,
);
sourceTree = "<group>";
};
CDD7BF791B2D5125006FDA75 /* Products */ = {
isa = PBXGroup;
children = (
CDD7BF781B2D5125006FDA75 /* libRNI18n.a */,
CDD7BF831B2D5126006FDA75 /* RNI18nTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
CDD7BF7A1B2D5125006FDA75 /* RNI18n */ = {
isa = PBXGroup;
children = (
CDD7BF7B1B2D5125006FDA75 /* RNI18n.h */,
CDD7BF7D1B2D5125006FDA75 /* RNI18n.m */,
);
path = RNI18n;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
CDD7BF771B2D5125006FDA75 /* RNI18n */ = {
isa = PBXNativeTarget;
buildConfigurationList = CDD7BF8C1B2D5126006FDA75 /* Build configuration list for PBXNativeTarget "RNI18n" */;
buildPhases = (
CDD7BF741B2D5125006FDA75 /* Sources */,
CDD7BF751B2D5125006FDA75 /* Frameworks */,
CDD7BF761B2D5125006FDA75 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = RNI18n;
productName = RNI18n;
productReference = CDD7BF781B2D5125006FDA75 /* libRNI18n.a */;
productType = "com.apple.product-type.library.static";
};
CDD7BF821B2D5126006FDA75 /* RNI18nTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = CDD7BF8F1B2D5126006FDA75 /* Build configuration list for PBXNativeTarget "RNI18nTests" */;
buildPhases = (
CDD7BF7F1B2D5126006FDA75 /* Sources */,
CDD7BF801B2D5126006FDA75 /* Frameworks */,
CDD7BF811B2D5126006FDA75 /* Resources */,
);
buildRules = (
);
dependencies = (
CDD7BF861B2D5126006FDA75 /* PBXTargetDependency */,
);
name = RNI18nTests;
productName = RNI18nTests;
productReference = CDD7BF831B2D5126006FDA75 /* RNI18nTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
CDD7BF701B2D5125006FDA75 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0630;
ORGANIZATIONNAME = "Alexander Zaytsev";
TargetAttributes = {
CDD7BF771B2D5125006FDA75 = {
CreatedOnToolsVersion = 6.3.2;
};
CDD7BF821B2D5126006FDA75 = {
CreatedOnToolsVersion = 6.3.2;
};
};
};
buildConfigurationList = CDD7BF731B2D5125006FDA75 /* Build configuration list for PBXProject "RNI18n" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = CDD7BF6F1B2D5125006FDA75;
productRefGroup = CDD7BF791B2D5125006FDA75 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 1A54B2011E1E5E84000AD278 /* Products */;
ProjectRef = 1A54B2001E1E5E84000AD278 /* React.xcodeproj */;
},
);
projectRoot = "";
targets = (
CDD7BF771B2D5125006FDA75 /* RNI18n */,
CDD7BF821B2D5126006FDA75 /* RNI18nTests */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
1A54B20C1E1E5E84000AD278 /* libReact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libReact.a;
remoteRef = 1A54B20B1E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1A54B20E1E1E5E84000AD278 /* libReact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libReact.a;
remoteRef = 1A54B20D1E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1A54B2101E1E5E84000AD278 /* libyoga.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libyoga.a;
remoteRef = 1A54B20F1E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1A54B2121E1E5E84000AD278 /* libyoga.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libyoga.a;
remoteRef = 1A54B2111E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1A54B2141E1E5E84000AD278 /* libcxxreact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcxxreact.a;
remoteRef = 1A54B2131E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1A54B2161E1E5E84000AD278 /* libcxxreact.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcxxreact.a;
remoteRef = 1A54B2151E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1A54B2181E1E5E84000AD278 /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 1A54B2171E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
1A54B21A1E1E5E84000AD278 /* libjschelpers.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libjschelpers.a;
remoteRef = 1A54B2191E1E5E84000AD278 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
CDD7BF811B2D5126006FDA75 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
CDD7BF741B2D5125006FDA75 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
CDD7BF7E1B2D5125006FDA75 /* RNI18n.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
CDD7BF7F1B2D5126006FDA75 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
CDD7BF861B2D5126006FDA75 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = CDD7BF771B2D5125006FDA75 /* RNI18n */;
targetProxy = CDD7BF851B2D5126006FDA75 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
CDD7BF8A1B2D5126006FDA75 /* 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;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
CDD7BF8B1B2D5126006FDA75 /* 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;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
CDD7BF8D1B2D5126006FDA75 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(BUILT_PRODUCTS_DIR)/include/*.*",
"$(BUILT_PRODUCTS_DIR)/usr/local/include/**",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
CDD7BF8E1B2D5126006FDA75 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
HEADER_SEARCH_PATHS = (
"$(inherited)",
"$(BUILT_PRODUCTS_DIR)/include/*.*",
"$(BUILT_PRODUCTS_DIR)/usr/local/include/**",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
CDD7BF901B2D5126006FDA75 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = RNI18nTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
CDD7BF911B2D5126006FDA75 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = RNI18nTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
CDD7BF731B2D5125006FDA75 /* Build configuration list for PBXProject "RNI18n" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CDD7BF8A1B2D5126006FDA75 /* Debug */,
CDD7BF8B1B2D5126006FDA75 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CDD7BF8C1B2D5126006FDA75 /* Build configuration list for PBXNativeTarget "RNI18n" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CDD7BF8D1B2D5126006FDA75 /* Debug */,
CDD7BF8E1B2D5126006FDA75 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
CDD7BF8F1B2D5126006FDA75 /* Build configuration list for PBXNativeTarget "RNI18nTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
CDD7BF901B2D5126006FDA75 /* Debug */,
CDD7BF911B2D5126006FDA75 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = CDD7BF701B2D5125006FDA75 /* Project object */;
}

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:RNI18n.xcodeproj">
</FileRef>
</Workspace>

View File

@ -1,14 +0,0 @@
//
// RNI18n.h
// RNI18n
//
// Created by Alexander Zaytsev on 14/06/15.
// Copyright (c) 2015 Alexander Zaytsev. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTLog.h>
@interface RNI18n : NSObject <RCTBridgeModule>
@end

View File

@ -1,27 +0,0 @@
//
// RNI18n.m
// RNI18n
//
// Created by Alexander Zaytsev on 14/06/15.
// Copyright (c) 2015 Alexander Zaytsev. All rights reserved.
//
#import "RNI18n.h"
@interface RNI18n ()
-(NSString*) getCurrentLocale;
@end
@implementation RNI18n
RCT_EXPORT_MODULE();
-(NSString*) getCurrentLocale{
NSString *localeString=[[NSLocale preferredLanguages] objectAtIndex:0];
return localeString;
}
- (NSDictionary *)constantsToExport
{
return @{ @"locale": [self getCurrentLocale] };
}
@end

4
ios/RNI18n.h Normal file
View File

@ -0,0 +1,4 @@
#import <React/RCTBridgeModule.h>
@interface RNI18n : NSObject <RCTBridgeModule>
@end

18
ios/RNI18n.m Normal file
View File

@ -0,0 +1,18 @@
#import "RNI18n.h"
@implementation RNI18n
RCT_EXPORT_MODULE();
- (NSString*) getCurrentLocale
{
NSString *localeString=[[NSLocale preferredLanguages] objectAtIndex:0];
return localeString;
}
- (NSDictionary *)constantsToExport
{
return @{ @"locale": [self getCurrentLocale] };
}
@end

View File

@ -0,0 +1,252 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
B3E7B58A1CC2AC0600A0062D /* RNI18n.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNI18n.m */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
58B511D91A9E6C8500147676 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
134814201AA4EA6300B7C361 /* libRNI18n.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNI18n.a; sourceTree = BUILT_PRODUCTS_DIR; };
B3E7B5881CC2AC0600A0062D /* RNI18n.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNI18n.h; sourceTree = "<group>"; };
B3E7B5891CC2AC0600A0062D /* RNI18n.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNI18n.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
58B511D81A9E6C8500147676 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
134814211AA4EA7D00B7C361 /* Products */ = {
isa = PBXGroup;
children = (
134814201AA4EA6300B7C361 /* libRNI18n.a */,
);
name = Products;
sourceTree = "<group>";
};
58B511D21A9E6C8500147676 = {
isa = PBXGroup;
children = (
B3E7B5881CC2AC0600A0062D /* RNI18n.h */,
B3E7B5891CC2AC0600A0062D /* RNI18n.m */,
134814211AA4EA7D00B7C361 /* Products */,
);
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
58B511DA1A9E6C8500147676 /* RNI18n */ = {
isa = PBXNativeTarget;
buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNI18n" */;
buildPhases = (
58B511D71A9E6C8500147676 /* Sources */,
58B511D81A9E6C8500147676 /* Frameworks */,
58B511D91A9E6C8500147676 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = RNI18n;
productName = RCTDataManager;
productReference = 134814201AA4EA6300B7C361 /* libRNI18n.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
58B511D31A9E6C8500147676 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0610;
ORGANIZATIONNAME = Facebook;
TargetAttributes = {
58B511DA1A9E6C8500147676 = {
CreatedOnToolsVersion = 6.1.1;
};
};
};
buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNI18n" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 58B511D21A9E6C8500147676;
productRefGroup = 58B511D21A9E6C8500147676;
projectDirPath = "";
projectRoot = "";
targets = (
58B511DA1A9E6C8500147676 /* RNI18n */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
58B511D71A9E6C8500147676 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B3E7B58A1CC2AC0600A0062D /* RNI18n.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
58B511ED1A9E6C8500147676 /* 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;
ENABLE_STRICT_OBJC_MSGSEND = YES;
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_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 = 7.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
58B511EE1A9E6C8500147676 /* 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 = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
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 = 7.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
58B511F01A9E6C8500147676 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../React/**",
"$(SRCROOT)/../../react-native/React/**",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = RNI18n;
SKIP_INSTALL = YES;
};
name = Debug;
};
58B511F11A9E6C8500147676 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../React/**",
"$(SRCROOT)/../../react-native/React/**",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = RNI18n;
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNI18n" */ = {
isa = XCConfigurationList;
buildConfigurations = (
58B511ED1A9E6C8500147676 /* Debug */,
58B511EE1A9E6C8500147676 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNI18n" */ = {
isa = XCConfigurationList;
buildConfigurations = (
58B511F01A9E6C8500147676 /* Debug */,
58B511F11A9E6C8500147676 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 58B511D31A9E6C8500147676 /* Project object */;
}

View File

@ -14,8 +14,5 @@
"i18n"
],
"author": "Alexander Zaytsev",
"license": "MIT",
"devDependencies": {
"react-native": "^0.40.0"
}
"license": "MIT"
}