Method: Unipush::Android_push#initialize

Defined in:
lib/unipush.rb

#initialize(mode = 'production') ⇒ Android_push

mode = production / development production - use gateway.push.apple.com and feedback.push.apple.com development - use sandbox.gateway.push.apple.com and sandbox.feedback.push.apple.com



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/unipush.rb', line 230

def initialize(mode='production')
  if mode == 'production'
    @ios_push_url = 'gateway.push.apple.com'
    @ios_feedback_url = 'feedback.push.apple.com'
  else
    @ios_push_url = 'sandbox.gateway.push.apple.com'
    @ios_feedback_url = 'sandbox.feedback.push.apple.com'
  end
  @ios_push_port = '2195'
  @ios_feedback_port = '2196'
  @ios_cert_path = ''


  @gcm_url = 'https://android.googleapis.com/gcm/send'
  @gcm_key = nil?

  @last_error = []
  @unsent_messages = []

  @sock = nil
  @ssl = nil

  @apns_feedback_conn = nil
end