Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make example work #315

Draft
wants to merge 24 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
13 changes: 6 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,20 @@ jobs:
steps:
- checkout:
path: ~/react-native-radar
- run: yarn install
- run: sudo yarn global add react-native
- run: chown -R $USER:$USER android
- run: cd android && ./gradlew assembleDebug
- run: cd ../ && npm install && npm run pack && cd example
- run: npm install ../react-native-radar-*.tgz && npm install
- run: cd android && ./gradlew
ios:
macos:
xcode: "13.4.1"
working_directory: ~/react-native-radar/example
steps:
- checkout:
path: ~/react-native-radar
- run: yarn install
- run: sudo yarn global add react-native-cli @react-native-community/[email protected]
- run: cd ../ && npm install && npm run pack && cd example
- run: npm install ../react-native-radar-*.tgz && npm install
- run: cd ios && pod update RadarSDK && pod install
- run: react-native run-ios
- run: xcodebuild -workspace ios/Example.xcworkspace -scheme example -sdk iphonesimulator
workflows:
version: 2
node-android-ios:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,4 @@ ios/Carthage/Checkouts
ios/Carthage/Build
junit.xml
dist/

example2
react-native-radar-*.tgz
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ repositories {

dependencies {
api 'com.facebook.react:react-native:+'
api 'io.radar:sdk:3.13.0'
api 'io.radar:sdk:3.13.2'
}

2 changes: 1 addition & 1 deletion android/src/main/java/io/radar/react/RNRadarModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public void initialize(String publishableKey, boolean fraud) {
this.fraud = fraud;
SharedPreferences.Editor editor = getReactApplicationContext().getSharedPreferences("RadarSDK", Context.MODE_PRIVATE).edit();
editor.putString("x_platform_sdk_type", "ReactNative");
editor.putString("x_platform_sdk_version", "3.12.1");
editor.putString("x_platform_sdk_version", "3.12.2");
editor.apply();
if (fraud) {
Radar.initialize(getReactApplicationContext(), publishableKey, receiver, Radar.RadarLocationServicesProvider.GOOGLE, fraud);
Expand Down
10 changes: 10 additions & 0 deletions example/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

@@ -0,0 +1,8 @@
/node_modules/
/stories/
/icons/
/logos/
/.next/
/static/
/public/
**/*.bundle.js
46 changes: 46 additions & 0 deletions example/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"root": true,

"env": {
"es2021": true,
"node": true,
"react-native/react-native": true
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"react",
"react-native"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"airbnb",
"airbnb/hooks"
],
"rules": {
"no-console": 1, // Means warning
// allow .js files to contain JSX code
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx",".ts", ".tsx"] }],

// prevent eslint to complain about the "styles" variable being used before it was defined
"no-use-before-define": ["error", { "variables": false }],

// ignore errors for the react-navigation package
"react/prop-types": ["error", {"ignore": ["navigation", "navigation.navigate"]}],

// ignore errors for import directives
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
]

}
}
4 changes: 0 additions & 4 deletions example/.expo-shared/assets.json

This file was deleted.

1 change: 1 addition & 0 deletions example/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pbxproj -text
87 changes: 24 additions & 63 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,74 +1,35 @@
node_modules/**/*
.expo/*
npm-debug.*
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# dependencies
node_modules/

# Expo
.expo/
dist/
web-build/

# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/

# macOS
.DS_Store
# Metro
.metro-health-check*

# @generated expo-cli sync-e7dcf75f4e856f7b6f3239b3f3a7dd614ee755a8
# The following patterns were generated by expo-cli
# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# OSX
#
# macOS
.DS_Store
*.pem

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# Bundle artifacts
*.jsbundle

# CocoaPods
/ios/Pods/

# Expo
.expo/
web-build/
dist/
# local env files
.env*.local

# @end expo-cli
# typescript
*.tsbuildinfo
5 changes: 5 additions & 0 deletions example/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"arrowParens": "always",
"trailingComma": "es5"
}
Loading