This repository has been archived by the owner. It is now read-only.

Reset sound default to "default" #84

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
@mattconnolly
Contributor

mattconnolly commented Dec 8, 2012

Hi,

The current apple docs suggest using the value of "default" to play a default sound. I can't see "1.aiff" anywhere. It is still optional, but having a default value shows people how to use the default sound and its not hard to use nil explicitly if the user wants to (as I already do).

I also added a test in here to validate that one of alert, badge or sound is present as is specified in the apple docs:

https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html

@@ -25,6 +25,7 @@ def self.up
change_column_null :rapns_apps, :certificate, true
change_column :rapns_notifications, :error_description, :text
+ change_column :rapns_notifications, :sound, :string, :default => 'default'

This comment has been minimized.

Show comment Hide comment
@ileitch

ileitch Dec 9, 2012

Owner

This need an equivalent in down.

@ileitch

ileitch Dec 9, 2012

Owner

This need an equivalent in down.

@@ -8,6 +8,7 @@ class MultipleAppAssignmentError < StandardError; end
validates_with Rapns::Apns::DeviceTokenFormatValidator
validates_with Rapns::Apns::BinaryNotificationValidator
+ validate :validate_required_fields

This comment has been minimized.

Show comment Hide comment
@ileitch

ileitch Dec 9, 2012

Owner

A validator class like the others woud be nice.

@ileitch

ileitch Dec 9, 2012

Owner

A validator class like the others woud be nice.

@mattconnolly

This comment has been minimized.

Show comment Hide comment
@mattconnolly

mattconnolly Dec 9, 2012

Contributor

Added down migration and validation in separate class in master branch, see pull request 85:

#85

Contributor

mattconnolly commented Dec 9, 2012

Added down migration and validation in separate class in master branch, see pull request 85:

#85

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.