diff --git a/Limelight/App.h b/Limelight/App.h deleted file mode 100644 index 1503ff8..0000000 --- a/Limelight/App.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// App.h -// Moonlight -// -// Created by Diego Waxemberg on 10/22/14. -// Copyright (c) 2014 Moonlight Stream. All rights reserved. -// - -#import - -@interface App : NSObject - -@property NSString* appId; -@property NSString* appName; -@property UIImage* appImage; -@property BOOL isRunning; - -@end diff --git a/Limelight/App.m b/Limelight/App.m deleted file mode 100644 index de8af39..0000000 --- a/Limelight/App.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// App.m -// Moonlight -// -// Created by Diego Waxemberg on 10/22/14. -// Copyright (c) 2014 Moonlight Stream. All rights reserved. -// - -#import "App.h" -#import "HttpManager.h" - -@implementation App -@synthesize appId, appName, appImage, isRunning; - -@end diff --git a/Limelight/Database/App+CoreDataProperties.h b/Limelight/Database/App+CoreDataProperties.h new file mode 100644 index 0000000..8df4ef6 --- /dev/null +++ b/Limelight/Database/App+CoreDataProperties.h @@ -0,0 +1,25 @@ +// +// App+CoreDataProperties.h +// Moonlight +// +// Created by Diego Waxemberg on 7/10/15. +// Copyright © 2015 Limelight Stream. All rights reserved. +// +// Delete this file and regenerate it using "Create NSManagedObject Subclass…" +// to keep your implementation up to date with your model. +// + +#import "App.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface App (CoreDataProperties) + +@property (nullable, nonatomic, retain) NSString *id; +@property (nullable, nonatomic, retain) NSData *image; +@property (nullable, nonatomic, retain) NSString *name; +@property (nullable, nonatomic, retain) Host *host; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Limelight/Database/App.h b/Limelight/Database/App.h new file mode 100644 index 0000000..92b9454 --- /dev/null +++ b/Limelight/Database/App.h @@ -0,0 +1,24 @@ +// +// App.h +// Moonlight +// +// Created by Diego Waxemberg on 7/10/15. +// Copyright © 2015 Limelight Stream. All rights reserved. +// + +#import +#import + +@class Host; + +NS_ASSUME_NONNULL_BEGIN + +@interface App : NSManagedObject + +@property BOOL isRunning; + +@end + +NS_ASSUME_NONNULL_END + +#import "App+CoreDataProperties.h" diff --git a/Limelight/Database/App.m b/Limelight/Database/App.m new file mode 100644 index 0000000..8ec42f5 --- /dev/null +++ b/Limelight/Database/App.m @@ -0,0 +1,16 @@ +// +// App.m +// Moonlight +// +// Created by Diego Waxemberg on 7/10/15. +// Copyright © 2015 Limelight Stream. All rights reserved. +// + +#import "App.h" +#import "Host.h" + +@implementation App + +@synthesize isRunning; + +@end diff --git a/Limelight/Database/DataManager.h b/Limelight/Database/DataManager.h index 6af1ec0..f5fc9b8 100644 --- a/Limelight/Database/DataManager.h +++ b/Limelight/Database/DataManager.h @@ -10,6 +10,7 @@ #import "Settings.h" #import "AppDelegate.h" #import "Host.h" +#import "App.h" @interface DataManager : NSObject @@ -21,5 +22,6 @@ - (void) saveHosts; - (Host*) createHost; - (void) removeHost:(Host*)host; +- (App*) createApp; @end diff --git a/Limelight/Database/DataManager.m b/Limelight/Database/DataManager.m index b2825ff..c7edef6 100644 --- a/Limelight/Database/DataManager.m +++ b/Limelight/Database/DataManager.m @@ -48,8 +48,7 @@ - (Host*) createHost { NSEntityDescription* entity = [NSEntityDescription entityForName:@"Host" inManagedObjectContext:[self.appDelegate managedObjectContext]]; - Host* host = [[Host alloc] initWithEntity:entity insertIntoManagedObjectContext:[self.appDelegate managedObjectContext]]; - return host; + return [[Host alloc] initWithEntity:entity insertIntoManagedObjectContext:[self.appDelegate managedObjectContext]]; } - (void) removeHost:(Host*)host { @@ -69,6 +68,11 @@ return [self fetchRecords:@"Host"]; } +- (App*) createApp { + NSEntityDescription* entity = [NSEntityDescription entityForName:@"App" inManagedObjectContext:[self.appDelegate managedObjectContext]]; + return [[App alloc] initWithEntity:entity insertIntoManagedObjectContext:[self.appDelegate managedObjectContext]]; +} + - (NSArray*) fetchRecords:(NSString*)entityName { NSFetchRequest* fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription* entity = [NSEntityDescription entityForName:entityName inManagedObjectContext:[self.appDelegate managedObjectContext]]; diff --git a/Limelight/Database/Host+CoreDataProperties.h b/Limelight/Database/Host+CoreDataProperties.h new file mode 100644 index 0000000..a77ca03 --- /dev/null +++ b/Limelight/Database/Host+CoreDataProperties.h @@ -0,0 +1,38 @@ +// +// Host+CoreDataProperties.h +// Moonlight +// +// Created by Diego Waxemberg on 7/10/15. +// Copyright © 2015 Limelight Stream. All rights reserved. +// +// Delete this file and regenerate it using "Create NSManagedObject Subclass…" +// to keep your implementation up to date with your model. +// + +#import "Host.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface Host (CoreDataProperties) + +@property (nullable, nonatomic, retain) NSString *address; +@property (nullable, nonatomic, retain) NSString *externalAddress; +@property (nullable, nonatomic, retain) NSString *localAddress; +@property (nullable, nonatomic, retain) NSString *mac; +@property (nullable, nonatomic, retain) NSString *name; +@property (nullable, nonatomic, retain) NSNumber *pairState; +@property (nullable, nonatomic, retain) NSString *uuid; +@property (nullable, nonatomic, retain) NSSet *appList; + +@end + +@interface Host (CoreDataGeneratedAccessors) + +- (void)addAppListObject:(NSManagedObject *)value; +- (void)removeAppListObject:(NSManagedObject *)value; +- (void)addAppList:(NSSet *)values; +- (void)removeAppList:(NSSet *)values; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Limelight/Database/Host.h b/Limelight/Database/Host.h index 576dd01..d866676 100644 --- a/Limelight/Database/Host.h +++ b/Limelight/Database/Host.h @@ -2,24 +2,24 @@ // Host.h // Moonlight // -// Created by Diego Waxemberg on 10/28/14. -// Copyright (c) 2014 Moonlight Stream. All rights reserved. +// Created by Diego Waxemberg on 7/10/15. +// Copyright © 2015 Limelight Stream. All rights reserved. // #import #import #import "Utils.h" +NS_ASSUME_NONNULL_BEGIN + @interface Host : NSManagedObject -@property (nonatomic, retain) NSString * name; -@property (nonatomic, retain) NSString * address; -@property (nonatomic, retain) NSString * localAddress; -@property (nonatomic, retain) NSString * externalAddress; -@property (nonatomic, retain) NSString * uuid; -@property (nonatomic, retain) NSString * mac; @property (nonatomic) BOOL online; @property (nonatomic) PairState pairState; @property (nonatomic) NSString * activeAddress; @end + +NS_ASSUME_NONNULL_END + +#import "Host+CoreDataProperties.h" diff --git a/Limelight/Database/Host.m b/Limelight/Database/Host.m index d527c60..133f016 100644 --- a/Limelight/Database/Host.m +++ b/Limelight/Database/Host.m @@ -2,21 +2,14 @@ // Host.m // Moonlight // -// Created by Diego Waxemberg on 10/28/14. -// Copyright (c) 2014 Moonlight Stream. All rights reserved. +// Created by Diego Waxemberg on 7/10/15. +// Copyright © 2015 Limelight Stream. All rights reserved. // #import "Host.h" - @implementation Host -@dynamic name; -@dynamic address; -@dynamic localAddress; -@dynamic externalAddress; -@dynamic uuid; -@dynamic mac; @dynamic pairState; @synthesize online; @synthesize activeAddress; diff --git a/Limelight/Limelight.xcdatamodeld/.xccurrentversion b/Limelight/Limelight.xcdatamodeld/.xccurrentversion index c2227ed..f988e70 100644 --- a/Limelight/Limelight.xcdatamodeld/.xccurrentversion +++ b/Limelight/Limelight.xcdatamodeld/.xccurrentversion @@ -3,6 +3,6 @@ _XCCurrentVersionName - Limelight 0.3.1.xcdatamodel + Moonlight v1.0.xcdatamodel diff --git a/Limelight/Limelight.xcdatamodeld/Moonlight v1.0.xcdatamodel/contents b/Limelight/Limelight.xcdatamodeld/Moonlight v1.0.xcdatamodel/contents new file mode 100644 index 0000000..4c3eafd --- /dev/null +++ b/Limelight/Limelight.xcdatamodeld/Moonlight v1.0.xcdatamodel/contents @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Limelight/Network/AppAssetManager.m b/Limelight/Network/AppAssetManager.m index 1ce5077..8a16bf7 100644 --- a/Limelight/Network/AppAssetManager.m +++ b/Limelight/Network/AppAssetManager.m @@ -15,8 +15,6 @@ @implementation AppAssetManager { NSOperationQueue* _opQueue; id _callback; - Host* _host; - NSMutableDictionary* _imageCache; } static const int MAX_REQUEST_COUNT = 4; @@ -24,29 +22,22 @@ static const int MAX_REQUEST_COUNT = 4; - (id) initWithCallback:(id)callback { self = [super init]; _callback = callback; - _imageCache = [[NSMutableDictionary alloc] init]; _opQueue = [[NSOperationQueue alloc] init]; [_opQueue setMaxConcurrentOperationCount:MAX_REQUEST_COUNT]; - + return self; } - (void) retrieveAssets:(NSArray*)appList fromHost:(Host*)host { - Host* oldHost = _host; - _host = host; - BOOL useCache = [oldHost.uuid isEqualToString:_host.uuid]; - Log(LOG_I, @"Using cached app images: %d", useCache); - if (!useCache) { - [_imageCache removeAllObjects]; - } for (App* app in appList) { - AppAssetRetriever* retriever = [[AppAssetRetriever alloc] init]; - retriever.app = app; - retriever.host = _host; - retriever.callback = _callback; - retriever.cache = _imageCache; - retriever.useCache = useCache; - [_opQueue addOperation:retriever]; + if (app.image == nil) { + AppAssetRetriever* retriever = [[AppAssetRetriever alloc] init]; + retriever.app = app; + retriever.host = host; + retriever.callback = _callback; + + [_opQueue addOperation:retriever]; + } } } diff --git a/Limelight/Network/AppAssetRetriever.h b/Limelight/Network/AppAssetRetriever.h index 84f853d..9588f6d 100644 --- a/Limelight/Network/AppAssetRetriever.h +++ b/Limelight/Network/AppAssetRetriever.h @@ -15,8 +15,6 @@ @property (nonatomic) Host* host; @property (nonatomic) App* app; -@property (nonatomic) NSMutableDictionary* cache; @property (nonatomic) id callback; -@property (nonatomic) BOOL useCache; @end diff --git a/Limelight/Network/AppAssetRetriever.m b/Limelight/Network/AppAssetRetriever.m index 8bd61c2..58cef23 100644 --- a/Limelight/Network/AppAssetRetriever.m +++ b/Limelight/Network/AppAssetRetriever.m @@ -16,34 +16,18 @@ static const double RETRY_DELAY = 2; // seconds static const int MAX_ATTEMPTS = 5; - - (void) main { UIImage* appImage = nil; int attempts = 0; while (![self isCancelled] && appImage == nil && attempts++ < MAX_ATTEMPTS) { - if (self.useCache) { - @synchronized(self.cache) { - UIImage* cachedImage = [self.cache objectForKey:self.app.appId]; - if (cachedImage != nil) { - appImage = cachedImage; - self.app.appImage = appImage; - } - } - } - if (appImage == nil) { - HttpManager* hMan = [[HttpManager alloc] initWithHost:_host.activeAddress uniqueId:[CryptoManager getUniqueID] deviceName:deviceName cert:[CryptoManager readCertFromFile]]; - AppAssetResponse* appAssetResp = [[AppAssetResponse alloc] init]; - [hMan executeRequestSynchronously:[HttpRequest requestForResponse:appAssetResp withUrlRequest:[hMan newAppAssetRequestWithAppId:self.app.appId]]]; - - appImage = [UIImage imageWithData:appAssetResp.data]; - self.app.appImage = appImage; - if (appImage != nil) { - @synchronized(self.cache) { - [self.cache setObject:appImage forKey:self.app.appId]; - } - } - } - + + HttpManager* hMan = [[HttpManager alloc] initWithHost:_host.activeAddress uniqueId:[CryptoManager getUniqueID] deviceName:deviceName cert:[CryptoManager readCertFromFile]]; + AppAssetResponse* appAssetResp = [[AppAssetResponse alloc] init]; + [hMan executeRequestSynchronously:[HttpRequest requestForResponse:appAssetResp withUrlRequest:[hMan newAppAssetRequestWithAppId:self.app.id]]]; + + appImage = [UIImage imageWithData:appAssetResp.data]; + self.app.image = UIImagePNGRepresentation(appImage); + [NSThread sleepForTimeInterval:RETRY_DELAY]; } [self performSelectorOnMainThread:@selector(sendCallbackForApp:) withObject:self.app waitUntilDone:NO]; diff --git a/Limelight/Network/AppListResponse.m b/Limelight/Network/AppListResponse.m index c7e66e2..9c3296a 100644 --- a/Limelight/Network/AppListResponse.m +++ b/Limelight/Network/AppListResponse.m @@ -8,6 +8,7 @@ #import "AppListResponse.h" #import "App.h" +#import "DataManager.h" #import @implementation AppListResponse { @@ -59,6 +60,7 @@ static const char* TAG_APP_IS_RUNNING = "IsRunning"; self.statusMessage = statusMsg; node = node->children; + DataManager* dataMan = [[DataManager alloc] init]; while (node != NULL) { //Log(LOG_D, @"node: %s", node->name); @@ -93,11 +95,11 @@ static const char* TAG_APP_IS_RUNNING = "IsRunning"; } appInfoNode = appInfoNode->next; } - App* app = [[App alloc] init]; - app.appName = appName; - app.appId = appId; + App* app = [dataMan createApp]; + app.name = appName; + app.id = appId; app.isRunning = appIsRunning; - if (app.appId != nil) { + if (app.id != nil) { [_appList addObject:app]; } } diff --git a/Limelight/UIAppView.m b/Limelight/UIAppView.m index f83be01..76e2e7b 100644 --- a/Limelight/UIAppView.m +++ b/Limelight/UIAppView.m @@ -24,7 +24,7 @@ _appButton = [UIButton buttonWithType:UIButtonTypeCustom]; UIImage* noImage = [UIImage imageNamed:@"NoAppImage"]; [_appButton setBackgroundImage:noImage forState:UIControlStateNormal]; - [_appButton setContentEdgeInsets:UIEdgeInsetsMake(0, 4, 0, 4)]; + [_appButton setContentEdgeInsets:UIEdgeInsetsMake(0, 4, 0, 4)]; [_appButton sizeToFit]; [_appButton addTarget:self action:@selector(appClicked) forControlEvents:UIControlEventTouchUpInside]; @@ -54,18 +54,28 @@ - (void) updateAppImage { [_appOverlay setHidden:!_app.isRunning]; - if (_app.appImage != nil && !(_app.appImage.size.width == 130.f && _app.appImage.size.height == 180.f)) { - _appButton.frame = CGRectMake(0, 0, _app.appImage.size.width / 2, _app.appImage.size.height / 2); - self.frame = CGRectMake(0, 0, _app.appImage.size.width / 2, _app.appImage.size.height / 2); - _appOverlay.frame = CGRectMake(0, 0, self.frame.size.width / 2.f, self.frame.size.height / 4.f); - _appOverlay.layer.shadowRadius = 4.0; - [_appOverlay setCenter:CGPointMake(self.frame.size.width/2, self.frame.size.height/6)]; - [_appButton setBackgroundImage:_app.appImage forState:UIControlStateNormal]; - [self setNeedsDisplay]; - } - // TODO: Improve no-app image detection - if (_app.appImage == nil || (_app.appImage.size.width == 130.f && _app.appImage.size.height == 180.f)) { // This size of image might be blank image received from GameStream. + BOOL noAppImage = false; + + if (_app.image != nil) { + UIImage* appImage = [UIImage imageWithData:_app.image]; + // This size of image might be blank image received from GameStream. + if (!(appImage.size.width == 130.f && appImage.size.height == 180.f)) { + _appButton.frame = CGRectMake(0, 0, appImage.size.width / 2, appImage.size.height / 2); + self.frame = CGRectMake(0, 0, appImage.size.width / 2, appImage.size.height / 2); + _appOverlay.frame = CGRectMake(0, 0, self.frame.size.width / 2.f, self.frame.size.height / 4.f); + _appOverlay.layer.shadowRadius = 4.0; + [_appOverlay setCenter:CGPointMake(self.frame.size.width/2, self.frame.size.height/6)]; + [_appButton setBackgroundImage:appImage forState:UIControlStateNormal]; + [self setNeedsDisplay]; + } else { + noAppImage = true; + } + } else { + noAppImage = true; + } + + if (noAppImage) { _appLabel = [[UILabel alloc] init]; CGFloat padding = 4.f; [_appLabel setFrame: CGRectMake(padding, padding, _appButton.frame.size.width - 2 * padding, _appButton.frame.size.height - 2 * padding)]; @@ -75,18 +85,10 @@ [_appLabel setTextAlignment:NSTextAlignmentCenter]; [_appLabel setLineBreakMode:NSLineBreakByWordWrapping]; [_appLabel setNumberOfLines:0]; - [_appLabel setText:_app.appName]; + [_appLabel setText:_app.name]; [_appButton addSubview:_appLabel]; } - + } -/* -// Only override drawRect: if you perform custom drawing. -// An empty implementation adversely affects performance during animation. -- (void)drawRect:(CGRect)rect { - // Drawing code -} -*/ - @end diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 3ba8137..c80e056 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -71,12 +71,24 @@ static NSArray* appList; } - (void)alreadyPaired { + BOOL usingCachedAppList = false; + if (_selectedHost.appList != nil) { + usingCachedAppList = true; + dispatch_async(dispatch_get_main_queue(), ^{ + appList = [_selectedHost.appList allObjects]; + _computerNameButton.title = _selectedHost.name; + [self.navigationController.navigationBar setNeedsLayout]; + [self updateApps]; + [self hideLoadingFrame]; + }); + } + Log(LOG_I, @"Using cached app list: %d", usingCachedAppList); dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ HttpManager* hMan = [[HttpManager alloc] initWithHost:_selectedHost.activeAddress uniqueId:_uniqueId deviceName:deviceName cert:_cert]; AppListResponse* appListResp = [[AppListResponse alloc] init]; [hMan executeRequestSynchronously:[HttpRequest requestForResponse:appListResp withUrlRequest:[hMan newAppListRequest]]]; - if (appListResp == nil || ![appListResp isStatusOk] || (appList = [appListResp getAppList]) == nil) { + if (appListResp == nil || ![appListResp isStatusOk] || [appListResp getAppList] == nil) { Log(LOG_W, @"Failed to get applist: %@", appListResp.statusMessage); [self hideLoadingFrame]; dispatch_async(dispatch_get_main_queue(), ^{ @@ -89,6 +101,12 @@ static NSArray* appList; [self showHostSelectionView]; }); } else { + if (!usingCachedAppList) { + appList = [[NSArray alloc] init]; + [_selectedHost addAppList:[NSSet setWithArray:appList]]; + } + [self mergeAppLists:[appListResp getAppList]]; + dispatch_async(dispatch_get_main_queue(), ^{ _computerNameButton.title = _selectedHost.name; [self.navigationController.navigationBar setNeedsLayout]; @@ -103,6 +121,23 @@ static NSArray* appList; }); } +- (void) mergeAppLists:(NSArray*) newList { + NSMutableArray* mergedList = [NSMutableArray arrayWithArray:appList]; + for (App* app in newList) { + BOOL appAlreadyInList = NO; + for (App* savedApp in mergedList) { + if (app.id == savedApp.id) { + appAlreadyInList = YES; + } + } + if (!appAlreadyInList) { + [mergedList addObject:app]; + [_selectedHost addAppListObject:app]; + } + } + appList = mergedList; +} + - (void)showHostSelectionView { appList = [[NSArray alloc] init]; [_appManager stopRetrieving]; @@ -250,10 +285,10 @@ static NSArray* appList; } - (void) appClicked:(App *)app { - Log(LOG_D, @"Clicked app: %@", app.appName); + Log(LOG_D, @"Clicked app: %@", app.name); _streamConfig = [[StreamConfiguration alloc] init]; _streamConfig.host = _selectedHost.activeAddress; - _streamConfig.appID = app.appId; + _streamConfig.appID = app.id; DataManager* dataMan = [[DataManager alloc] init]; Settings* streamSettings = [dataMan retrieveSettings]; @@ -272,16 +307,16 @@ static NSArray* appList; App* currentApp = [self findRunningApp]; if (currentApp != nil) { UIAlertController* alertController = [UIAlertController - alertControllerWithTitle: app.appName - message: [app.appId isEqualToString:currentApp.appId] ? @"" : [NSString stringWithFormat:@"%@ is currently running", currentApp.appName]preferredStyle:UIAlertControllerStyleAlert]; + alertControllerWithTitle: app.name + message: [app.id isEqualToString:currentApp.id] ? @"" : [NSString stringWithFormat:@"%@ is currently running", currentApp.name]preferredStyle:UIAlertControllerStyleAlert]; [alertController addAction:[UIAlertAction - actionWithTitle:[app.appId isEqualToString:currentApp.appId] ? @"Resume App" : @"Resume Running App" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ - Log(LOG_I, @"Resuming application: %@", currentApp.appName); + actionWithTitle:[app.id isEqualToString:currentApp.id] ? @"Resume App" : @"Resume Running App" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ + Log(LOG_I, @"Resuming application: %@", currentApp.name); [self performSegueWithIdentifier:@"createStreamFrame" sender:nil]; }]]; [alertController addAction:[UIAlertAction actionWithTitle: - [app.appId isEqualToString:currentApp.appId] ? @"Quit App" : @"Quit Running App and Start" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){ - Log(LOG_I, @"Quitting application: %@", currentApp.appName); + [app.id isEqualToString:currentApp.id] ? @"Quit App" : @"Quit Running App and Start" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){ + Log(LOG_I, @"Quitting application: %@", currentApp.name); dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ HttpManager* hMan = [[HttpManager alloc] initWithHost:_selectedHost.activeAddress uniqueId:_uniqueId deviceName:deviceName cert:_cert]; HttpResponse* quitResponse = [[HttpResponse alloc] init]; @@ -298,7 +333,7 @@ static NSArray* appList; preferredStyle:UIAlertControllerStyleAlert]; } // If it succeeds and we're to start streaming, segue to the stream and return - else if (![app.appId isEqualToString:currentApp.appId]) { + else if (![app.id isEqualToString:currentApp.id]) { currentApp.isRunning = NO; dispatch_async(dispatch_get_main_queue(), ^{ diff --git a/Moonlight.xcodeproj/project.pbxproj b/Moonlight.xcodeproj/project.pbxproj index b139a22..2a6b3df 100644 --- a/Moonlight.xcodeproj/project.pbxproj +++ b/Moonlight.xcodeproj/project.pbxproj @@ -65,12 +65,12 @@ FBD3494319FC9C04002D2A60 /* AppAssetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3494219FC9C04002D2A60 /* AppAssetManager.m */; }; FBD3495019FF2174002D2A60 /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3494F19FF2174002D2A60 /* SettingsViewController.m */; }; FBD3495319FF36FB002D2A60 /* SWRevealViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3495219FF36FB002D2A60 /* SWRevealViewController.m */; }; - FBD3495B1A004411002D2A60 /* Host.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3495A1A004411002D2A60 /* Host.m */; }; FBD3495E1A004412002D2A60 /* Settings.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3495D1A004412002D2A60 /* Settings.m */; }; FBD349621A0089F6002D2A60 /* DataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD349611A0089F6002D2A60 /* DataManager.m */; }; FBDE86E019F7A837001C18A8 /* UIComputerView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86DF19F7A837001C18A8 /* UIComputerView.m */; }; FBDE86E619F82297001C18A8 /* UIAppView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86E519F82297001C18A8 /* UIAppView.m */; }; - FBDE86E919F82315001C18A8 /* App.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86E819F82315001C18A8 /* App.m */; }; + FBFCB3311B50B29400089F8A /* Host.m in Sources */ = {isa = PBXBuildFile; fileRef = FBFCB3301B50B29400089F8A /* Host.m */; }; + FBFCB3351B50B29400089F8A /* App.m in Sources */ = {isa = PBXBuildFile; fileRef = FBFCB3341B50B29400089F8A /* App.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -257,6 +257,7 @@ FB9AFD3F1A7E127D00872C98 /* AppListResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppListResponse.m; sourceTree = ""; }; FB9AFD411A7F0C6900872C98 /* Controller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Controller.h; sourceTree = ""; }; FB9AFD421A7F0C6900872C98 /* Controller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Controller.m; sourceTree = ""; }; + FBB460391B50ACE400F3099C /* Moonlight v1.0.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.0.xcdatamodel"; sourceTree = ""; }; FBD1C8E01A8AD69E00C6703C /* Logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logger.h; sourceTree = ""; }; FBD1C8E11A8AD71400C6703C /* Logger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Logger.m; sourceTree = ""; }; FBD3494119FC9C04002D2A60 /* AppAssetManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppAssetManager.h; sourceTree = ""; }; @@ -266,8 +267,6 @@ FBD3495119FF36FB002D2A60 /* SWRevealViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWRevealViewController.h; sourceTree = ""; }; FBD3495219FF36FB002D2A60 /* SWRevealViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWRevealViewController.m; sourceTree = ""; }; FBD349571A003F05002D2A60 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; - FBD349591A004411002D2A60 /* Host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Host.h; path = Database/Host.h; sourceTree = ""; }; - FBD3495A1A004411002D2A60 /* Host.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Host.m; path = Database/Host.m; sourceTree = ""; }; FBD3495C1A004412002D2A60 /* Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Settings.h; path = Database/Settings.h; sourceTree = ""; }; FBD3495D1A004412002D2A60 /* Settings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Settings.m; path = Database/Settings.m; sourceTree = ""; }; FBD349601A0089F6002D2A60 /* DataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataManager.h; path = Database/DataManager.h; sourceTree = ""; }; @@ -276,8 +275,12 @@ FBDE86DF19F7A837001C18A8 /* UIComputerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIComputerView.m; sourceTree = ""; }; FBDE86E419F82297001C18A8 /* UIAppView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIAppView.h; sourceTree = ""; }; FBDE86E519F82297001C18A8 /* UIAppView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIAppView.m; sourceTree = ""; }; - FBDE86E719F82315001C18A8 /* App.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = App.h; path = ../App.h; sourceTree = ""; }; - FBDE86E819F82315001C18A8 /* App.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = App.m; path = ../App.m; sourceTree = ""; }; + FBFCB32E1B50B29400089F8A /* Host+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "Host+CoreDataProperties.h"; path = "Database/Host+CoreDataProperties.h"; sourceTree = ""; }; + FBFCB32F1B50B29400089F8A /* Host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Host.h; path = Database/Host.h; sourceTree = ""; }; + FBFCB3301B50B29400089F8A /* Host.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Host.m; path = Database/Host.m; sourceTree = ""; }; + FBFCB3321B50B29400089F8A /* App+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "App+CoreDataProperties.h"; path = "Database/App+CoreDataProperties.h"; sourceTree = ""; }; + FBFCB3331B50B29400089F8A /* App.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = App.h; path = Database/App.h; sourceTree = ""; }; + FBFCB3341B50B29400089F8A /* App.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = App.m; path = Database/App.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -440,7 +443,7 @@ children = ( FB9AFD2F1A7C979700872C98 /* Http */, FB9AFD341A7D877B00872C98 /* Discovery */, - FB9AFD331A7D876F00872C98 /* AppAsset */, + FB9AFD331A7D876F00872C98 /* AppList */, FB89461319F646E200339C8A /* PairManager.h */, FB89461419F646E200339C8A /* PairManager.m */, FB4678FD1A565DAC00377732 /* WakeOnLanManager.h */, @@ -467,8 +470,6 @@ FB89461E19F646E200339C8A /* Utility */ = { isa = PBXGroup; children = ( - FBDE86E719F82315001C18A8 /* App.h */, - FBDE86E819F82315001C18A8 /* App.m */, FB89462119F646E200339C8A /* Utils.h */, FB89462219F646E200339C8A /* Utils.m */, FBD1C8E01A8AD69E00C6703C /* Logger.h */, @@ -674,7 +675,7 @@ name = Http; sourceTree = ""; }; - FB9AFD331A7D876F00872C98 /* AppAsset */ = { + FB9AFD331A7D876F00872C98 /* AppList */ = { isa = PBXGroup; children = ( FBD3494119FC9C04002D2A60 /* AppAssetManager.h */, @@ -682,7 +683,7 @@ FB9AFD301A7D867C00872C98 /* AppAssetRetriever.h */, FB9AFD311A7D867C00872C98 /* AppAssetRetriever.m */, ); - name = AppAsset; + name = AppList; sourceTree = ""; }; FB9AFD341A7D877B00872C98 /* Discovery */ = { @@ -701,10 +702,14 @@ FBD3495F1A004453002D2A60 /* Database */ = { isa = PBXGroup; children = ( + FBFCB3321B50B29400089F8A /* App+CoreDataProperties.h */, + FBFCB3331B50B29400089F8A /* App.h */, + FBFCB3341B50B29400089F8A /* App.m */, + FBFCB32E1B50B29400089F8A /* Host+CoreDataProperties.h */, + FBFCB32F1B50B29400089F8A /* Host.h */, + FBFCB3301B50B29400089F8A /* Host.m */, FBD3495C1A004412002D2A60 /* Settings.h */, FBD3495D1A004412002D2A60 /* Settings.m */, - FBD349591A004411002D2A60 /* Host.h */, - FBD3495A1A004411002D2A60 /* Host.m */, FBD349601A0089F6002D2A60 /* DataManager.h */, FBD349611A0089F6002D2A60 /* DataManager.m */, ); @@ -819,15 +824,14 @@ FB89462919F646E200339C8A /* mkcert.c in Sources */, FB9AFD281A7C84ED00872C98 /* HttpResponse.m in Sources */, FBDE86E019F7A837001C18A8 /* UIComputerView.m in Sources */, - FBDE86E919F82315001C18A8 /* App.m in Sources */, FB89463019F646E200339C8A /* StreamConfiguration.m in Sources */, + FBFCB3311B50B29400089F8A /* Host.m in Sources */, FBD3495319FF36FB002D2A60 /* SWRevealViewController.m in Sources */, FBD3495019FF2174002D2A60 /* SettingsViewController.m in Sources */, FB89462C19F646E200339C8A /* HttpManager.m in Sources */, FB89462D19F646E200339C8A /* MDNSManager.m in Sources */, FB89462B19F646E200339C8A /* StreamView.m in Sources */, FB4678FA1A55FFAD00377732 /* DiscoveryManager.m in Sources */, - FBD3495B1A004411002D2A60 /* Host.m in Sources */, FB89463519F646E200339C8A /* MainFrameViewController.m in Sources */, FBD1C8E21A8AD71400C6703C /* Logger.m in Sources */, FB89463619F646E200339C8A /* StreamFrameViewController.m in Sources */, @@ -842,6 +846,7 @@ FB89462A19F646E200339C8A /* ControllerSupport.m in Sources */, FB9AFD3D1A7E111600872C98 /* AppAssetResponse.m in Sources */, FBD349621A0089F6002D2A60 /* DataManager.m in Sources */, + FBFCB3351B50B29400089F8A /* App.m in Sources */, FB4A23B81A9D3637004D2EF2 /* LoadingFrameViewController.m in Sources */, FB9AFD3A1A7E05CE00872C98 /* ServerInfoResponse.m in Sources */, FB89463119F646E200339C8A /* StreamManager.m in Sources */, @@ -1033,11 +1038,12 @@ FB290D0519B2C406004C83CF /* Limelight.xcdatamodeld */ = { isa = XCVersionGroup; children = ( + FBB460391B50ACE400F3099C /* Moonlight v1.0.xcdatamodel */, FB6549621A60B4A9001C8F39 /* Limelight 0.3.1.xcdatamodel */, FB4678F21A51BDCB00377732 /* Limelight 0.3.0.xcdatamodel */, FB290D0619B2C406004C83CF /* Limelight.xcdatamodel */, ); - currentVersion = FB6549621A60B4A9001C8F39 /* Limelight 0.3.1.xcdatamodel */; + currentVersion = FBB460391B50ACE400F3099C /* Moonlight v1.0.xcdatamodel */; path = Limelight.xcdatamodeld; sourceTree = ""; versionGroupType = wrapper.xcdatamodel;