Corona SDK Release Notes (Build 2012.971)

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.894.

What’s New in This Release

  • New skins: iPhone 5, KindleFireHD 7“ and 9”, Galaxy S3.
  • Updated widgets with new widgets: on/off switch (including checkbox style), spinner, progress bar, and segmented control
  • Support for iPhone5
  • Support for iPad Mini
  • Support for Nook HD/HD+ devices
  • Support for Kindle Fire HD devices
  • Added native.newMapView() support to Android
  • Added Local Notifications to Android
  • Added LPEG support to Lua
  • Support for xhdpi icons on Android
  • Improved JSON performance (using LPEG)
  • Faster iOS build times for developer device builds
  • Preserve Lua debug info on developer device builds
  • iOS now supports iOS 6 SDK

Please note the following

  • The Mac Simulator requires OSX 10.7 and later
  • For iOS builds (Mac), requires Xcode 4.5 or later and OSX 10.8 or later
  • For both Mac and Window Simulator, requires Java 6 (Android only supports Java 6)

Known Issues

  • iOS builds: If the project folder contains a space in the name (or a parent folder contains a space), an exception error will occur in the terminal: “[IMKInputSession activate] exception caught. NSInvalidSendPortException : [NSMachPort sendBeforeDate:] destination port invalid.” The solution is to remove/change any spaces in the folder name.
  • Android/Kindle/Nook builds: A harmless warning message will be displayed in the terminal: “[copy] Warning: Could not find file /appfolder/appname/Iconnone.png to copy.”

New Features and Bug fixes

  • Android: Added “Icon-xhdpi.png” 96x96 application icon support. casenum: 9982
  • Android: Added local/scheduled notification support. (Does not support app badge numbers. Does not support custom data yet.)
  • Android: Added native.newMapView() support. (Supported on all Android devices, including Kindle Fire and Nook.)
  • Android: Added Nook HD/HD+ support.
  • Android: Added support for launch arguments and the “applicationOpen” system event. Allows for facebook deep linking support.
  • Android: Added support for orientation combinations {“landscapeRight”,“landscapeLeft”} and {“portrait”,“portraitUpsideDown”} apps on Android 2.3 or higher. (Note that Android 2.2 does not support this.)
  • Android: Added xhdpi camera view icons.
  • Android: Changed MapView’s “loading” background color from white to grey. Make the activity indicator easier to see. Especially on the Nook HD.
  • Android: Fixed bug where a TextBox listener will stop receiving events when you press the Enter key. (Only known to happen on a Nook Color and Galaxy Tab. Most other devices work correctly) casenum: 18319
  • Android: Fixed bug where a white rectangle would be displayed on the right side of a MapView on Android 4.0.x devices. (Does not occur on Android 3.x or older devices. Does not occur on Android 4.1 devices.)
  • Android: Fixed bug where an invalid “build.settings” file will cause the build process to generate an invalid “AndroidManifest.xml” file in the returned APK. This is the likely cause of the missing MAIN activity error reported by the Nook app store review process. Servers will now return a build failure instead. (Note that this fix will not be published to our build servers until October 10th.)
  • Android: Fixed bug where build will fail if application name contains characters &, <, >, :, /, \, ", or ’
  • Android: Fixed bug where MapView does not disable the GPS when the app is suspended. casenum: 17225
  • Android: Fixed bug where MapView does not redraw itself when the user interacts with it on a Nook HD.
  • Android: Fixed bug where native display objects (ie: TextField, TextBox, WebView, etc.) have a “Top-Left” reference point by default instead of “Center” like on iOS.
  • Android: Fixed bug where native.setActivityIndicator() would black out the entire screen on Nook HD.
  • Android: Fixed bug where native.showPopup(“mail”) fails to attach files on Nook Tablet. (Note that Nook Color’s mail app does not support attachments.) casenum: 17261
  • Android: Fixed bug where native.showPopup(“rateApp”) and native.showPopup(“appStore”) would cause a crash on a Nook HD.
  • Android: Fixed bug where network request/download will cause a crash if the received response has an empty body, which is always the case for status code 204. casenum: 17998
  • Android: Fixed bug where network request/download yields “event.isError” set to true if received an HTTP status code less than 300. Changed it so that “isError” is only set true when a connection error or response timeout occurs, like how it is handled on all other platforms.
  • Android: Fixed bug where powering the screen off/on twice will display a black screen on Android 4.0 devices. (Bug does not occur on Android 2.x, 3.x, or 4.1). casenum: 16886, 17385
  • Android: Fixed bug where removed WebViews and WebPopups were not completely deleted from memory.
  • Android: Fixed bug where setTextColor() does not work for native TextField or TextBox since build #860.
  • Android: Fixed bug where the screen would sometimes turn black after loading a MapView on an Android 4.0 or newer device.
  • Android: Fixed bug where WebPopups and WebViews do not display JavaScript alert, confirm, or prompt dialogs. casenum: 17611
  • Android: Fixed crash that sometimes happens when returning from the screen lock or when backing out of the app.
  • Android: Fixed crash with WebView and WebPopup that only occurs if CheckJNI is enabled on the device
  • Android: Fixed native TextBox to vertically top align its text instead of vertically centering it. (Note that native TextFields are still centered vertically, which is by design.) casenum: 17327
  • Android: Fixed notification “event.applicationState” to return the same value that iOS does when the application is suspended/exited
  • Android: Fixed subtle bug due to Ogg Tremor vs. Ogg Vorbis using different units in SoundDecoder. Should fix out of memory issues with audio.loadSound on long, but still reasonably sized .ogg files on Android devices that were previously failing.
  • Android: Fixes casenum: 15651, 17609, 18342. Fixes missing “ended” event on touch when multitouch is OFF.
  • Android: Modified mapView:getUserLocation() to return a location table with the “errorCode” property set (ie: non-nil) if current location is unknown.
  • Android: Modified network request/download to automatically convert header values to string if they are numbers, such as for the “Content-Length” header. Prevents network request failure. casenum: 15411
  • Android: Optimized media.show() so that saving photos to file is now done asynchronously. No longer has a long blocking delay when returning to the Corona app. casenum: 13782
  • Android: Tweaked OpenSL ES mixing backend to try to reduce latency to be on-par with the prior Audiotrack backend. There is a delicate balancing act between reducing latency and maximizing mixing throughput/quality. By reducing the latency, we expose more performance risk to cracking/breakup/skipping when playing multiple channels simulataneously. Please test your programs for both latency and performance when playing lots of simulataneous sounds and let us know your results compared against the prior builds.
  • Android: Updated native.showAlert() to use the “Holo Dark” theme on Android 3.x and higher devices.
  • Android: Updated OpenAL Soft branch to include our OpenSL ES fixes for better audio performance on Android 4.1 (without breaking latency on 4.0 and earlier) and correctly handling audioPlayFrequency (ALC_FREQUENCY) so it doesn’t play back too fast.
  • Android: Upgraded OpenAL Soft backend to use Apportable’s branch. This introduces an optional OpenSL ES based backend which will fix audio on some 2.3+ devices such as Vizio.
  • Android: Upgraded SQLite from version 3.5.9 to 3.7.14.1. Fixes compatibility issues with iOS version. casenum: 18127
  • Android/iOS: Added ability to display the app store details of other apps via native.showPopup(“appStore”). (See the daily build docs for more details.)
  • Android/iOS: Added ability to display the app store’s “Write Review” window via the native.showPopup(“rateApp”) function. Supports the iTunes App Store (iOS6 and below), Google Play, Amazon App Store, Samsung App Store, and (drum-roll) Nook App Store.
  • Core: Added LPeg support to Corona.
  • Core: Updated dkjson module to current tip f0800304dd4d6463 to fix casenum:12719,14384. Note: The json module automatically uses LPeg when available to accelerate decoding which can result in 2x–3x speed ups.
  • Core: Adds display.actualContentWidth and display.actualContentHeight which is the width/height of the screen in Corona units. NOTE: we are evaluating whether behavior around kNone, e.g. if the units should be in pixels or in system units (e.g. Apple’s points)
  • Core: Adds display.pixelWidth and display.pixelHeight. On iOS, you can use this to detect that you are operating on an iPhone5.
  • Core: Fixes casenum: 14984: incorrect hit testing location when isHitTestMasked is active. Fix address situation when mask is on a group (e.g. scrollview) as well as when mask is on an object inside a group.
  • Core: Fixes casenum: 17615. Touch events were not registering properly on image objects that were using a trimmed frame from an imagesheet. The offsets are now accounted for; touch events go to the smaller frame bounds (not the original bounds).
  • Core: Fixes casenum: 18341. Crash on nil keys to core libraries
  • Core: LPeg: Bug fix from Roberto Ierusalimschy to fix eqlpeggsub(“%p”, “%p”) failure on Android.
  • iOS: Enhanced the iOS 6 CoronaUseIOS6LandscapeOnlyWorkaround to respect apps that specify only “landscapeRight” or “landscapeLeft” as ‘supported’ orientations in build.settings.
  • iOS: Fix for iOS 6 behavior change with the media movie player where video would terminate if play was called while playing and touch events were still being sent to the main view controller. casenum:18727.
  • iOS: Fixed bug where calling system.cancelNotification(id) with an argument will cause a crash. casenum: 16076
  • iOS: Fixed bug where the MapView’s “isLocationVisible” property was not returning the correct result. It was returning true if the map had permission to display the current location instead of whether or not the current location was visible in the map view, as specified in our API documentation.
  • iOS: fixes casenum: 17123. If you call native.newWebViews(x,y,w,h) where x,y are not zero, then it would appear as if the webview were positioned at 2x,2y. This would cause touches to be clipped. This fixes both the positioning and touch clipping issues.
  • iOS: Fixes for broken orientation changes on iOS 6. casenum 17420.
  • iOS: GameCenter login: iOS 6 deprecated the old login method. This change causes devices running on iOS 6 to call the new method. Consequently, there is a new behavior change/introduction with gameNetwork.init’s callback function. When running under iOS 6, if the Game Center sign-in screen needs to be shown, you will get a callback with event.type == “showSignIn”. This gives you an opportunity to do things like pause your game before the sign-in screen takes over the screen. event.data will have the authentication status boolean (which should be false at this stage) to avoid breaking existing code. After the user dismisses the sign-in screen, the initCallback will fire again and behave like it did in pre-iOS 6 so you can check the result of the sign-in. Note: Users trying to work-around the iOS 6 landscape-only orientation bug on iPhone/iPod touch but are having problems with native display objects auto-rotation, this is an opportunity to minimize the problem by removing or hiding the display objects before the Game Center view comes up and then restoring them after it is dismissed.
  • iOS: Made MapView properties “isZoomEnabled” and “isScrollEnabled” settable. Allows you to prevent the user from panning and zooming the map.
  • iOS: New workaround for iOS 6 iPad Photo Picker landscape-only crashing bug. This workaround is similar to the iPhone landscape-only workaround in yesterday’s daily build. If you are affected by this bug, to activate the workaround, you must opt-in to it by putting in your build.settings in the plist section: CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround=true, You should also remove the previous workaround we blogged about and do not set the ‘content’ key, nor set any portrait settings in ‘supported’. This workaround is specially crafted to run only on iPad running iOS 6.0.x. The key will be ignored on any other device or OS version. You may define both this key and yesterday’s key to activate both workarounds. Example minimal build.settings: settings = { orientation = { default = “landscapeRight”, supported = { “landscapeRight”,“landscapeLeft”,},}, iphone = { plist= { CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true, }, } }
  • iOS: New workaround for iOS 6 iPhone/iPod touch landscape-only crashing bug (e.g. Game Center). If you are affected by this bug, you must opt-into this behavior by putting in your build.settings in the plist section: CoronaUseIOS6LandscapeOnlyWorkaround=true, You should also remove the previous workaround we blogged about and do not set the ‘content’ key, nor set any portrait settings in ‘supported’. This workaround is specially crafted to run only on iPhone/iPod touch running iOS 6.0.x. The key will be ignored on any other device or OS version. Example minimal build.settings: settings = { orientation = { default = “landscapeRight”, supported = { “landscapeRight”,“landscapeLeft”,},}, iphone = { plist= { CoronaUseIOS6LandscapeOnlyWorkaround = true, }, } }
  • iOS: On large projects with lots of PNGs, dramatically increase build times for “iPhone Developer” profiles by skipping XCode’s pngcrush step. Straight copy instead. On distribution builds (Ad Hoc or Store), we will continue to do pngcrush, as before.
  • iOS: WebView: Add “loaded” as a value for event.type in urlRequest events. This is dispatched when a page is done loading in a webview.
  • iOS: when an app is launched via url, “applicationOpen” system events now open on initial launch and on a resume.
  • iOS/Mac: Changed the internal error message generating system (aka logging system) to use NSLog because Xcode 4.5 and iOS 6 are now suppressing all print messages except those generated from NSLog.
  • iOS/Mac: Fixes casenum: 17649, 17770. Workaround bug introduced by iOS6/Mac 10.8 where dealloc was getting called on a separate thread.
  • iOS6: Make UIWindow always adapt to fullscreen size. Touches were not going through at the bottom on iPhone5
  • iOS6: Temporarily remove armv7s as architecture because 3rd party libraries do not build for that architecture
  • Mac Simulator: Minor bug fix for a few menu items for some skin options.
  • Mac Simulator/iOS: All iOS builds are now built against the iOS 6 SDK now that it is official.
  • Mac: Changed behavior of native.newTextField event listener phases to be a closer match to iOS phases.
  • Mac: Fix skin selection issue in open dialog on a fresh install
  • Mac: New skins: iPhone5, KindleFireHD 7“ and 9”, Galaxy S3. Also, improved sharpness for GalaxyTab, iPadRetina, iPhone, iPhone4, KindleFire, NookColor when viewing at 50%.
  • Mac/iOS/Android/Core: Replace Lua print implementation to deal with the iOS 6/Xcode 4.5 behavior where print statements no longer appear in the console.
  • Mac/Windows: Fixed bug in Corona Simulator where system.getInfo(“mode”) would return “Nook Color” instead of “BNRV200” like the actual device.
  • Mac/Windows: Updated model names in the Corona Simulator of Galaxy SIII and Kindle Fire HD to match the actual devices.
  • Sprites: Fixes casenum: 17866. Sprite trimming regression introduced in build 926.
  • Storyboard: Fixes “flicker” between scene transitions. RE: http://developer.coronalabs.com/forum/2012/09/27/storyboard-slide-effect-has-flicker-between-scenes#comment–126796
  • Storyboard/Widget: Casenum: 15040, 17590, 15384, 15264, 15781, 15257, 16540, 14794, 16094, 15293, 17029, 16605
  • Widget: Add on/off switch (including checkbox style), spinner, progress bar, and segmented control
  • Widget: Fixes bug where setting a middle segment to be the default segment would throw an error.
  • Widget: Fixes bug where setting a middle segment to be the default segment would throw an error.
  • Widget: Fixes casenum: 16983 - Scroll view bug when scrolling fast and when just scrolling (Android). Fixes casenums 17923, 17903 - Picker Wheel Widget is Broken, widget.newPickerWheel opening 2 spots down. Fixes casenum: 18128 - TableView widget scrollToY throws an error.
  • Widget: Fixes casenums: 18538, 18537, 18503. (2) Fixes issues where widgets would be created with a center reference point when setting left/top values instead of a top left reference point. (3) Fixes issues where moving widgets to a different position than initial creation position could result in calculations reporting incorrectly.
  • Widget: Fixes casenums: 18538, 18537, 18503. (2) Fixes issues where widgets would be created with a center reference point when setting left/top values instead of a top left reference point. (3) Fixes issues where moving widgets to a different position than initial creation position could result in calculations reporting incorrectly.
  • Windows: Added new device skins iPhone 5, Galaxy SIII, Kindle Fire HD 7“, and Kindle Fire HD 9”.
  • Windows: Added sample projects “Interface\MapView” and “Notifications\LocalNotifications”.
  • Windows: Added xhdpi Android icons to all sample projects.
  • Windows: Updated 3rd party tool “Kwik” to version 2 in the Tools directory.
  • Windows: Updated sample project “Interface\WidgetDemo” to demonstrate new “switch” feature.
  • Windows: Updated SQLite from version 3.6.12 to 3.7.14.1.