Post

Replies

Boosts

Views

Created

Apps rejected by App Store Connect if they contain Objective-C dictionaries defined with @{ @"key": @"value" } notation
I have been having trouble submitting my app to App Store Connect after building it with Xcode 13. I figured out that if a project contains this Objective-C code, App Store Connect will reject the app claiming it to use NSConstantDictionary as a private API: NSDictionary *myDictionary = @{@"a":@"b", @"c":@"d" }; NSLog(@"myDictionary: %@", myDictionary); I suspect the same issue exists for NSArray, at least when written with @[@"a", @"b"] notation. I filed FB9188387 regarding this. It seems like a pretty big problem. The FB includes a very simple sample project that gets rejected with the error above. The same project archived and submitted by Xcode 12.5 is accepted. The FB also contains a copy of this sample project with the two lines above commented out. That is accepted and processed by App Store Connect. John
0
0
1.2k
Jun ’21
Registering custom fonts from a framework in a widget extension
I want a widget to use the same custom fonts that the containing app uses. I do not want multiple copies of the font files in the app bundle. I put the font files into a framework shared by the app and the widget extension. I have code to register the fonts from the framework bundle using CTFontManagerRegisterGraphicsFont. That works from the app, but it does not work from the widget extension because it requires UIKit. (At least I think that's why it doesn't seem to work from my widget extension.) Widgets cannot run UIKit code. Is there a way to programmatically register the fonts in a widget? If not is there a way I can make a UIAppFonts Info.plist entry point to a framework?
6
1
6.4k
Jul ’20
Apply custom fonts and colors to context menus
I am looking for a way to apply custom fonts and colors to context menus. I was able to change UIAction text color with the appearance manager:[[[UILabel class] appearanceWhenContainedInInstancesOfClasses:@[NSClassFromString(@"_UIContextMenuActionView")]] setTextColor:[UIColor greenColor]];But doing the same with the font does not work for me:[[[UILabel class] appearanceWhenContainedInInstancesOfClasses:@[NSClassFromString(@"_UIContextMenuActionView")]] setFont:[UIFont systemFontOfSize:30]];Similarly I cannot find a way to apply custom colors to the separator lines between UIActions or inline UIMenus.Is there a way to do this?Thanks.John
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
2.8k
Sep ’19