Skip to content

Commit

Permalink
MMRecord Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Conrad Stoll committed Apr 14, 2014
1 parent 28b743b commit 57de0a6
Show file tree
Hide file tree
Showing 34 changed files with 2,206 additions and 1 deletion.
102 changes: 102 additions & 0 deletions Examples/MMRecordAppDotNet/MMRecordAppDotNet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
5569077B16FA750D0040D191 /* MMRecordMarshaler.h in Resources */ = {isa = PBXBuildFile; fileRef = 5569077916FA750D0040D191 /* MMRecordMarshaler.h */; };
5573C68C16FA874600B82CE5 /* MMRecordMarshaler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5569077A16FA750D0040D191 /* MMRecordMarshaler.m */; };
55AA517018BF997F00F54E80 /* CoverImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA516F18BF997F00F54E80 /* CoverImage.m */; };
55AA656D18FB1F610018B4A0 /* _FBTweakBindObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA655518FB1F610018B4A0 /* _FBTweakBindObserver.m */; };
55AA656E18FB1F610018B4A0 /* _FBTweakCategoryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA655718FB1F610018B4A0 /* _FBTweakCategoryViewController.m */; };
55AA656F18FB1F610018B4A0 /* _FBTweakCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA655918FB1F610018B4A0 /* _FBTweakCollectionViewController.m */; };
55AA657018FB1F610018B4A0 /* _FBTweakTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA655B18FB1F610018B4A0 /* _FBTweakTableViewCell.m */; };
55AA657118FB1F610018B4A0 /* FBTweak.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA655E18FB1F610018B4A0 /* FBTweak.m */; };
55AA657218FB1F610018B4A0 /* FBTweakCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA656018FB1F610018B4A0 /* FBTweakCategory.m */; };
55AA657318FB1F610018B4A0 /* FBTweakCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA656218FB1F610018B4A0 /* FBTweakCollection.m */; };
55AA657418FB1F610018B4A0 /* FBTweakInline.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA656518FB1F610018B4A0 /* FBTweakInline.m */; };
55AA657518FB1F610018B4A0 /* FBTweakShakeWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA656818FB1F610018B4A0 /* FBTweakShakeWindow.m */; };
55AA657618FB1F610018B4A0 /* FBTweakStore.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA656A18FB1F610018B4A0 /* FBTweakStore.m */; };
55AA657718FB1F610018B4A0 /* FBTweakViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA656C18FB1F610018B4A0 /* FBTweakViewController.m */; };
55AA657E18FB203C0018B4A0 /* FBMMRecordTweakRepresentation.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA657C18FB203C0018B4A0 /* FBMMRecordTweakRepresentation.m */; };
55AA658118FB7E1A0018B4A0 /* FBMMRecordTweakModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 55AA658018FB7E1A0018B4A0 /* FBMMRecordTweakModel.m */; };
55E6987E16A247A400F25C9A /* Source.m in Sources */ = {isa = PBXBuildFile; fileRef = 55E6987D16A247A400F25C9A /* Source.m */; };
55E712BB16FE15C900EC1159 /* ADNServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 55E712BA16FE15C900EC1159 /* ADNServer.m */; };
55E712BE16FE15E300EC1159 /* ADNPageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 55E712BD16FE15E300EC1159 /* ADNPageManager.m */; };
Expand Down Expand Up @@ -108,6 +121,35 @@
5569077A16FA750D0040D191 /* MMRecordMarshaler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MMRecordMarshaler.m; sourceTree = "<group>"; };
55AA516E18BF997F00F54E80 /* CoverImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoverImage.h; sourceTree = "<group>"; };
55AA516F18BF997F00F54E80 /* CoverImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoverImage.m; sourceTree = "<group>"; };
55AA655418FB1F610018B4A0 /* _FBTweakBindObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _FBTweakBindObserver.h; sourceTree = "<group>"; };
55AA655518FB1F610018B4A0 /* _FBTweakBindObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _FBTweakBindObserver.m; sourceTree = "<group>"; };
55AA655618FB1F610018B4A0 /* _FBTweakCategoryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _FBTweakCategoryViewController.h; sourceTree = "<group>"; };
55AA655718FB1F610018B4A0 /* _FBTweakCategoryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _FBTweakCategoryViewController.m; sourceTree = "<group>"; };
55AA655818FB1F610018B4A0 /* _FBTweakCollectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _FBTweakCollectionViewController.h; sourceTree = "<group>"; };
55AA655918FB1F610018B4A0 /* _FBTweakCollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _FBTweakCollectionViewController.m; sourceTree = "<group>"; };
55AA655A18FB1F610018B4A0 /* _FBTweakTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _FBTweakTableViewCell.h; sourceTree = "<group>"; };
55AA655B18FB1F610018B4A0 /* _FBTweakTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _FBTweakTableViewCell.m; sourceTree = "<group>"; };
55AA655C18FB1F610018B4A0 /* FBTweak-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FBTweak-Prefix.pch"; sourceTree = "<group>"; };
55AA655D18FB1F610018B4A0 /* FBTweak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweak.h; sourceTree = "<group>"; };
55AA655E18FB1F610018B4A0 /* FBTweak.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweak.m; sourceTree = "<group>"; };
55AA655F18FB1F610018B4A0 /* FBTweakCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakCategory.h; sourceTree = "<group>"; };
55AA656018FB1F610018B4A0 /* FBTweakCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweakCategory.m; sourceTree = "<group>"; };
55AA656118FB1F610018B4A0 /* FBTweakCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakCollection.h; sourceTree = "<group>"; };
55AA656218FB1F610018B4A0 /* FBTweakCollection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweakCollection.m; sourceTree = "<group>"; };
55AA656318FB1F610018B4A0 /* FBTweakEnabled.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakEnabled.h; sourceTree = "<group>"; };
55AA656418FB1F610018B4A0 /* FBTweakInline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakInline.h; sourceTree = "<group>"; };
55AA656518FB1F610018B4A0 /* FBTweakInline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweakInline.m; sourceTree = "<group>"; };
55AA656618FB1F610018B4A0 /* FBTweakInlineInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakInlineInternal.h; sourceTree = "<group>"; };
55AA656718FB1F610018B4A0 /* FBTweakShakeWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakShakeWindow.h; sourceTree = "<group>"; };
55AA656818FB1F610018B4A0 /* FBTweakShakeWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweakShakeWindow.m; sourceTree = "<group>"; };
55AA656918FB1F610018B4A0 /* FBTweakStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakStore.h; sourceTree = "<group>"; };
55AA656A18FB1F610018B4A0 /* FBTweakStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweakStore.m; sourceTree = "<group>"; };
55AA656B18FB1F610018B4A0 /* FBTweakViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakViewController.h; sourceTree = "<group>"; };
55AA656C18FB1F610018B4A0 /* FBTweakViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweakViewController.m; sourceTree = "<group>"; };
55AA657B18FB203C0018B4A0 /* FBMMRecordTweakRepresentation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBMMRecordTweakRepresentation.h; sourceTree = "<group>"; };
55AA657C18FB203C0018B4A0 /* FBMMRecordTweakRepresentation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBMMRecordTweakRepresentation.m; sourceTree = "<group>"; };
55AA657F18FB7E1A0018B4A0 /* FBMMRecordTweakModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBMMRecordTweakModel.h; sourceTree = "<group>"; };
55AA658018FB7E1A0018B4A0 /* FBMMRecordTweakModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBMMRecordTweakModel.m; sourceTree = "<group>"; };
55E6987C16A247A400F25C9A /* Source.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Source.h; sourceTree = "<group>"; };
55E6987D16A247A400F25C9A /* Source.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Source.m; sourceTree = "<group>"; };
55E712B916FE15C900EC1159 /* ADNServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ADNServer.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -231,6 +273,51 @@
path = ../../../Source/MMRecordJSONServer;
sourceTree = "<group>";
};
55AA655318FB1F610018B4A0 /* FBTweak */ = {
isa = PBXGroup;
children = (
55AA655418FB1F610018B4A0 /* _FBTweakBindObserver.h */,
55AA655518FB1F610018B4A0 /* _FBTweakBindObserver.m */,
55AA655618FB1F610018B4A0 /* _FBTweakCategoryViewController.h */,
55AA655718FB1F610018B4A0 /* _FBTweakCategoryViewController.m */,
55AA655818FB1F610018B4A0 /* _FBTweakCollectionViewController.h */,
55AA655918FB1F610018B4A0 /* _FBTweakCollectionViewController.m */,
55AA655A18FB1F610018B4A0 /* _FBTweakTableViewCell.h */,
55AA655B18FB1F610018B4A0 /* _FBTweakTableViewCell.m */,
55AA655C18FB1F610018B4A0 /* FBTweak-Prefix.pch */,
55AA655D18FB1F610018B4A0 /* FBTweak.h */,
55AA655E18FB1F610018B4A0 /* FBTweak.m */,
55AA655F18FB1F610018B4A0 /* FBTweakCategory.h */,
55AA656018FB1F610018B4A0 /* FBTweakCategory.m */,
55AA656118FB1F610018B4A0 /* FBTweakCollection.h */,
55AA656218FB1F610018B4A0 /* FBTweakCollection.m */,
55AA656318FB1F610018B4A0 /* FBTweakEnabled.h */,
55AA656418FB1F610018B4A0 /* FBTweakInline.h */,
55AA656518FB1F610018B4A0 /* FBTweakInline.m */,
55AA656618FB1F610018B4A0 /* FBTweakInlineInternal.h */,
55AA656718FB1F610018B4A0 /* FBTweakShakeWindow.h */,
55AA656818FB1F610018B4A0 /* FBTweakShakeWindow.m */,
55AA656918FB1F610018B4A0 /* FBTweakStore.h */,
55AA656A18FB1F610018B4A0 /* FBTweakStore.m */,
55AA656B18FB1F610018B4A0 /* FBTweakViewController.h */,
55AA656C18FB1F610018B4A0 /* FBTweakViewController.m */,
);
name = FBTweak;
path = Vendor/FBTweak;
sourceTree = "<group>";
};
55AA657818FB203C0018B4A0 /* FBMMRecordTweakModel */ = {
isa = PBXGroup;
children = (
55AA657F18FB7E1A0018B4A0 /* FBMMRecordTweakModel.h */,
55AA658018FB7E1A0018B4A0 /* FBMMRecordTweakModel.m */,
55AA657B18FB203C0018B4A0 /* FBMMRecordTweakRepresentation.h */,
55AA657C18FB203C0018B4A0 /* FBMMRecordTweakRepresentation.m */,
);
name = FBMMRecordTweakModel;
path = ../../../Source/FBMMRecordTweakModel;
sourceTree = "<group>";
};
55E712B816FE159800EC1159 /* Posts */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -378,6 +465,8 @@
55F9520A165C741E0060851E /* MMRecord */,
55063A2816FD6249009263E2 /* MMRecordAFServer */,
5509C0E316FE84B900310806 /* MMRecordJSONServer */,
55AA657818FB203C0018B4A0 /* FBMMRecordTweakModel */,
55AA655318FB1F610018B4A0 /* FBTweak */,
);
name = Vendor;
path = MMRecordAppDotNet;
Expand Down Expand Up @@ -555,17 +644,23 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
55AA658118FB7E1A0018B4A0 /* FBMMRecordTweakModel.m in Sources */,
55AA657618FB1F610018B4A0 /* FBTweakStore.m in Sources */,
55AA657018FB1F610018B4A0 /* _FBTweakTableViewCell.m in Sources */,
55F951EC165C73460060851E /* main.m in Sources */,
55F951FC165C73460060851E /* ADNPostsViewController.m in Sources */,
55F95213165C741E0060851E /* MMRecord.m in Sources */,
55F95215165C741E0060851E /* MMServer.m in Sources */,
55F95216165C741E0060851E /* MMServerPageManager.m in Sources */,
55F95219165C744C0060851E /* AppDotNetModel.xcdatamodeld in Sources */,
55AA656E18FB1F610018B4A0 /* _FBTweakCategoryViewController.m in Sources */,
55AA657518FB1F610018B4A0 /* FBTweakShakeWindow.m in Sources */,
55F95224165C76370060851E /* User.m in Sources */,
55F95227165C76370060851E /* Post.m in Sources */,
55F9522A165C76920060851E /* ADNRecord.m in Sources */,
55AA517018BF997F00F54E80 /* CoverImage.m in Sources */,
55F95243165C77380060851E /* AFHTTPClient.m in Sources */,
55AA657418FB1F610018B4A0 /* FBTweakInline.m in Sources */,
55F95244165C77380060851E /* AFHTTPRequestOperation.m in Sources */,
55F95245165C77380060851E /* AFImageRequestOperation.m in Sources */,
55F95246165C77380060851E /* AFJSONRequestOperation.m in Sources */,
Expand All @@ -577,18 +672,25 @@
55F9524E165C774C0060851E /* ADNHTTPClient.m in Sources */,
55F95256165C78930060851E /* MMDataManager.m in Sources */,
55F95260165C82B90060851E /* PostCell.m in Sources */,
55AA657318FB1F610018B4A0 /* FBTweakCollection.m in Sources */,
267469E516A1C128006A6A81 /* MMRecordResponse.m in Sources */,
55AA657718FB1F610018B4A0 /* FBTweakViewController.m in Sources */,
55AA656D18FB1F610018B4A0 /* _FBTweakBindObserver.m in Sources */,
267469EC16A1C226006A6A81 /* MMRecordProtoRecord.m in Sources */,
55AA657E18FB203C0018B4A0 /* FBMMRecordTweakRepresentation.m in Sources */,
55E6987E16A247A400F25C9A /* Source.m in Sources */,
262496B816D9E45000767D83 /* MMRecordCache.m in Sources */,
55211F6A16F179E300729C51 /* MMRecordRepresentation.m in Sources */,
5573C68C16FA874600B82CE5 /* MMRecordMarshaler.m in Sources */,
55063A2C16FD626B009263E2 /* MMAFJSONServer.m in Sources */,
5528733B16FD62E0006AFD47 /* MMAppDelegate.m in Sources */,
55E712BB16FE15C900EC1159 /* ADNServer.m in Sources */,
55AA657218FB1F610018B4A0 /* FBTweakCategory.m in Sources */,
55E712BE16FE15E300EC1159 /* ADNPageManager.m in Sources */,
55AA657118FB1F610018B4A0 /* FBTweak.m in Sources */,
55E712C216FE4A4000EC1159 /* ADNUsersViewController.m in Sources */,
55E712C716FE4A6D00EC1159 /* UserCell.m in Sources */,
55AA656F18FB1F610018B4A0 /* _FBTweakCollectionViewController.m in Sources */,
55E712CC16FE4B4D00EC1159 /* ADNUserManager.m in Sources */,
55E712CF16FE4EF800EC1159 /* ADNUserPostsViewController.m in Sources */,
5509C0D416FE5CFD00310806 /* Counts.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
#import "ADNPostManager.h"
#import "Counts.h"

@interface ADNPostsViewController ()
#import "FBTweakViewController.h"
#import "FBTweakStore.h"

@interface ADNPostsViewController () <FBTweakViewControllerDelegate>

@property (nonatomic, strong) ADNPostManager *postManager;
@property (nonatomic, copy) NSArray *posts;
Expand All @@ -38,8 +41,20 @@ - (void)viewDidLoad {
forCellReuseIdentifier:@"PostCell"];

[self getPosts];

UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Tweaks" style:UIBarButtonItemStyleBordered target:self action:@selector(showTweaks)];
self.navigationItem.rightBarButtonItem = item;
}

- (void)showTweaks {
FBTweakViewController *viewController = [[FBTweakViewController alloc] initWithStore:[FBTweakStore sharedInstance]];
viewController.tweaksDelegate = self;
[self presentViewController:viewController animated:YES completion:NULL];
}

- (void)tweakViewControllerPressedDone:(FBTweakViewController *)tweakViewController {
[self dismissViewControllerAnimated:YES completion:NULL];
}

#pragma mark - Posts Request Methods

Expand Down
6 changes: 6 additions & 0 deletions Examples/MMRecordAppDotNet/MMRecordAppDotNet/ADNRecord.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "ADNRecord.h"

#import "FBMMRecordTweakRepresentation.h"

static NSDateFormatter *ADNRecordDateFormatter;

@implementation ADNRecord
Expand All @@ -26,4 +28,8 @@ + (NSDateFormatter *)dateFormatter {
return ADNRecordDateFormatter;
}

+ (Class)representationClass {
return [FBMMRecordTweakRepresentation class];
}

@end
4 changes: 4 additions & 0 deletions Examples/MMRecordAppDotNet/MMRecordAppDotNet/MMAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
#import "ADNRecord.h"
#import "ADNServer.h"
#import "MMJSONServer.h"
#import "MMDataManager.h"
#import "FBMMRecordTweakModel.h"

@implementation MMAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ADNServer registerAFHTTPClient:[ADNHTTPClient sharedClient]];
[ADNRecord registerServerClass:[ADNServer class]];

[FBMMRecordTweakModel loadTweaksForManagedObjectModel:[MMDataManager sharedDataManager].managedObjectModel];

//[MMJSONServer registerResourceName:@"posts" forPathComponent:@"posts"];
//[ADNRecord registerServerClass:[MMJSONServer class]];

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.

This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
*/

Loading

0 comments on commit 57de0a6

Please sign in to comment.