vonage conversations create `
--name='your_conversation' `
--display-name='Your conversation' `
--image-url='https://manchuck.com' `
--ttl=600 `
--phone-number=16127779311 `
--callback-url='https://example.com/conversations/callback' `
--callback-event-mask='audio:mute:on' `
--callback-event-mask='audio:mute:off' `
--callback-method='GET' `
--callback-application-id='00000000-0000-0000-0000-000000000000' `
--callback-ncco-url='https://example.com/conversations/ncco'
✅ Fetching conversation
Name: your_conversation
Conversation ID: CON-00000000-0000-0000-0000-000000000000
Display Name: Your Conversation
Image URL: https://tinyurl.com/5ey2vhw2
State: ACTIVE
Time to Leave: 600
Created at: 08/29/1997, 02:14:00 AM
Updated at: Not Set
Destroyed at: Not Set
Sequence: 0
Media State:
Earmuffed: ❌ No
Muted: ❌ No
Playing Stream: ❌ No
Recording: ❌ No
Transcribing: ❌ No
Text To Speech: ❌ No
Objective-C
Erstellen Sie die Benutzer
Jeder Teilnehmer an einer Konversation wird durch ein [User](/conversation/ Concepts/Benutzer) Objekt repräsentiert und muss vom Client SDK authentifiziert werden. In einer Produktionsanwendung würden Sie normalerweise diese Benutzerinformationen in einer Datenbank speichern.
Führen Sie die folgenden Befehle aus, um zwei Benutzer anzulegen, Alice und Bob der sich beim Vonage Client anmeldet und
an dem In-App-Sprachanruf (Konversation) teilnehmen.
vonage conversations create ^
--name='your_conversation' ^
--display-name='Your conversation' ^
--image-url='https://manchuck.com' ^
--ttl=600 ^
--phone-number=16127779311 ^
--callback-url='https://example.com/conversations/callback' ^
--callback-event-mask='audio:mute:on' ^
--callback-event-mask='audio:mute:off' ^
--callback-method='GET' ^
--callback-application-id='00000000-0000-0000-0000-000000000000' ^
--callback-ncco-url='https://example.com/conversations/ncco'
✅ Fetching conversation
Name: your_conversation
Conversation ID: CON-00000000-0000-0000-0000-000000000000
Display Name: Your Conversation
Image URL: https://tinyurl.com/5ey2vhw2
State: ACTIVE
Time to Leave: 600
Created at: 08/29/1997, 02:14:00 AM
Updated at: Not Set
Destroyed at: Not Set
Sequence: 0
Media State:
Earmuffed: ❌ No
Muted: ❌ No
Playing Stream: ❌ No
Recording: ❌ No
Transcribing: ❌ No
Text To Speech: ❌ No
vonage conversations create \ --name='your_conversation' \ --display-name='Your conversation' \ --image-url='https://manchuck.com' \ --ttl=600 \ --phone-number=16127779311 \ --callback-url='https://example.com/conversations/callback' \ --callback-event-mask='audio:mute:on' \ --callback-event-mask='audio:mute:off' \ --callback-method='GET' \ --callback-application-id='00000000-0000-0000-0000-000000000000' \ --callback-ncco-url='https://example.com/conversations/ncco' ✅ Fetching conversation Name: your_conversation Conversation ID: CON-00000000-0000-0000-0000-000000000000 Display Name: Your Conversation Image URL: https://tinyurl.com/5ey2vhw2 State: ACTIVE Time to Leave: 600 Created at: 08/29/1997, 02:14:00 AM Updated at: Not Set Destroyed at: Not Set Sequence: 0 Media State: Earmuffed: ❌ No Muted: ❌ No Playing Stream: ❌ No Recording: ❌ No Transcribing: ❌ No Text To Speech: ❌ No
Notieren Sie sich die Benutzer-IDs, da Sie sie später noch benötigen.
Erstellen einer iOS-Chat-App
Erstellen einer iOS-Anwendung, mit der sich Benutzer gegenseitig Nachrichten schicken können
Schritte
1
Einleitung zu dieser Aufgabe2
Prerequisites3
Erstellen einer Vonage-Applikation4
Ein Gespräch führen5
Erstellen Sie die Benutzer6
Benutzer zur Konversation hinzufügen7
JWTs generieren8
Xcode-Projekt und Arbeitsbereich9
Aufbau der Anmeldeschnittstelle10
Erstellung des Benutzermodells11
NXMClient12
Aufbau der Chat-Schnittstelle13
Chat-Ereignisse14
Senden einer Nachricht15
Was kommt als Nächstes?