2016-02-07 55 views

回答

2

不,這不可能派專人使用WhatsApp的消息,而不存儲在通訊錄的數量。而之所以說是正是你想做什麼:WhatsApp的將不允許您發送的隨機數「垃圾郵件」。你必須收集號碼,並將其添加到您的聯繫人,然後手動發送他們的消息。

0

它的可能!試圖用迅疾3和的Xcode 8.3.2。

let date = Date() 
    let msg = "Hi my dear friends\(date)" 
    let urlWhats = "whatsapp://send?phone=phoneNumber&abid=phoneNumber&text=hi" 
    if let urlString = urlWhats.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed) { 
     if let whatsappURL = NSURL(string: urlString) { 
      if UIApplication.shared.canOpenURL(whatsappURL as URL) { 
       UIApplication.shared.openURL(whatsappURL as URL) 
      } else { 
       print("please install watsapp") 
      } 
     } 
    }