Hi There, My app is a legacy project built with Objective C. The host app shared data with the service extension by using
NSUserDefaults *userDefault = [[NSUserDefaults alloc] initWithSuiteName:@"group.com.myapp.project"];
and it worked until a customer recently reported a bug (iOS 18.6). After debugging, I found that data sharing from the host app to the service extension was not working correctly.
The host app updated a field's value, but the service still used the old or stale value, causing the issue.
HostApp saved info
2026-06-01 13:44:07.020 [INFO] (VMP)(ThreadID: 0x10a85c000): "Saved Vomo information {
"EXT_AP_IP" = 1c28af0f9d73;
"EXT_PING_DND" = 0;
"EXT_PING_USER_NAME" = aaa08AA541F8;
"EXT_SERIAL_ACK_TIME" = "2026-06-01 20:44:07 +0000";
"EXT_SERIAL_NO" = 689;
"EXT_SERVER_NAME" = "10.xxx.xxx.182";
"EXT_VOICE_LOGIN" = 1;
}"
Service extension read value:
2026-06-01 13:46:09.678 [INFO] (VMP) - (EXTENSION)(ThreadID: 0x1050a41d0): "start Vomo with Server: [10.xxx.xxx.79] and userName [aaa08AA541F8]"
I can see the value shared from host app is:
10.xxx.xxx.182, but service extension still took the stale value 10.xxx.xxx.79
First I thought it is synchronized issue, however, apple deprecated those API,
CFPreferencesAppSynchronize((__bridge CFStringRef)@"group.com.myexample.project");
How to ensure the shared value successfully delivered to service extension?
Thanks.