Skip to content

Commit

Permalink
Merge pull request #2654 from brandingbrand/develop
Browse files Browse the repository at this point in the history
chore: merge develop into main
  • Loading branch information
jasonmosley authored Mar 14, 2024
2 parents c623965 + f3bcca9 commit 0c5c674
Show file tree
Hide file tree
Showing 44 changed files with 395 additions and 262 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

name: PR Test

on: [ push, pull_request ]
on: [pull_request]

jobs:
build:

runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 25

steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # pin@v3
Expand All @@ -22,4 +22,4 @@ jobs:
- name: Run tests
run: yarn test
- name: Initialize react native app
run: yarn workspace @brandingbrand/code-app run init -v
run: yarn workspace @brandingbrand/code-app run init -p android -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ yarn-error.log
buck-out/
\.buckd/
*.keystore
!example.keystore
!debug.keystore

# fastlane
Expand Down
4 changes: 4 additions & 0 deletions apps/react-native/.coderc/env/env.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ const dev: ENV = {
version: '0.0.1',
build: 1,
},
signing: {
keyAlias: 'androiddebugkey',
storeFile: 'signing/example.keystore',
},
manifest: {
urlScheme: {
scheme: 'code',
Expand Down
12 changes: 8 additions & 4 deletions apps/react-native/.coderc/env/env.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const prod: ENV = {
exportTeamId: '762H5V79XV',
exportMethod: 'app-store',
provisioningProfileName: 'Test Provisioning Profile',
profilesDir: 'xx/xx',
appleCert: 'xx/xx',
distCert: 'xx/xx',
distP12: 'xx/xx',
profilesDir: 'signing',
appleCert: 'signing/AppleWWDRCA.cert',
distCert: 'signing/store.cert',
distP12: 'signing/store.p12',
},
frameworks: [
{
Expand All @@ -48,6 +48,10 @@ const prod: ENV = {
version: '0.0.1',
build: 1,
},
signing: {
keyAlias: 'androiddebugkey',
storeFile: 'signing/example.keystore',
},
manifest: {
mainActivityAttributes: {
'android:screenOrientation': 'portrait',
Expand Down
Empty file.
Binary file not shown.
Empty file.
Empty file.
Empty file.
8 changes: 4 additions & 4 deletions docs/src/pages/en/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ lang: en

## FAQ

#### How does this help me?
### How does this help me?

`Flagship Code™` provides you a typed configuration with idempotent native code generation. This is important for scalability, managing third-party dependencies, managing build configurations, managing runtime configurations, and staying up to date with the latest stable release of React Native.

#### React Native Support Version?
### React Native Support Version?

We support the latest stable release of React Native which we define as the latest released version minus one semantic minor version e.g., latest released is `0.71.2` and we support `0.70.6`. This will be the continued pattern unless there is a necessary upgrade.

#### Can I opt-in at any time?
### Can I opt-in at any time?

Yes, at any time you can opt-in. To opt-in, stop persisting the `ios` and `android` directories and create a new `code` runtime configuration directory with all necessary assets and packages. To see a detailed implementation, head over to the [**integration**](/en/usage/integration) page.

#### Can I opt-out at any time?
### Can I opt-out at any time?

Yes, at any time you can opt-out. To opt-out you will start persisting the `ios` and `android` directories and remove all `code` dependencies.
6 changes: 3 additions & 3 deletions docs/src/pages/en/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ lang: en

This toolkit can be broken into three models: Core, CLI, and Plugins.

### Core
## Core

The core SDK contains utility functions, executors, and a template. Utility functions are foundational functions that executors and more complex functions are built upon to manipulate or generate native code.

### CLI
## CLI

The CLI SDK is a command line interface that listens for options that conditionally run executors.

> Executors are complex functions that are executed at different native-specific lifecycles.
### Plugins
## Plugins

Plugins are published or local native-specific scripts (e.g., iOS and/or Android) that manipulate or generate native code for a specific third-party SDK. These plugins are run generically based on a priority list captured in the package.json file.

Expand Down
10 changes: 5 additions & 5 deletions docs/src/pages/en/packages/cli/v12.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import CodeCopy from "../../../../components/code-copy.astro";

## CLI

`@brandingbrand/code-cli` is a package that listens commands that will invoke initializing an iOS and/or Android React Native project, add native code-signing keys and cleaning out native code + compiled configuration files.
`@brandingbrand/code-cli` is a package that listens to commands that will invoke initializing an iOS and/or Android React Native project, add native code-signing keys and cleaning out native code + compiled configuration files.

### Getting Started

Expand All @@ -21,15 +21,15 @@ Add the above noted package and the `code` command is now available to use via `

### Usage

The 3 commands that are available to use with `code` are: `init`, `keys` and `clean`. Each command accepts different options but do follow the same execution life-cycle hooks: pre, pre-platform, platform, post-platform, post.
The 3 commands that are available to use with `code` are: `init`, `keys` and `clean`. Each command accepts different options but follows the same execution life-cycle hooks: pre, pre-platform, platform, post-platform, post.

These explicit life-cycle hooks exist to give full customization to the execution workflow. Each execution life-cycle hook exports an array of executors which each have a use case. To learn more about executors and the execution life-cycle hooks jump over to the [**Core**](/en/packages/core) package. The CLI package doesn't know any specifics of the executors, it only knows of the life-cycle hooks to invoke.

### Init

Initializes a specificed platform project.
Initializes a specified platform project.

To invoke this `init` command run: `yarn code init`. This will invoke all the execution life-cycle hooks for `init`. There are a few options that can be sent to this command.
To invoke the `init` command run: `yarn code init`. This will invoke all the execution life-cycle hooks for `init`. There are a few options that can be sent to this command.

#### Options

Expand All @@ -46,7 +46,7 @@ To invoke this `init` command run: `yarn code init`. This will invoke all the ex

Adds codesigning keys for a specified platform.

To invoke this `keys` command run: `yarn code keys`. This will invoke all the execution life-cycle hooks for `keys`. There are a few options that can be sent to this command.
To invoke the `keys` command run: `yarn code keys`. This will invoke all the execution life-cycle hooks for `keys`. There are a few options that can be sent to this command.

#### Options

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/en/packages/plugins/app-icon/v1.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-app-icon" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/en/packages/plugins/asset/v1.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-asset" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/en/packages/plugins/fastlane/v1.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-fastlane" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
82 changes: 82 additions & 0 deletions docs/src/pages/en/packages/plugins/fastlane/v2.0.0.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
title: Plugin Fastlane
description: brandingbrand/code-plugin-fastlane
layout: ../../../../../layouts/docs.astro
lang: en
---

import CodeCopy from "../../../../../components/code-copy.astro";

## Plugin Fastlane

`@brandingbrand/code-plugin-fastlane` is a package that will generate native fastlane code necessary for your ci/cd integrations. Right now this contains the appcenter fastlaene integration.

### Getting Started

<div class="flex w-full my-6">
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-fastlane" />
</div>

Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

After adding this plugin as a dev dependency it is necessary to add it to the code plugins configuration via the `package.json`.

`package.json`

```
"code": {
"plugins": [
"@brandingbrand/code-plugin-fastlane"
]
},
```

Your Flagship Code environment should also be updated with the `@brandingbrand/code-plugin-fastlane` required props from the defined interface.

<aside class="p-2 bg-yellow-100 rounded-md mb-2">
In the context of Continuous Integration/Continuous Deployment (CI/CD), the manual invocation of the `code keys` command becomes obsolete, as fastlane adeptly manages all aspects of codesigning.
</aside>

`.coderc/env/env.<env>.ts`

```
codePluginFastlane: {
code: {
ios: {
appCenter: {
organization: 'Your-Org',
appName: 'TestApp-iOS-Internal',
destinationType: 'group',
destinations: ['IAT', 'UAT'],
},
buildScheme: 'appname',
},
android: {
appCenter: {
organization: 'Your-Org',
appName: 'TestApp-Android-Internal',
destinationType: 'group',
destinations: ['IAT', 'UAT'],
},
},
},
},
```

The interface in your `.coderc/env/env.<env>.ts` has the following props:

<div class="my-4 overflow-scroll">
| attribute | description |
| :-------- | :---------- |
| code.ios.appcenter.organization | appcenter account name of the owner of the app (username or organization URL name |
| code.ios.appcenter.appName | appcenter app name (as seen in app URL) |
| code.ios.appcenter.destinationType | Destination type of distribution destination. 'group' and 'store' are supported (default: group) |
| code.ios.appcenter.destinations | Comma separated list of destination names, use '*' for all distribution groups if destination type is 'group'. Both distribution groups and stores are supported. All names are required to be of the same destination type (default: Collaborators) |
| code.ios.buildScheme | xcode project name |
| code.android.appcenter.organization | appcenter account name of the owner of the app (username or organization URL name |
| code.android.appcenter.appName | appcenter app name (as seen in app URL) |
| code.android.appcenter.destinationType | Destination type of distribution destination. 'group' and 'store' are supported (default: group) |
| code.android.appcenter.destinations | Comma separated list of destination names, use '*' for all distribution groups if destination type is 'group'. Both distribution groups and stores are supported. All names are required to be of the same destination type (default: Collaborators) |
</div>
2 changes: 1 addition & 1 deletion docs/src/pages/en/packages/plugins/fbsdk-next/v1.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-fbsdk-next && yarn add react-native-fbsdk-next" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-firebase-analytics && yarn add @react-native-firebase/analytics@^15.7.0" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/en/packages/plugins/firebase-app/v1.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-firebase-app && yarn add @react-native-firebase/app@^15.7.0" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-google-signin && yarn add @react-native-google-signin/google-signin@^8.0.0" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/en/packages/plugins/leanplum/v1.0.1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-leanplum && yarn add @leanplum/react-native-sdk@~2.0.0 clevertap-react-native@^0.9.4" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-native-navigation && yarn add react-native-navigation@^7.31.1" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/en/packages/plugins/permissions/v1.0.0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-permissions && yarn add react-native-permissions@^3.6.1" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-splash-screen" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-target-application" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import CodeCopy from "../../../../../components/code-copy.astro";
<CodeCopy args="yarn add -D @brandingbrand/code-plugin-target-extension" />
</div>

Add the above noted package and the plugin is avaialble in the Flagship Code plugin ecosystem.
Add the above noted package and the plugin is available in the Flagship Code plugin ecosystem.

### Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/en/usage/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ As a first step to troubleshooting iOS, we recommend you clear your Xcode Derive
If you are upgrading from a previous version of FS to FS12, all text elements in Android that do not have a value for their color will be white when the device is in dark mode. To resolve this, patch the template style values XML file so that the application defaults to light mode, regardless of the device’s current theme.

### Java Vesion
### Java Version
It's possible OS updates have caused this issue when reported; however, if a Java version issue is encountered while building the Android application, you can resolve it by making sure you set the JAVA_HOME path equal to the one used by Android Studio in your path file.

Open and edit your .zshrc file `code .zshrc` (or .bashrc if using Linux, or WSL)
Expand Down
3 changes: 3 additions & 0 deletions docs/src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
.markdown p {
@apply mb-4 text-code-charcoal dark:text-code-light-grey;
}
.markdown aside > p {
@apply mb-4 text-code-charcoal dark:text-code-charcoal;
}
.markdown a > p {
@apply mb-0 text-sm;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"eslint": "^8.25.0",
"eslint-config-eslint": "^7.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsdoc": "^39.3.12",
"eslint-plugin-jsdoc": "^48.2.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"format-package": "^7.0.0",
Expand Down
Loading

0 comments on commit 0c5c674

Please sign in to comment.