ruby_native 0.9.2 → 0.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.
- checksums.yaml +4 -4
- data/lib/generators/ruby_native/templates/CLAUDE.md +1 -0
- data/lib/ruby_native/helper.rb +12 -0
- data/lib/ruby_native/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bea37c1e721c525bee3535c67771d53969d46eca1458cbdf3948c5b6cb7c1bcc
|
|
4
|
+
data.tar.gz: 63963d9b8707c01862cc9a603e0a26baf8ae91eb4f84a84404c955b1a1e0742b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e97a991d0bc54079de18af9be52f4bc7e3df3e57229047a1c424e7ea89329db48a1d8f3715cd3cdd37ef026afbc01185985192fc6d7dabf7d3d7d8ea869237b
|
|
7
|
+
data.tar.gz: 31c81f18e641df0c60f6b1f97e3c5f8086dd7f9962353655b71a3fb935050e3be8853491c1a4b0fae0af55371ba10fab566fb5d66ef23f1e6dd98af6ae21e919
|
|
@@ -89,6 +89,7 @@ Use these in your layouts and views:
|
|
|
89
89
|
- `native_tabs_tag` renders a signal element that tells the app to show the tab bar. Only include it on pages where tabs should appear.
|
|
90
90
|
- `native_form_tag` marks the page as a form. The app uses this to skip form pages when navigating back.
|
|
91
91
|
- `native_push_tag` requests push notification permission from the user.
|
|
92
|
+
- `native_review_tag` asks the app to show the App Store rating prompt when the page loads. The system throttles how often the prompt appears (and shows nothing in TestFlight builds), so it is safe to render on any page where a review would be welcome. It is automatically suppressed during App Store screenshot runs.
|
|
92
93
|
|
|
93
94
|
Signal elements are hidden `<div>` tags. Place them in the `<body>`, not the `<head>`.
|
|
94
95
|
|
data/lib/ruby_native/helper.rb
CHANGED
|
@@ -73,6 +73,18 @@ module RubyNative
|
|
|
73
73
|
data
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
+
# Renders a signal element that asks the app to request an App Store
|
|
77
|
+
# rating from the user. The system decides whether to actually show the
|
|
78
|
+
# prompt (Apple throttles it to a few times per year), so it is safe to
|
|
79
|
+
# render this on any page where a review would be welcome, like a
|
|
80
|
+
# confirmation screen after the user finishes something worthwhile.
|
|
81
|
+
#
|
|
82
|
+
# See Apple's docs on requesting App Store reviews:
|
|
83
|
+
# https://developer.apple.com/documentation/storekit/requesting-app-store-reviews
|
|
84
|
+
def native_review_tag
|
|
85
|
+
tag.div(data: { native_review: true }, hidden: true)
|
|
86
|
+
end
|
|
87
|
+
|
|
76
88
|
# Picks the right icon name for the current native platform. Accepts the
|
|
77
89
|
# single `icon:` form (applied to every platform) and/or the `icons:` hash
|
|
78
90
|
# form (`{ ios: "...", android: "..." }`). When both are given, a matching
|
data/lib/ruby_native/version.rb
CHANGED