xFonts 2.0 - #1
Conversation
…d with (unused) disclosure indicator.
…ain view controller to a table view controller. UI cleanup.
…et bugs (love them).
| self.statusLabel.text = [NSString stringWithFormat:@"%ld font%s added, %ld need%s install", addedCount, (addedCount == 1 ? "" : "s"), installCount, (installCount == 1 ? "s" : "")]; | ||
| } | ||
| else { | ||
| self.statusLabel.text = [NSString stringWithFormat:@"%ld fonts added", addedCount]; |
There was a problem hiding this comment.
| self.statusLabel.text = [NSString stringWithFormat:@"%ld fonts added", addedCount]; | |
| self.statusLabel.text = [NSString stringWithFormat:@"%ld font%s added", addedCount, (addedCount == 1 ? "" : "s")]; |
| { | ||
| //DebugLog(@"%s called", __PRETTY_FUNCTION__); | ||
| if (previousTraitCollection.userInterfaceStyle != self.traitCollection.userInterfaceStyle) { | ||
| //[self loadHelpMarkdown]; |
There was a problem hiding this comment.
Nope. Test code that was forgotten :-)
|
|
||
| UIFont *baseFont = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; | ||
|
|
||
| #if 1 |
There was a problem hiding this comment.
is this if/else still needed?
There was a problem hiding this comment.
Nope. The new code is simpler and more reliable.
| //#import "PresentationBlurAnimator.h" | ||
| //#import "DismissBlurAnimator.h" |
There was a problem hiding this comment.
| //#import "PresentationBlurAnimator.h" | |
| //#import "DismissBlurAnimator.h" |
There was a problem hiding this comment.
Good cleanup!
| // | ||
| //@property (nonatomic, weak) IBOutlet UITableView *tableView; | ||
| //@property (nonatomic, weak) IBOutlet UIBarButtonItem *installButton; | ||
| //@property (nonatomic, weak) IBOutlet UIBarButtonItem *addButton; | ||
| // | ||
| //@property (nonatomic, strong) NSArray<FontInfo *> *fonts; |
There was a problem hiding this comment.
| // | |
| //@property (nonatomic, weak) IBOutlet UITableView *tableView; | |
| //@property (nonatomic, weak) IBOutlet UIBarButtonItem *installButton; | |
| //@property (nonatomic, weak) IBOutlet UIBarButtonItem *addButton; | |
| // | |
| //@property (nonatomic, strong) NSArray<FontInfo *> *fonts; |
There was a problem hiding this comment.
Good cleanup!
| { | ||
| [super viewDidAppear:animated]; | ||
|
|
||
| #if 1 |
There was a problem hiding this comment.
is this if/else still needed?
There was a problem hiding this comment.
I'd like to keep this one in - helpful to test the overlay without clearing out all the fonts.
| NSString *message = [NSString stringWithFormat:@"The mobile configuration profile could not be created.\n\nThe error was '%@'", error.localizedDescription]; | ||
| UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Install Error" message:message preferredStyle:UIAlertControllerStyleAlert]; | ||
| alertController.view.tintColor = self.view.tintColor; | ||
| [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; |
There was a problem hiding this comment.
maybe this should be this instead?
| [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; | |
| [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]]; |
| NSString *profile = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version=\"1.0\"><dict><key>PayloadType</key><string>Configuration</string><key>PayloadVersion</key><integer>1</integer><key>PayloadDisplayName</key><string>xFonts (%@)</string><key>PayloadIdentifier</key><string>xFonts %@</string><key>PayloadUUID</key><string>%@</string><key>PayloadContent</key><array>%@</array></dict></plist>", title, NSUUID.UUID.UUIDString, NSUUID.UUID.UUIDString, fonts]; | ||
| NSString *profile = [NSString stringWithFormat:profilePayloadTemplate, productName, productName, NSUUID.UUID.UUIDString, fontsPayload]; | ||
|
|
||
| NSURL *URL = [FontInfo.storageURL URLByAppendingPathComponent:@"xFonts.mobileconfig"]; |
There was a problem hiding this comment.
should this be renamed too?
| NSURL *URL = [FontInfo.storageURL URLByAppendingPathComponent:@"xFonts.mobileconfig"]; | |
| NSURL *URL = [FontInfo.storageURL URLByAppendingPathComponent:@"Fontcase.mobileconfig"]; |
There was a problem hiding this comment.
I thought about that, but it's never seen by the customer. It's kind of like the bundle ID (that uses xFonts) so I'd say leave it as-is.
| NSString *fileAtPath = [self pathForFile:fileName]; | ||
| if (![[NSFileManager defaultManager] fileExistsAtPath:fileAtPath]) { | ||
| [[NSFileManager defaultManager] createFileAtPath:fileAtPath contents:nil attributes:nil]; | ||
| - (void)applicationDidBecomeActive:(UIApplication *)application |
There was a problem hiding this comment.
this looks right to me but when running the TestFlight im not seeing it update when i come back to the app after installing. it still shows the font as "need to install" until i kill the app, and then it does show as "installed"
There was a problem hiding this comment.
I think this is a bug with the Font Manager and fonts that are registered in the process scope. It sometimes doesn't refresh what's available until the process restarts. I'd like to fix it, of course, but it may be something we have to live with...
|
Thanks for going through these - you found some good stuff! |
| Open the _Settings_ app and you’ll see a _Profile Downloaded_ button above the Airplane Mode switch. (If not, navigate to _General_ > _Profiles_ > _Downloaded Profile_ > _$(PRODUCT_NAME) Installation_.) After tapping the button, the first thing you’ll see is “Not Signed” highlighted in red. | ||
|
|
||
| This is another instance where you need to trust the source of the profile and its contents. Since the profile was generated on your device, there’s no risk that it was modified in transit. But unfortunately there’s no way to sign a profile locally without exposing a secret: the private key would have to be in the app’s source code or resources. | ||
| This is another instance where you need to trust the source of the profile and its contents. Since the profile was generated on your device, there’s no risk that it was modified in transit. This also means there's no way to sign a profile locally without exposing a secret: the private key would have to be in the app’s source code or resources. |
There was a problem hiding this comment.
tiny nit: not sure if intentional or not but i think maybe we should keep using ’ instead of '
There was a problem hiding this comment.
Yep, I'll fix this in the next PR.
|
Famous last words: ready for release 😄 |
|
Added App Store metadata, including screenshots. See above 😄 |
manolosavi
left a comment
There was a problem hiding this comment.
think it looks good, lmk how you wanna proceed here
These are all the changes that we'll be releasing as Fontcase on the App Store.