I’m trying to create a sticker pack app for iMessage using Xcode 15.3 and nothing seems to be working.
-
The attribute editor does not show up when selecting sticker assets. This makes it impossible to edit the accessibility text on the stickers. This apple dev forum post describes the same issue.
-
Trying to run the app on my physical devices gives me a variety of errors depending on the device I’m using
a. On my iPad I get this error:
Failed to log access with error: access=, error=Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.privacyaccountingd" UserInfo={NSDebugDescription=connection to service named com.apple.privacyaccountingd}
b. On my iPhone I get this error:
Couldn’t read values in CFPrefsPlistSource<0x30079c120> (Domain: com.apple.country.carrier_1, User: kCFPreferencesCurrentUser, ByHost: No, Container: /var/mobile/Library/CountryBundles/, Contents Need Refresh: No): accessing preferences outside an application’s container requires user-preference-read or file-read-data sandbox access
-
Trying to run the app in the device simulator doesn’t work either. The simulator will crash, or the app just won’t load.
I tried creating a sticker pack app in Xcode 14.2 on my older laptop and it doesn’t have these issues. Unfortunately, I can’t run a build on my devices running iOS 17, and the simulator still crashes. I’ve tried trouble shooting the other errors, but I’m not entirely sure what they are alluding to. Some solutions have recommended custom entitlements or info.plists, but I haven’t had any success. It’s kind of funny that a no code application template is having so many problems.
2
Answers
I’m also having problems testing iMessage sticker packs with Xcode 15.3, so you’re not alone. This answer suggested that running on an older simulator would work, but that didn’t work for me. Using 15.3, I still couldn’t get sticker packs to work either in the simulator (iOS 16 / 17) or on device (iOS 15/16/17).
What did work was using Xcode 15.2. It’s not listed on the downloads page, but you can still download it directly from Apple here after you login to your developer account.
It’s still a bit finicky (after hitting run in Xcode, I still sometimes need to switch away from the sticker pack to a different one and then back), but they do eventually run in both the simulator (tested with iOS 17.2) and on device (tested with iOS 15.7.3).
Hopefully this is fixed in Xcode 15.4.
I can help with the accessibility tags:
The accessibility tags can be manually added to individual stickers by editing the JSON file that is in the same folder as the sticker.
Location: "YourStickerSet StickerPackExtension" > Stickers.xcstickers > Sticker pack.stickerpack > STICKERNAME.sticker > contents.json
(YourStickerSet = whatever your app extension is named.)
(STICKERNAME = the individual sticker’s name within your sticker set.)
Open the JSON file in any text editor and within the "properties" section of the "contents.json" file:
Add the line:
"accessibility-label" : "your accessibility tag goes here",
eg:
screenshot of contents-JSON
Text ver:
"properties" : {
"accessibility-label" : "Green Bunny Ears",
"filename" : "Bunny_Ears-Green.png"
}
(My own current problem is that on 15.3, the sticker apps are not currently showing on the simulators, nor are they updating the existing sets on my phone…) I am attempting to add some new stickers to an existing set.