Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ orbs:
executors:
js_compatible:
docker:
- image: cimg/node:18.4.0
- image: cimg/node:20.18.2
working_directory: ~/project
ios_compatible:
macos:
Expand All @@ -33,7 +33,7 @@ executors:
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
android_compatible:
machine:
machine:
image: android:default
resource_class: large
working_directory: ~/project/example/android
Expand All @@ -60,15 +60,15 @@ commands:
steps:
- restore_cache:
name: Restore gem cache
key: 3-gems-{{ checksum "Gemfile.lock" }}
key: 1-gems-{{ arch }}-{{ checksum "../Gemfile.lock" }}
- run:
name: Install gem dependencies
command: bundle check || bundle install --deployment --path vendor/bundle
- save_cache:
name: Save gem cache
key: 3-gems-{{ checksum "Gemfile.lock" }}
key: 1-gems-{{ arch }}-{{ checksum "../Gemfile.lock" }}
paths:
- vendor/bundle
- ../vendor/bundle

# -------------------------
# JOBS
Expand Down Expand Up @@ -103,14 +103,14 @@ jobs:
command: |
yarn lint

typescript:
typecheck:
executor: js_compatible
steps:
- attach_project
- run:
name: Typecheck files
command: |
yarn typescript
yarn typecheck

unit-tests:
executor: js_compatible
Expand Down Expand Up @@ -294,7 +294,7 @@ workflows:
- lint:
requires:
- install-dependencies
- typescript:
- typecheck:
requires:
- install-dependencies
- unit-tests:
Expand Down
24 changes: 23 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
**/.xcode.env.local

# Android/IJ
#
Expand All @@ -44,6 +45,9 @@ android.iml
#
example/ios/Pods

# Ruby
example/vendor/

# node.js
#
node_modules/
Expand All @@ -57,12 +61,30 @@ buck-out/
android/app/libs
android/keystores/debug.keystore

# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Expo
.expo/*
.expo/

# Turborepo
.turbo/

# generated by bob
lib/

# React Native Codegen
ios/generated
android/generated

# React Native Nitro Modules
nitrogen/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
Expand Down
1 change: 0 additions & 1 deletion .husky/.npmignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/commit-msg

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
541 changes: 541 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions .yarnrc

This file was deleted.

10 changes: 10 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
nodeLinker: node-modules
nmHoistingLimits: workspaces

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.1.cjs
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This native module is a bridge between the native Appcues SDKs in a React Native
- [πŸš€ Getting Started](#-getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Standard](#standard-installation)
- [Standard Installation](#standard-installation)
- [Segment](#segment)
- [One Time Setup](#one-time-setup)
- [Initializing the SDK](#initializing-the-sdk)
Expand All @@ -31,7 +31,7 @@ This native module is a bridge between the native Appcues SDKs in a React Native

### Prerequisites

**React Native** - your application should use React Native version 0.73 or above. Applications using Expo should use version 50 or above.
**React Native** - your application should use React Native version 0.73 or above. Applications using Expo should use version 50 or above. The New Architecture is fully supported starting with version 4.4.0.

**Android** - your application's `build.gradle` must have a `compileSdkVersion` of 34+ and `minSdkVersion` of 21+. Your project should use the Android Gradle Plugin (AGP) version 8 or above.
```
Expand Down Expand Up @@ -141,7 +141,7 @@ Add `AppcuesFrameView` instances in your application layouts to support embedded

## πŸ“ Documentation

More technical documentation about this module (including instruction for usage with Expo Bare and Managed workflow apps) is available in the [`docs` directory](https://github.com/appcues/appcues-react-native-module/tree/main/docs). Full documentation is available at https://docs.appcues.com/
More technical documentation about this module is available in the [`docs` directory](https://github.com/appcues/appcues-react-native-module/tree/main/docs). Full documentation is available at https://docs.appcues.com/

## 🎬 Examples

Expand Down
63 changes: 63 additions & 0 deletions android/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
cmake_minimum_required(VERSION 3.13)
project(AppcuesReactNative)

set(CMAKE_VERBOSE_MAKEFILE on)

file(GLOB_RECURSE cpp_SRCS CONFIGURE_DEPENDS ../cpp/*.cpp)
file(GLOB_RECURSE react_codegen_SRCS CONFIGURE_DEPENDS ./build/generated/source/codegen/jni/*.cpp)

add_library(
react_codegen_AppcuesReactNativeSpec
OBJECT
${cpp_SRCS}
${react_codegen_SRCS}
)

target_include_directories(react_codegen_AppcuesReactNativeSpec PUBLIC ../cpp)
target_include_directories(react_codegen_AppcuesReactNativeSpec PUBLIC ./build/generated/source/codegen/jni)

# https://github.com/react-native-community/discussions-and-proposals/discussions/816
# This if-then-else can be removed once this library does not support version below 0.76
# https://github.com/facebook/react-native/blob/68453a1f90b4a21b3f48cba07ab3c820fda32dac/packages/react-native-codegen/src/generators/modules/GenerateModuleJniH.js#L91-L104
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
target_link_libraries(
react_codegen_AppcuesReactNativeSpec
fbjni
jsi
# We need to link different libraries based on whether we are building rncore or not, that's necessary
# because we want to break a circular dependency between react_codegen_rncore and reactnative
reactnative
)
else()
target_link_libraries(
react_codegen_AppcuesReactNativeSpec
fbjni
folly_runtime
glog
jsi
react_codegen_rncore
react_debug
react_nativemodule_core
react_render_componentregistry
react_render_core
react_render_debug
react_render_graphics
react_render_imagemanager
react_render_mapbuffer
react_utils
rrc_image
rrc_view
turbomodulejsijni
yoga
)
endif()

target_compile_options(
react_codegen_AppcuesReactNativeSpec
PRIVATE
-DLOG_TAG=\"ReactNative\"
-fexceptions
-frtti
-std=c++20
-Wall
)
Loading