Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ fastlane/report.xml
fastlane/Preview.html

Artsy/View_Controllers/App_Navigation/ARTopMenuViewController+DeveloperExtras.m
Artsy/Eigen.playground/
Artsy/Eigen.playground/

iOSInjectionProject/
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
@interface ARTopMenuViewController (DeveloperExtras)

- (void)runDeveloperExtras;
- (void)appHasBeenInjected:(NSNotification *)notification;

@end
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
#import "ARTopMenuViewController+DeveloperExtras.h"
#import "Artsy-Swift.h"

// You can tell git to ignore changes to this file by running
//
// git update-index --assume-unchanged Artsy/View_Controllers/App_Navigation/ARTopMenuViewController+DeveloperExtras.m
// This file is for running developer specific code, either when
// the app is loaded, or when you have injected fresh code in via
// InjectionForXcode (which you can install via Alcatraz.)

// See: https://github.com/artsy/eigen/pull/1236

// It is put in gitignore as the current state of what you see now,
// any changes you make will be erased when you switch branches.


@implementation ARTopMenuViewController (DeveloperExtras)

// Use this function to run code once the app is loaded, useful for pushing a
// specific VC etc.
// Called when the app has been re-injected with some code,
// the default here will pop the top view controller and
// re-run the developerExtras

- (void)appHasBeenInjected:(NSNotification *)notification
{
[self.rootNavigationController popViewControllerAnimated:NO];
[self runDeveloperExtras];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍


// Use this to create a new ViewController and push it on to the stack
//
// @example
//
// id viewController = [[LiveAuctionViewController alloc] init];
// [self pushViewController:viewController animated:YES];
//
// @example
//
// NSString *path = @"/artwork/helidon-xhixha-energia-delle-forme";
// id viewController = [[ARSwitchBoard sharedInstance] loadPath:path];
// [self pushViewController:viewController animated:YES];
//

- (void)runDeveloperExtras
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ - (void)viewDidAppear:(BOOL)animated
if ([ARAppStatus isRunningTests] == NO) {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appHasBeenInjected:) name:@"INJECTION_BUNDLE_NOTIFICATION" object:nil];

[self runDeveloperExtras];
});
}
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ upcoming:
- Added a switch between native and martsy works for you view - maxim
- Made the searchbar larger in fair views on iPhone - maxim
- Additional work on the auction title view - ash
- Quicksilver is now accessible to non-Eigen devs - orta
- Quicksilver is now accessible to non-Eigen devs - orta
- Removes rotation support on refine auction listings view for iPhone - ash
- Developers can choose to have a custom url for their staging environment - orta
- Initial work on the Live Auctions view controller - orta
- AuctionVC supports before state - orta
- Initial working structure for Live Auctions with stubbed data - orta
- Shows a lot of the main views on Live Auctions - orta

- AMAZING - Added support for dynamic code-injection - orta

notes:
- Support breaking out of the router sandboxing when there's a link with ?eigen_escape_sandbox' - orta
- Users may now refine sale artworks on native auction view by their low estimates - ash
Expand Down