Commit 08f11b5f authored by DanmeiChen's avatar DanmeiChen
Browse files

fix crash when enter background

parent dd587b0b
......@@ -40,6 +40,7 @@
@interface IosAppDelegate : IosObject
- (id)initWithCore:(std::shared_ptr<LinphonePrivate::Core>)core;
- (void)configure:(std::shared_ptr<LinphonePrivate::Core>)core;
@end
......
......@@ -342,6 +342,7 @@ void CorePrivate::notifyEnteringBackground () {
if (isInBackground)
return;
ms_message("Core [%p] notify enter background", q);
isInBackground = true;
auto listenersCopy = listeners; // Allow removal of a listener in its own call
for (const auto &listener : listenersCopy)
......
......@@ -142,6 +142,9 @@ void IosPlatformHelpers::start (std::shared_ptr<LinphonePrivate::Core> core) {
mNetworkReachable = 0; // wait until monitor to give a status;
mSharedCoreHelpers = createIosSharedCoreHelpers(core);
mHandler = [[IosHandler alloc] initWithCore:core];
if (mUseAppDelgate) {
[mAppDelegate configure:core];
}
string cpimPath = getResourceDirPath(Framework, "cpim_grammar");
if (!cpimPath.empty())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment