title: iOS how to set Alarm and schedule work/notifications
body: <p>Hi I am new to iOS basically I am android developer. But Right now I am working on iOS app,It is simply an iOS replica of android. Let me tell you about what I want in app:</p>
  
  <blockquote>
    <p>Our app features alarm, that will remind our client that on a specific date you have this meeting. For example, if user sets alarm for 1-jan-2019 at time 9:00AM then on that day and time user must be notified of this meeting. </p>
  </blockquote>
  
  <p>I have read alot and found that in iOS we can not do this since when app is in background it can not run code of his own? So I have 2 basic questions:</p>
  
  <p>What I want:</p>
  
  <ol>
  <li><p>First of all how to schedule an Alarm </p></li>
  <li><p>If alarm is set and app is in background/terminated then how to generate notification and when user click on notification take him to specific view?</p></li>
  <li>If app is in forground then how to take him to wanted view? also if app is on specific view how to update view itself when alarm goes on?</li>
  </ol>
  
  <p>I know these are 3 main and major part that required too much coding. But I just want directions. Give me link of chunks of code. I am using xcode 9.2 and swift 4.0. Thanks in advance ... </p>