Skip to content

Commit

Permalink
Upgrade react-native 0.76.3
Browse files Browse the repository at this point in the history
  • Loading branch information
christocracy committed Nov 27, 2024
1 parent b868af2 commit c0c6885
Show file tree
Hide file tree
Showing 19 changed files with 1,805 additions and 1,674 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ yarn-error.log

# For running ./scripts/bundle-install, we manually create this folder
android/app/src/main/assets

android/app/.cxx/
# Yarn
.yarn/*
!.yarn/patches
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ruby ">= 2.6.10"
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'

gem 'xcodeproj', '< 1.26.0'
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ android {
applicationId "com.transistorsoft.backgroundgeolocation.react"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 371
versionName "4.16.3"
versionCode 372
versionName "4.17.5"
resConfigs "en", "US"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader


Expand All @@ -35,7 +36,7 @@ class MainApplication : Application(), ReactApplication {

override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
Expand Down
10 changes: 5 additions & 5 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 23
compileSdkVersion = 34
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
// background-geolocation
playServicesLocationVersion = "21.0.1" // Or higher.
playServicesLocationVersion = "21.3.0" // Or higher.
hmsLocationVersion = "6.9.0.300" // Huawei HMS location version
appCompatVersion = "1.4.1"
appCompatVersion = "1.6.1"
removeBackgroundGeolocationDebugSoundsInRelease = false
}
repositories {
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
3 changes: 2 additions & 1 deletion android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down
2 changes: 1 addition & 1 deletion bin/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function link() {
const path = require('path');
const rimraf = require("rimraf");

const SRC_ROOT = path.join('/Users/chris/workspace/react/background-geolocation');
const SRC_ROOT = path.join('/Users/chris/workspace/background-geolocation/react');
const MODULE_NAME = "react-native-background-geolocation";
const SRC_MODULE = path.join(SRC_ROOT, MODULE_NAME + "-android");
const NODE_MODULES = path.join('.', 'node_modules');
Expand Down
17 changes: 4 additions & 13 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,18 @@ BackgroundGeolocation.registerHeadlessTask(BackgroundGeolocationHeadlessTask);
*/
const BackgroundFetchHeadlessTask = async (event) => {
console.log('[BackgroundFetch HeadlessTask] start', event.taskId);

/*
if (event.taskId == 'react-native-background-fetch') {
const location = await BackgroundGeolocation.getCurrentPosition({
samples: 2,
samples: 1,
extras: {
event: 'background-fetch',
headless: true
}
});
console.log('[BackgroundFetch] getCurrentPosition: ', location);

/*
await BackgroundFetch.scheduleTask({
taskId: 'com.transistorsoft.customtask',
delay: 5000,
stopOnTerminate: false,
enableHeadless: true,
forceAlarmManager: true
});
*/
console.log('[BackgroundFetch] getCurrentPosition: ', location);
}
*/
// Important: await asychronous tasks when using HeadlessJS.
/* DISABLED
const location = await BackgroundGeolocation.getCurrentPosition({persist: false, samples: 1});
Expand Down
2 changes: 1 addition & 1 deletion ios/BGGeolocation/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>location</string>
<string>fetch</string>
<string>processing</string>
</array>
<key>UILaunchStoryboardName</key>
Expand Down
Loading

0 comments on commit c0c6885

Please sign in to comment.