rubymotion-community / sugarcube

Some sugar for your cocoa. RubyMotion helpers.
Other
421 stars 66 forks source link

UIAlert not working under UIWebView #207

Open poc7667 opened 9 years ago

poc7667 commented 9 years ago

UIAlert not working under UIWebView

If my app is in the background, i can receive the notification alert.

But if my app is in the foreground and focus on the UIWebView the alert window won't show

any idea? Thanks so much

def application(application, didReceiveRemoteNotification: user_info)  
  NSLog("%@", user_info[:aps][:alert])
  NSLog("%@", user_info[:some_extra_data])
  alert_log(user_info[:some_extra_data])
end    

def alert_log(message)
  UIAlertView.alert('This is happening, OK?', message) do
    self.it_happened!
  end    
end