Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ coverage/
# tsc
#
dist
android/build

# OSX
#
Expand Down
6 changes: 0 additions & 6 deletions examples/RNOneSignalTS/.buckconfig

This file was deleted.

2 changes: 2 additions & 0 deletions examples/RNOneSignalTS/.bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
4 changes: 1 addition & 3 deletions examples/RNOneSignalTS/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: '@react-native',
};
1 change: 0 additions & 1 deletion examples/RNOneSignalTS/.gitattributes

This file was deleted.

42 changes: 27 additions & 15 deletions examples/RNOneSignalTS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
**/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -28,36 +29,47 @@ build/
.gradle
local.properties
*.iml

# Visual Studio Code
#
.vscode/
*.hprof
.cxx/
*.keystore
!debug.keystore
.kotlin/

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

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# CocoaPods
/ios/Pods/
# Ruby / CocoaPods
**/Pods/
/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
3 changes: 1 addition & 2 deletions examples/RNOneSignalTS/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
bracketSpacing: false,
jsxBracketSameLine: true,
arrowParens: 'avoid',
singleQuote: true,
trailingComma: 'all',
};
42 changes: 42 additions & 0 deletions examples/RNOneSignalTS/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/

import { StatusBar, StyleSheet, useColorScheme, View } from 'react-native';
import {
SafeAreaProvider,
useSafeAreaInsets,
} from 'react-native-safe-area-context';
import OSDemo from './OSDemo';

function App() {
const isDarkMode = useColorScheme() === 'dark';

return (
<SafeAreaProvider>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<AppContent />
</SafeAreaProvider>
);
}

function AppContent() {
const safeAreaInsets = useSafeAreaInsets();

return (
<View style={styles.container}>
<OSDemo name="OneSignal" />
</View>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
},
});

export default App;
16 changes: 16 additions & 0 deletions examples/RNOneSignalTS/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby ">= 2.6.10"

# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'

# Ruby 3.4.0 has removed some libraries from the standard library.
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
import * as React from 'react';
import {
View,
StyleSheet,
Platform,
KeyboardAvoidingView,
StyleSheet,
Text,
TextInput,
TouchableOpacity,
} from 'react-native';
import {Button} from '@react-native-material/core';

const disabledColor = '#BEBEBE';
// const disabledColor = '#BEBEBE';

export const renderButtonView = (name: string, callback: Function) => {
return (
<View key={name + '_parent'} style={styles.buttonContainer}>
<Button
key={name}
title={name}
onPress={() => {
callback();
}}
/>
</View>
<TouchableOpacity
key={name + '_parent'}
style={styles.buttonContainer}
onPress={() => {
callback();
}}
>
<Text style={styles.buttonText}>{name}</Text>
</TouchableOpacity>
);
};

Expand Down Expand Up @@ -59,11 +57,19 @@ export const renderFieldView = (

const styles = StyleSheet.create({
buttonContainer: {
flexDirection: 'column',
overflow: 'hidden',
borderRadius: 10,
backgroundColor: '#007bff',
borderRadius: 8,
marginVertical: 10,
marginHorizontal: 10,
paddingVertical: 12,
paddingHorizontal: 16,
alignItems: 'center',
justifyContent: 'center',
},
buttonText: {
color: 'white',
fontSize: 16,
fontWeight: '600',
},
textInput: {
marginHorizontal: 10,
Expand Down
Loading
Loading