-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xFonts 2.0 #1
xFonts 2.0 #1
Conversation
…d with (unused) disclosure indicator.
…ain view controller to a table view controller. UI cleanup.
…et bugs (love them).
xFonts/HeaderView.m
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.statusLabel.text = [NSString stringWithFormat:@"%ld fonts added", addedCount]; | |
self.statusLabel.text = [NSString stringWithFormat:@"%ld font%s added", addedCount, (addedCount == 1 ? "" : "s")]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
xFonts/HeaderView.m
Outdated
{ | ||
//DebugLog(@"%s called", __PRETTY_FUNCTION__); | ||
if (previousTraitCollection.userInterfaceStyle != self.traitCollection.userInterfaceStyle) { | ||
//[self loadHelpMarkdown]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. Test code that was forgotten :-)
xFonts/HelpViewController.m
Outdated
|
||
UIFont *baseFont = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; | ||
|
||
#if 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this if/else still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. The new code is simpler and more reliable.
xFonts/ViewController.h
Outdated
//#import "PresentationBlurAnimator.h" | ||
//#import "DismissBlurAnimator.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//#import "PresentationBlurAnimator.h" | |
//#import "DismissBlurAnimator.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good cleanup!
xFonts/ViewController.h
Outdated
// | ||
//@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// | |
//@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good cleanup!
xFonts/ViewController.m
Outdated
{ | ||
[super viewDidAppear:animated]; | ||
|
||
#if 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this if/else still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to keep this one in - helpful to test the overlay without clearing out all the fonts.
xFonts/ViewController.m
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should be this instead?
[alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; | |
[alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
xFonts/Help.md
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'll fix this in the next PR.
Famous last words: ready for release 😄 |
Added App Store metadata, including screenshots. See above 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.