Skip to content

Commit

Permalink
Cleanup project files and structure, fix all build warnings (#391)
Browse files Browse the repository at this point in the history
* restore files from other freshly created project clone

* rename target

* restore fabric configuration

* reduce target ios version, add istestnet swift flag

* correct implementation f testnet/mainnet schemes config

* format plist

* correct SFSafariViewController usage

* correct SFSafariViewController usage
  • Loading branch information
itswisdomagain authored and macsleven committed May 19, 2019
1 parent baa5a21 commit 146e31c
Show file tree
Hide file tree
Showing 335 changed files with 1,594 additions and 7,683 deletions.
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.

File renamed without changes.
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
File renamed without changes.
File renamed without changes
File renamed without changes
Loading

0 comments on commit 146e31c

Please sign in to comment.