Skip to content
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

Export values to plist through email #12

Closed
wants to merge 5 commits into from

Conversation

@kcharwood
Copy link
Contributor

kcharwood commented Mar 29, 2014

Easy way to share. Let me know your thoughts!

@grp
Copy link
Contributor

grp commented Mar 30, 2014

This is a great idea. I wonder if it would make sense to export all categories, rather than just one — maybe an action sheet that replaces the current "Reset" button with "Reset" and "Email" options?

@pruthvikar
Copy link

pruthvikar commented Mar 30, 2014

It would be cool if you could share and import configs in one click. I'd love to implement this via URL schemes!

@kcharwood
Copy link
Contributor Author

kcharwood commented Mar 30, 2014

Sure I think that makes tons of sense.

How about a tool bar on the bottom of the main view controller, with the share in the bottom right?

I can take a stab at it today.

Kevin Harwood


Sent from my iPhone

On Mar 29, 2014, at 8:58 PM, Grant Paul notifications@github.com wrote:

This is a great idea. I wonder if it would make sense to export all categories, rather than just one — maybe an action sheet that replaces the current "Reset" button with "Reset" and "Email" options?


Reply to this email directly or view it on GitHub.

@kcharwood
Copy link
Contributor Author

kcharwood commented Mar 30, 2014

Sorry misread your comment. I thought you said replace reset, but you said replace it with an action sheet...

Still early in the morning.

Would you prefer the tool bar or the action sheet?

Kevin Harwood


Sent from my iPhone

On Mar 29, 2014, at 8:58 PM, Grant Paul notifications@github.com wrote:

This is a great idea. I wonder if it would make sense to export all categories, rather than just one — maybe an action sheet that replaces the current "Reset" button with "Reset" and "Email" options?


Reply to this email directly or view it on GitHub.

@kcharwood
Copy link
Contributor Author

kcharwood commented Apr 8, 2014

@grpaul added a toolbar and action to the main view controller, and removed it from the child.

Now exports everything.

@@ -33,14 +37,27 @@ - (void)viewDidLoad
{
[super viewDidLoad];

_tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
CGFloat toolBarHeight = 44.0;

This comment has been minimized.

@grp

grp Apr 9, 2014 Contributor

Rather than hardcoding this, maybe call -sizeToFit on the UIToolbar to use the default height?

[self.view addSubview:_toolbar];

CGRect tableViewFrame = self.view.bounds;
tableViewFrame.size.height -= CGRectGetHeight(_toolbar.bounds);

This comment has been minimized.

@grp

grp Apr 9, 2014 Contributor

Rather than resizing this shorter, for iOS 7 maybe it's best to include it in the contentInset?



NSMutableDictionary *categoryDictionary = [NSMutableDictionary new];
[self.store.tweakCategories

This comment has been minimized.

@grp

grp Apr 9, 2014 Contributor

I wonder if creating this could be a method on the FBTweakStore? That way, other clients could easily build their own export UIs.

NSString *body = [NSString stringWithFormat:@"%@ \n%@", appName, version];
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:categoryDictionary];

NSString *fileName = [NSString stringWithFormat:@"%@_tweaks.plist", appName];

This comment has been minimized.

@grp

grp Apr 9, 2014 Contributor

I like the filename here — can't get confused between apps (& versions).

@kcharwood
Copy link
Contributor Author

kcharwood commented Apr 12, 2014

I have most of this ready, although i noticed i have a problem with the dictionary export to a plist.

I'll let you know when its ready 🍻

@kcharwood
Copy link
Contributor Author

kcharwood commented Apr 12, 2014

This one is all ready to go!

@grp
Copy link
Contributor

grp commented Apr 29, 2014

I converted it to NSCoding and landed it as 94dc87c. Thanks for the patch!

@grp grp closed this Apr 29, 2014
@kcharwood
Copy link
Contributor Author

kcharwood commented May 2, 2014

Good thinking. Looks good! 👍

When are you planning on releasing a new 1.1?

@grp
Copy link
Contributor

grp commented May 2, 2014

I'm doing some testing this week to see if I can find any other bugs to fix, but after that I'll do a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.