diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0d63849 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Cores/DeltaCore"] + path = Cores/DeltaCore + url = git@github.com:rileytestut/DeltaCore.git diff --git a/Cores/DeltaCore b/Cores/DeltaCore new file mode 160000 index 0000000..b8398a5 --- /dev/null +++ b/Cores/DeltaCore @@ -0,0 +1 @@ +Subproject commit b8398a50386bfa1291f584391de491175bdd7515 diff --git a/Delta.xcodeproj/project.pbxproj b/Delta.xcodeproj/project.pbxproj index a85d275..17b347e 100644 --- a/Delta.xcodeproj/project.pbxproj +++ b/Delta.xcodeproj/project.pbxproj @@ -8,6 +8,8 @@ /* Begin PBXBuildFile section */ BF46894F1AAC46EF00A2586D /* DirectoryContentsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF46894E1AAC46EF00A2586D /* DirectoryContentsDataSource.swift */; }; + BF9F4FCF1AAD7B87004C9500 /* DeltaCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF9F4FCE1AAD7B87004C9500 /* DeltaCore.framework */; }; + BF9F4FD01AAD7B87004C9500 /* DeltaCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BF9F4FCE1AAD7B87004C9500 /* DeltaCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; BFFA71DD1AAC406100EE9DD1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFFA71DC1AAC406100EE9DD1 /* AppDelegate.swift */; }; BFFA71DF1AAC406100EE9DD1 /* GamesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFFA71DE1AAC406100EE9DD1 /* GamesViewController.swift */; }; BFFA71E21AAC406100EE9DD1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BFFA71E01AAC406100EE9DD1 /* Main.storyboard */; }; @@ -15,8 +17,23 @@ BFFA71E71AAC406100EE9DD1 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = BFFA71E51AAC406100EE9DD1 /* LaunchScreen.xib */; }; /* End PBXBuildFile section */ +/* Begin PBXCopyFilesBuildPhase section */ + BF9F4FCC1AAD7AEE004C9500 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + BF9F4FD01AAD7B87004C9500 /* DeltaCore.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ BF46894E1AAC46EF00A2586D /* DirectoryContentsDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectoryContentsDataSource.swift; sourceTree = ""; }; + BF9F4FCE1AAD7B87004C9500 /* DeltaCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = DeltaCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; BFFA71D71AAC406100EE9DD1 /* Delta.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Delta.app; sourceTree = BUILT_PRODUCTS_DIR; }; BFFA71DB1AAC406100EE9DD1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BFFA71DC1AAC406100EE9DD1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -31,6 +48,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + BF9F4FCF1AAD7B87004C9500 /* DeltaCore.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -46,11 +64,20 @@ name = "Game Selection"; sourceTree = ""; }; + BF9F4FCD1AAD7B25004C9500 /* Frameworks */ = { + isa = PBXGroup; + children = ( + BF9F4FCE1AAD7B87004C9500 /* DeltaCore.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; BFFA71CE1AAC406100EE9DD1 = { isa = PBXGroup; children = ( BFFA71D91AAC406100EE9DD1 /* Delta */, BFFA71D81AAC406100EE9DD1 /* Products */, + BF9F4FCD1AAD7B25004C9500 /* Frameworks */, ); sourceTree = ""; }; @@ -93,6 +120,7 @@ BFFA71D31AAC406100EE9DD1 /* Sources */, BFFA71D41AAC406100EE9DD1 /* Frameworks */, BFFA71D51AAC406100EE9DD1 /* Resources */, + BF9F4FCC1AAD7AEE004C9500 /* Embed Frameworks */, ); buildRules = ( ); @@ -268,6 +296,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Delta/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -278,6 +307,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Delta/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/Delta.xcworkspace/contents.xcworkspacedata b/Delta.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..339ebcf --- /dev/null +++ b/Delta.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/Delta/GamesViewController.swift b/Delta/GamesViewController.swift index 5d3af11..cd6efcf 100644 --- a/Delta/GamesViewController.swift +++ b/Delta/GamesViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import DeltaCore class GamesViewController: UITableViewController { @@ -55,7 +56,7 @@ class GamesViewController: UITableViewController if self.directoryContentsDataSource == nil { - let alertController = UIAlertController(title: "Games Directory Invalid", message: "Please ensure the current games directory exists, then restart the app.", preferredStyle: .Alert) + let alertController = UIAlertController(title: "Invalid Games Directory", message: "Please ensure the current games directory exists, then restart Delta.", preferredStyle: .Alert) alertController.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Cancel, handler: nil)) self.presentViewController(alertController, animated: true, completion: nil) @@ -67,7 +68,24 @@ class GamesViewController: UITableViewController super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } - - + + + //MARK: UITableViewDelegate + + + override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) + { + if let URL = self.directoryContentsDataSource?.URLAtIndexPath(indexPath), game = Game.gameWithURL(URL) + { + println(game.name) + } + else + { + let alertController = UIAlertController(title: "Unsupported Game", message: "This game is not supported by Delta. Please select another game.", preferredStyle: .Alert) + alertController.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Cancel, handler: nil)) + + self.presentViewController(alertController, animated: true, completion: nil) + } + } }