Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26710

[iOS] Example app.js is incorrect when creating a iOS Swift module

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 8.0.0
    • Fix Version/s: Release 8.0.0
    • Component/s: iOS
    • Labels:
      None
    • Environment:

      SDK Version 8.0.0.v20190109125941
      iPhone 6S (12.1) Sim
      APPC CLI: 7.0.9
      Operating System Name: Mac OS Mojave
      Operating System Version: 10.14.2
      Node.js Version: 8.9.1
      Xcode 10.1

      Description

      When creating a iOS test module using Swift the example app.js is incorrect and throws errors.

      Test Steps:

      1. Create a new test module using ti create -t module --name test --id com.example.tese --code-base swift
      2. Package the module using appc run -p ios --build-only (iOS folder within the module)
      3. Create a new Titanium project
      4. Copy the example found in TEST_Module -> example -> app.js in to Titaniums app.js
      5. Add the packaged module in to the application
      6. Run the program

      Actual results
      Application shows errors as the correct methods/properties can not be found at

      Expected result
      Application should run fine with the app.js from the example folder in the module

      Note The following example should work

      var test = require('com.example.tese');
      Ti.API.info('module is => ' + test);
      Ti.API.info('module tryThis method returns => ' + test.tryThis());
      Ti.API.info('module exampleProp is => ' + test.testProperty);
      test.testProperty = 'Should equal Hello World';
      

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              smohammed Samir Mohammed
              Reviewer:
              Jan Vennemann
              Tester:
              Samir Mohammed
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6813
                  Sync status:
                  PENDING
                  Last received:
                  Last sent:

                  Git Source Code