Defold 1.2.126 has been released

Defold 1.2.126

This sprint we’ve added a new SDK function for iOS, which enables users to hook into the life cycle functions of an UIApplicationDelegate.
We’ve also renamed some internal functions, in order to avoid future clashes when building extensions using libcrypto.

We have also added a side-by-side editing mode in the editor.

Engine

  • DEF-3137 - Added: Added dmExtension::RegisteriOSUIApplicationDelegate() to Native Extension SDK
  • DEF-3024 - Fixed: Renamed (internal) AxTls symbols with a namespace to avoid libcrypto/libssl clashes
  • DEF-3146 - Fixed: Fix win32 accumulating error in dt when “variable_dt” checked in game.project
  • DEF-3161 - Fixed: Set content length explicitly to zero for 204 (no content) responses
  • DEF-3237 - Fixed: Improved error handling for extension errors on Win32
  • DEF-3216 - Fixed: factory.create() now allows nil for the properties argument
  • DEF-3218 - Fixed: Fixed rare assert when adding and deleting many objects during the same frame
  • DEF-3238 - Fixed: Reenabled logging when using lldb

Editor

In this release we’ve added the ability to edit two resources side-by-side. Simply right-click on an editor tab and choose Move to Other Tab Pane from the context menu to move the selected tab to a new pane beside the existing tab pane. You can now move tabs between the two tab panes using the same command.

To return to a single all-encompassing tab pane, simply select Join Tab Panes from the same context menu. There is also a Swap With Other Tab Pane command if you prefer to switch the left-right order of the two visible tabs.

  • DEFEDIT-1312 - Added: Side-by-side editing
  • DEFEDIT-1345 - Fixed: Defold 1.2.124 not launching on macOS High Sierra 10.13.4
  • DEFEDIT-1348 - Fixed: Add exception printing & logging during application startup
  • DEFEDIT-1349 - Fixed: Add util directory to reflection check build step
  • DEFEDIT-1350 - Fixed: The debugger is no longer working
  • DEFEDIT-1351 - Fixed: Shift+Enter from the Find field should Find Previous in code editor and console
  • DEFEDIT-1352 - Fixed: Undo after auto-complete no longer removes the whole line
  • DEFEDIT-1353 - Fixed: Text selection almost invisible when searching
  • DEFEDIT-1355 - Fixed: Error when syncing new project from editor
  • DEFEDIT-1356 - Fixed: Error when changed a value (scale) on a template node and then tried to reset it
  • DEFEDIT-1357 - Fixed: AssertionError when trying to attach to a running engine while building
  • DEFEDIT-1358 - Fixed: Breakpoints no longer get copied when you make new lines on a line with a breakpoint
  • DEFEDIT-1359 - Fixed: You can now mouse click to select autocomplete result
  • DEFEDIT-1360 - Fixed: Correctly syntax-highlight numbers inside all-caps Lua constants
  • DEFEDIT-1361 - Fixed: Lua keywords inside strings will no longer trigger indentation changes

Work in progress

We are currently working on a new Lua module name timer, which will add in engine support for timed callbacks.

We are continuing work on the live update feature to add more useful features, coming soon.

Also, we’re adding a resource and game object profiler to the engine, for easier debugging of the memory consumption on lower end devices.

21 Likes

I immediately noticed that I forgot to add the documentation for the new functions. So here is the sneak peek of the documentation for these functions:

void dmExtension::RegisteriOSUIApplicationDelegate(void* delegate);

void dmExtension::UnregisteriOSUIApplicationDelegate(void* delegate);

And, how to use them:


// myextension_ios.mm

id<UIApplicationDelegate> g_MyApplicationDelegate;

@interface MyApplicationDelegate : NSObject <UIApplicationDelegate>

- (void) applicationDidBecomeActive:(UIApplication *) application;

@end

@implementation MyApplicationDelegate

- (void) applicationDidBecomeActive:(UIApplication *) application {
 dmLogWarning("applicationDidBecomeActive - MyAppDelegate");
}

@end

// Invoked from myextension.cpp in ExtensionAppInitialize
void ExtensionAppInitializeiOS(dmExtension::AppParams* params)
{
 g_MyApplicationDelegate = [[MyApplicationDelegate alloc] init];
 dmExtension::RegisteriOSUIApplicationDelegate(g_MyApplicationDelegate);
}

// Invoked from myextension.cpp in ExtensionAppFinalize
void ExtensionAppFinalizeiOS(dmExtension::AppParams* params)
{
    dmExtension::UnregisteriOSUIApplicationDelegate(g_MyApplicationDelegate);
    [g_MyApplicationDelegate release];
    g_MyApplicationDelegate = 0;
}
6 Likes

Just a double check, is DEF-3146 the speedy Windows thingie? As in my windows version of the game goes really fast and on mobile it’s slower but more correct? :slight_smile:

5 Likes

Yes

5 Likes

Good stuff!

4 Likes

This will be really helpful! Thanks!

5 Likes

Great update!

2 Likes

The following manuals have now been added/updated:

12 Likes

Cool! I see the Lua modules manual clearing up a lot of newcomer confusion. I’ve seen newcomers to Defold ping pong-ing state changes across scripts with messages before learning that you can use modules to share state.

6 Likes

Hi, for my vkontakte extension. I need this openURL call

-(BOOL)application:(UIApplication *)application
            	openURL:(NSURL *)url
            	sourceApplication:(NSString *)sourceApplication
            	annotation:(id)annotation;

but it never works.
applicationDidBecomeActive works fine

my manifests/ios/Info.plist file contains schemas:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
	<dict>
		<key>CFBundleURLSchemes</key>
		<array>
			<string>vk000000</string>
		</array>
	</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
	<string>vk</string>
	<string>vk-share</string>
	<string>vkauthorize</string>
</array>
</dict>
</plist>

delegate:

id<UIApplicationDelegate> vkAppDelegate;

@interface VkAppDelegate : NSObject <UIApplicationDelegate>

- (void) applicationDidBecomeActive:(UIApplication *) application;

- (BOOL)application:(UIApplication *)application
            	openURL:(NSURL *)url
            	sourceApplication:(NSString *)sourceApplication
            	annotation:(id)annotation;

- (BOOL)application:(UIApplication *)application
       				didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
@end

@implementation VkAppDelegate

- (void) applicationDidBecomeActive:(UIApplication *) application {
NSLog(@"vk_sdk_ext Log: %@", @"applicationDidBecomeActive");
}

- (BOOL)application:(UIApplication *)application
								 openURL:(NSURL *)url
								 sourceApplication:(NSString *)sourceApplication
								 annotation:(id)annotation {
NSLog(@"vk_sdk_ext Log: %@", @"openURL");
[VKSdk processOpenURL:url fromApplication:sourceApplication];
return YES;
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary 
*)launchOptions {
NSLog(@"vk_sdk_ext Log: %@", @"didFinishLaunchingWithOptions");
return YES;
}
@end

I can’t understand why, please help

solved.
there was a problem in delegate registration
need to do as in the example:

3 Likes

What are the improvements by the way?. The thing is the last version was not so good for me. It sometimes crashed suddenly and I lost every work that I was doing for more than 4 hours. Crashing at an unexpected time makes it very hard to use defold. I hope this version brings some stable output.

What do we need debugging for in defold?. I think the app is getting much bigger and for that I guess the new version will get slower than before. I have not used it yet. Did you?, should I upgrade to the new version or stay put here?.

Are you using Defold 1.2.126?! This version is extremely old and we can’t possibly guarantee any kind of support. I can’t think of any reason for you to not upgrade.

1 Like