Skip to content

Instantly share code, notes, and snippets.

Avatar
😴
☕️⚛️🏃‍♂️🐶

Brent Vatne brentvatne

😴
☕️⚛️🏃‍♂️🐶
View GitHub Profile
@brentvatne
brentvatne / notes.md
Created Jun 20, 2020
Converting a bare React Native app to a managed Expo app
View notes.md

Hi there!

There's no automated way to do this, but it shouldn't be too hard to pull off! I'd say to just give it a shot using the following process:

  1. What custom native code are you using in your app? Can it be replaced by something from the Expo SDK? If not, you may not be able to use the managed workflow for now and your journey ends here.
  2. The same applies for libraries - here is an exhaustive list of libraries in the Expo SDK in an easy to read JSON format. Compare that with your package.json.
  3. Create a new project with expo init - choose blank or blank (TypeScript).
  4. Start copying your source over and getting it to a working state piece-by-piece.
  5. Configure things like the bundle identifier, icon, splash screen, and android package in app.json.
  6. Publish it in expo publish, do a simulator build with expo build:ios -t simulator and a build you can run in the Andro
View powerhour.md

If you need help using the app, please reach out to brent@expo.io!

@brentvatne
brentvatne / privacy.md
Last active May 28, 2020
Hour Power Privacy Policy
View privacy.md

Privacy Policy

This privacy policy governs your use of the software application Hour Power (“Application”) for mobile devices that was created by Brent Vatne. Please read this policy and our Mobile Terms and Conditions carefully; by using the App you confirm to have understood and agreed to them.

What information does the Application obtain and how is it used?

User Provided Information

The Application does not obtain the information you provide when you download and register the Application.

View example.js
import * as React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import Constants from 'expo-constants';
import { ShadowBox, NeomorphBox } from 'react-native-neomorph-shadows';
import Animated, { Easing } from 'react-native-reanimated';
import Svg, {
Defs,
LinearGradient,
Circle,
Stop
View Podfile
# "DoingMyThing" is the app name here, replace it with your own, of course
platform :ios, '10.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
target 'DoingMyThing' do
# Pods for DoingMyThing
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
View MainApplication.java
package com.doingmything;
// "com.doingmything" should be your app package name
import com.doingmything.generated.BasePackageList;
import android.app.Application;
import android.util.Log;
import org.unimodules.adapters.react.ModuleRegistryAdapter;
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
View MainApplication.java
package com.doingmything;
import android.app.Application;
import android.util.Log;
import com.doingmything.generated.BasePackageList;
import org.unimodules.adapters.react.ModuleRegistryAdapter;
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
import org.unimodules.core.interfaces.SingletonModule;
View AppDelegate.h
#import <UIKit/UIKit.h>
#import <UMReactNativeAdapter/UMModuleRegistryAdapter.h>
#import <React/RCTBridgeDelegate.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@property (nonatomic, strong) UMModuleRegistryAdapter *moduleRegistryAdapter;
@property (nonatomic, strong) UIWindow *window;
@end
View AppDelegate.m
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <ReactNativeNavigation/ReactNativeNavigation.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{