Skip to content

Instantly share code, notes, and snippets.

View 0xpatrickdev's full-sized avatar
🚀

0xPatrick 0xpatrickdev

🚀
View GitHub Profile
@0xpatrickdev
0xpatrickdev / AppDelegate.m
Created December 6, 2018 01:55
Handle deep liking from multiple sources in a React Native app for iOS
// 'The AppDelegate.m file can only have one method for openUrl.'
// 'If you're also using RCTLinkingManager to handle deep links, you should handle both results in your openUrl method.'
// https://github.com/facebook/react-native-fbsdk#32-ios-project
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <CodePush/CodePush.h>
#import <react-native-branch/RNBranch.h>
import fetch from 'isomorphic-fetch';
import stripeInit from 'stripe';
import {stripeKey, graphCoolEndpoint} from './constants';
const stripe = stripeInit(stripeKey);
const updateGraphCoolCustomer = async (id, stripeId) => {
const updateCustomer = JSON.stringify({
query: `
mutation {
@0xpatrickdev
0xpatrickdev / react-native-calendars.js
Last active July 19, 2017 04:24
A node_modules file that uses ES.Next/ES7+ Property Initializers
import React, {Component} from 'react';
import {
View,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
import XDate from 'xdate';
import dateutils from '../dateutils';
import {xdateToData, parseDate} from '../interface';