🚀 Native iOS- and Android- Apps with JavaScript

Overview

Titanium

Welcome to the Titanium open source project. Titanium provides a mature platform for developers to build completely native cross-platform mobile applications using JavaScript.

Currently supported native platforms are iOS and Android.

Titanium is licensed under the OSI approved Apache Public License (version 2). Please see the LICENSE file for specific details.

Download Pre-built Titanium

Table of Contents

Features

With Titanium, you use JavaScript to code your application. Titanium's compiler will compile your application code into an efficient native executable for each target mobile platform.

  • Native apps built using JavaScript (no hybrid, no embedded WebView)
  • Apps are compiled and run locally with full offline support
  • Support for native platform UI controls (TabGroup (iOS), ActionBar (Android), AppBar (Windows), ...)
  • Support for watchOS targets
  • Support for in-application SQL database
  • Support for Geolocation (compass, geolocation, forward/reverse lookup)
  • Support for Camera (taking Photos, playing and recording Video)
  • Support for Calendar (creating & fetching Events)
  • Support for 3D-Touch (Peek and Pop, Application Shortcuts, ...)
  • Support for Photo Album (reading and writing)
  • Support for Contacts Database / Address Book
  • Support for Streaming Audio and Recording Audio, Audio Input Levels, Mic etc
  • Support for Vibration
  • Support for Social APIs such as Facebook, Twitter, etc.
  • Support for Yahoo YQL
  • Support for Web Services via REST, SOAP
  • Support for native Maps
  • Support for Push Notifications
  • Support for In-Application Email
  • Support for In-Application SMS, Telephone
  • Support for Filesystem (create, read, write, etc.)
  • Support for Gestures (such as Shake and Pinch)
  • Support for Platform and Device capabilities
  • Support for complex native views such as Coverflow, Image Views, Table Views, Grouped Views, Composites, etc.
  • Support for Web Views incorporating HTML5, CSS etc.
  • Completely extensible via Module API and Hyperloop for building your own controls or extending capabilities

And much, much more (see our Documentation for more infos).

Hyperloop

Use Hyperloop, our latest addition to the Appcelerator Platform, to extend your Titanium apps by native API's using JavaScript. Prior to Hyperloop, you would use native modules to extend the Titanium API. With Hyperloop, you are now able to implement native classes, 3rd-Party libraries (Cocoapods, local frameworks, .aar files) and more directly into your apps. Hyperloop is available for iOS, Android and Windows Phone (Tech Preview).

Features

Cross-Platform Reuse

Build and maintain apps in a fraction of the time with up to 95% code reuse.

Direct API Access

Access 100% of platform APIs directly, with instant support for each new OS release.

JavaScript Everywhere

Create mobile apps using the world’s most popular programming language.

3rd-Party Libraries

Incorporate 3rd-party native libraries using JavaScript, with no changes required.

Custom Animations

Easily create complex custom effects like dynamic animations using JavaScript.

Run Native

Mobile app development for every major mobile OS – with no hybrid compromises.

Example

Create a native view in iOS and Android:

// iOS
var view = new UIView();

// Android
var view = new View(activity);

Getting Started

Check out our Hyperloop Sample App and Hyperloop Programming Guide to get started with Hyperloop today!

Alloy

Alloy is the MVC application framework built on top of Titanium. It is optional. It rocks. Check it out if you're considering using Titanium. It is also a separate open source project available under Apache Public License.

Example

Manage your application scope by separating your code into different models, views, controllers and more:

index.xml (View)

<Alloy>
  <Window title="Titanium and Alloy">
    <Button onClick="handleClick" id="myButton">Click me!</Button>
  </Window>
</Alloy>

index.js (Controller)

function handleClick() {
  alert('Hello from the Controller!');
}

index.tss (Style)

Window: {
  backgroundColor: 'white'
}

"#myButton": {
  width: 200,
  height: 30,
  backgroundColor: 'green'
}

Getting Help

There are a number of ways to get help with Titanium.

Official Documentation, Tutorials and Videos

Please visit the official documentation site at http://docs.appcelerator.com/ for the latest and historical documentation on Titanium, Alloy and the various products built by Appcelerator.

Developer Community

Appcelerator Developer is our developer community.

Video Tutorials

Appcelerator University is our main video channel for video tutorials on Titanium.

Slack

Community support and discussion about Titanium is available on Slack at TiSlack.

Twitter

Please consider following @Appcelerator and @AppcDev on Twitter for updates.

Blog

The Appcelerator blog is located at (http://www.appcelerator.com/blog).

Commercial Support, Licensing

We give our software away for FREE! In order to do that, we have programs for companies that require additional level of assistance through training or commercial support, need special licensing or want additional levels of capabilities. Please visit the Appcelerator Website for more information about Appcelerator or email [email protected].

Contributing

Titanium is an open source project. Titanium wouldn't be where it is now without contributions by the community. Please consider forking Titanium to improve, enhance or fix issues. If you feel like the community will benefit from your fork, please open a pull request.

To protect the interests of the Titanium contributors, Appcelerator, customers and end users we require contributors to sign a Contributors License Agreement (CLA) before we pull the changes into the main repository. Our CLA is simple and straightforward - it requires that the contributions you make to any Appcelerator open source project are properly licensed and that you have the legal authority to make those changes. This helps us significantly reduce future legal risk for everyone involved. It is easy, helps everyone, takes only a few minutes, and only needs to be completed once.

You can digitally sign the CLA online. Please indicate your email address in your first pull request so that we can make sure that will locate your CLA. Once you've submitted it, you no longer need to send one for subsequent submissions.

Building Locally

Previously Titanium used scons and python scripts to build the SDK. If you'd like to build the SDK locally, we've replaced scons with some Node.JS scripts. Typical usage would be:

npm ci
npm run cleanbuild

The build and package commands will default to all target platforms on your host OS unless explicitly specified. (i.e. Android, iOS on macOS; Windows and Android on Windows). It will compile, package and install the locally-built SDK for you as well, so you can test it in your own applications without any further procedures.

The build command will look for the Android SDK directory path via the $ANDROID_SDK env variables if not explicitly passed using command line arguments.

You can use the -h flag to display the full list of comands and options.

npm ci
npm run cleanbuild -- [platform1] [platform2] --android-sdk /opt/android-sdk /Users/build/android-sdk-macosx

Unit tests

We have a unit test suite intended to run across all supported platforms.

We have npm scripts set up to run a full clean, build, package, symlinked install, ti sdk select the built sdk, and then run the unit test suite:

npm run test:android
npm run test:iphone
npm run test:ipad

How it works

The test suite generates a single Titanium project targeting the specified platform(s), builds the project for emulator, launches the app on the emulator and then runs a series of tests defined via ti-mocha and should.js.

The tests spit out their results to the console log, and the test scripts listen to the logs to gather the results. We then generate an overview on the console as well as a junit report xml file (to be consume by CI build systems like Jenkins).

How to modify the tests locally and in your PRs

The tests folder contains the test suite. Any files living within that directory are copied on top of the test app's structure.

Legal Stuff

Appcelerator is a registered trademark of Appcelerator, Inc. Titanium is a registered trademark of Appcelerator, Inc. Please see the LEGAL information about using our trademarks, privacy policy, terms of usage and other legal information at http://www.appcelerator.com/legal.

Comments
  • An in-range update of rollup is breaking the build 🚨

    An in-range update of rollup is breaking the build 🚨

    The devDependency rollup was updated from 1.13.1 to 1.14.0.

    🚨 View failing branch.

    This version is covered by your current version range and after updating it in your project the build failed.

    rollup is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

    Status Details
    • continuous-integration/jenkins/branch: The build of this commit was aborted (Details).

    Release Notes for v1.14.0

    2019-06-05

    Features

    • Deoptimize code inside and called from try-statements for feature detection (#2892)
    • Tree-shake unused call arguments (#2892)

    Pull Requests

    • #2892: Implement try-statement-deoptimization for feature detection, tree-shake unused arguments (@lukastaegert)
    Commits

    The new version differs by 3 commits.

    • 6f9c3b5 1.14.0
    • 8186d22 Update changelog
    • cf398aa Implement try-statement-deoptimization for feature detection, tree-shake unused arguments (#2892)

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    opened by greenkeeper[bot] 66
  • Update @ngtools/webpack in group templates to the latest version 🚀

    Update @ngtools/webpack in group templates to the latest version 🚀

    The devDependency @ngtools/webpack was updated from 6.2.9 to 7.3.8.

    This version is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.


    Find out more about this release.

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    opened by greenkeeper[bot] 48
  • [TIMOB-26354] Android: Refactor TabGroup and introduce new style

    [TIMOB-26354] Android: Refactor TabGroup and introduce new style

    JIRA: https://jira.appcelerator.org/browse/TIMOB-26354

    Description: Refactor the implementation of TabGroup - remove deprecated ActioBar tabs UI and replace it with TabLayout. Introduce a new style for using BottomNavigationView. A more detailed description will be available once I am done with everything.

    Currently still trying to fix the removal of tabs before opening the TabGroup by simplifying the relation between the tab proxies added and their TiUiAbstractTab counterparts.

    Update: How things work after the refactoring:

    • all the code related to the deprecated ActionBar Tabs UI has been removed - that way all the problems with themes originating from ActionBar are no longer present. For instance now TabGroup can be used with a Theme.AppCompat.NoTitleBar and children of it without issues;
    • handling of the ViewPager that is used to show the Tabs is moved to TiUIAbstractTabGroup;
    • TiUIAbstractTabGroup provides an interface for communication with different "controllers";
    • this allows us to have the separate styles as different implementations making it easier to support and introduce new styles;
    • backwards compatibility with the JS code for the TabGroup implementation before this refactoring. Not defining a style at creation falls back to using the DEFAULT style which is as close as possible the ActionBar UI, but following the Material Design Guidelines ( one difference is the position of the icon relative to the title );
    • fixes the behavior of some properties ( tabsBackgroundColor, tabsFocusedBackgroundColor ), adds some new properties ( style, shiftMode ) and brings parity with iOS for other ( titleColor, activeTitleColor );

    Note: The constants for style will be used from the same namespace for the TabbedBar component. I will change them in the PR for it once this gets the green light for merging.

    Tickets that should be resolved by this refactoring:

    • https://jira.appcelerator.org/browse/TIMOB-24961
    • https://jira.appcelerator.org/browse/TIMOB-19695
    • https://jira.appcelerator.org/browse/TIMOB-15496
    • https://jira.appcelerator.org/browse/TIMOB-23271
    • https://jira.appcelerator.org/browse/TIMOB-25200
    • https://jira.appcelerator.org/browse/TIMOB-17931
    • https://jira.appcelerator.org/browse/TIMOB-16900 ( this one was already fixed, listing it here as the same behavior is kept )

    Test case: app.js

    var mainWindow = Ti.UI.createWindow({
    		layout: 'vertical'
    	}),
    	buttonDefault = Ti.UI.createButton({
    		title: 'Default'
    	}),
    	buttonBottom = Ti.UI.createButton({
    		title: 'Bottom'
    	}),
    	winDefaultA = Ti.UI.createWindow({
    		backgroundColor: 'red'
    	}),
    	winDefaultB = Ti.UI.createWindow({
    		backgroundColor: 'green'
    	}),
    	winDefaultC = Ti.UI.createWindow({
    		backgroundColor: 'blue'
    	}),
    	tabDefaultA = Ti.UI.createTab({
    		title: 'Tab A',
    		window: winDefaultA
    	}),
    	tabDefaultB = Ti.UI.createTab({
    		title: 'Tab B',
    		window: winDefaultB
    	}),
    	tabDefaultC = Ti.UI.createTab({
    		title: 'Tab C',
    		window: winDefaultC,
    		backgroundColor: 'cyan',
    		backgroundFocusedColor: 'magenta',
    		titleColor: 'red',
    		activeTitleColor: 'blue'
    	}),
    	tabGroupDefault = Ti.UI.createTabGroup({
    		// for backwards compatibility if no style is defined, the component falls back to the default one
    		style: Ti.UI.Android.TABS_STYLE_DEFAULT,
    		tabs: [tabDefaultA, tabDefaultB, tabDefaultC],
    		tabsBackgroundColor: '#88AAAAAA',
    		tabsBackgroundSelectedColor: '#AAAAAA'
    	}),
    	winBottomA = Ti.UI.createWindow({
    		backgroundColor: 'red'
    	}),
    	winBottomB = Ti.UI.createWindow({
    		backgroundColor: 'green'
    	}),
    	winBottomC = Ti.UI.createWindow({
    		backgroundColor: 'blue'
    	}),
    	tabBottomA = Ti.UI.createTab({
    		title: 'Tab 1',
    		window: winBottomA
    	}),
    	tabBottomB = Ti.UI.createTab({
    		title: 'Tab 2',
    		window: winBottomB,
    	}),
    	tabBottomC = Ti.UI.createTab({
    		title: 'Tab 3',
    		window: winBottomC,
    		backgroundColor: 'cyan',
    		backgroundFocusedColor: 'magenta',
    		titleColor: 'red',
    		activeTitleColor: 'blue'
    	})
    	tabGroupBottom = Ti.UI.createTabGroup({
    		style: Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION,
    		tabs: [tabBottomA, tabBottomB, tabBottomC],
    		// The following two properties override the colors from TabGroup
    		tabsBackgroundColor: '#88994444',
    		tabsBackgroundSelectedColor: '#883333',
    		// Comment the row below or set it to true to see the difference
    		shiftMode: false
    	}),
    	buttonDisableTabNavigation = Ti.UI.createButton({
    		title: 'Disable Tab Navigation'
    	}),
    	flagTabNavigationDisabled = false,
    	buttonSetActiveTab = Ti.UI.createButton({
    		title: 'Go to Tab A'
    	});
    
    buttonDisableTabNavigation.addEventListener('click', function () {
    	flagTabNavigationDisabled = !flagTabNavigationDisabled;
    	tabGroupDefault.disableTabNavigation(flagTabNavigationDisabled);
    });
    winDefaultB.add(buttonDisableTabNavigation);
    
    buttonSetActiveTab.addEventListener('click', function () {
    	tabGroupDefault.setActiveTab(tabDefaultA);
    });
    winDefaultC.add(buttonSetActiveTab);
    
    buttonDefault.addEventListener('click', function () {
    	tabGroupDefault.open();
    });
    
    buttonBottom.addEventListener('click', function () {
    	tabGroupBottom.open();
    });
    
    mainWindow.add(buttonDefault);
    mainWindow.add(buttonBottom);
    mainWindow.open();
    
    tabGroupDefault.addEventListener('open', function () {
    	Ti.API.info('Default TabGroup OPEN event fired');
    });
    tabGroupDefault.addEventListener('close', function () {
    	Ti.API.info('Default TabGroup CLOSE event fired');
    });
    tabGroupDefault.addEventListener('focus', function () {
    	Ti.API.info('Default TabGroup FOCUS event fired');
    });
    tabGroupDefault.addEventListener('blur', function () {
    	Ti.API.info('Default TabGroup blur event fired');
    });
    tabDefaultA.addEventListener('focus', function () {
    	Ti.API.info('Default Tab A FOCUS event fired');
    });
    tabDefaultA.addEventListener('blur', function () {
    	Ti.API.info('Default Tab A BLUR event fired');
    });
    tabDefaultA.addEventListener('selected', function () {
    	Ti.API.info('Default Tab A SELECTED event fired');
    });
    tabDefaultA.addEventListener('UNSELECTED', function () {
    	Ti.API.info('Default Tab A UNSELECTED event fired');
    });
    
    

    Note: I haven't added a new example in the docs. I was thinking the test case from here should do, but maybe it is not in the best format to go there (too long?).

    android bug improvement docs in-qe-testing 🕵 
    opened by ypbnv 48
  • [TIMOB-23310] Update v8 engine to 5.0.71.33

    [TIMOB-23310] Update v8 engine to 5.0.71.33

    JIRA: https://jira.appcelerator.org/browse/TIMOB-23310 https://jira.appcelerator.org/browse/TIMOB-23476

    Description:

    This is a MAJOR update of the V8 engine we use for Android. Our current engine is 3.9.24.29, which dates back to May/June 2012, so this brings the engine forward a full 4 years!

    Note that right now even this version of V8 is behind. Once we get this merged we should regularly update. Right now Android stable version is: 5.1.281.57 - see https://omahaproxy.appspot.com Looks like they "release" pretty much weekly. We should consider having regular updates of V8 ourselves so that next time we don't have a major overhaul of all the native code and can handle API changes as they come.

    This is a major breaking change and will mean all compiled/native modules for Android will need to be rebuilt.

    This currently builds fine against Android NDK r11c for me, and I was able to run a classic two-tab app without problems.

    android feature needs docs 🚨 BREAKING CHANGES ⚠️ 
    opened by sgtcoolguy 47
  • Android: Random crash with map view in Ti.UI.ListSection footer

    Android: Random crash with map view in Ti.UI.ListSection footer

    https://jira.appcelerator.org/browse/TIMOB-28583

    Exception
    E AndroidRuntime: FATAL EXCEPTION: main
    E AndroidRuntime: Process: ti.map.test, PID: 29094
    E AndroidRuntime: java.lang.IllegalArgumentException: No view found for id 0x2 (unknown) for fragment SupportMapFragment{ab59c34} (12aebe3e-06b7-46e3-b9ca-2d53d2ec238d id=0x2)
    E AndroidRuntime:        at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:513)
    E AndroidRuntime:        at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
    E AndroidRuntime:        at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
    E AndroidRuntime:        at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
    E AndroidRuntime:        at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
    E AndroidRuntime:        at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
    E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:873)
    E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:99)
    E AndroidRuntime:        at android.os.Looper.loop(Looper.java:193)
    E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6669)
    E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
    E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    
    App sample
    const mapView = Ti.UI.createView({
      height: 200
    });
    mapView.add(require('ti.map').createView());
    
    const win = Ti.UI.createWindow({
      title: 'test',
      backgroundColor: 'gray'
    });
    
    function addListView() {
      var listView = Ti.UI.createListView({
        footerView: mapView,
        templates: {
          test: {
            childTemplates: [{
              type: 'Ti.UI.View',
              childTemplates: [{
                type: 'Ti.UI.Label',
                bindId: 'label',
                properties: {
                  color: 'black',
                  bindId: 'label'
                }
              }],
              properties: {
                width: Ti.UI.FILL,
                height: 200,
                cardUseCompatPadding: true,
                backgroundColor: 'white'
              }
            }]
          }
        },
        defaultItemTemplate: 'test'
      });
      var section = Ti.UI.createListSection();
      var items = [];
    
      for (let i = 0; i < 20; i++) {
        items.push({
          label: {
            text: 'item ' + i
          },
          template: 'test'
        })
      }
    
      section.setItems(items);
      listView.sections = [section];
      win.add(listView);
    }
    
    win.addEventListener('open', function() {
      addListView();
    })
    win.open();
    
    

    Original discussion

    I think the reason is a race condition between FragmentTransaction and attaching view to a window, i.e. app will crash when the transaction is executed before the view has been attached.

    P.S. somehow connecting to the app with debugger make it harder to reproduce the problem.

    opened by drauggres 43
  • [TIMOB-26015] Android/iOS: Refactored

    [TIMOB-26015] Android/iOS: Refactored "app.js" launch handling

    JIRA:

    • https://jira.appcelerator.org/browse/TIMOB-26015
    • https://jira.appcelerator.org/browse/TIMOB-26144
    • https://jira.appcelerator.org/browse/TIMOB-26128
    • https://jira.appcelerator.org/browse/TIMOB-26124
    • https://jira.appcelerator.org/browse/TIMOB-25899
    • https://jira.appcelerator.org/browse/TIMOB-26217

    Summary:

    • Added a new "titanium_mobile/common/Resources" JavaScript folder.
      • Provides JS files/extensions intended to be shared by across all platforms.
    • Android/iOS now launch using new ti.main.js instead of app.js.
      • Used to load JS extension/bootstrap scripts that are shared on all platforms.
      • Loads app.js once finished loading everything.
    • Now logs app version and Titanium version on startup via ti.main.js instead of from native code.
      • New Message: <AppName> <AppVer> (Powered by Titanium <TiVer>.<TiBuildHash>)
    • TIMOB-26015 Added bootstrap script support.
      • All files named bootstrap.js or end with name *.bootstrap.js under the "Resources" directory will be automatically required-in before app.js gets loaded. This is a recursive search.
      • This is the CommonJS equivalent of native Android module's onAppCreate() or iOS module's load() method.
      • Bootstrap script can support optional exports.execute(finishedCallback) method intended to display UI to end-user. Will not load app.js until given callback is invoked.
    • TIMOB-26124 Fixed bug where Ti.buildHash always returned null on Android as of Titanium 6.0.0.
      • Was a typo in scons-build.js and scons-cleanbuild.js scripts.
      • Fix needed by new Titanium version logging on app startup. (Build hash needed to differentiate between RC and GA versions.)
    • TIMOB-26128 Modified Android build system to include asset directory names have a leading underscore '_'.
      • This was an intentional limitation in Google's aapt Android command line tool.
      • Solved by using appt command line argument --ignore-assets and omitting <dir>_* from filter list.
    • TIMOB-25899 Modified JS Error object to expose non-enumerable properties via JSON.stringify().
      • Was always returning "{}" on Android since none of the V8 Error object properties are enumerable.
      • Also modified to reveal stack property on iOS. (Not enumerable in JavaScriptCore.)
      • Solved by adding toJSON() method to Error object prototype. (See: ./common/Resources/ti.internal/extensions/Error.js)
      • Implementing this was not needed for this PR, but it's a proof of concept on how JS prototype can be extended on all platforms in Titanium's core JS code.
    • TIMOB-26144 Significantly improved Android's performance in accessing files/directories under the "Resources" directory.
      • The File.getDirectoryListing() performance is now about 20x faster. The isDirectory(), isFile(), and existence() calls have been improved too.
      • Now stores a hash table of all file/directory paths under the APK's "assets" folder for quick existence checks. Paths are now obtained by accessing APK as a zip file and fetching its zip entries, which is significantly faster than AssetManager.list() calls.
    • TIMOB-26217 iOS: Added missing Ti.Filesystem.File methods isFile() and isDirectory() when referencing an encrypted asset.
      • Was causing JS runtime errors in bootstrap recursive search.
    • TIMOB-16678 Modified Android File.read() to not return an empty string when referencing an encrypted asset.
      • Needed to access new bootstrap.json for device/production builds.

    Notes:

    • I purposely did not document the new *.bootstrap.js handling in our API docs. We should dog-food it first to see how much we like it before setting it in stone. Plus we may want it to use Promises in the future (this feature is missing on iOS 9 at the moment).
    • We plan on having our ti.playservices module take advantage of the bootstrapping feature in 7.4.0. It's needed to check/install/update "Google Play Services" before loading the app.js.

    Test: Perform the below tests on the following:

    • Android device without LiveView (This tests encrypted asset handling.)
    • Android emulator (This tests APK's "assets" handling.)
    • iOS device
    • iOS emulator
    • iOS 8 (This tests oldest JavaScript engine version handling.)

    Test procedure:

    1. Build and run the app with the below app.js and ui.bootstrap.js code. Note that the ui.bootstrap.js needs to be next to the app.js file under the Resources directory.
    2. On app startup, verify that an alert is displayed stating that it was launched by a bootstrap.
    3. Tap on the "OK" button.
    4. Next the app.js will have loaded, displaying a JavaScript Error object in JSON form. (This verifies that our core JS extensions have been loaded.)
    5. If running on iOS, verify that the displayed JSON contains a "stack" entry. (This used to be excluded on iOS.)
    6. If running on Android, verify that the displayed JSON is not an empty "{}". The JSON should display entries "message" and "stack".
    7. If running on Android, press the "Back" button and then restart the app. Verify that the bootstrap alert dialog (mentioned in step 2) is shown again.

    app.js

    var window = Ti.UI.createWindow({ fullscreen: true });
    var scrollView = Ti.UI.createScrollView({
    	layout: "vertical",
    	showHorizontalScrollIndicator: false,
    	shorVerticalScrollIndicator: true,
    	width: Ti.UI.FILL,
    	height: Ti.UI.FILL,
    });
    scrollView.add(Ti.UI.createLabel({
    	text: "JSON.stringify(new Error('My error message'))",
    	width: Ti.UI.FILL,
    	top: "10dp",
    }));
    scrollView.add(Ti.UI.createLabel({
    	text: JSON.stringify(new Error('My error message'), null, 4),
    	width: "100%",
    }));
    window.add(scrollView);
    window.open();
    

    ui.bootstrap.js

    exports.execute = function(finished) {
    	var dialog = Ti.UI.createAlertDialog({
    		title: 'Alert Dialog',
    		message: 'This dialog was launched by a bootstrap script.',
    		buttonNames: ['OK'],
    		cancel: 0,
    	});
    	dialog.addEventListener('click', function(e) {
    		finished();
    	});
    	dialog.show();
    };
    
    ios android feature bug in-qe-testing 🕵 parity 👯‍♀️ 
    opened by jquick-axway 41
  • iOS/Android: Support printing capabilities

    iOS/Android: Support printing capabilities

    I have searched and made sure there are no existing issues for the issue I am filing

    • [X] I have searched the existing issues

    Description

    The Ti.Airprint module will not work in the XCode simulator on M1 Macs since it was not built for that processor. And since I would also need a module to convert html to a pdf to use ti.airprint in my app, even rebuilding that won't be enough.

    And since Google no longer supports Google print, there is no good way to print from an Android app built with Titanium SDK. I am not aware of any modules that address printing on Android.

    I would like to see printing for both iOS and Android added to Titanium SDK so no module is needed, or updated modules to handle printing on both platforms that will run in the simulator on an M1 Mac. Printing seems like a core function and should be included in a robust way.

    Aside from this suggestion, I have been very much enjoying using VSCode and the Titanium extension on my M1 Mac. Builds go very fast. I really appreciate all the work that went into making the open-source transition work. The new API documentation is very good and very easy to use. Lots of other great documentation as well. Thanks!

    Solution

    I would like to see printing included in Titanium SDK or new modules for printing for both iOS and Android that will run in the simulator on an M1 Mac as well.

    Alternatives

    I have tried a few workarounds, include openURL to try to open Safari with an html file to print (this is what I do with my Android app, but this is a clumsy solution, and far from ideal). I also tried doing a webview and then doing evalJS to do window.print() but that didn't work. I'm not sure if that's something that could work with changes to Titanium SDK or if it's a limitation of iOS. But again, that's not an ideal solution.

    Platforms

    Android & iOS

    feature needs triage 
    opened by dethier1958 38
  • [TIMOB-18082] Android: Enable --multi-dex for android builds

    [TIMOB-18082] Android: Enable --multi-dex for android builds

    JIRA: https://jira.appcelerator.org/browse/TIMOB-18082

    Description: This calls dexer with the --multi-dex argument, modifies our CLI to copy *.dex (not just classes.dex), and modifies TiApplication to override attachBaseContext to call MultiDex.install (to support loading multiple dex files). We also include the android-support-multidex.jar as a library dependency.

    This PR's functionality was confirmed with the module @ashcoding provided.

    android feature 
    opened by sgtcoolguy 30
  • [TIMOB-9911] Android: Action Bar Navigation Tabs

    [TIMOB-9911] Android: Action Bar Navigation Tabs

    Add support for Action Bar based Tab Groups. This is a monster refactoring so it is important we do lots of regression hunting.

    For regression testing use KitchenSink or any other existing applications which use Tab Groups. To test the new Action Bar modify the android manifest and bump the targetSdkVersion to 14.

    opened by joshthecoder 30
  • refactor(android): asset handling

    refactor(android): asset handling

    • Refactor Android asset encryption to utilize new ti.cloak module
    TEST CASE
    • Build application with encrypted assets
      • appc run -p android --deploy-type test
    • Application should run without any issues

    JIRA Ticket

    android improvement in-qe-testing 🕵 no tests cli 📟 
    opened by garymathews 28
  • An in-range update of webpack is breaking the build 🚨

    An in-range update of webpack is breaking the build 🚨

    The devDependency webpack was updated from 4.29.6 to 4.30.0.

    🚨 View failing branch.

    This version is covered by your current version range and after updating it in your project the build failed.

    webpack is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

    Status Details
    • continuous-integration/jenkins/branch: This commit has test failures (Details).

    Release Notes for v4.30.0

    Features

    • add amd: false to disable AMD support
    • Compilation.hooks.finishModules now also allows async plugins
    • add output.libraryTarget: "system" to compile for SystemJs environment

    Bugfixes

    • fix generating a null id when concatenating an entry module in a different chunk
    • fix unneeded chunk references when splitting modules from chunks
    • fix parsing of function name in function scope

    Performance

    • Lazy require some internal files
    • Faster way to generate function headers

    Contributing

    • Run prettier on examples markdown
    Commits

    The new version differs by 102 commits.

    • b72b96a 4.30.0
    • 9ededfa Merge pull request #9034 from webpack/dependabot/npm_and_yarn/tapable-1.1.3
    • e33a91f chore(deps): bump tapable from 1.1.1 to 1.1.3
    • de81dd0 Merge pull request #8864 from joeldenning/issue-8833
    • 7dfddc2 Merge pull request #8858 from webpack/dependabot/npm_and_yarn/json-schema-to-typescript-6.1.3
    • f7d0c25 Improve way how System is tested
    • 39a680d formating of output code
    • e2e74f5 Merge pull request #8980 from webpack/dependabot/npm_and_yarn/eslint-5.16.0
    • 81dc70d Merge pull request #9022 from sandersn/fix-webassembly-declaration
    • 13aa512 Merge pull request #9023 from webpack/dependabot/npm_and_yarn/typescript-3.4.3
    • 1566036 chore(deps-dev): bump typescript from 3.4.2 to 3.4.3
    • ce33ca7 Update WebAssembly declaration
    • 5117461 Merge pull request #9006 from hiroppy/feature/fix-template-syntax
    • 9e60850 Merge pull request #8984 from webpack/dependabot/npm_and_yarn/react-16.8.6
    • 5f75527 Bump json-schema-to-typescript from 6.1.1 to 6.1.3

    There are 102 commits in total.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    opened by greenkeeper[bot] 28
  • build(deps): bump json5 from 1.0.1 to 1.0.2

    build(deps): bump json5 from 1.0.1 to 1.0.2

    Bumps json5 from 1.0.1 to 1.0.2.

    Release notes

    Sourced from json5's releases.

    v1.0.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295). This has been backported to v1. (#298)
    Changelog

    Sourced from json5's changelog.

    Unreleased [code, diff]

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump fast-json-patch from 3.0.0-1 to 3.1.1

    build(deps): bump fast-json-patch from 3.0.0-1 to 3.1.1

    Bumps fast-json-patch from 3.0.0-1 to 3.1.1.

    Release notes

    Sourced from fast-json-patch's releases.

    3.1.1

    Security Fix for Prototype Pollution - huntr.dev #262

    Bug fixes and ES6 modules

    Use ES6 Modules

    • package now exports non-bundled ES module Starcounter-Jack/JSON-Patch#232
    • main still points to CommonJS module for backward compatibility
    • README recommends use of named ES imports

    List of changes https://github.com/Starcounter-Jack/JSON-Patch/compare/v2.2.1...3.0.0-0

    Commits
    Maintainer changes

    This version was pushed to npm by mountain-jack, a new releaser for fast-json-patch since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • fix(ios): fix crash on soft-restart

    fix(ios): fix crash on soft-restart

    This crash happens when soft-restarting the app (e.g. with https://github.com/rborn/tiapprestart) after opening an Universal Link / User Activities API. The reason is that we override the internal NSUserActivity to a NSDictionary during initial launch any try to re-access the native value that is already mapped to a dictionary at this point.

    The testing setup is a bit complex, but it's basically this:

    1. Download the ti.apprestart module: https://github.com/rborn/tiapprestart
    2. Setup Universal Links: https://stackoverflow.com/questions/36542001/appcelerator-how-to-add-universal-links-support-in-ios9-app
    3. Open a universally-linked URL
    4. Return to the app
    5. Trigger an app restart

    -> App crashes!

    opened by hansemannn 0
  • 404 ios error

    404 ios error

    I have searched and made sure there are no existing issues for the issue I am filing

    • [X] I have searched the existing issues

    Description

    This is a very weird issue affecting only a few ios users so I really can't give you much details. I only know it is happening at ios devices (with different models or os versions) and it has been happening even when sdks where released by appcelerator team. So this is not a recent change.

    Whenever we try to make a rest api call to our server we get a 404 Not found error.

    I know you will say this seems a server side issue but the weird thing is that the issue gets resolved if app is deleted and reinstalled!

    At some cases users never have the issue again, at others they have to install app every day.

    Expected Behavior

    Successful rest api calls.

    Actual behavior

    404 error on rest api calls

    Reproducible sample

    Random received from very few ios users as feedback

    Steps to reproduce

    Install app, try to perform a rest api call if this happens you get 404 as response.

    Platform

    No response

    SDK version you are using

    11.1.1.GA

    Alloy version you are using

    No response

    ios bug needs triage 
    opened by meandmymonkey7 6
  • Android: migrate ViewPager to ViewPager2

    Android: migrate ViewPager to ViewPager2

    I have searched and made sure there are no existing issues for the issue I am filing

    • [X] I have searched the existing issues

    Description

    Currently the SDK still uses the normal ViewPager. Migrating to ViewPager2 would allow to use vertical orientation, RTL support and it's based on RecyclerView tech.

    https://developer.android.com/develop/ui/views/animations/vp2-migration

    Platforms

    Android

    android feature needs triage 
    opened by m1ga 0
  • feat(all): fixed rows in filtered results

    feat(all): fixed rows in filtered results

    This PR adds the option (filterAlwaysInclude) to always show specific rows in your search/filter results, even if they don't match the query

    Example:

    • run the code
    • search for "apple"
    • the "apple" row will show up and the "always show..." rows
    var win = Ti.UI.createWindow();
    
    var sectionFruit = Ti.UI.createTableViewSection({ headerTitle: 'Fruit' });
    sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' }));
    sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' }));
    sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Always show (fruits)', filterAlwaysInclude: true}));
    
    var sectionVeg = Ti.UI.createTableViewSection({ headerTitle: 'Vegetables' });
    sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Carrots' }));
    sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Potatoes' }));
    sectionVeg.add(Ti.UI.createTableViewRow({ title: 'Always show (vegetables)', filterAlwaysInclude: true}));
    
    var sectionFish = Ti.UI.createTableViewSection({ headerTitle: 'Fish' });
    sectionFish.add(Ti.UI.createTableViewRow({ title: 'Cod' }));
    sectionFish.add(Ti.UI.createTableViewRow({ title: 'Haddock' }));
    sectionFish.add(Ti.UI.createTableViewRow({ title: 'Always show (fish)' , filterAlwaysInclude: true}));
    
    var table = Ti.UI.createTableView({data: [sectionFruit, sectionVeg, sectionFish], search: Ti.UI.createSearchBar(), height: "45%", top: 0});
    win.add(table);
    
    // listview
    var listView = Ti.UI.createListView({bottom: 0, height: "45%", searchView: Ti.UI.createSearchBar()});
    var sections = [];
    
    var fruitDataSet = [{properties: { title: 'Apple', searchableText:'Apple'}}, {properties: { title: 'Banana', searchableText:'Banana'}}, {properties: { title: 'Always show (fruits)', filterAlwaysInclude:true}}];
    var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits', items: fruitDataSet});
    sections.push(fruitSection);
    
    var vegDataSet = [{properties: { title: 'Carrots', searchableText:'Carrots'}},{properties: { title: 'Potatoes', searchableText:'Potatoes'}}, {properties: { title: 'Always show (vegetables)', filterAlwaysInclude:true}}];
    var vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables', items: vegDataSet});
    sections.push(vegSection);
    
    var fishDataSet = [ {properties: { title: 'Cod', searchableText:'Cod'}}, {properties: { title: 'Haddock', searchableText:'Haddock'}}, {properties: { title: 'Always show (fish)', filterAlwaysInclude:true}}];
    var fishSection = Ti.UI.createListSection({ headerTitle: 'Fish', items: fishDataSet});
    sections.push(fishSection);
    
    listView.sections = sections;
    win.add(listView);
    
    win.open();
    

    Screenshot_20221220-115342 Screenshot_20221220-115329

    TODO:

    • [x] Android TableView
    • [x] Android ListView
    • [x] iOS TableView
    • [x] iOS ListView
    opened by m1ga 0
Releases(12_0_0_GA)
Owner
Team Appcelerator
Team Appcelerator
JavaScript evaluation from kotlin common code for android & iOS

Mobile Kotlin javascript This is a Kotlin MultiPlatform library that allows you to run JavaScript code from common Kotlin code Table of Contents Featu

IceRock Development 14 Aug 29, 2022
Cross-platform framework for building truly native mobile apps with Java or Kotlin. Write Once Run Anywhere support for iOS, Android, Desktop & Web.

Codename One - Cross Platform Native Apps with Java or Kotlin Codename One is a mobile first cross platform environment for Java and Kotlin developers

Codename One 1.4k Jan 9, 2023
Lambda-snake.kt - Snake Game Implementation for Web using Kotlin programming language compiled for Javascript

Projeto da disciplina de Linguagem de Programação Funcional 2021.1 (jan/2022) ??

Alex Candido 3 Jan 10, 2022
Uproot-JS - Extract JavaScript files from burp suite project with ease

Extract JavaScript files from burp suite project with ease. Disclaimer I am not

Dexter0us 50 Aug 8, 2022
Runtime Mobile Security (RMS) 📱🔥 - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime

Runtime Mobile Security (RMS) ?? ?? by @mobilesecurity_ Runtime Mobile Security (RMS), powered by FRIDA, is a powerful web interface that helps you to

Mobile Security 2k Dec 20, 2022
An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile.

An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile. 项目架构主要分为原生系统层、Android/iOS业务SDK层、KMM SDK层、KMM业务逻辑SDK层、iOS sdkfra

libill 4 Nov 20, 2022
Android project setup files when developing apps from scratch. The codebase uses lates jetpack libraries and MVVM repository architecture for setting up high performance apps

Android architecture app Includes the following Android Respository architecture MVVM Jepack libraries Carousel view Kotlin Kotlin Flow and Livedata P

null 2 Mar 31, 2022
This library provides common speech features for ASR including MFCCs and filterbank energies for Android and iOS.

Kotlin Speech Features Quick Links ?? Introduction This library is a complete port of python_speech_features in pure Kotlin available for Android and

Merlyn Mind 13 Oct 7, 2022
Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that scaffolds your app and includes a server and build system.

What is it? Reapp is everything you need to build amazing apps with React: a collection of packages that work together, our UI kit, and a CLI that sca

reapp 3.4k Nov 20, 2022
A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android

Blue-Falcon A Bluetooth "Cross Platform" Kotlin Multiplatform library for iOS, Android, MacOS, Raspberry Pi and Javascript. Bluetooth in general has t

Andrew Reed 220 Dec 28, 2022
Dependency Injection library for Kotlin Multiplatform, support iOS and Android

Multiplatform-DI library for Kotlin Multiplatform Lightweight dependency injection framework for Kotlin Multiplatform application Dependency injection

Anna Zharkova 32 Nov 10, 2022
Simple Kotlin Multiplatform PrayerTimes App for iOS and Android

Kotlin Multiplatform ___ _______ ___ / _ \_______ ___ _____ ___/_ __(_)_ _ ___ ___ / _ | __

Ahmed El-Helw 26 Nov 9, 2022
Location Service Manager for Kotlin Multiplatform Mobile iOS and android

Location Service Manager for Kotlin Multiplatform Mobile iOS and android Features Provides simple permission settings Dramatically reduce the amount o

LINE 55 Dec 10, 2022
Kotlin Multiplatform Mobile demo for Android and iOS - app for viewing Cat pictures

CatViewerDemo Android demo iOS demo Kotlin Multiplatform Mobile demo for Android and iOS. App for viewing Cat pictures from Cats API. This sample show

Martin Rajniak 111 Dec 18, 2022
A local storage management library for Kotlin Multiplatform Mobile iOS and android

A local storage management library for Kotlin Multiplatform Mobile iOS and android Features iOS and Android local storage in one interface Provides ge

LINE 20 Oct 30, 2022
A Kotlin Multiplatform Project using TMDB Api. Currently supports Android,iOS,Desktop and web platforms

A Kotlin Multiplatform Project using TMDB Api(https://www.themoviedb.org/). Currently this project is implemented in following platforms Andr

Jackson E J 11 Nov 10, 2022
Small app to create icon sets for Linux, Windows, OSX, Android and IOS from a single PNG image

FXIconcreator Small app to create icon sets (multi resolution) for Linux, Windows, OSX from a single PNG image Reason for creating such an app was tha

null 18 Aug 4, 2022
Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Kotlin Multiplatform is an SDK for cross-platform mobile development, which enables teams to use the same business logic in both Android and iOS client applications.

Chris Russell 1 Feb 11, 2022