Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rayansys committed Mar 11, 2023
0 parents commit b769fdf
Show file tree
Hide file tree
Showing 20 changed files with 1,646 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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

# node.js
#
node_modules/
npm-debug.log

# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
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

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
build/

1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git/
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# react-native-sms-sender

## SendSMS
Use this RN component to send an SMS with a DeviceEventEmitter (SMS_STATUS_LISTENER). iOS and Android are both supported.

## How to install
1. `npm install react-native-sms-sender --save`

## Using the module

Once everything is all setup, it's pretty simple:
```JavaScript
SendSMS.send(myOptionsObject);
```

### Object Properties
|Key|Type|Platforms|Required?|Description|
|-|-|-|-|-|
| `body` | String | iOS/Android | No | The text that shows by default when the SMS is initiated |
| `recipients` | Array (strings) | iOS/Android | No | Provides the phone number recipients to show by default |
## Example:

```JavaScript
import SendSMS from 'react-native-sms-sender'

//some stuff

someFunction() {
SendSMS.send({
body: 'The default body of the SMS!',
recipients: ['0123456789', '9876543210'],
});

//only for android |0:send,1:sent,2:delivered,3:errorSend,4:notDelivered|
let statusListener = DeviceEventEmitter.addListener('SMS_STATUS_LISTENER', function(status) {
console.log(status);
});
}
```
282 changes: 282 additions & 0 deletions SendSMS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
95688E1E1D38251600F72D63 /* SendSMS.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 95688E1D1D38251600F72D63 /* SendSMS.h */; };
95688E201D38251600F72D63 /* SendSMS.m in Sources */ = {isa = PBXBuildFile; fileRef = 95688E1F1D38251600F72D63 /* SendSMS.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
95688E181D38251600F72D63 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
95688E1E1D38251600F72D63 /* SendSMS.h in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
95688E1A1D38251600F72D63 /* libSendSMS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSendSMS.a; sourceTree = BUILT_PRODUCTS_DIR; };
95688E1D1D38251600F72D63 /* SendSMS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SendSMS.h; sourceTree = "<group>"; };
95688E1F1D38251600F72D63 /* SendSMS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SendSMS.m; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
95688E171D38251600F72D63 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
95688E111D38251600F72D63 = {
isa = PBXGroup;
children = (
95688E1C1D38251600F72D63 /* SendSMS */,
95688E1B1D38251600F72D63 /* Products */,
);
sourceTree = "<group>";
};
95688E1B1D38251600F72D63 /* Products */ = {
isa = PBXGroup;
children = (
95688E1A1D38251600F72D63 /* libSendSMS.a */,
);
name = Products;
sourceTree = "<group>";
};
95688E1C1D38251600F72D63 /* SendSMS */ = {
isa = PBXGroup;
children = (
95688E1D1D38251600F72D63 /* SendSMS.h */,
95688E1F1D38251600F72D63 /* SendSMS.m */,
);
path = SendSMS;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
95688E191D38251600F72D63 /* SendSMS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 95688E231D38251600F72D63 /* Build configuration list for PBXNativeTarget "SendSMS" */;
buildPhases = (
95688E161D38251600F72D63 /* Sources */,
95688E171D38251600F72D63 /* Frameworks */,
95688E181D38251600F72D63 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = SendSMS;
productName = SendSMS;
productReference = 95688E1A1D38251600F72D63 /* libSendSMS.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
95688E121D38251600F72D63 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
ORGANIZATIONNAME = "Trevor Porter";
TargetAttributes = {
95688E191D38251600F72D63 = {
CreatedOnToolsVersion = 7.3.1;
};
};
};
buildConfigurationList = 95688E151D38251600F72D63 /* Build configuration list for PBXProject "SendSMS" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 95688E111D38251600F72D63;
productRefGroup = 95688E1B1D38251600F72D63 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
95688E191D38251600F72D63 /* SendSMS */,
);
};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
95688E161D38251600F72D63 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
95688E201D38251600F72D63 /* SendSMS.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
95688E211D38251600F72D63 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
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;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = 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_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 = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../React/**",
"$(SRCROOT)/../react-native/React/**",
"$(SRCROOT)/Flare",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
95688E221D38251600F72D63 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
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;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
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 = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../React/**",
"$(SRCROOT)/../react-native/React/**",
"$(SRCROOT)/Flare",
);
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
95688E241D38251600F72D63 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/../react-native/React/**",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../React/**",
"$(inherited)",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Debug;
};
95688E251D38251600F72D63 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
HEADER_SEARCH_PATHS = (
"$(SRCROOT)/../react-native/React/**",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../React/**",
"$(inherited)",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
95688E151D38251600F72D63 /* Build configuration list for PBXProject "SendSMS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
95688E211D38251600F72D63 /* Debug */,
95688E221D38251600F72D63 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
95688E231D38251600F72D63 /* Build configuration list for PBXNativeTarget "SendSMS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
95688E241D38251600F72D63 /* Debug */,
95688E251D38251600F72D63 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 95688E121D38251600F72D63 /* Project object */;
}
Loading

0 comments on commit b769fdf

Please sign in to comment.