Giter VIP home page Giter VIP logo

watson-developer-cloud / swift-sdk Goto Github PK

View Code? Open in Web Editor NEW
879.0 66.0 223.0 155.34 MB

:iphone: The Watson Swift SDK enables developers to quickly add Watson Cognitive Computing services to their Swift applications.

Home Page: https://watson-developer-cloud.github.io/swift-sdk/

License: Apache License 2.0

Objective-C 0.25% Swift 86.00% HTML 6.91% Shell 0.79% CSS 0.38% JavaScript 0.06% C 5.16% Dockerfile 0.01% Ruby 0.46%
ibm-watson-services ibm-watson-speech swift-4 hacktoberfest

swift-sdk's Issues

Ensure tests pass

Testing should be performed as functions are implemented. This issue is just a reminder to verify that all tests pass before considering the library to be complete!

Create project

Start fresh with a new project. Be sure to follow updated bundle identifier and naming conventions.

Investigate bundle identifier and naming conventions

What bundle identifier should we use? (Should it match the Java/NodeJS wrappers?)

Given the bundle identifier, should we make changes to the naming conventions? Should we drop "Watson" from the name of all of the classes/structs?

Should we return JSON strings or wrapper structs?

This is a trade-off between usability and maintenance.

The Java wrapper uses classes, but it adds a lot of work when building support for new services. The NodeJS wrapper just returns JSON. What should we do?

Prototype API

These will follow as closely as possible to the existing SDK's from the other platforms

I will create a separate ticket from unit tests for tracking purposes

Submit request to update BlueMix security

BlueMix does not support the standards required by Apple's "App Transport Security" in iOS 9. As a result, we need to modify the App Transport Security for each example application. Instead, we should submit a request to update BlueMix's security standards so that our SDK's clients do not have to make exceptions or disable App Transport Security.

For more information on App Transport Security see this blog post.

Here is the error that was produced by the SpeechTranscriptionDemo application when App Transport Security was not disabled or modified:

2015-09-13 09:42:03.886 SpeechTranscriptionDemo[29039:1519370] CFNetwork SSLHandshake failed (-9824)
2015-09-13 09:42:03.887 SpeechTranscriptionDemo[29039:1519370] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)

Prototype API

Write function declarations (i.e. functions with names and arguments but no implementation) to design the Speech to Text API.

Any deviation from the Java / Objective-C APIs should be recorded, discussed, and approved.

Should we use default values or optionals in our functions?

Many of the Watson endpoints have optional parameters. If they are unspecified, then the server uses a default value.

When we implement a function in the SDK that maps to a Watson endpoint, should we capture these parameters using default values (model: String = en_us_broadbandModel) or optionals (model: String?)?

Remove WatsonAuthentication and WatsonGateway

These files are no longer necessary and can be removed from Watson Core. They were used in the early stages of our SDK before a common network utils library or the use of AlamoFire.

Create project

Start fresh with a new project. Be sure to follow updated bundle identifier and naming conventions.

How should we represent parameter values?

Many services include a number of parameters: voices, languages, dialects, etc.

How do we want to expose those parameters to clients?

Should we design enums? Or should our functions accept the same strings used in the HTTP call to Watson?

If we use strings, should our frameworks include constant definitions to enable auto-complete, or will that end up creating too much work or requiring too much maintenance to keep them up-to-date?

Write code documentation

Documentation should be written as we go, but this issue serves as a reminder to check and revise documentation for all functions (both public and private) in the Speech to Text API.

Investigate the use of tokens and cookies

Tokens may have an advantage over username/password authentication since they are short-lived and can be easily shared. Investigate to determine if we should continue using http basic authentication or build token-handling into WatsonAuthentication.

Similarly, most services respond with a cookie that should be set. Using the cookie can result in a faster response from the server, since it aids in authentication. We should look into receiving and setting cookies with NSURLSession.

What functions should be exposed to clients?

We definitely want to implement support for (1) common use cases on mobile, and (2) all features supported by each Watson service. But do we want to expose all of these functions? Or should we just expose the functions we expect clients to call?

As an example, in SpeechToText, we have recognize() functions intended to be called by the client. They abstract the session-handling, interim results, etc. Do we want to also expose the lower-level functions that actually communicate with the Watson service?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.