@rebox/ios
Set of helpers to deal with React Native applications on iOS
Last updated a month ago by deepsweet .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @rebox/ios 
SYNC missed versions from official npm registry.

@rebox/ios npm

Set of helpers to deal with React Native applications on iOS.

Install

$ yarn add @rebox/ios

Requirements

  • Xcode 11.4
  • iOS Simulator 13.2

Setup

brew install cocoapods

API

type TLinkIosDependencyOptions = {
  projectPath: string,
  dependencyName: string
}

const linkIosDependency: (options: TLinkIosDependencyOptions) => Promise<void>
type TBuildIosAppDebugOptions = {
  projectPath: string,
  iOSVersion: string,
  platformName: string,
  appName: string,
  appId: string
}

const buildIosAppDebug: (options: TBuildIosAppDebugOptions) => Promise<void>
type TInstallIosAppOptions = {
  appPath: string,
  deviceId?: string // booted one by default
}

const installIosApp: (options: TInstallIosAppOptions) => Promise<void>
type TUninstallIosAppOptions = {
  appId: string,
  deviceId?: string // booted one by default
}

const uninstallIosApp: (options: TUninstallIosAppOptions) => Promise<void>
type TRunSimulatorOptions = {
  iPhoneVersion: number,
  iOSVersion: string,
  isHeadless?: boolean // false by default
}

const runIosSimulator: (options: TRunSimulatorOptions) => Promise<() => void>
type TLaunchIosAppOptions = {
  appId: string,
  deviceId?: string // booted one by default
}

const launchIosApp: (options: TLaunchIosAppOptions) => Promise<void>
type TRunIosOptions = {
  appName: string,
  appId: string,
  entryPointPath: string,
  iOSVersion: string, // for example `13.2`
  iPhoneVersion: number, // for example `8`
  fontsDir?: string, // directory with `.ttf` or `.otf` files
  dependencyNames?: string[], // installed NPM package names
  isHeadless?: boolean, // false by default
  logMessage?: (msg: string) => void
}

const runIosApp: (options: TRunIosOptions) => Promise<() => void>

Usage

// App.tsx
import React, { FC } from 'react'
import { Svg, Circle } from 'react-native-svg'

export const App: FC<{}> = () => (
  <Svg height={100} width={100} viewBox="0 0 100 100">
    <Circle
      cx="50"
      cy="50"
      r="45"
      stroke="blue"
      strokeWidth="2.5"
      fill="green"
    />
  </Svg>
)
// run.ts
import { runAndroidApp } from '@rebox/android'

await runAndroidApp({
  appName: 'Test',
  appId: 'org.nextools.test',
  entryPointPath: './App.tsx',
  dependencyNames: ['react-native-svg'],
  isHeadless: false,
  logMessage: console.log
})

Current Tags

  • 2.0.5                                ...           latest (a month ago)

24 Versions

  • 2.0.5                                ...           a month ago
  • 2.0.4                                ...           2 months ago
  • 2.0.3                                ...           2 months ago
  • 2.0.2                                ...           2 months ago
  • 2.0.1                                ...           2 months ago
  • 2.0.0                                ...           2 months ago
  • 1.0.1                                ...           4 months ago
  • 1.0.0                                ...           4 months ago
  • 0.8.1                                ...           5 months ago
  • 0.8.0                                ...           5 months ago
  • 0.7.0                                ...           7 months ago
  • 0.6.4                                ...           7 months ago
  • 0.6.3                                ...           9 months ago
  • 0.6.2                                ...           9 months ago
  • 0.6.1                                ...           9 months ago
  • 0.6.0                                ...           9 months ago
  • 0.5.0                                ...           9 months ago
  • 0.4.0                                ...           a year ago
  • 0.3.1                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.3                                ...           a year ago
  • 0.2.2                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (12)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |