I am using background task to run the timer in the background to update the user's location. It's declared as:
UIBackgroundTaskIdentifier bgTask;
in the header file, and initialized as:
bgTask = UIBackgroundTaskInvalid;
But still, I am getting this message in the gdb:
Can't endBackgroundTask: no background task exists with identifier 23dc, or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug.
Why? And how can I solve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…