Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Bleisteiner
committed
May 17, 2017
0 parents
commit a30a01d
Showing
1,217 changed files
with
26,349 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
######################### | ||
# .gitignore file for Xcode4 / OS X Source projects | ||
# | ||
# Version 2.0 | ||
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | ||
# | ||
# 2013 updates: | ||
# - fixed the broken "save personal Schemes" | ||
# | ||
# NB: if you are storing "built" products, this WILL NOT WORK, | ||
# and you should use a different .gitignore (or none at all) | ||
# This file is for SOURCE projects, where there are many extra | ||
# files that we want to exclude | ||
# | ||
######################### | ||
|
||
##### | ||
# OS X temporary files that should never be committed | ||
|
||
.DS_Store | ||
*.swp | ||
*.lock | ||
profile | ||
|
||
|
||
#### | ||
# Xcode temporary files that should never be committed | ||
# | ||
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this... | ||
|
||
*~.nib | ||
|
||
|
||
#### | ||
# Xcode build files - | ||
# | ||
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" | ||
|
||
DerivedData/ | ||
|
||
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" | ||
|
||
build/ | ||
|
||
|
||
##### | ||
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) | ||
# | ||
# This is complicated: | ||
# | ||
# SOMETIMES you need to put this file in version control. | ||
# Apple designed it poorly - if you use "custom executables", they are | ||
# saved in this file. | ||
# 99% of projects do NOT use those, so they do NOT want to version control this file. | ||
# ..but if you're in the 1%, comment out the line "*.pbxuser" | ||
|
||
*.pbxuser | ||
*.mode1v3 | ||
*.mode2v3 | ||
*.perspectivev3 | ||
# NB: also, whitelist the default ones, some projects need to use these | ||
!default.pbxuser | ||
!default.mode1v3 | ||
!default.mode2v3 | ||
!default.perspectivev3 | ||
|
||
|
||
#### | ||
# Xcode 4 - semi-personal settings | ||
# | ||
# | ||
# OPTION 1: --------------------------------- | ||
# throw away ALL personal settings (including custom schemes! | ||
# - unless they are "shared") | ||
# | ||
# NB: this is exclusive with OPTION 2 below | ||
xcuserdata | ||
|
||
# OPTION 2: --------------------------------- | ||
# get rid of ALL personal settings, but KEEP SOME OF THEM | ||
# - NB: you must manually uncomment the bits you want to keep | ||
# | ||
# NB: this is exclusive with OPTION 1 above | ||
# | ||
#xcuserdata/**/* | ||
|
||
# (requires option 2 above): Personal Schemes | ||
# | ||
#!xcuserdata/**/xcschemes/* | ||
|
||
#### | ||
# XCode 4 workspaces - more detailed | ||
# | ||
# Workspaces are important! They are a core feature of Xcode - don't exclude them :) | ||
# | ||
# Workspace layout is quite spammy. For reference: | ||
# | ||
# /(root)/ | ||
# /(project-name).xcodeproj/ | ||
# project.pbxproj | ||
# /project.xcworkspace/ | ||
# contents.xcworkspacedata | ||
# /xcuserdata/ | ||
# /(your name)/xcuserdatad/ | ||
# UserInterfaceState.xcuserstate | ||
# /xcsshareddata/ | ||
# /xcschemes/ | ||
# (shared scheme name).xcscheme | ||
# /xcuserdata/ | ||
# /(your name)/xcuserdatad/ | ||
# (private scheme).xcscheme | ||
# xcschememanagement.plist | ||
# | ||
# | ||
|
||
#### | ||
# Xcode 4 - Deprecated classes | ||
# | ||
# Allegedly, if you manually "deprecate" your classes, they get moved here. | ||
# | ||
# We're using source-control, so this is a "feature" that we do not want! | ||
|
||
*.moved-aside | ||
|
||
|
||
#### | ||
# UNKNOWN: recommended by others, but I can't discover what these files are | ||
# | ||
# ...none. Everything is now explained. |
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
GeoLicious.xcodeproj/project.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
GeoLicious.xcodeproj/project.xcworkspace/xcshareddata/GeoLicious.xccheckout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?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>IDESourceControlProjectFavoriteDictionaryKey</key> | ||
<false/> | ||
<key>IDESourceControlProjectIdentifier</key> | ||
<string>0A3A5A71-5C1A-44D5-89C6-FB8A43C787F2</string> | ||
<key>IDESourceControlProjectName</key> | ||
<string>project</string> | ||
<key>IDESourceControlProjectOriginsDictionary</key> | ||
<dict> | ||
<key>C69C7DB86BF0AEADDC6780D572AA08EF8531E95B</key> | ||
<string>https://github.com/da3x/GeoLicious.git</string> | ||
</dict> | ||
<key>IDESourceControlProjectPath</key> | ||
<string>GeoLicious.xcodeproj/project.xcworkspace</string> | ||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key> | ||
<dict> | ||
<key>C69C7DB86BF0AEADDC6780D572AA08EF8531E95B</key> | ||
<string>../..</string> | ||
</dict> | ||
<key>IDESourceControlProjectURL</key> | ||
<string>https://github.com/da3x/GeoLicious.git</string> | ||
<key>IDESourceControlProjectVersion</key> | ||
<integer>111</integer> | ||
<key>IDESourceControlProjectWCCIdentifier</key> | ||
<string>C69C7DB86BF0AEADDC6780D572AA08EF8531E95B</string> | ||
<key>IDESourceControlProjectWCConfigurations</key> | ||
<array> | ||
<dict> | ||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key> | ||
<string>public.vcs.git</string> | ||
<key>IDESourceControlWCCIdentifierKey</key> | ||
<string>C69C7DB86BF0AEADDC6780D572AA08EF8531E95B</string> | ||
<key>IDESourceControlWCCName</key> | ||
<string>GeoLicious</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// CloudUtils.h | ||
// GeoLicious | ||
// | ||
// Created by Daniel Bleisteiner on 05.08.16. | ||
// Copyright © 2016 Daniel Bleisteiner. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface CloudUtils : NSObject | ||
|
||
+ (void) updateCloudDrive; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// | ||
// CloudUtils.m | ||
// GeoLicious | ||
// | ||
// Created by Daniel Bleisteiner on 05.08.16. | ||
// Copyright © 2016 Daniel Bleisteiner. All rights reserved. | ||
// | ||
|
||
#import "CloudUtils.h" | ||
|
||
@interface CloudUtils () | ||
@property(nonatomic, strong) NSMetadataQuery *query; | ||
@end | ||
|
||
@implementation CloudUtils | ||
|
||
static CloudUtils *singleton; | ||
|
||
+ (CloudUtils *) sharedInstance | ||
{ | ||
if (singleton == nil) { | ||
singleton = [[CloudUtils alloc] init]; | ||
} | ||
return singleton; | ||
} | ||
|
||
+ (void) updateCloudDrive | ||
{ | ||
NSLog(@"in updateCloudDrive"); | ||
|
||
CloudUtils *utils = [CloudUtils sharedInstance]; | ||
|
||
// Wichtig: Das Query muss STRONG gebunden sein... sonst ist das zu früh wieder weg! | ||
utils.query = [[NSMetadataQuery alloc] init]; | ||
utils.query.searchScopes = [NSArray arrayWithObjects:NSMetadataQueryUbiquitousDocumentsScope, NSMetadataQueryUbiquitousDataScope,nil]; | ||
utils.query.predicate = [NSPredicate predicateWithFormat:@"%K like[cd] %@", NSMetadataItemFSNameKey, @"*.db"]; | ||
|
||
[[NSNotificationCenter defaultCenter] addObserver:utils | ||
selector:@selector(queryDidFinishGathering:) | ||
name:NSMetadataQueryDidFinishGatheringNotification | ||
object:utils.query]; | ||
|
||
[[NSNotificationCenter defaultCenter] addObserver:utils | ||
selector:@selector(queryDidUpdate:) | ||
name:NSMetadataQueryDidUpdateNotification | ||
object:utils.query]; | ||
|
||
dispatch_async(dispatch_get_main_queue(), ^{ | ||
// Das scheitert, falls schon ein solches Query läuft... was aber nicht schlimm ist. | ||
[utils.query startQuery]; | ||
}); | ||
} | ||
|
||
// Diese Methode kommt ins Spiel, wenn es zu viele Ergebnisse auf einmal sind... | ||
// Dann werden einige davon schon gemeldet, bevor das Query ganz fertig ist... | ||
- (void) queryDidUpdate: (NSNotification *) notification | ||
{ | ||
NSLog(@"in queryDidUpdate:"); | ||
|
||
NSMetadataQuery *query = [notification object]; | ||
[query disableUpdates]; | ||
NSError *error = nil; | ||
for (NSMetadataItem *item in [query results]) { | ||
NSURL *url = [item valueForAttribute:NSMetadataItemURLKey]; | ||
NSString *status = nil; | ||
if ([url getResourceValue:&status forKey:NSURLUbiquitousItemDownloadingStatusKey error:&error] == YES) { | ||
if ([status isEqualToString:NSURLUbiquitousItemDownloadingStatusNotDownloaded] == YES) { | ||
// NSLog(@"starting download of %@", url); | ||
[[NSFileManager defaultManager] startDownloadingUbiquitousItemAtURL:url error:&error]; | ||
} | ||
} | ||
} | ||
[query enableUpdates]; | ||
} | ||
|
||
- (void) queryDidFinishGathering: (NSNotification *) notification | ||
{ | ||
NSLog(@"in queryDidFinishGathering:"); | ||
|
||
NSMetadataQuery *query = [notification object]; | ||
[query disableUpdates]; | ||
[query stopQuery]; | ||
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSMetadataQueryDidFinishGatheringNotification object:query]; | ||
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSMetadataQueryDidUpdateNotification object:query]; | ||
|
||
NSError *error = nil; | ||
for (NSMetadataItem *item in [query results]) { | ||
NSURL *url = [item valueForAttribute:NSMetadataItemURLKey]; | ||
// NSLog(@"starting download of %@", url); | ||
[[NSFileManager defaultManager] startDownloadingUbiquitousItemAtURL:url error:&error]; | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// CoreData.h | ||
// GeoLicious | ||
// | ||
// Created by Daniel Bleisteiner on 28.05.14. | ||
// Copyright (c) 2014 Daniel Bleisteiner. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <CoreData/CoreData.h> | ||
|
||
@interface CoreData : NSObject | ||
|
||
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext; | ||
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel; | ||
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator; | ||
|
||
- (void) saveContext; | ||
- (NSURL *) applicationDocumentsDirectory; | ||
|
||
@end |
Oops, something went wrong.