Closed germanattanasio closed 6 years ago
In the latest SDK you would use platform specific compilation.
private SpeechToText _speechToText;
private Credentials _defaultCredentials = new Credentials(username, password, url);
private Credentials _mobileCredentials = new Credentials(mobileUsername, mobilePassword, mobileUrl);
#if UNITY_IOS || UNITY_ANDROID
_speechToText = new SpeechToText(_mobileCredentials);
#else
_speechToText = new SpeechToText(_defaultCredentials);
#endif
We can add some Editor code to detect what build platform the user has set and print to the console
void Start()
{
if (Application.platform == RuntimePlatform.IPhonePlayer ||
Application.platform == RuntimePlatform.Android)
Debug.Log("Use mobile credentials!");
}
From jstylos
The goal would be to make it so all users had to do was update the Watson Unity SDK and then the app works even if the main endpoint shuts down TLS 1.0 support
@germanattanasio @jsstylos Dan Cox and team got back to me with gateway-tls10.watsonplatform.net
and stream-tls10.watsonplatform.net
for TLS 1.0 only endpoints. They should be just another route in via datapower. They won't be creating a gateway-a-tls10
because they don't have ip address space and
I believe that AlchemyLanguage will be EOL'd by the end of March and that Visual Recognition will transfer over to SL only in 1Q. Based on this I would not expect gateway-a to have a -tls10 variant. There is some possibility gateway-a will be changed to point to PPRD datapower - but that will be covered by gateway-tls10.
We won't be able to hit Visual Recognition on a TLS 1.0 only endpoint until they move over in q1.
They opened up an issue here.
Thoughts?
Conversation and the Speech services should be first priority, not supporting gateway-a
should hopefully be ok based on usage numbers.
from dan
gateway-a.watsonplatform.net will continue to support tls 1.0 until it is shutdown.
We should be able to keep VR and Alchemy endpoints the same.
Great, even better.
Public endpoints for gateway and stream for TLS 1.0 and 1.2 are now working
https://gateway-tls10.watsonplatform.net/
https://gateway-tls12.watsonplatform.net/
https://stream-tls10.watsonplatform.net/
https://stream-tls12.watsonplatform.net/
I sent a sample application with buttons testing testing responses hitting these endpoints without the SDK to the Unity platform engineers. Waiting on them to test the application across all platforms before deciding what platforms to switch endpoints for.
Unity responded with the results of the sample application. All build platforms work with both TLS 1.0 and TLS 1.2 endpoints. I built and tested for ios and android to verify and calls to gateway and stream are working.
Context
In the future, we may want to have custom endpoints for different targets. This issue is to investigate how flexible is unity and if we can address the items described below.
Acceptance Criteria