7.0.0 • Published 4 years ago
@rebox/ios v7.0.0
@rebox/ios
Set of helpers to deal with React Native applications on iOS.
Install
$ yarn add @rebox/ios
Requirements
- Xcode
- iOS Simulator
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 { 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
})
7.0.0
4 years ago
6.0.4
4 years ago
6.0.3
4 years ago
6.0.2
4 years ago
6.0.1
4 years ago
6.0.0
4 years ago
5.0.0
4 years ago
4.0.0
4 years ago
3.0.0
5 years ago
2.0.5
5 years ago
2.0.4
5 years ago
2.0.3
5 years ago
2.0.2
5 years ago
2.0.1
5 years ago
2.0.0
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.8.1
5 years ago
0.8.0
5 years ago
0.7.0
5 years ago
0.6.4
5 years ago
0.6.3
5 years ago
0.6.2
5 years ago
0.6.1
5 years ago
0.6.0
5 years ago
0.5.0
5 years ago
0.4.0
6 years ago
0.3.1
6 years ago
0.3.0
6 years ago
0.2.3
6 years ago
0.2.2
6 years ago
0.2.1
6 years ago
0.2.0
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago