Answer: Applications that access the mPaaS use their own account systems. If you want to manage user mode data by using the unified storage component, notify the unified storage component first. The unified storage component switches the user database and then notifies other business layers.
[[APDataCenter defaultDataCenter] setCurrentUserId:userId];
When you log off, you do not need to call the
setCurrentUserId method. The unified storage component will continue to open the database used by the last user.
Answer: Yes. All the data storage interfaces of the unified storage component are thread-safe and can be called in all threads.
Description: When you integrate your application with a certain version of Baidu Map SDK, a crash may occur, as shown in the following figure.
Answer: Complete the following configurations when you initialize your application. Make sure that the version of the mPaaS is 10.1.32 or later.
// For example, add the following code in the application initialization method.
APDataCenter.compatibility = YES;
Answer: The following code snippets show how
archiveObject stores and reads variables:
- Store objects persistently:
MPCodingData *obj = [MPCodingData new];
obj.name = @"Amelia";:
obj.age = 1;
[APUserPreferences archiveObject:obj forKey:@"archObjKey" business:dataBusiness];
Read variables from the unified storage component:
MPCodingData *encodeObj = [APUserPreferences objectForKey:@"archObjKey" business:dataBusiness];