expo-tracking-transparency 2.0.2 → 2.2.0
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/CHANGELOG.md +7 -1
- package/README.md +4 -4
- package/build/ExpoTrackingTransparency.d.ts +1 -0
- package/build/ExpoTrackingTransparency.d.ts.map +1 -0
- package/build/TrackingTransparency.d.ts +1 -0
- package/build/TrackingTransparency.d.ts.map +1 -0
- package/ios/EXTrackingTransparency/TrackingTransparencyModule.swift +2 -2
- package/ios/EXTrackingTransparency.podspec +2 -1
- package/package.json +7 -5
- package/plugin/build/withTrackingTransparency.js +2 -2
- package/plugin/src/withTrackingTransparency.ts +16 -12
- package/ios/Info-generated.plist +0 -22
- package/unimodule.json +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 2.0
|
|
13
|
+
## 2.2.0 — 2022-04-18
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
|
|
18
|
+
|
|
19
|
+
## 2.1.0 — 2021-12-03
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
|
16
22
|
|
package/README.md
CHANGED
|
@@ -6,16 +6,16 @@ For more information on Apple's new App Tracking Transparency framework, please
|
|
|
6
6
|
|
|
7
7
|
## API documentation
|
|
8
8
|
|
|
9
|
-
- [Documentation for the
|
|
10
|
-
- [Documentation for the latest stable release](https://docs.expo.
|
|
9
|
+
- [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/tracking-transparency.md)
|
|
10
|
+
- [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/tracking-transparency/)
|
|
11
11
|
|
|
12
12
|
## Installation in managed Expo projects
|
|
13
13
|
|
|
14
|
-
For
|
|
14
|
+
For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/tracking-transparency/).
|
|
15
15
|
|
|
16
16
|
## Installation in bare React Native projects
|
|
17
17
|
|
|
18
|
-
For bare React Native projects, you must ensure that you have [installed and configured the `
|
|
18
|
+
For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
|
|
19
19
|
|
|
20
20
|
### Add the package to your npm dependencies
|
|
21
21
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoTrackingTransparency.d.ts","sourceRoot":"","sources":["../src/ExpoTrackingTransparency.ts"],"names":[],"mappings":";AAEA,wBAA2D"}
|
|
@@ -63,3 +63,4 @@ export declare const useTrackingPermissions: (options?: PermissionHookOptions<ob
|
|
|
63
63
|
*/
|
|
64
64
|
export declare function isAvailable(): boolean;
|
|
65
65
|
export { PermissionResponse, PermissionStatus, PermissionExpiration, PermissionHookOptions };
|
|
66
|
+
//# sourceMappingURL=TrackingTransparency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrackingTransparency.d.ts","sourceRoot":"","sources":["../src/TrackingTransparency.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EAGtB,MAAM,mBAAmB,CAAC;AAY3B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,+BAA+B,IAAI,OAAO,CAAC,kBAAkB,CAAC,CASnF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAS/E;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,sBAAsB,4JAGjC,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAMrC;AAED,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -8,7 +8,7 @@ public class TrackingTransparencyModule: Module {
|
|
|
8
8
|
EXPermissionsMethodsDelegate.register([EXTrackingPermissionRequester()], withPermissionsManager: self.appContext?.permissions)
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function("getPermissionsAsync") { (promise: Promise) in
|
|
12
12
|
EXPermissionsMethodsDelegate.getPermissionWithPermissionsManager(
|
|
13
13
|
self.appContext?.permissions,
|
|
14
14
|
withRequester: EXTrackingPermissionRequester.self,
|
|
@@ -17,7 +17,7 @@ public class TrackingTransparencyModule: Module {
|
|
|
17
17
|
)
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function("requestPermissionsAsync") { (promise: Promise) in
|
|
21
21
|
EXPermissionsMethodsDelegate.askForPermission(
|
|
22
22
|
withPermissionsManager: self.appContext?.permissions,
|
|
23
23
|
withRequester: EXTrackingPermissionRequester.self,
|
|
@@ -19,7 +19,8 @@ Pod::Spec.new do |s|
|
|
|
19
19
|
|
|
20
20
|
# Swift/Objective-C compatibility
|
|
21
21
|
s.pod_target_xcconfig = {
|
|
22
|
-
'DEFINES_MODULE' => 'YES'
|
|
22
|
+
'DEFINES_MODULE' => 'YES',
|
|
23
|
+
'SWIFT_COMPILATION_MODE' => 'wholemodule'
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-tracking-transparency",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "An Expo library for requesting permission to track the users on devices using iOS 14.5 and higher.",
|
|
5
5
|
"main": "build/TrackingTransparency.js",
|
|
6
6
|
"types": "build/TrackingTransparency.d.ts",
|
|
@@ -30,14 +30,16 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/module-template",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@expo/config-plugins": "^
|
|
34
|
-
"expo-modules-core": "~0.4.3"
|
|
33
|
+
"@expo/config-plugins": "^4.0.14"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"expo-module-scripts": "^2.0.0"
|
|
38
37
|
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"expo": "*"
|
|
40
|
+
},
|
|
39
41
|
"jest": {
|
|
40
|
-
"preset": "expo-module-scripts
|
|
42
|
+
"preset": "expo-module-scripts"
|
|
41
43
|
},
|
|
42
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
|
|
43
45
|
}
|
|
@@ -5,7 +5,7 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|
|
5
5
|
const pkg = require('expo-tracking-transparency/package.json');
|
|
6
6
|
exports.DEFAULT_NSUserTrackingUsageDescription = 'Allow this app to collect app-related data that can be used for tracking you or your device.';
|
|
7
7
|
const withTrackingTransparency = (config, props) => {
|
|
8
|
-
config = exports.withUserTrackingPermission(config, props);
|
|
8
|
+
config = (0, exports.withUserTrackingPermission)(config, props);
|
|
9
9
|
return config;
|
|
10
10
|
};
|
|
11
11
|
const withUserTrackingPermission = (config, { userTrackingPermission } = {}) => {
|
|
@@ -20,4 +20,4 @@ const withUserTrackingPermission = (config, { userTrackingPermission } = {}) =>
|
|
|
20
20
|
return config;
|
|
21
21
|
};
|
|
22
22
|
exports.withUserTrackingPermission = withUserTrackingPermission;
|
|
23
|
-
exports.default = config_plugins_1.createRunOncePlugin(withTrackingTransparency, pkg.name, pkg.version);
|
|
23
|
+
exports.default = (0, config_plugins_1.createRunOncePlugin)(withTrackingTransparency, pkg.name, pkg.version);
|
|
@@ -5,22 +5,26 @@ const pkg = require('expo-tracking-transparency/package.json');
|
|
|
5
5
|
export const DEFAULT_NSUserTrackingUsageDescription =
|
|
6
6
|
'Allow this app to collect app-related data that can be used for tracking you or your device.';
|
|
7
7
|
|
|
8
|
-
const withTrackingTransparency: ConfigPlugin<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
const withTrackingTransparency: ConfigPlugin<
|
|
9
|
+
{
|
|
10
|
+
/**
|
|
11
|
+
* Sets the iOS `NSUserTrackingUsageDescription` permission message in `Info.plist`. Omitting a
|
|
12
|
+
* description will result in using the default permission message.
|
|
13
|
+
* @default 'Allow this app to collect app-related data that can be used for tracking you or your
|
|
14
|
+
* device.'
|
|
15
|
+
*/
|
|
16
|
+
userTrackingPermission?: string;
|
|
17
|
+
} | void
|
|
18
|
+
> = (config, props) => {
|
|
17
19
|
config = withUserTrackingPermission(config, props);
|
|
18
20
|
return config;
|
|
19
21
|
};
|
|
20
22
|
|
|
21
|
-
export const withUserTrackingPermission: ConfigPlugin<
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
export const withUserTrackingPermission: ConfigPlugin<
|
|
24
|
+
{
|
|
25
|
+
userTrackingPermission?: string;
|
|
26
|
+
} | void
|
|
27
|
+
> = (config, { userTrackingPermission } = {}) => {
|
|
24
28
|
if (!config.ios) config.ios = {};
|
|
25
29
|
if (!config.ios.infoPlist) config.ios.infoPlist = {};
|
|
26
30
|
config.ios.infoPlist.NSUserTrackingUsageDescription =
|
package/ios/Info-generated.plist
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
-
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
|
7
|
-
<key>CFBundleExecutable</key>
|
|
8
|
-
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
-
<key>CFBundleIdentifier</key>
|
|
10
|
-
<string>expo.tracking.transparency</string>
|
|
11
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
-
<string>6.0</string>
|
|
13
|
-
<key>CFBundleName</key>
|
|
14
|
-
<string>EXTrackingTransparency</string>
|
|
15
|
-
<key>CFBundlePackageType</key>
|
|
16
|
-
<string>FMWK</string>
|
|
17
|
-
<key>CFBundleShortVersionString</key>
|
|
18
|
-
<string>1.1.0</string>
|
|
19
|
-
<key>CFBundleVersion</key>
|
|
20
|
-
<string>1</string>
|
|
21
|
-
</dict>
|
|
22
|
-
</plist>
|
package/unimodule.json
DELETED