Corona SDK Release Notes (Build 2013.1076)

This document describes the changes to the Corona SDK on Mac OS X and Windows, including the Simulator, and iOS and Android device builds since 2012.971. Refer to the API documentation for details.

What's New in This Release

  • All: Networking 2.0 featuring new capabilities like the ability to track download progress.
  • All: Runtime error reporting
  • All: Widgets 2.0
  • All: Enable OpenGL texture filter GL_NEAREST
  • Android: Google Push notifications
  • Android: Removed default permissions
  • Android: Everyone can now build for Kindle and Nook
  • Android: Fetch remote images from Picasa, Google+, Dropbox, etc
  • Android: Google Application Licensing support (LVL)
  • Android: Opentype font support
  • iOS: Updated Facebook API
  • iOS: Removed UDID. Note: inneractive has been temporarily removed due to UDID sunsetting on May 1.
  • iOS: Added iAds support
  • Simulator usability improvements on both Mac and Windows

Please Note

  • The Mac Simulator requires OSX 10.7 or later
  • The Windows Simulator requires Windows XP SP2 or later
  • For iOS builds (Mac), requires Xcode 4.5 or later and OSX 10.8 or later
  • For both Mac and Windows Simulator, Corona SDK requires Java 6 (Java 7 is not supported)

New Features and Bug Fixes

  • All: Add a new implementation of display.newEmbossedText()
  • All: Alpha now works with masked images
  • All: Fixed issue with storyboard scene events firing in an incorrect order. As reported here
  • All: Improved error message for media.save() (more precisely identify missing file)
  • All: Remove OpenFeint because it has been shut down
  • Android: Added custom data support to local/scheduled notifications
  • Android: Added JavaScript geolocation support to WebView and WebPopup. (Note that this still requires Android permissions ACCESS_FINE_LOCATION and/or ACCESS_COARSE_LOCATION)
  • Android: Added new build.settings option settings.android.largeHeap = true that allows apps to use more memory on Android 3.0 or higher devices. Works around out-of-memory errors when loading large images for high res displays
  • Android: Added new function system.request("suspendApplication") which hides/suspends the application and brings the user back to the home/menu screen. Also added function system.request("exitApplication") which exits the application gracefully on Android, which does the same thing as native.requestExit()
  • Android: Added (*.otf) OpenType font file support to display.newText(). (Only supported TrueType fonts before)
  • Android: Added push notification support via Google Cloud Messaging (GCM). (Requires the Google Play app to be installed. See sample app Notifications/GooglePushNotifications)
  • Android: Changed mapView:getAddress() location to use Google's API v3. v2 is in the process of being deprecated and required a key to use. Added a new API mapView:requestLocation(), which functions just like getAddress except this one is none blocking and thus takes a listener as an extra argument. Finally, mapView:nearestAddress() takes a listener as the third parameter instead of having to add a listener through the runtime
  • Android: Changed media.save() and display.capture() functions to save images to the My File/Pictures directory instead of the root My Files directory
  • Android: Fixed a crash that can sometimes occur when accessing a TextField or TextBox's text property while the end-user is editing the field
  • Android: Fixed bug where a landscape app's contents would sometimes become black or its contents misplaced when returning from the screen lock. (Only known to happen on a Samsung Galaxy W, but could happen on other devices as well)
  • Android: Fixed bug where a landscape orientation event would sometimes be raised on a portrait only app and vice-versa. (Only known to happen on a Samsung Galaxy SIII and Galaxy Tab when transitioning from another app having a different orientation)
  • Android: Fixed bug where a landscape-only app would sometimes display a black screen when returning from screen lock. (Happens rarely and only on particular devices)
  • Android: Fixed bug where an app supporting portrait and landscape orientations will not always change orientations on a Galaxy Nexus
  • Android: Fixed bug where displaying the Nook app store from a landscape only app will sometimes cause a 10-40 second delay
  • Android: Fixed bug where mail attachments would not get sent on a Nook Color
  • Android: Fixed bug where media.show(media.PhotoLibrary) would fail to load images from Picasa, Google+, SkyDrive, and other remote sources
  • Android: Fixed bug where quickly changing the orientation of an app that supports portrait and landscape orientations on startup can be displayed at the wrong orientation
  • Android: Fixed bug where Samsung Galaxy SII would display last rendered frame from a landscape app on the screen lock
  • Android: Fixed bug where screen would be shifted up when returning from screen lock on a Nook HD
  • Android: Fixed crash on app startup that only occurs on particular devices using GPU PowerVR SGX 540 such as LGs. (Does not crash on Kindle Fires or Nooks)
  • Android: Fixed crash with facebook.request() and facebook.showDialog() when passing boolean or numeric parameters. (Corona will now convert them to strings, which is what the Facebook Android SDK expects)
  • Android: Fixed display.statusBarHeight to return the correct pixel height for the Kindle Fire HD devices
  • Android: Fixed duplicate time-stamping issue with touch events and widget TableView scrolling problems
  • Android: Fixed in-app purchase to not return an error when calling store.finishTransaction() with the newest version of Google Play
  • Android: Fixed InMobi issue on Android 4.x where a black or white rectangle would briefly flash/flicker onscreen when displaying an ad
  • Android: Fixed media.save() to not export the given image file to PNG and instead copy the image file as-is to the gallery app. (This allows JPEGs to be transferred unaltered)
  • Android: Fixed silent crash that can only be seen in the log when quickly backing out of the app just before an alert dialog or activity indicator gets displayed
  • Android: Fixed store.finishTransaction() with Google Play. No longer causes past purchases to be received
  • Android: Fixed issue where Android does not post data without content header
  • Android: Improved error handling. Now displays specific Lua runtime errors onscreen and outputs Lua stack trace to Android log. Outputs Lua file name and line number for debug builds. Also displays Java exceptions invoked by Lua onscreen, such as missing permissions
  • Android: Modified push and local notifications to raise a notification event immediately if the Corona app is active and in the foreground. (This is to match iOS' behavior)
  • Android: Modified store transaction callback to provide information needed to verify Google Play in-app purchases via the event.transaction.receipt and event.transaction.signature properties
  • Android: Modified system.openURL() to return false if unable to open the given URL, which matches iOS' behavior
  • Android: Modified TextField and TextBox to preserve the cursor position(s) when changing their text in Lua
  • Android: Modified the volume controls for media.playVideo() to adjust the media volume instead of the ringer volume
  • Android: Modified volume controls to not flip back and forth between adjusting ringer and media volumes. Now when you load/play audio at least once, volume controls always adjust media volume. If you never play audio, then volume controls adjusts ringer volume
  • Android: Now automatically mutes audio output if the ringer is put into silent/vibrate mode. Required by the Samsung app store review process
  • Android: On the Amazon Kindle the attachments had the wrong content type which caused the attachments to show incorrectly
  • Android: Ported Google's newest OpenGL bug fixes to Corona, making the fixes available on older Android OS versions
  • Android: Removed permissions INTERNET, READ_PHONE_STATE, and ACCESS_NETWORK_STATE from all Android builds. You must now opt-in to these permission via the build.settings file
  • Android: Removed support for SuperRewards. (It crashes on Android 4.x and there hasn't been a library update in 1.5 years)
  • Android: Selecting an image from the media.PhotoLibrary on the Kindle HD Fire does not return anything
  • Android: Trying to record on a device without a microphone caused an error. Now the application does not record anything when it detects that it is on a device without a microphone
  • Android: Using the audio player inside the media.playVideo's listener now correctly plays the audio
  • Android: When cancelAlert is called on an alert the event.action was clicked instead of cancelled.
  • Android: When resuming a video from the recent apps screen, the video position is where it left off from.
  • Android: When the app is resumed after it is suspended, alignment bounces around. For example if the yAlign value is top in config.lua and then the user presses the home button and resumes the app the content's position would have been in the middle. The next time they did that the content's position would have been at the top again
  • Core: Add Mac and Android support functions necessary for the solution to native textfields won't transition off screen
  • Core: Added ability to fetch targeted app store via system.getInfo(targetAppStore). Returns the same result as the store.target property, but more convenient because you do not have to require in the store library
  • Core: Added native.canShowPopup(name) which is mostly useful for mail and sms
  • Core: Don't wake up the physics world when collision listeners are added
  • Core: Fix base64 encoding/decoding of long strings
  • Core: Fixed bug where display.save() would not save to the system.CachesDirectory. (Would save to system.DocumentsDirectory instead)
  • Core: Fixed bug where object returned by display.newEmbossedText() return nil for its text property
  • Core: Fixed inconsistent text placement issue between different platforms when calling display.newText() with an empty string. (Note that you need to use the same font on all platforms to see this improvement. Text may still be a few pixels off on different platforms, but still a huge improvement compared to before)
  • Core: Line objects were not blending when blend mode was set to something other than normal. The blend mode is now correctly applied to line objects.
  • Core: Removed OpenFeint from license agreements. (OpenFeint is no longer supported)
  • Core: Removed spurious debug message on screen rotation
  • Core: Take the RenderingStream size into account when getting the font size from Lua
  • Core: The antialias setting in the config.lua file is now ignored. Antialiasing is now always disabled due to lack of consistent support and graphics glitches between devices
  • Core: Update DisplayObjects that are about to go offscreen
  • Graphics: Add ability to specify GL_LINEAR and GL_NEAREST via display.setDefault( key, value ). Keys are magTextureFilter and minTextureFilter. Values are linear and nearest. Once you change the default, a display.new* call will use the new default. However, you cannot change the texture's filter, once the image has been loaded the first time. If you use the image in other display objects, it will use the filter default from the first time the image was loaded
  • iOS: Add twitter as a type for native.showPopup()
  • iOS: Allows saving display objects to PNG files with alpha support
  • iOS: Change made to media.newRecording to prevent recording with unsupported media encoding. AIF is the only supported encoding type on iOS
  • iOS: Facebook support for Scrumptious example. facebook.showDialog() now supports place and friends pickers. These correspond to FBPlacePickerViewController and FBFriendPickerViewController
  • iOS: Fix system.openURL() to not display UI if custom url is not supported. This allows you to open things like Google Maps, but also handle the case where it will silently return false if the Google Maps app is not installed
  • iOS: Fix to properly load hash fragments in UIWebView (Note: Hash fragments do not dispatch listener events)
  • iOS: Fixed bug where display.statusBarHeight was always returning 20 on iOS devices, the correct pixel height is now returned for retina displays
  • iOS: Fixed native.newTextField() vertical text alignment so it matches Android. Added support for decimal numeric keyboard type for native.newTextField()
  • iOS: Fixed native.newWebView() gray loading screen offset issue
  • iOS: Fixed custom field in iOS push notifications
  • iOS: Fixed bug where native.newWebView() was not correctly handling transitions, height change, and scaling
  • iOS: Fixed incorrect auto-capitalization of email and url input
  • iOS: Removes dot files and dot directories from app builds on iOS
  • iOS, Mac: Fixed crash with strings containing certain high-bit characters
  • iOS, Mac: Removed spurious warning if 0 was used with display.newText() to indicate a width or height should be calculated
  • iOS: Temporarily removed Inneractive support due to UDID sunsetting
  • iOS: Replaced mapView:getAddressLocation() by mapView:requestLocation()
  • iOS: Reworked Facebook implementation to work better with FBConnect SDK v3.1.1. Verified against sample code and
  • iOS: System.getInfo( "deviceID" ) will return a different value from previous builds because Apple is officially deprecating the old API
  • iOS: This change adds unixTime to the returned parameters for GameCenter score requests. It is an additional parameter which is useful over the existing string formatted date parameter since this returns an integer in unix epoch time
  • iOS: This change moves Flurry analytics into a plugin, which is now optional for Enterprise. This also fixes an issue with analytics.init() causing a crash on app suspension in very specific instances through an upgrade to Flurry analytics SDK 4.1.0
  • iOS: Update Facebook SDK to 3.1.1.
  • iOS: Updated build client to know about iOS6.1
  • iOS: Video orientation in Portrait mode will now work on iPad as well
  • iOS: Video orientation was not automatically changing to support landscape or portrait mode
  • iOS/Android/Mac: GameNetwork support added for Corona Cloud
  • iOS/Mac: Additional support added to save PNG with media.save() to the media gallery
  • iOS/Mac: Fixed the display orientation of images that include EXIF orientation information
  • iOS/Mac: Emit a console message when a URL request fails with a HTTP response >= 400
  • iOS/Mac: Fix crash when loading image from invalid data
  • iOS/Mac: Fixed behavior when attempting to load missing images
  • iOS/Mac Fixed issue on Mac Simulator where multiple status listeners can cause application fault
  • iOS/Mac: Obj:scale in time.performWithDelay or enterFrame event listener now functions correctly with reference points
  • Mac: Allows saving display objects to PNG files with alpha support
  • Mac: Ensured the listener always gets called for display.loadRemoteImage() even if the network request fails or the target URL is a 404
  • Mac: Performs scheduled to move textfield focus were crashing on reload
  • Mac: Fix media.show() creates display object if file parameter is passed
  • Mac: Fix to prevent issue when bringing up the Android build dialog
  • Mac: Fixed bug where display.statusBarHeight was always returning 20 on Simulator and the orientation of the app did not change the status bar width
  • Mac: Fixed crash on reshowing the Welcome window
  • Mac: Fixed warning on failure to load network resource so that it only appears in the Simulator
  • Mac: Various fixes around media.show() and media.save()
  • Mac: General improvements to the build dialog including more correct Simulator suspension and persistence for fields in the build dialog. Also adds Reopen last project preference
  • Mac: If a project crashes the Simulator don't automatically open it again
  • Mac: Improved shake animation and stopped the Simulator window leaving the screen
  • Mac: Make Android/iOS build dialogs consistent
  • Mac: Prevent long certificate names from wrapping in drop-down menu
  • Mac: Setting focus on native keyboard crashes Simulator
  • Mac/iOS: Fixed display.newText() so that it honors widths greater than 0 and now behaves the same on all platforms
  • Mac/iOS: Modified network.request() and network.download() when called within a coroutine to call their Lua listeners on the main Lua thread
  • Mac/Win: Fix New Project for App
  • Mac/Win: Fixed Android build to not print Iconnone.png warnings. (Note that these warnings were harmless)
  • Mac/Win: Fixed bug where the Corona Simulator would return model name WFJWI instead of KFJWI for the Kindle Fire HD 9
  • Mac/Win: Removes dot files and dot directories from app builds on iOS
  • Mac/Win: Updated the build.settings file for all sample projects to include Android permissions INTERNET, READ_PHONE_STATE, or ACCESS_NETWORK_STATE if needed. (In preparation to remove all default Android permissions)
  • Physics: Added the ability to change the collision reference point and the ability to average collision points
  • Win: Added iPad retina app icons to all sample projects
  • Win: Added sample project Networking\Scrumptious
  • Win: Added sample project Notifications\GooglePushNotifications
  • Win: Added sample project Store\Licensing to demonstrate Google Licensing support
  • Win: Fixed bug where a touch moved event can occur without a began phase when making a selection in modal dialog
  • Win: Fixed bug where subscription text in Preferences dialog would get truncated on 32-bit Windows
  • Win: Fixed bug where de-auth can cause exception
  • Win: Modified Online Documentation menu items to open the browser to http://docs.coronalabs.com/api instead of the Resources web page
  • Win: Moved sample project Networking\InAppPurchase to Store\InAppPurchase
  • Win: Removed OpenFeint sample projects
  • Win: Removed sample project Credits\SuperRewardsSample
  • Win: Removes Spriteloq from windows installation
  • Win: Updated all sample projects to support the new widget library
  • Win: Updated Graphics\X-ray sample project