@independo/capacitor-emoji-picker 1.3.3-dev.2 → 1.3.3-dev.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/IndependoCapacitorEmojiPicker.podspec +1 -0
- package/Package.swift +2 -1
- package/README.md +27 -0
- package/android/build.gradle +4 -0
- package/android/src/main/java/app/independo/capacitoremojipicker/presenter/DefaultEmojiPickerDialogFactory.java +38 -0
- package/ios/Sources/EmojiPicker/PrivacyInfo.xcprivacy +23 -0
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
13
|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
s.resource_bundles = { 'IndependoCapacitorEmojiPicker_Privacy' => ['ios/Sources/EmojiPicker/PrivacyInfo.xcprivacy'] }
|
|
14
15
|
s.ios.deployment_target = '15.0'
|
|
15
16
|
s.dependency 'Capacitor'
|
|
16
17
|
s.swift_version = '5.9'
|
package/Package.swift
CHANGED
|
@@ -19,7 +19,8 @@ let package = Package(
|
|
|
19
19
|
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
20
20
|
.product(name: "Cordova", package: "capacitor-swift-pm")
|
|
21
21
|
],
|
|
22
|
-
path: "ios/Sources/EmojiPicker"
|
|
22
|
+
path: "ios/Sources/EmojiPicker",
|
|
23
|
+
resources: [.copy("PrivacyInfo.xcprivacy")]),
|
|
23
24
|
.testTarget(
|
|
24
25
|
name: "EmojiPickerTests",
|
|
25
26
|
dependencies: ["EmojiPicker"],
|
package/README.md
CHANGED
|
@@ -53,6 +53,33 @@ pnpm exec cap sync
|
|
|
53
53
|
- Android minSdk 24+; builds require Java 21 (recommended). `pnpm verify:android` requires a Java version supported
|
|
54
54
|
by the bundled Gradle wrapper (currently Java 21–24, with Java 21 recommended).
|
|
55
55
|
|
|
56
|
+
### iOS privacy manifest
|
|
57
|
+
|
|
58
|
+
To bring up the system emoji keyboard, the plugin reads `UITextInputMode.activeInputModes`. Apple lists this as a
|
|
59
|
+
[required-reason API](https://developer.apple.com/documentation/bundleresources/describing-use-of-required-reason-api)
|
|
60
|
+
in the category `NSPrivacyAccessedAPICategoryActiveKeyboards`. The plugin collects no data and does no tracking, and
|
|
61
|
+
the keyboard information never leaves the device.
|
|
62
|
+
|
|
63
|
+
Plugin version 1.3.3 and later ship their own `PrivacyInfo.xcprivacy` for Swift Package Manager and CocoaPods, so apps
|
|
64
|
+
need to declare nothing.
|
|
65
|
+
|
|
66
|
+
On older versions, the plugin is compiled into the app binary without a manifest, and App Store Connect reports
|
|
67
|
+
`ITMS-91053` unless the app declares the reason itself. Add this entry to `NSPrivacyAccessedAPITypes` in the app's
|
|
68
|
+
own `PrivacyInfo.xcprivacy`:
|
|
69
|
+
|
|
70
|
+
```xml
|
|
71
|
+
<dict>
|
|
72
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
73
|
+
<string>NSPrivacyAccessedAPICategoryActiveKeyboards</string>
|
|
74
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
75
|
+
<array>
|
|
76
|
+
<string>54BD.1</string>
|
|
77
|
+
</array>
|
|
78
|
+
</dict>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`54BD.1` covers reading the active keyboards to present the correct UI to the user.
|
|
82
|
+
|
|
56
83
|
### Compatibility
|
|
57
84
|
|
|
58
85
|
Versioning follows Capacitor versioning. Major versions of the plugin are compatible with major versions of Capacitor.
|
package/android/build.gradle
CHANGED
|
@@ -6,6 +6,7 @@ ext {
|
|
|
6
6
|
androidxEmoji2EmojiPickerVersion = project.hasProperty('androidxEmoji2EmojiPickerVersion') ? rootProject.ext.androidxEmoji2EmojiPickerVersion : '1.5.0'
|
|
7
7
|
materialVersion = project.hasProperty('materialVersion') ? rootProject.ext.materialVersion : '1.12.0'
|
|
8
8
|
androidxLifecycleVersion = project.hasProperty('androidxLifecycleVersion') ? rootProject.ext.androidxLifecycleVersion : '2.8.7'
|
|
9
|
+
androidxRecyclerViewVersion = project.hasProperty('androidxRecyclerViewVersion') ? rootProject.ext.androidxRecyclerViewVersion : '1.1.0'
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
buildscript {
|
|
@@ -74,6 +75,9 @@ dependencies {
|
|
|
74
75
|
// explicitly (rather than relying on it being pulled in transitively via appcompat) so a future
|
|
75
76
|
// appcompat version bump can't silently break compilation.
|
|
76
77
|
implementation "androidx.lifecycle:lifecycle-common:$androidxLifecycleVersion"
|
|
78
|
+
// Relied on for RecyclerView in DefaultEmojiPickerDialogFactory. Declared explicitly (rather than
|
|
79
|
+
// relying on it being pulled in transitively via material) for the same reason.
|
|
80
|
+
implementation "androidx.recyclerview:recyclerview:$androidxRecyclerViewVersion"
|
|
77
81
|
testImplementation "junit:junit:$junitVersion"
|
|
78
82
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
79
83
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -4,6 +4,7 @@ import android.app.Activity;
|
|
|
4
4
|
import android.view.View;
|
|
5
5
|
import android.view.ViewGroup;
|
|
6
6
|
import androidx.emoji2.emojipicker.EmojiPickerView;
|
|
7
|
+
import androidx.recyclerview.widget.RecyclerView;
|
|
7
8
|
import app.independo.capacitoremojipicker.core.EmojiBackdropOptions;
|
|
8
9
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
|
9
10
|
|
|
@@ -34,6 +35,19 @@ public class DefaultEmojiPickerDialogFactory implements EmojiPickerDialogFactory
|
|
|
34
35
|
});
|
|
35
36
|
|
|
36
37
|
dialog.setContentView(pickerView);
|
|
38
|
+
|
|
39
|
+
// `BottomSheetBehavior` coordinates with exactly one nested-scrolling child, the first one it
|
|
40
|
+
// finds depth-first on each layout. `EmojiPickerView` puts its horizontal category header
|
|
41
|
+
// `RecyclerView` before the vertical emoji grid, so without this the behavior binds the header
|
|
42
|
+
// and every vertical drag on the grid moves the sheet instead of scrolling the grid. The
|
|
43
|
+
// picker inflates its children after loading emoji data asynchronously, so this runs on every
|
|
44
|
+
// layout pass rather than once; each header only flips once, and the follow-up
|
|
45
|
+
// `requestLayout` makes the behavior look up its scrolling child again.
|
|
46
|
+
pickerView.getViewTreeObserver().addOnGlobalLayoutListener(() -> {
|
|
47
|
+
if (disableHorizontalNestedScrolling(pickerView)) {
|
|
48
|
+
pickerView.requestLayout();
|
|
49
|
+
}
|
|
50
|
+
});
|
|
37
51
|
dialog.setCanceledOnTouchOutside(dismissOnBackdropTap);
|
|
38
52
|
dialog.setOnDismissListener(d -> listener.onDismissed());
|
|
39
53
|
|
|
@@ -59,6 +73,30 @@ public class DefaultEmojiPickerDialogFactory implements EmojiPickerDialogFactory
|
|
|
59
73
|
return dialog::dismiss;
|
|
60
74
|
}
|
|
61
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Turns off nested scrolling on every {@link RecyclerView} under {@code view} that can't scroll
|
|
78
|
+
* vertically, so a vertical list is the one {@code BottomSheetBehavior} binds to. Returns whether
|
|
79
|
+
* any view changed.
|
|
80
|
+
*/
|
|
81
|
+
private static boolean disableHorizontalNestedScrolling(View view) {
|
|
82
|
+
boolean changed = false;
|
|
83
|
+
if (view instanceof RecyclerView) {
|
|
84
|
+
RecyclerView recyclerView = (RecyclerView) view;
|
|
85
|
+
RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
|
|
86
|
+
if (layoutManager != null && !layoutManager.canScrollVertically() && recyclerView.isNestedScrollingEnabled()) {
|
|
87
|
+
recyclerView.setNestedScrollingEnabled(false);
|
|
88
|
+
changed = true;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (view instanceof ViewGroup) {
|
|
92
|
+
ViewGroup group = (ViewGroup) view;
|
|
93
|
+
for (int i = 0; i < group.getChildCount(); i++) {
|
|
94
|
+
changed |= disableHorizontalNestedScrolling(group.getChildAt(i));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return changed;
|
|
98
|
+
}
|
|
99
|
+
|
|
62
100
|
/**
|
|
63
101
|
* `"light"`/`"dark"` pick Material's fixed (non-DayNight) theme variants directly, bypassing
|
|
64
102
|
* {@code Configuration.uiMode} entirely - an earlier attempt forced the night-mode bit via a
|
|
@@ -0,0 +1,23 @@
|
|
|
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>NSPrivacyTracking</key>
|
|
6
|
+
<false/>
|
|
7
|
+
<key>NSPrivacyTrackingDomains</key>
|
|
8
|
+
<array/>
|
|
9
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
10
|
+
<array/>
|
|
11
|
+
<key>NSPrivacyAccessedAPITypes</key>
|
|
12
|
+
<array>
|
|
13
|
+
<dict>
|
|
14
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
15
|
+
<string>NSPrivacyAccessedAPICategoryActiveKeyboards</string>
|
|
16
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
17
|
+
<array>
|
|
18
|
+
<string>54BD.1</string>
|
|
19
|
+
</array>
|
|
20
|
+
</dict>
|
|
21
|
+
</array>
|
|
22
|
+
</dict>
|
|
23
|
+
</plist>
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"url": "https://github.com/independo-gmbh/capacitor-emoji-picker.git"
|
|
14
14
|
},
|
|
15
15
|
"description": "Emoji picker plugin for Capacitor 8 with native Android support, iOS system emoji keyboard integration, and a web fallback.",
|
|
16
|
-
"version": "1.3.3-dev.
|
|
16
|
+
"version": "1.3.3-dev.3",
|
|
17
17
|
"packageManager": "pnpm@11.8.0",
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@capacitor/android": "catalog:",
|