Digital Assistant and Mobile

Get Involved. Join the Conversation.


    TypeScript errors in Mobile Hub SDK setup docs
    Topic posted June 21, 2019 by bc_uk, last edited June 21, 2019, tagged Android, iOS, Mobile 
    TypeScript errors in Mobile Hub SDK setup docs

    I have installed the Mobile Cloud Service SDK for ionic into my ionic app, as per the notes in the official Oracle docs found here:

    Set Up the SDK

    However, the code shown in step 3 (Create the configuration file for the app) seems not to be correctly formed TypeScript. When I paste it into a new .ts file in my project, the following two lines of code cause compilation errors:


    import * as mcssdk from 'mcs'
    const mcs: IMCS = mcssdk;


    The errors are: Identifier expected, ; expected, cannot find name 'mcssdk'. There's also no closing brace for the first opening brace. Does anyone have a working example I could use?

    Also, where in my ionic project should I store the mcs.js and mcs.min.js files? I have put them in src > app > lib > mcs. The article linked below says to put them in www > lib > mcs but my project does not have a lib folder in www. My project is ionic 5.0.3.