Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ xcuserdata/

## MacOS
.DS_Store

## Secrets
Secrets.xcconfig
Secrets.swift
14 changes: 1 addition & 13 deletions app/BudgetIntent/BudgetIntent.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.rafaelsoh.dime</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudKit</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)com.rafaelsoh.dime</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.rafaelsoh.dime</string>
<string>group.com.vanxun.dime</string>
</array>
</dict>
</plist>
14 changes: 1 addition & 13 deletions app/BudgetIntentUI/BudgetIntentUI.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.rafaelsoh.dime</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudKit</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)com.rafaelsoh.dime</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.rafaelsoh.dime</string>
<string>group.com.vanxun.dime</string>
</array>
</dict>
</plist>
4 changes: 2 additions & 2 deletions app/ExpenditureWidget/BudgetWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,12 @@ struct BudgetWidgetEntryView: View {
}

struct WidgetBudgetDollarView: View {
@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var showCents: Bool = true
@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var showCents: Bool = true

var amount: Double
var red: Bool

@AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
var currencySymbol: String {
return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
}
Expand Down
8 changes: 4 additions & 4 deletions app/ExpenditureWidget/InsightsWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct InsightsProvider: IntentTimelineProvider {
// calendar initialization
var calendar = Calendar(identifier: .gregorian)

calendar.firstWeekday = UserDefaults(suiteName: "group.com.rafaelsoh.dime")!.integer(forKey: "firstWeekday")
calendar.firstWeekday = UserDefaults(suiteName: "group.com.vanxun.dime")!.integer(forKey: "firstWeekday")
calendar.minimumDaysInFirstWeek = 4

var dictionary = [Date: Double]()
Expand Down Expand Up @@ -300,13 +300,13 @@ struct InsightsWidgetEntryView: View {
let monthNumberArray = [1, 4, 7, 10]
let monthNames: [Int: String] = [1: "Jan", 4: "Apr", 7: "Jul", 10: "Oct"]

@AppStorage("firstDayOfMonth", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var firstDayOfMonth: Int = 1
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
@AppStorage("firstDayOfMonth", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var firstDayOfMonth: Int = 1
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
var currencySymbol: String {
return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
}

@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var showCents: Bool = true
@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var showCents: Bool = true

var dollarText: String {
if entry.amount < 10000 && showCents {
Expand Down
4 changes: 2 additions & 2 deletions app/ExpenditureWidget/LockBudgetWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@ struct LockBudgetWidgetEntryView: View {
return String(localized: "\(Int(round((entry.totalSpent / entry.budget.budgetAmount) * 100)))% spent")
}

@AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
var currencySymbol: String {
return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
}

@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var showCents: Bool = true
@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var showCents: Bool = true

var body: some View {
switch widgetFamily {
Expand Down
4 changes: 2 additions & 2 deletions app/ExpenditureWidget/MainBudgetWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ struct MainBudgetWidgetEntryView: View {
return size > systemSmallWidgetText.widthOfRoundedString(size: 10, weight: .semibold)
}

@AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
var currencySymbol: String {
return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
}

@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var showCents: Bool = true
@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var showCents: Bool = true

var body: some View {
switch widgetFamily {
Expand Down
2 changes: 1 addition & 1 deletion app/ExpenditureWidget/NewExpenseWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct NewExpenseWidgetEntry: TimelineEntry {
struct NewExpenseWidgetEntryView: View {
let entry: NewExpenseProvider.Entry

@AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
var currencySymbol: String {
return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
}
Expand Down
6 changes: 3 additions & 3 deletions app/ExpenditureWidget/RecentTransactionsWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ struct ExpenditureWidgetEntryView: View {
@Environment(\.widgetFamily) var widgetFamily
let entry: Provider.Entry

@AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
var currencySymbol: String {
return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
}

@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var showCents: Bool = true
@AppStorage("showCents", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var showCents: Bool = true

var inlineSubtitleText: String {
switch entry.duration {
Expand Down Expand Up @@ -596,7 +596,7 @@ struct RecentTransactionsDollarView: View {
var net: Bool
var bigger: Bool = false

@AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
@AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
var currencySymbol: String {
return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
}
Expand Down
4 changes: 2 additions & 2 deletions app/ExpenditureWidget/TemplateTransactionWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
//
// let entry: TemplateTransactionWidgetProvider.Entry
//
// @AppStorage("showCents", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var showCents: Bool = true
// @AppStorage("currency", store: UserDefaults(suiteName: "group.com.rafaelsoh.dime")) var currency: String = Locale.current.currencyCode!
// @AppStorage("showCents", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var showCents: Bool = true
// @AppStorage("currency", store: UserDefaults(suiteName: "group.com.vanxun.dime")) var currency: String = Locale.current.currencyCode!
// var currencySymbol: String {
// return Locale.current.localizedCurrencySymbol(forCurrencyCode: currency)!
// }
Expand Down
14 changes: 1 addition & 13 deletions app/ExpenditureWidgetExtension.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,9 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.rafaelsoh.dime</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudKit</string>
</array>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)com.rafaelsoh.dime</string>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.rafaelsoh.dime</string>
<string>group.com.vanxun.dime</string>
</array>
</dict>
</plist>
Loading