Corona SDK Release Notes (Build 2011.591)

This document describes the changes to the Corona SDK on Mac OS X and Windows, including the simulator, and iOS and Android device builds.

What’s New in This Release

  • Priority device builds for subscribers
  • Improved Android Build times
  • Mac Simulator compatible with OSX Lion
  • Added Papaya support
  • Added InMobi ads support
  • Added gyroscope support to iOS and Android
  • Added Widgets for iOS (was called Corona UI)
  • Added “gameNetwork” support
  • New sample apps added: Gyroscope, InMobi, Papaya, MultiPlayerPubNub, SimplePoolPlus, SuperRewardsSample, WidgetDemo
  • Added Credits (Virtual Currency) API (for iOS)
  • Numerous Android fixes
  • Numerous Window Simulator fixes

Please note the following:

  • Not all Corona features are available on Android (see Known Issues below)

Changes to Android OS and architecture support

Starting with build 484, Android device builds you create with Corona will only run on devices that meet the following specifications:

  • Android 2.2 or later installed
  • ARM7 (or compatible) processor

If you try to install an APK on a device with an incompatible OS or architecture, you will encounter errors. The Android Market automatically filters out applications that have incompatible OS or architecture requirements, so end-users (your customers) will not encounter these types of errors.

New Features and bug fixes (common to Android, iOS, and Simulator)

  • Added Papaya support. Accessible via gameNetwork.init(“papaya”, “MySocialKey”, “MyMapsKey”)
  • Added InMobi Ads support.
  • Added JSON library to Corona core.
  • Added gyroscope support to iOS and Android.
  • Added gyroscope and accelerometer deltatime to iOS. - case 5978
  • Added “timeScale” property to sprites to control animation speeds dynamically. - case 4465
  • Added Widgets for iOS (was called Corona UI)
  • Added “gameNetwork” support. OpenFeint is now accessed through gameNetwork APIs.
  • Moved OpenFeint code into gameNetwork library. Deprecate old openfeint library calls.
  • Added Javascript equivalents to Corona’s API: table.copy, table.indexOf, math.round.
  • Added the ability to mask text display objects. Also, a mask can be composited with another mask (using Display Groups).
  • Add additive blends (a.k.a. linear dodge). Vector and image objects now have a “blendMode” property which can be “normal” or “add”. This is a very naive implementation, so masking cannot be done simultaneously.
  • New Corona icon.
  • New sample apps added: Gyroscope, InMobiPapaya, MultiPlayerPubNub, , SimplePoolPlus, SuperRewardsSample, WidgetDemo
  • Mask/Touch enhancement. Limits touch events to masked portion of the object. Added isHitTestMasked property to override masked touches. Defaults to true (enables masked touches).
  • New text “editing” event callback when editing a native.newTextfield. API changes: event.oldString is now event.oldText, event.startPosition now starts at index=1 instead of 0, event.text is introduced to show the new/current string. event.newCharacters and event.numDeleted are unchanged. - case 5670
  • system.getTimer() now returns up to 0.001 millisecond accuracy, i.e. microseconds (if supported by the device).
  • Added ability to reset display object’s reference point: object:setReferencePoint( nil ).
  • iOS/Core: Audio: re-audited the iOS interruption handling system. Changes were needed to handle the new suspend/resume/backgrounding/screenlock changes because interruptions are handled before Lua callbacks are fired. Interruptions will now automatically pause any playing audio and resume those channels when the interruption ends. This should also extend to general suspend/resume events and also the simulators. - cases 6428, 2069, 5666, 6372
  • Fixed bug where first frame in sprite animation does not play at full length after re-playing the animation. - case 6680
  • Fixed for loss of momentum scrolling in tableview for certain (not all) 3GS devices.
  • Fixed suspend and resume callback order so event callbacks are run while Corona is still active. Note on iOS, there seems to be an intermittent OpenAL bug on pause/resume where the calls sometimes fail. I am investigating with Apple. - case 6372
  • Implemented Lua APIs for: audio.supportsSessionProperty, audio.getSessionProperty(), audio.setSessionProperty(). Includes additional constants to support APIs. - cases 2746, 5213, 5548, 5666
  • Fixed trimmed sprites to position themselves correctly when scaled. - cases 1540, 3753
  • Fixed memory leak in error handling library (Audio) for creating new error strings. - case 5780
  • Fixed new audio system to avoid race condition where a new play event fights with a currently scheduled completion event for the callback handler which was resulting in lost completion events. - case 5724
  • Added caching system for audio.loadSound to avoid users accidentally loading the same file into memory multiple times.
  • Fixed various screen capture bugs with display.save() and display.captureScreen() - cases 79, 1164, 3828, 4240, 4463, 5634
  • On events that occur between a suspend and resume (e.g. orientation events in the simulator), system.getTimer() now returns the time at suspend, and not the current time, since those times will come after time reported at resume. - case 4657
  • Improve implementation of masking. Now object’s alpha can be set on masked images on devices with only 2 texture units, e.g. Nexus One.
  • Corona SDK: Fixed bug where Lua event listener for media.playSound() does not get called after resuming a paused sound. - case 5296

iOS Features and Fixes

  • Addressed issues caused by canceling native.showWebPopups while they are loading. Also flashing of WebPopups should go away. - cases 6319, 3557
  • Added Reachability: network.canDetectNetworkStatusChanges to API. - case 386
  • New sample apps added: Reachability.
  • Added Credits (Virtual Currency) API. - case 5560
  • Fixed OpenFeint’s GameCenter popup – should only appear if the OFGameCenter.plist is present. - case 6702
  • Changed map error callback to use event.errorMessage and event.errorCode. - case 4754
  • Fixed camera/photo picker to delete itself after use to avoid cached reuse case which led to the wrong picker being invoked on subsequent calls. - case 6437
  • event.response was returning different values for Android and Apple for network.download. The former gives a full path, while the latter only gives the lastPathComponent. This changes the Apple implementation to return the full path. - case 6475
  • Changed internal suspend/resume code to allow audio to continue playing if the MediaPlayback AudioSession category is set. Also reworked internal suspend/resume code so true iOS backgrounding will work (currently with limitations related to the system timer). To use backgrounding, you must change the Info.plist setting of UIApplicationExitsOnSuspend to NO and set UIBackgroundModes as an array with string keys either/both ‘audio’ or ‘location’. Also, you may need to change the audio session category to a category that allows mixing. - cases 669, 5548
  • Renamed AudioSession constants so they no longer start with ‘k’. In addition, the audio session category (mix mode) values now end with the term MixMode: audio.AmbientMixMode, audio.SoloAmbientMixMode, audio.MediaPlaybackMixMode, audio.RecordAudioMixMode, audio.PlayAndRecordMixMode. - cases 5666, 2746, 5213, 5548, 5939
  • Fixed problems with mixing native audio and video playback. Video and image pickers will no longer suspend Corona so audio can continue processing. - case 5939
  • Fixed bug where network.request() returns a corrupted response if it contains UTF-8 encoded characters. - case 4996
  • Fixed OpenFeint crashing on iOS 3x builds. - case 4819

Android Features and Fixes

  • Revamp Android builds. Server compile times are significantly improved.
  • Added support for BACK and MENU buttons on Android devices. See new sample Hardware/KeyEvents/main.lua. - cases 6343, 6501
  • New sample app “Hardware\KeyEvents” added.
  • Android builds default to a new Corona icon if none supplied during the build.
  • Added android icons to all sample apps.
  • Fixed media.playVideo() to support landscape, back button, and to back out when video ends. - cases 2374, 4523
  • Modified key events to not repeatedly call its event listener while a key is held down. - case 6891
  • Fixed bug where key event up/down phases were being set wrong. - case 6882
  • Fixed random crashes that can happen when backing out of the app or changing app orientation. - case 6735
  • Made several fixes to facebook API. - cases 6196, 6391
  • Facebook Connect fix. “dialog” event type was being sent instead of “request”. - cases 4432, 4469
  • Fixed crash caused by native.showWebPopup URL redirects (m.facebook.com). - case 6644
  • Android: Fixed media.playVideo() to play local files. Now supports relative paths. - cases 4524, 6087
  • Can now open files from Temporary, Documents, and Resource directories via system.openURL(). - case 5983
  • Remove unnecessary permissions (vibrate, write_external_storage, get_accounts). Note: Internet access permission is still in Android Manifest.
  • Fixed e-mail issues with system.openURL() via “mailto:”. - cases 6218, 6219, 6220
  • Fixed bug where calling system.openURL() with a telephone prefix “tel:” will crash if the device is not a phone. - case 6213
  • Fixed tap handling (particularly double taps) to match iOS. - case 4187
  • native.setKeyboardFocus now brings up the software keyboard. - case 5664
  • UTF8 app name disappears when installed on device. Added unicode application name support. - case 5699
  • Changed bitmap loading code so 2.3 devices behave the same way as 2.2 devices to reduce out of memory problems. - case 4225
  • Changed validation rules to ignore parts of the filename of ‘Res’ files after the first period. This will fix problems like not being able to package .3gp files. - case 4525
  • Changed Android PathForResourceFile to use case insensitive file extension comparisons to try to fix problems with all-caps .PNG extensions. - case 4454
  • Fixed crash on network.request and fixes issues with “POST” requests. - case 4459
  • Added a “Learn More” button to the trial warning message box. - case 4839
  • Fixed crash caused by media.playSound() with a file that does not exist - case 3923
  • Fixed issue where tap events were not called when Multitouch is active. - case 5390
  • Fixed display.save() and display.captureScreen() to work with all Android devices - case 618, 2307
  • Fixed webpop not being able to load from the local /documents and /temporary directories. - case 4980
  • Check for package names containg “._” characters. (489) - case 4849

Simulator Features and Fixes

  • Windows: Added iPhone, iPhone4, and iPad skins to simulator as well as display.setStatusBar() support. - case 4359
  • Windows: Added “mailto” support and opening files such as PDFs via system.openURL() function. - case 6156
  • Windows: Added audio tuner support. Now works with SimpleTuner sample app (does not work on Android devices). - case 2737
  • Windows: Added photo library support to display.captureScreen(true) function. Saves to “My Pictures\Corona Simulator” directory.
  • Windows: Improved Internet connection reliability with authorization, de-authorization, and builds (questionable internet check code removed).
  • Windows: Improved quality of audio recorder from 8-bit to 16-bit, like the Mac and iOS version. - case 5293
  • Windows: Simulator now supports Corona Lua API system.setIdleTimer() and system.getIdleTimer() functions. - case 3563
  • Windows: Now supports Internet Explorer’s proxy server settings for network communications. - case 5520
  • Windows: Renamed install program from “Corona Simulator Setup.msi” to “CoronaSDK.msi”.
  • Windows: Modified menu item “Open Project in Editor” to default to Notepad if a file association has not been set.
  • Windows: Changed console to support UTF-8 encoded strings printed via Lua. - case 4992
  • Windows: Modified simulator to not resume simulation after closing the Build window. - case 4757
  • Windows: Modified deauthorization to display a client/server clock synchronization error message. - case 5175
  • Windows: Fixed release version to not raise asserts from the Box2D physics engine. - cases 2952, 5999
  • Windows: Fixed bug where simulator logins and de-authorizations fail if clock is too far out of sync from current time. - case 5160
  • Windows: Fixed bug where audio recorder creates a corrupted file when recording in a format that the hardware does not support. Windows has problem with 44K sample rate. - case 5527
  • Windows: Fixed bug where the 2nd touch’s “began” event phase is not received when double clicking the screen fast - case 4928, 4929
  • Windows: Fixed “Open Project in Editor” menu item to display Notepad if default file association was set to the Corona Simulator - case 3293
  • Windows: Fixed Logon problems when machine SID is not available. Forces de-authorization if unable to match device ID with local machine.
  • Windows: Fixed bug where agreeing to the simulator’s license agreement exits the application if the Ansca server is not available or you don’t have Internet access. - case 4891
  • Windows: Fixed login window to not display a user name and password failure if unable to connect to the server or Internet. - case 4993
  • Windows: Fixed login window to not display a user name and password failure if unable to connect to the server or Internet. - case 4993
  • Windows: Fixed build window to not ask for a password if system clock is out of sync with server. - case 5182
  • Windows: Fixed bug where stopping the audio recorder freezes the simulator for half a second. - case 5294
  • Windows: Re-fixed tuner to accurately identify notes due to an endianness issue. - case 2737
  • Windows: Fixed simulator to support resuming the last paused sound via the Lua media.playSound() function. - case 4782
  • Windows: Fixed bug where async HTTP requests fail if the response header contains a “Connection: close”. - case 4774
  • Mac: Fixed bug where network.request() returns a corrupted response if it contains UTF-8 encoded characters. - case 4996

Known Issues

iOS:

  • Screen capture: display.save and display.capture APIs – not working in Landscape mode and with Dynamic Scaling.

Android:

  • MapView not supported
  • Tuner APIs not supported
  • Camera functionality not supported
  • native.setActivityIndicator() not supported
  • Credits (Virtual Currency) API not supported
  • Orientation events are not sent when auto rotation is not enabled (in build.settings file) - case 1341
  • Screen capture: display.save and display.capture APIs – not working in Landscape mode and with Dynamic Scaling.
  • Widgets were designed for iOS and may not scale/display on Android devices.

Window Simulator:

  • Custom fonts don’t work in Windows simulator - case 3947