Skip to content

Commit 7dff6ce

Browse files
authored
Merge pull request #328 from Unity-Technologies/trigger-docs
Update documentation for iOS notification triggers
2 parents 43ceb89 + a836a85 commit 7dff6ce

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

com.unity.mobile.notifications/Runtime/iOS/iOSNotificationTriggers.cs

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ public enum iOSNotificationTriggerType
3636
public interface iOSNotificationTrigger
3737
{
3838
/// <summary>
39-
/// Returns the trigger type for this trigger.
39+
/// The type of notification trigger. For internal use.
4040
/// </summary>
41+
/// <value>The type of the trigger</value>
4142
iOSNotificationTriggerType Type { get; }
4243
}
4344

@@ -54,9 +55,7 @@ public interface iOSNotificationTrigger
5455
///</remarks>
5556
public struct iOSNotificationLocationTrigger : iOSNotificationTrigger
5657
{
57-
/// <summary>
58-
/// The type of notification trigger.
59-
/// </summary>
58+
/// <inheritdoc/>
6059
public iOSNotificationTriggerType Type { get { return iOSNotificationTriggerType.Location; } }
6160

6261
/// <summary>
@@ -79,31 +78,37 @@ public Vector2 Center
7978
/// <summary>
8079
/// The latitude of the center point of the geographic area.
8180
/// </summary>
81+
/// <value>Latitude in degrees</value>
8282
public double Latitude { get; set; }
8383

8484
/// <summary>
8585
/// The longitude of the center point of the geographic area.
8686
/// </summary>
87+
/// <value>Longitude in degrees</value>
8788
public double Longitude { get; set; }
8889

8990
/// <summary>
9091
/// The radius (measured in meters) that defines the geographic area’s outer boundary.
9192
/// </summary>
93+
/// <value>Radius in meters</value>
9294
public float Radius { get; set; }
9395

9496
/// <summary>
9597
/// When this property is enabled, a device crossing from outside the region to inside the region triggers the delivery of a notification
9698
/// </summary>
99+
/// <value>If true, a notification triggers when entering the region.</value>
97100
public bool NotifyOnEntry { get; set; }
98101

99102
/// <summary>
100103
/// When this property is enabled, a device crossing from inside the region to outside the region triggers the delivery of a notification
101104
/// </summary>
105+
/// <value>If true, a notification triggers when leaving the region.</value>
102106
public bool NotifyOnExit { get; set; }
103107

104108
/// <summary>
105109
/// Whether the notification should repeat.
106110
/// </summary>
111+
/// <value>If true, the notification repeats.</value>
107112
public bool Repeats { get; set; }
108113
}
109114

@@ -120,9 +125,7 @@ public Vector2 Center
120125

121126
public struct iOSNotificationPushTrigger : iOSNotificationTrigger
122127
{
123-
/// <summary>
124-
/// The type of notification trigger.
125-
/// </summary>
128+
/// <inheritdoc/>
126129
public iOSNotificationTriggerType Type { get { return iOSNotificationTriggerType.Push; } }
127130
}
128131

@@ -134,16 +137,15 @@ public struct iOSNotificationPushTrigger : iOSNotificationTrigger
134137
/// </remarks>
135138
public struct iOSNotificationTimeIntervalTrigger : iOSNotificationTrigger
136139
{
137-
/// <summary>
138-
/// The type of notification trigger.
139-
/// </summary>
140+
/// <inheritdoc/>
140141
public iOSNotificationTriggerType Type { get { return iOSNotificationTriggerType.TimeInterval; } }
141142

142143
internal int timeInterval;
143144

144145
/// <summary>
145146
/// Time interval after which the notification should be delivered (only total of full seconds is considered).
146147
/// </summary>
148+
/// <value>Time interval until delivery</value>
147149
public TimeSpan TimeInterval
148150
{
149151
get { return TimeSpan.FromSeconds(timeInterval); }
@@ -158,6 +160,7 @@ public TimeSpan TimeInterval
158160
/// <summary>
159161
/// Whether the notification should repeat.
160162
/// </summary>
163+
/// <value>If true, the notification repeats with the same interval.</value>
161164
public bool Repeats { get; set; }
162165
}
163166

@@ -170,49 +173,55 @@ public TimeSpan TimeInterval
170173
/// </remarks>
171174
public struct iOSNotificationCalendarTrigger : iOSNotificationTrigger
172175
{
173-
/// <summary>
174-
/// The type of notification trigger.
175-
/// </summary>
176+
/// <inheritdoc/>
176177
public iOSNotificationTriggerType Type { get { return iOSNotificationTriggerType.Calendar; } }
177178

178179
/// <summary>
179-
/// Year
180+
/// Specify the year to schedule the notification for or set to null to indicate any year.
180181
/// </summary>
182+
/// <value>Number indicating year or null to ignore year</value>
181183
public int? Year { get; set; }
182184

183185
/// <summary>
184-
/// Month
186+
/// Specify the month to schedule the notification for or set to null to indicate any month.
185187
/// </summary>
188+
/// <value>Number indicating month or null to ignore month</value>
186189
public int? Month { get; set; }
187190

188191
/// <summary>
189-
/// Day
192+
/// Specify the day to schedule the notification for or set to null to indicate any day.
190193
/// </summary>
194+
/// <value>Number indicating day or null to ignore day</value>
191195
public int? Day { get; set; }
192196

193197
/// <summary>
194-
/// Hour
198+
/// Specify the hour to schedule the notification for or set to null to indicate any hour.
195199
/// </summary>
200+
/// <value>Number indicating hour or null to ignore hour</value>
196201
public int? Hour { get; set; }
197202

198203
/// <summary>
199-
/// Minute
204+
/// Specify the minute to schedule the notification for or set to null to indicate any minute.
200205
/// </summary>
206+
/// <value>Number indicating minute or null to ignore minute</value>
201207
public int? Minute { get; set; }
202208

203209
/// <summary>
204-
/// Second
210+
/// Specify the second to schedule the notification for or set to null to indicate any second.
205211
/// </summary>
212+
/// <value>Number indicating second or null to ignore second</value>
206213
public int? Second { get; set; }
207214

208215
/// <summary>
209216
/// Are Date and Time field in UTC time. When false, use local time.
210217
/// </summary>
218+
/// <value>If true, use UTC time.</value>
211219
public bool UtcTime { get; set; }
212220

213221
/// <summary>
214222
/// Indicate whether the notification is repeated every defined time period. For instance if hour and minute fields are set the notification will be triggered every day at the specified hour and minute.
215223
/// </summary>
224+
/// <value>If true, the notification repeats for each matching date and time. If false, the notification triggers only on the first match.</value>
216225
public bool Repeats { get; set; }
217226

218227
/// <summary>

0 commit comments

Comments
 (0)