Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup project files and structure, fix all build warnings #391

Merged
merged 8 commits into from
May 19, 2019
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,294 changes: 1,294 additions & 0 deletions Decred Wallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B3B4698E228F0C2D00A68EDD"
BuildableName = "Decred Wallet.app"
BlueprintName = "Decred Wallet"
ReferencedContainer = "container:Decred Wallet.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Testnet Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Testnet Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B3B4698E228F0C2D00A68EDD"
BuildableName = "Decred Wallet.app"
BlueprintName = "Decred Wallet"
ReferencedContainer = "container:Decred Wallet.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Testnet Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B3B4698E228F0C2D00A68EDD"
BuildableName = "Decred Wallet.app"
BlueprintName = "Decred Wallet"
ReferencedContainer = "container:Decred Wallet.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Testnet Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Testnet Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,26 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DDA3E26920292EF900C83D18"
BuildableName = "DecredWallet.app"
BlueprintIdentifier = "B3B4698E228F0C2D00A68EDD"
BuildableName = "Decred Wallet.app"
BlueprintName = "Decred Wallet"
ReferencedContainer = "container:decred_wallet.xcodeproj">
ReferencedContainer = "container:Decred Wallet.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "mainnet"
buildConfiguration = "Mainnet Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DDA3E27D20292EF900C83D18"
BuildableName = "Decred WalletTests.xctest"
BlueprintName = "Decred WalletTests"
ReferencedContainer = "container:decred_wallet.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DDA3E26920292EF900C83D18"
BuildableName = "DecredWallet.app"
BlueprintName = "Decred Wallet"
ReferencedContainer = "container:decred_wallet.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "mainnet"
buildConfiguration = "Mainnet Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand All @@ -65,37 +46,37 @@
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DDA3E26920292EF900C83D18"
BuildableName = "DecredWallet.app"
BlueprintIdentifier = "B3B4698E228F0C2D00A68EDD"
BuildableName = "Decred Wallet.app"
BlueprintName = "Decred Wallet"
ReferencedContainer = "container:decred_wallet.xcodeproj">
ReferencedContainer = "container:Decred Wallet.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "mainnet"
buildConfiguration = "Mainnet Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Zombies.tracetemplate"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DDA3E26920292EF900C83D18"
BuildableName = "DecredWallet.app"
BlueprintIdentifier = "B3B4698E228F0C2D00A68EDD"
BuildableName = "Decred Wallet.app"
BlueprintName = "Decred Wallet"
ReferencedContainer = "container:decred_wallet.xcodeproj">
ReferencedContainer = "container:Decred Wallet.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "mainnet">
buildConfiguration = "Mainnet Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "mainnet"
buildConfiguration = "Mainnet Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ import CoreData
import Dcrlibwallet
import SlideMenuControllerSwift
import UserNotifications

// compile-time preprocessor, following code will only be added if compiling for testnet
#if IsTestnet
import Fabric
import Crashlytics
#endif

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
static var walletLoader: WalletLoader = WalletLoader()

func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// setup crash reporting for testnet build only
if GlobalConstants.App.IsTestnet {
Fabric.with([Crashlytics.self])
}
// compile-time preprocessor, following code will only be added if compiling for testnet
#if IsTestnet
Fabric.with([Crashlytics.self])
print("crashlytics set up on testnet")
#endif

UNUserNotificationCenter.current().delegate = self
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge , .sound]) { (granted, error) in
Expand Down Expand Up @@ -57,6 +62,18 @@ extension AppDelegate {
return UIApplication.shared.delegate as! AppDelegate
}

class var compileDate: Date {
let bundleName = Bundle.main.infoDictionary!["CFBundleName"] as? String ?? "Info.plist"

if let infoPath = Bundle.main.path(forResource: bundleName, ofType: nil),
let infoAttr = try? FileManager.default.attributesOfItem(atPath: infoPath),
let infoDate = infoAttr[FileAttributeKey.creationDate] as? Date {
return infoDate
}

return Date()
}

func setAndDisplayRootViewController(_ vc: UIViewController) {
self.window?.rootViewController = vc
self.window?.makeKeyAndVisible()
Expand Down
Loading