Ignore spurious UIApplicationDidBecomeActiveNotification events.

Signed-off-by: Eloy Durán <eloy.de.enige@gmail.com>
This commit is contained in:
Jason W. May
2013-12-17 13:19:04 -08:00
committed by Eloy Durán
parent 2cd94ea84f
commit 2033869ea3

View File

@@ -1,15 +1,15 @@
# Copyright (c) 2012, HipByte SPRL and contributors
# All rights reserved.
#
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -229,7 +229,7 @@ module Motion; module Project;
def device_retina_xcode5_string(family, target, retina)
retina4_string = begin
if (target >= '7.0' && App.config.archs['iPhoneSimulator'].include?("x86_64"))
if (target >= '7.0' && App.config.archs['iPhoneSimulator'].include?("x86_64"))
" Retina (4-inch 64-bit)"
else
" Retina (4-inch)"
@@ -251,7 +251,7 @@ module Motion; module Project;
end
end
end
def device_family_ints
ary = @device_family.is_a?(Array) ? @device_family : [@device_family]
ary.map { |family| device_family_int(family) }
@@ -451,13 +451,15 @@ EOS
SpecLauncher *launcher = [[self alloc] init];
[[NSNotificationCenter defaultCenter] addObserver:launcher selector:@selector(appLaunched:) name:UIApplicationDidBecomeActiveNotification object:nil];
return launcher;
return launcher;
}
- (void)appLaunched:(id)notification
{
// Give a bit of time for the simulator to attach...
[self performSelector:@selector(runSpecs) withObject:nil afterDelay:0.3];
// unregister observer to avoid duplicate invocation
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidBecomeActiveNotification object:nil];
}
- (void)runSpecs