react-native-background-geolocation 4.9.2 → 4.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/libs/com/transistorsoft/tslocationmanager/{3.2.6/tslocationmanager-3.2.6.aar → 3.2.7/tslocationmanager-3.2.7.aar} +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/{3.2.6/tslocationmanager-3.2.6.pom → 3.2.7/tslocationmanager-3.2.7.pom} +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager/maven-metadata.xml +4 -3
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.2.6/tslocationmanager-reverse-3.2.6.aar → 3.2.7/tslocationmanager-reverse-3.2.7.aar} +0 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.aar.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/{3.2.6/tslocationmanager-reverse-3.2.6.pom → 3.2.7/tslocationmanager-reverse-3.2.7.pom} +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.md5 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.sha1 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.sha256 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.7/tslocationmanager-reverse-3.2.7.pom.sha512 +1 -0
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/maven-metadata.xml +4 -3
- package/package.json +1 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.aar.sha512 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.md5 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.sha1 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.sha256 +0 -1
- package/android/libs/com/transistorsoft/tslocationmanager-reverse/3.2.6/tslocationmanager-reverse-3.2.6.pom.sha512 +0 -1
- package/scripts/cp-declarations +0 -53
- package/scripts/declare-module +0 -3
- package/scripts/docs-index.html +0 -4
- package/scripts/generate-docs +0 -23
- package/scripts/tsconfig.json +0 -21
- package/scripts/xcode-helpers.js +0 -171
|
Binary file
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
bfbe154562a0bd36e6de59b01db6e3a6
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
646dd4b53337a3080cb1f4b407c35c3f476a7997
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f0b920709441b748f8c029ba046262a75a3deebea81772a58f1bf1ac778aabc6
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.aar.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a3221bb3e97bf8dd37c1785cd4a373e1e38147f6ebd9e3557f04c22ab565260754d74e1175e5be1f555153db3656c78ce3b40e192e9505bf73f14797dad66df3
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.md5
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7d99f3b24498fe9a089817acc433ba5e
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha1
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e02dd92c5d5f1996b5a7545ac21bcc3487d17735
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha256
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b7f5c299d1cfa0e74ff23afc8db34e0b95ce6cc5b08626850d2269a15f3617b9
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.7/tslocationmanager-3.2.7.pom.sha512
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a6081fb382046e288ba6fc35256ec950645e9e63950b51361837bdb90111e4dbcb9950ecb7dab7cc580c3992e3f5297df1cd0e495062c1196ff1a5d3acc23966
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
<groupId>com.transistorsoft</groupId>
|
|
4
4
|
<artifactId>tslocationmanager</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>3.2.
|
|
7
|
-
<release>3.2.
|
|
6
|
+
<latest>3.2.7</latest>
|
|
7
|
+
<release>3.2.7</release>
|
|
8
8
|
<versions>
|
|
9
9
|
<version>3.2.6</version>
|
|
10
|
+
<version>3.2.7</version>
|
|
10
11
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
12
|
+
<lastUpdated>20221026135257</lastUpdated>
|
|
12
13
|
</versioning>
|
|
13
14
|
</metadata>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9c76cbc585c54d50c668361c10ef3ec2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7ff5da635f3ee43fb297d45b914d823af7810f8f
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ccb988bf634e17222af4298b6b4fad13aead99e74c7861c7f4b3efa20190ea41
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f6c1a31b649d9cbe7161e0e68b0eef8582599374dfcb837b12a12a12509b013c99ee3b9bf71f77fb7d2bc903ea6caa155dad77926e470cd785ceecd189fc2fec
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9a6136e2bd04007e11fcc84fa8b4c765
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a8f65c6057bad6cbdb89968b2bed8e60f38781e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2a4882a1d3c81b08da5924b8340c1bc0d3d7fd98e6615627f58fddffd1d7a100
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
85119ae37d69431011cd3b3dd26168169cd64e5b88afae6af60098bc55c13b90db0bdee84765ef56935881363a232797191b2a47febf2992986020abb5ecf7bf
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
<groupId>com.transistorsoft</groupId>
|
|
4
4
|
<artifactId>tslocationmanager-reverse</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>3.2.
|
|
7
|
-
<release>3.2.
|
|
6
|
+
<latest>3.2.7</latest>
|
|
7
|
+
<release>3.2.7</release>
|
|
8
8
|
<versions>
|
|
9
9
|
<version>3.2.6</version>
|
|
10
|
+
<version>3.2.7</version>
|
|
10
11
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
12
|
+
<lastUpdated>20221026135257</lastUpdated>
|
|
12
13
|
</versioning>
|
|
13
14
|
</metadata>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-background-geolocation",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.3",
|
|
4
4
|
"description": "The most sophisticated cross-platform background location-tracking & geofencing module with battery-conscious motion-detection intelligence",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
41f3ac23783f5ddf78b3a74a1296e4ba
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c65a6f4d0721d90fee84de3e60a2676a696866ef
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
734dca901c9fa132ef04bcff43a2a20bc045e88cb7e55e9ca17fde2474f58672
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
517eca12476d737d2b7469b4246d8f488654fd8355666910b9e4e5b641afe10c3fe963849926a607c13e03144308cc355c7b4dd3c5cf5532c815df2a374cbbf1
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
00e86f0f373eec1f927b0f24447748fa
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9048834dc1ad2dc8047811dd58c2a8adf59798c1
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
364bb683fb5235a848be6cf96b801852880b6ab6df36a4604b7e0ef43c653cbb
|
package/android/libs/com/transistorsoft/tslocationmanager/3.2.6/tslocationmanager-3.2.6.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c2501c6c8c322cbc07839c36ee9ffcd5d0a2328723699c8d9ea80fa246134e26de943bd50e2c49d61c971f802e35f7da10c200df8f4ada248d7f44c2b6e8e16a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
15ff65b863b2396d6aec38806c2b187e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
af2493a9204548b8fa550ddf028147b96885a030
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d8895605981e46748187b8b09a66e61352188ec48ec04338531383b985fbb4c2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
f4b6b70c113a7fac573f224168f1e637881419b12f729928ef15cad3dce74924964158dbe6dc791f32d75c8ca6365049b64d227bae81452b24ad778e1b96e18d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bb4a8fd3e21caead2839e16ed0828bf9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
718c2e540054c271206ff765fbe01550debcec4e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
74bb64c1b2f6aed572821a3356ee6aee71d6d7a63c317ea1a33d96afcef98064
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
45d69b06687c7e3340be6fd163082b5d9872bc88d573109fb12d7feab559a8896f871269c36dc4cd428db6e786c7febc0b266064f90f6dbad46e5f84ab180805
|
package/scripts/cp-declarations
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
###
|
|
4
|
-
# Copies the Typescript modules from another project (eg: Free->Premium and vice-versa).
|
|
5
|
-
# Re-writes each definition file's declare module "module-name" to the current module-name.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
# $ ./cp-declaration ../xxx-background-geolocation
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
if [ -z "$1" ]
|
|
12
|
-
then
|
|
13
|
-
echo "ERROR: No source path provided"
|
|
14
|
-
exit
|
|
15
|
-
fi
|
|
16
|
-
# Strip trailing /
|
|
17
|
-
SOURCE_PATH=$(echo $1 | tr -s /)
|
|
18
|
-
SOURCE_PATH=${SOURCE_PATH%/}
|
|
19
|
-
|
|
20
|
-
# Sample the source directory for path of /declarations
|
|
21
|
-
if [ -d "$SOURCE_PATH/src/declarations" ]; then
|
|
22
|
-
SOURCE_PATH="$SOURCE_PATH/src/declarations"
|
|
23
|
-
elif [ -d "$SOURCE_PATH/src/ionic/declarations" ]; then
|
|
24
|
-
SOURCE_PATH="$SOURCE_PATH/src/ionic/declarations"
|
|
25
|
-
else
|
|
26
|
-
echo "ERROR: Invalid source path"
|
|
27
|
-
exit
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
# Sample the destination directory for path of /declarations
|
|
31
|
-
DESTINATION_PATH="."
|
|
32
|
-
if [ -d "$DESTINATION_PATH/src/declarations" ]; then
|
|
33
|
-
DESTINATION_PATH="$DESTINATION_PATH/src"
|
|
34
|
-
elif [ -d "$DESTINATION_PATH/src/ionic" ]; then
|
|
35
|
-
DESTINATION_PATH="$DESTINATION_PATH/src/ionic"
|
|
36
|
-
else
|
|
37
|
-
echo "ERROR: Invalid destination. Are you in a background-geolocation project?"
|
|
38
|
-
exit
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
# This module's name
|
|
42
|
-
MODULE_NAME="${PWD##*/}"
|
|
43
|
-
|
|
44
|
-
cp -R -f "$SOURCE_PATH" "$DESTINATION_PATH"
|
|
45
|
-
echo "MODULE $MODULE_NAME"
|
|
46
|
-
echo "SOURCE: $SOURCE_PATH"
|
|
47
|
-
echo "DESTINATION: $DESTINATION_PATH"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# Finally, 'declare module "xxx-background-geolocation"' in every .d.ts file.
|
|
51
|
-
find "$DESTINATION_PATH/declarations" -type f -name "*.d.ts" -print0 | xargs -0 sed -i '' -e "s/declare module.*/declare module \"$MODULE_NAME\" \{/g"
|
|
52
|
-
|
|
53
|
-
|
package/scripts/declare-module
DELETED
package/scripts/docs-index.html
DELETED
package/scripts/generate-docs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
echo "Analytics ID: $GA_ID"
|
|
4
|
-
|
|
5
|
-
#typedoc --out docs --includeDeclarations --excludeExternals --listInvalidSymbolLinks --name "React Native Background Geolocation" --theme ./node_modules/typedoc-theme-transistor/src/default --mode file --gaID $GA_ID --gaSite "auto" ./src/declarations/
|
|
6
|
-
|
|
7
|
-
typedoc --out docs \
|
|
8
|
-
--tsconfig ./scripts/tsconfig.json \
|
|
9
|
-
--excludeExternals \
|
|
10
|
-
--listInvalidSymbolLinks \
|
|
11
|
-
--readme none \
|
|
12
|
-
--name "React Native Background Geolocation" \
|
|
13
|
-
--theme node_modules/\@transistorsoft/typedoc-theme/bin/default \
|
|
14
|
-
--highlightTheme monokai \
|
|
15
|
-
--gaID $GA_ID \
|
|
16
|
-
--gaSite "auto" \
|
|
17
|
-
--plugin ./node_modules/\@transistorsoft/typedoc-theme/node_modules/\@transistorsoft/typedoc-plugin-mediaplayer \
|
|
18
|
-
--plugin ./node_modules/\@transistorsoft/typedoc-theme/node_modules/\@transistorsoft/typedoc-plugin-gitlink \
|
|
19
|
-
--plugin ./node_modules/\@transistorsoft/typedoc-theme/node_modules/typedoc-plugin-merge-modules \
|
|
20
|
-
./src/declarations/
|
|
21
|
-
|
|
22
|
-
touch ./docs/.nojekyll
|
|
23
|
-
|
package/scripts/tsconfig.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": "",
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"emitDecoratorMetadata": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"lib": [
|
|
9
|
-
"dom",
|
|
10
|
-
"es2015"
|
|
11
|
-
],
|
|
12
|
-
"module": "es2015",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"sourceMap": true,
|
|
15
|
-
"target": "es5"
|
|
16
|
-
},
|
|
17
|
-
"include": [
|
|
18
|
-
"../src/declarations/*.d.ts",
|
|
19
|
-
"../src/declarations/interfaces/*d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
package/scripts/xcode-helpers.js
DELETED
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const glob = require('glob');
|
|
4
|
-
// unfortunately we can't use the 'plist' module at the moment for parsing
|
|
5
|
-
// because it has a few issues with empty strings and keys.
|
|
6
|
-
// There are several issues and PRs on that repository open though and hopefully
|
|
7
|
-
// we can revert back to only using one module once they're merged.
|
|
8
|
-
const plistParser = require('fast-plist');
|
|
9
|
-
const plistWriter = require('plist');
|
|
10
|
-
|
|
11
|
-
// The getBuildProperty method of the 'xcode' project is a bit naive in that it
|
|
12
|
-
// doesn't take a specific target but iterates over all of them and doesn't have
|
|
13
|
-
// an exit condition if a property has been found.
|
|
14
|
-
// Which in the case of react-native projects usually is the tvOS target because
|
|
15
|
-
// it comes last.
|
|
16
|
-
function getBuildProperty(project, property) {
|
|
17
|
-
const firstTarget = project.getFirstTarget().firstTarget;
|
|
18
|
-
const configurationList = project.pbxXCConfigurationList()[
|
|
19
|
-
firstTarget.buildConfigurationList
|
|
20
|
-
];
|
|
21
|
-
const defaultBuildConfiguration = configurationList.buildConfigurations.reduce(
|
|
22
|
-
(acc, config) => {
|
|
23
|
-
const buildSection = project.pbxXCBuildConfigurationSection()[
|
|
24
|
-
config.value
|
|
25
|
-
];
|
|
26
|
-
return buildSection.name ===
|
|
27
|
-
configurationList.defaultConfigurationName
|
|
28
|
-
? buildSection
|
|
29
|
-
: acc;
|
|
30
|
-
},
|
|
31
|
-
configurationList.buildConfigurations[0]
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
return defaultBuildConfiguration.buildSettings[property];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function getPlistPath(sourceDir, project) {
|
|
38
|
-
const plistFile = getBuildProperty(project, 'INFOPLIST_FILE');
|
|
39
|
-
if (!plistFile) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return path.join(
|
|
43
|
-
sourceDir,
|
|
44
|
-
plistFile.replace(/"/g, '').replace('$(SRCROOT)', '')
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function readPlist(sourceDir, project) {
|
|
49
|
-
const plistPath = getPlistPath(sourceDir, project);
|
|
50
|
-
if (!plistPath || !fs.existsSync(plistPath)) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
return plistParser.parse(fs.readFileSync(plistPath, 'utf-8'));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function writePlist(sourceDir, project, plist) {
|
|
57
|
-
fs.writeFileSync(
|
|
58
|
-
getPlistPath(sourceDir, project),
|
|
59
|
-
plistWriter.build(plist)
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// based on: https://github.com/facebook/react-native/blob/545072b/local-cli/link/ios/mapHeaderSearchPaths.js#L5
|
|
64
|
-
function eachBuildConfiguration(project, predicate, callback) {
|
|
65
|
-
const config = project.pbxXCBuildConfigurationSection();
|
|
66
|
-
Object.keys(config)
|
|
67
|
-
.filter(ref => ref.indexOf('_comment') === -1)
|
|
68
|
-
.filter(ref => predicate(config[ref]))
|
|
69
|
-
.forEach(ref => callback(config[ref]));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// this is being used to determine whether the current target is a react-native
|
|
73
|
-
// project: https://github.com/facebook/react-native/blob/545072b/local-cli/link/ios/mapHeaderSearchPaths.js#L31
|
|
74
|
-
function hasLCPlusPlus(config) {
|
|
75
|
-
return (config.buildSettings.OTHER_LDFLAGS || []).indexOf('"-lc++"') >= 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// based on: https://github.com/facebook/react-native/blob/1490ab1/local-cli/core/ios/findProject.js
|
|
79
|
-
function findProject(folder) {
|
|
80
|
-
const GLOB_PATTERN = '**/*.xcodeproj';
|
|
81
|
-
const TEST_PROJECTS = /test|example|sample/i;
|
|
82
|
-
const IOS_BASE = 'ios';
|
|
83
|
-
const GLOB_EXCLUDE_PATTERN = ['**/@(Pods|node_modules)/**'];
|
|
84
|
-
|
|
85
|
-
const projects = glob
|
|
86
|
-
.sync(GLOB_PATTERN, {
|
|
87
|
-
cwd: folder,
|
|
88
|
-
ignore: GLOB_EXCLUDE_PATTERN,
|
|
89
|
-
})
|
|
90
|
-
.filter(project => {
|
|
91
|
-
return path.dirname(project) === IOS_BASE || !TEST_PROJECTS.test(project);
|
|
92
|
-
})
|
|
93
|
-
.sort((projectA, projectB) => {
|
|
94
|
-
return path.dirname(projectA) === IOS_BASE ? -1 : 1;
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
if (projects.length === 0) {
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return projects[0];
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
function addToFrameworkSearchPaths(project, path, recursive) {
|
|
105
|
-
eachBuildConfiguration(project, hasLCPlusPlus, config => {
|
|
106
|
-
if (!config.buildSettings.FRAMEWORK_SEARCH_PATHS) {
|
|
107
|
-
config.buildSettings.FRAMEWORK_SEARCH_PATHS = [];
|
|
108
|
-
} else if (typeof config.buildSettings.FRAMEWORK_SEARCH_PATHS === 'string') {
|
|
109
|
-
config.buildSettings.FRAMEWORK_SEARCH_PATHS = [config.buildSettings.FRAMEWORK_SEARCH_PATHS];
|
|
110
|
-
}
|
|
111
|
-
const fullPath = '"' + path + (recursive ? '/**' : '') + '"';
|
|
112
|
-
|
|
113
|
-
if (
|
|
114
|
-
config.buildSettings.FRAMEWORK_SEARCH_PATHS.indexOf(fullPath) === -1
|
|
115
|
-
) {
|
|
116
|
-
config.buildSettings.FRAMEWORK_SEARCH_PATHS = config.buildSettings.FRAMEWORK_SEARCH_PATHS.concat(
|
|
117
|
-
fullPath
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
function removeFromFrameworkSearchPaths(project, path) {
|
|
124
|
-
eachBuildConfiguration(project, hasLCPlusPlus, config => {
|
|
125
|
-
if (!config.buildSettings.FRAMEWORK_SEARCH_PATHS) {
|
|
126
|
-
config.buildSettings.FRAMEWORK_SEARCH_PATHS = [];
|
|
127
|
-
} else if (typeof config.buildSettings.FRAMEWORK_SEARCH_PATHS === 'string') {
|
|
128
|
-
config.buildSettings.FRAMEWORK_SEARCH_PATHS = [config.buildSettings.FRAMEWORK_SEARCH_PATHS];
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
const fullPath = unquote(path) + '/**';
|
|
132
|
-
|
|
133
|
-
config.buildSettings.FRAMEWORK_SEARCH_PATHS = config.buildSettings.FRAMEWORK_SEARCH_PATHS.filter(
|
|
134
|
-
searchPath =>
|
|
135
|
-
unquote(searchPath) !== unquote(path) &&
|
|
136
|
-
unquote(searchPath) !== fullPath
|
|
137
|
-
);
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// The node-xcode library doesn't offer a method to get all target attributes,
|
|
142
|
-
// so we'll have to implement it ourselves.
|
|
143
|
-
function getTargetAttributes(project, target) {
|
|
144
|
-
var attributes = project.getFirstProject()['firstProject']['attributes'];
|
|
145
|
-
target = target || project.getFirstTarget();
|
|
146
|
-
|
|
147
|
-
if (attributes['TargetAttributes'] === undefined) {
|
|
148
|
-
attributes['TargetAttributes'] = {};
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
if (attributes['TargetAttributes'][target.uuid] === undefined) {
|
|
152
|
-
attributes['TargetAttributes'][target.uuid] = {};
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return attributes['TargetAttributes'][target.uuid];
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function unquote(str) {
|
|
159
|
-
return (str || '').replace(/^"(.*)"$/, '$1');
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
module.exports = {
|
|
163
|
-
getBuildProperty: getBuildProperty,
|
|
164
|
-
getPlistPath: getPlistPath,
|
|
165
|
-
readPlist: readPlist,
|
|
166
|
-
writePlist: writePlist,
|
|
167
|
-
getTargetAttributes: getTargetAttributes,
|
|
168
|
-
addToFrameworkSearchPaths: addToFrameworkSearchPaths,
|
|
169
|
-
removeFromFrameworkSearchPaths: removeFromFrameworkSearchPaths,
|
|
170
|
-
findProject: findProject,
|
|
171
|
-
};
|