I’m encountering an issue while reading/writing shared preferences using UserDefaults with an App Group in my iOS Message Extension. The following error appears in the console:
`Couldn't read values in CFPrefsPlistSource<0x3034e7f80> (Domain: [MyAppGroup], User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd.
I have correctly enabled the App Group in both my containing app and the Message Extension, and I am using UserDefaults(suiteName:) to access shared preferences. However, I keep getting this error when trying to read/write values.
Has anyone encountered this before? How can I properly configure my app group preferences to avoid this issue? Any help would be greatly appreciated!
Messages
RSS for tagCreate app extensions that lets users send text, stickers, media files, and interactive messages using Messages.
Posts under Messages tag
87 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am encountering the following issue while working with app group preferences in my Safari web extension:
Couldn't read values in CFPrefsPlistSource<0x3034e7f80> (Domain: [MyAppGroup], User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd.
I am trying to read/write shared preferences using UserDefaults with an App Group but keep running into this error. Any guidance on how to resolve this would be greatly appreciated!
Has anyone encountered this before? How can I properly configure my app group preferences to avoid this issue?
Hi Apple Developer,
I’m working on a message-filtering application and reviewing Apple's documentation on message filtering. The documentation clearly states that MMS messages can be filtered. (https://developer.apple.com/documentation/identitylookup/sms-and-mms-message-filtering)
When we refer to MMS, it includes images, short videos, and other supported multimedia formats. However, the ILMessageFilterQueryRequest only provides the message body as a String, meaning we can access text and links but not images or other media files.
Could you please confirm whether Apple allows third-party applications to access multimedia content sent from unknown numbers?
Looking forward to your quick response.
Thanks,
Rijul Singhal
The rearrangemnet of the emoji menu is driving me crazy. I never use Memojis or the Apple animal emojis and now they're all squished together at the front of the emoji keyboard and it's difficult to select what I want, since the menu is so small.
I switch between language and emoji keyboards frequently and this is extremely frustrating.
Hi Apple Developers,
I am currently working on a message filtering application and facing issues specifically with filtering RCS (Rich Communication Services) messages. To debug this, I created a sample app that consistently categorizes all incoming messages as "junk." However, the filtering behaviour is inconsistent and not functioning as expected.
Here are the key issues observed during testing on iOS versions 18.2.1 and 18.3:
Inconsistent Filtering Behavior:
When a message is received from an unknown number, it sometimes gets moved to the Junk folder momentarily but is then immediately moved back to the main Messages inbox.
In some cases, the message does not get moved to the Junk folder at all, despite the app returning the verdict as "junk."
Duplicate Contact Tiles:
The Messages app displays two separate conversation tiles for the same mobile number, which is unexpected behavior.
For reference, my carrier partner is T-Mobile. Please let me know if you need any additional information to investigate this issue further.
Looking forward to your insights and guidance.
Best regards,
Rijul Singhal
Hi Apple Developers,
I am currently working on a message filtering application and facing issues specifically with filtering RCS (Rich Communication Services) messages. To debug this, I created a sample app that consistently categorizes all incoming messages as "junk." However, the filtering behaviour is inconsistent and not functioning as expected.
Here are the key issues observed during testing on iOS versions 18.2.1 and 18.3:
Inconsistent Filtering Behavior:
When a message is received from an unknown number, it sometimes gets moved to the Junk folder momentarily but is then immediately moved back to the main Messages inbox.
In some cases, the message does not get moved to the Junk folder at all, despite the app returning the verdict as "junk."
Duplicate Contact Tiles:
The Messages app displays two separate conversation tiles for the same mobile number, which is unexpected behavior.
I have attached both a sample app and a screen recording that clearly demonstrates the issue. The recording shows that the app categorizes messages as junk, yet they still end up in the main Messages inbox.
For reference, my carrier partner is T-Mobile. Please let me know if you need any additional information to investigate this issue further.
Looking forward to your insights and guidance.
Best regards,
Rijul Singhal
Hi there,
I use the Clipboard API to create formatted project links with a "copy link" button. This has been really versatile for end users. When they paste into their email, they get a hyperlinked project name that leads to the project, and when they paste into the URL bar, they just get the project URL.
It used to be that pasting into Messages on Mac would yield the same behavior as pasting into the URL bar. But recently, Messages started only pasting the inner text of the HTML clipboard, so no URL, just the project name, which isn’t very useful for a copy link function.
Is there any way to ensure that Messages pastes the URL while maintaining my formatting options on other surfaces?
In the documentation for a Message Filter Extension it states:
If you have servers that can help your app extension determine how to handle a message, you must add the Associated Domains capability to your Xcode project and specify those domains.
(https://developer.apple.com/documentation/sms_and_call_reporting/sms_and_mms_message_filtering/creating_a_message_filter_app_extension)
The words servers and domains are in the plural.
If it's possible to specify multiple servers/domains for a Message Filter Extension then how is that done? There's no documentation nor reference for that.
If multiple domains can be added to the info.plist then what is the iOS behavior in that case?
Can the extension supply/change which domain is used at run time?
I’m working on a solution to archive iMessages by using an API or similar mechanism. Here’s the desired workflow:
The user provides their phone number to initiate the archiving process.
They receive a text message with a URL link.
Clicking on the link authorizes the archiving of their iMessages.
Once authorized, their text messages are archived.
So far, I’ve researched third-party services and APIs but haven’t found any that offer this capability directly for iMessages.
Questions:
Are there any APIs or frameworks (Apple or third-party) that support accessing and archiving iMessages programmatically?
In my Catalyst app I use
func setupMailComposer() {
// Check if the device can send email
guard MFMailComposeViewController.canSendMail() else {
print("Mail services are not available")
showMailErrorAlert()
return
}
// Create and configure the mail composer
let mailComposeVC = MFMailComposeViewController()
mailComposeVC.mailComposeDelegate = self
// Set the email details
mailComposeVC.setToRecipients(["example@example.com"])
mailComposeVC.setSubject("Subject for your email")
mailComposeVC.setMessageBody("This is the body of the email.", isHTML: false)
// Attach a file (optional)
if let filePath = Bundle.main.path(forResource: "example", ofType: "pdf"),
let fileData = try? Data(contentsOf: URL(fileURLWithPath: filePath)) {
mailComposeVC.addAttachmentData(fileData, mimeType: "application/pdf", fileName: "example.pdf")
}
// Present the mail composer
self.present(mailComposeVC, animated: true, completion: nil)
}
Since I have updated to macOS 15.1 the canSendMail() function returns false although I have configured Apple Mail (like before in 15.0 where it worked flawlessly).
Issue:
Using Messages in macOS Sequoia, I stop receiving any messages after 7+ hrs of the system being on.
Troubleshooting:
any messages sent to the target account doesn't show up when this issue occurs.
I'm able to send messages from the target account which is received.
only way to get it working is to reboot the computer but those messages sent never arrive to the target account even after reboot.
upon reboot the behavior functions as expected.
however the issue returns after 7hrs+ after reboot.
logout and log back in when the system is in this state doesn't resolve the issue. only a reboot but the issues eventually returns.
note the 7hrs+ is tested and is more accurately 7-10 hrs.
We recently began getting reports that when posts are shared via Messages the rich preview will display an unrelated image from an altogether different post. The correct open graph image appears when sharing via every other platform we've tried (Slack, Whatsapp, Twitter/X) and the og:image tag refers to the appropriate image url.
The image Messages uses in the rich preview only appears in an unrelated metadata tag that includes data for multiple recent posts. Has anyone else encountered this?
I couldn’t create Apple ID account for the past 6 days
Hey Chat,
I'm researching personality analysis using LLMs, and I'm curious about whether Apple’s AI can be allowed access to your messages, Instagram DMs, and similar communications to perform a personality analysis based on your writing style. If anyone has insights on this, I would greatly appreciate your input. Thx a ton
I’ve not been able to save stickers ever since getting the iPhone 16. I can long click a picture and click “add sticker” but it only stays for a bout a second and disappears. Alternatively I can use the ”add sticker button” on the stickers widget and It will stay while the widget is open but does not remain ready for use.
Please help, this has been going on for at least 2 months.
Video Icloud Link: https://share.icloud.com/photos/004_0xVjBtdAPYzaHl9rH8Jcw
I am working on a sticker app and I am building a custom sticker app in SwiftUI. I have created a custom UIViewRepresentable to allow a MSStickerView to be displayed in SwiftUI. I have local *.gif files in my project and I am loading them into the MSStickerView successfully, however when they are loaded in my iMessage sticker extension the stickers are not animating by default. When I tap on the MSStickerView the gif begins to animate, I'm not sure what else I can do to get this working properly in my app. Some sample code below:
public struct CustomStickerView: UIViewRepresentable {
var sticker: CustomSticker
public init(sticker: CustomSticker) {
self.sticker = sticker
}
public func makeUIView(context: Context) -> MSStickerView {
let v = MSStickerView()
if sticker.fileType == .gif {
v.startAnimating()
}
return v
}
public func updateUIView(_ uiView: MSStickerView, context: Context) {
uiView.sticker = sticker.sticker
}
}
// CustomSticker
public var sticker: MSSticker? {
guard let imagePath = Bundle.main.path(forResource: name, ofType: ".\(fileType.rawValue)") else {
print("Failed to get sticker - \(name).\(fileType.rawValue)")
return nil
}
let path = URL(fileURLWithPath: imagePath)
return try? MSSticker(contentsOfFileURL: path, localizedDescription: name)
}
Stickerpack runs and builds successfully on iPhone 16 simulator, but on a real iPhone (14 connected trough a cable and with developer options enabled) it builds successfully, but when opening the pack in iMessage, there is nothing shown in the sticker browser and Xcode shows the following error:
Could not attach to pid : “662”
“com.[name].[name].StickerPackExtension” failed to launch or exited before the debugger could attach to it. Please verify that “com.[name].[name].StickerPackExtension” has a valid code signature that permits it to be launched on “iPhone([name])”. Refer to crash logs and system logs to for more diagnostic information.
MORE DETAILS:
Could not attach to pid : “662”
Domain: IDEDebugSessionErrorDomain
Code: 7
Failure Reason: “com.[name].[name].StickerPackExtension” failed to launch or exited before the debugger could attach to it. Please verify that “com.heart.owmStickers.StickerPackExtension” has a valid code signature that permits it to be launched on “iPhone([]name)”. Refer to crash logs and system logs to for more diagnostic information.
User Info: {
DVTErrorCreationDateKey = "2024-11-24 08:42:49 +0000";
DVTRadarComponentKey = 855031;
IDERunOperationFailingWorker = DBGLLDBLauncher;
RawUnderlyingErrorMessage = "no such process.";
}
--
Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
"device_identifier" = "00008110-0011514A227A401E";
"device_isCoreDevice" = 1;
"device_model" = "iPhone14,7";
"device_osBuild" = "18.1 (22B83)";
"device_platform" = "com.apple.platform.iphoneos";
"device_thinningType" = "iPhone14,7";
"dvt_coredevice_version" = "397.24";
"dvt_coresimulator_version" = "987.2";
"dvt_mobiledevice_version" = "1759.60.6";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 336;
"operation_errorCode" = 7;
"operation_errorDomain" = IDEDebugSessionErrorDomain;
"operation_errorWorker" = DBGLLDBLauncher;
"operation_name" = IDERunOperationWorkerGroup;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphoneos";
"param_diag_113575882_enable" = 0;
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 0;
"param_diag_allowLocationSimulation" = 0;
"param_diag_checker_tpc_enable" = 0;
"param_diag_gpu_frameCapture_enable" = 0;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 1;
"param_diag_guardMalloc_enable" = 0;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_mtc_enable" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 0;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_enable" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 1;
"param_install_style" = 2;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 99;
"param_launcher_substyle" = 0;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.app-extension.messages-sticker-pack";
"param_structuredConsoleMode" = 0;
"param_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphoneos18.1";
"sdk_osVersion" = "18.1";
"sdk_variant" = iphoneos;
}
--
System Information
macOS Version 15.2 (Build 24C5073e)
Xcode 16.1 (23503) (Build 16B40)
Timestamp: 2024-11-24T11:42:49+03:00
Im not a dev but trying to create something
trying to create an app that includes an iMessage extension AND a sticker pack. My first attempt I tried to create a iMessage app but apparently I cant include a sticker pack. Ive tried to create a shell app with a sticker pack and iMessage extension but it's just not working.
Can someone please let me know how I can do this. How can I get an iMessage extension app and a sticker pack installed at the same time from the same app.
Ive tried everything, tried creating a seperate iOS app with sticker pack and iMessage extension and nothing. A lot of times a get an error like "CompileAssetCatalogVariant failed with a nonzero exit code"" If I remove the sticker pack builds successfully.
thank you in advance
Hi,
I'm implementing InSendMessageIntent handling in our app. I can handle InSendMessageIntent through extension, but handling also includes business logic like authorisation status and some heavy operation which I can't expose from the main target.
I tried to handle it in-app, but func application(_ application: UIApplication, handlerFor intent: INIntent) -> Any? didn't trigger. At the first glance the configuration looks correct - the InSendMessageIntent is added under INIntentsSupported and UIApplicationSupportsMultipleScenes is set to YES in info.plist.
After that reply with message button disappeared from the incoming Voip callKit screen.
So I had a question - Is this intent possible to be handled in-app?
Anne has two phone numbers, work and personal. Beth saved both phone numbers for Anne under one contact profile. When Beth sends a text to Anne's work phone, it is received on Anne's personal phone instead.
We have verified only one phone number is set up under Messages settings, signed out of messages, restarted the phones.
Any other fixes or suggestions?