Skip to content

Instantly share code, notes, and snippets.

@AlexisLeon
AlexisLeon / gist:46e5a997575a8523793d433aa54d58e2
Created April 10, 2017 23:38 — forked from mnylen/gist:8c4010ab353f4886f89c
Using the new Safari View Controller from React Native application

Using the new Safari View Controller from React Native application

  • Safari View Controller is iOS 9 only. You need Xcode 7 (beta 2 currently) to use it

  • React Native 0.6.0 is the minimum I got this working on

You might need to add this to your Info.plist in order for iOS 9 to load your application correctly:

<key>NSAppTransportSecurity</key>
@AlexisLeon
AlexisLeon / onesignal-node.js
Created April 6, 2017 06:03 — forked from mulhoon/onesignal-node.js
Send a push notification in node with OneSignal
var request = require('request');
var sendMessage = function(device, message){
var restKey = '****';
var appID = '****';
request(
{
method:'POST',
uri:'https://onesignal.com/api/v1/notifications',
headers: {
@AlexisLeon
AlexisLeon / rn.input-numbers.js
Created January 15, 2017 04:28
TextInput accepts only numbers - React Native
import React, { Component } from 'react';
import { TextInput } from 'react-native';
class Input extends Component {
constructor(props) {
super(props);
this.state = {
text: ''
};
}