mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-06-19 01:56:33 +08:00
[RM-683] fix where `rake background_fetch=1' did not work with Xcode 6.x
http://hipbyte.myjetbrains.com/youtrack/issue/RM-683
This commit is contained in:
2
NEWS
2
NEWS
@@ -2,6 +2,8 @@
|
||||
|
||||
* [iOS] Fixed a regression where wrong info.plist would be genrated wchich
|
||||
related to Background Fetch.
|
||||
* [iOS] Fixed a bug where `rake background_fetch=1' for background fetch would
|
||||
not work with Xcode 6.x.
|
||||
|
||||
= RubyMotion 3.0 =
|
||||
|
||||
|
||||
14
bin/sim.m
14
bin/sim.m
@@ -1221,6 +1221,9 @@ lldb_run_command()
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int pidNumber = ((int (*)(id, SEL))objc_msgSend)(session,
|
||||
@selector(simulatedApplicationPID));
|
||||
|
||||
// Open simulator to the foreground.
|
||||
if (!spec_mode) {
|
||||
NSArray *ary = [NSRunningApplication runningApplicationsWithBundleIdentifier:
|
||||
@@ -1234,12 +1237,19 @@ lldb_run_command()
|
||||
[running_app activateWithOptions:
|
||||
NSApplicationActivateIgnoringOtherApps];
|
||||
}
|
||||
else if (NSClassFromString(@"SimDevice")) {
|
||||
// With Xcode 6.x, it moves app into background and sends `fetch' event for `background fetch'.
|
||||
id messenger = ((id (*)(id, SEL))objc_msgSend)(session,
|
||||
@selector(messenger));
|
||||
((void (*)(id, SEL, int))objc_msgSend)(messenger,
|
||||
@selector(backgroundAllApps:), pidNumber);
|
||||
((void (*)(id, SEL, int))objc_msgSend)(messenger,
|
||||
@selector(doFetchEventForPID:), pidNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (debug_mode == DEBUG_GDB) {
|
||||
int pidNumber = ((int (*)(id, SEL))objc_msgSend)(session,
|
||||
@selector(simulatedApplicationPID));
|
||||
if (pidNumber == 0) {
|
||||
fprintf(stderr, "*** Cannot get simulated application PID\n");
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user