$30 off During Our Annual Pro Sale. View Details »

iMessage Apps

iMessage Apps

Fabricio Serralvo

December 06, 2017
Tweet

More Decks by Fabricio Serralvo

Other Decks in Programming

Transcript

  1. IMESSAGE APPS
    COCOAHEADS CAMPINAS

    View Slide

  2. OLÁ, SOU O FABRÍCIO
    github.com/serralvo
    !

    View Slide

  3. "
    DEV iOS @ ELDORADO

    View Slide

  4. UM PAPO SOBRE
    APPS PARA IMESSAGE

    View Slide


  5. UM POUCO SOBRE

    View Slide


  6. STICKERS

    View Slide


  7. APPS

    View Slide


  8. APIs

    View Slide

  9. UM POUCO SOBRE

    View Slide

  10. SURGIU NO iOS 5

    View Slide

  11. ONDE FUNCIONA?

    View Slide


  12. EM TODO O ECOSSISTEMA

    View Slide

  13. iOS 10 TROUXE A NOVIDADE

    View Slide

  14. E EM VERSÕES ANTERIORES?

    View Slide


  15. FALLBACK

    View Slide

  16. E EM DEVICES SEM O APP?

    View Slide

  17. APP STORE EXCLUSIVA

    View Slide

  18. View Slide

  19. View Slide

  20. STICKERS

    View Slide


  21. "FUN WAY TO COMMUNICATE"

    View Slide


  22. ADICIONAR EM UMA MENSAGEM

    View Slide

  23. IDEAL PARA ENGAJAMENTO

    View Slide

  24. View Slide

  25. ANIMADOS OU ESTÁTICOS

    View Slide


  26. E COMO FAÇO TUDO ISSO?

    View Slide

  27. DOIS JEITOS PARA FAZER

    View Slide


  28. TEM O JEITO FÁCIL

    View Slide


  29. E TEM O JEITO MUITO FÁCIL

    View Slide

  30. View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. APPS

    View Slide


  38. ALGUMAS CONSIDERAÇÕES

    View Slide

  39. 0
    NÃO TEMOS ACESSO AS MENSAGENS

    View Slide


  40. STANDALONE

    View Slide

  41. App
    Extension
    nope
    iMessage

    App

    View Slide


  42. DICA PARA QUEM QUER COMEÇAR

    View Slide

  43. View Slide

  44. API

    View Slide

  45. MESSAGES FRAMEWORK
    É DELE QUE VAMOS FALAR

    View Slide

  46. MSMESSAGE

    View Slide


  47. INTERFACE GRÁFICA

    View Slide

  48. MSMESSAGETEMPLATELAYOUT

    View Slide

  49. View Slide

  50. let layout = MSMessageTemplateLayout()
    layout.image = UIImage(named: "coverImage")
    layout.caption = "Message In A Bottle"
    let message = MSMessage()
    message.layout = layout

    View Slide

  51. View Slide


  52. E O ENVIO DE INFORMAÇÕES?

    View Slide

  53. var components = URLComponents()
    components.queryItems = [
    URLQueryItem(name: "songID", value: “92381”),
    URLQueryItem(name: "name", value: “Message In A Bottle")
    ]
    let message = MSMessage()
    message.url = components.url

    View Slide

  54. MSCONVERSATION

    View Slide

  55. guard let conversation = activeConversation else {
    fatalError("Whooops, expected a conversation")
    }
    // iOS 10 API
    conversation.insert(message) { error in
    if let e = error {
    print(e)
    }
    }
    // iOS 11 API
    conversation.send(message) { error in
    if let e = error {
    print(e)
    }
    }

    View Slide

  56. MSSESSION

    View Slide

  57. guard let conversation = activeConversation else {
    fatalError("Whooops, expected a conversation")
    }
    let session = conversation.selectedMessage?.session ?? MSSession()
    let message = MSMessage(session: session)

    View Slide

  58. MSMESSAGESAPPVC

    View Slide

  59. View Slide

  60. // Changing presentation style
    requestPresentationStyle(.expanded)
    // Messages Handling
    override func didSelect(_ message: MSMessage,
    conversation: MSConversation) {
    print("Items: \(message.url?.query ?? “Nope")")
    }

    View Slide

  61. MSSTICKERBROWSERVC

    View Slide

  62. // MSStickerBrowserViewDataSource
    override func numberOfStickers(in
    stickerBrowserView: MSStickerBrowserView) -> Int {
    return 5
    }
    override func stickerBrowserView(_ stickerBrowserView:
    MSStickerBrowserView, stickerAt index: Int) -> MSSticker {
    // ...
    }

    View Slide

  63. RECAPITULANDO

    View Slide

  64. VIEWCONTROLLER

    View Slide

  65. VIEWCONTROLLER
    CONVERSATION

    View Slide

  66. VIEWCONTROLLER
    CONVERSATION
    MESSAGE
    B
    A

    View Slide

  67. VIEWCONTROLLER
    CONVERSATION
    MESSAGE
    SESSION
    A&B

    View Slide

  68. 4
    REFERÊNCIAS

    View Slide


  69. DÚVIDAS?!

    View Slide


  70. OBRIGADO!

    View Slide