Skip to content

Commit

Permalink
Started preparations for feedback collection
Browse files Browse the repository at this point in the history
  • Loading branch information
oolxg committed Jun 8, 2023
1 parent 56b2bdb commit 306a46b
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 357 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea/
.periphery.yml
.DS_Store

Config.xcconfig
20 changes: 4 additions & 16 deletions Hanami.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
085DB65F28E11BD100AF5323 /* NukeUI in Frameworks */ = {isa = PBXBuildFile; productRef = 085DB65E28E11BD100AF5323 /* NukeUI */; };
086A3DDA296F6BCB00CF434C /* PopupView in Frameworks */ = {isa = PBXBuildFile; productRef = 086A3DD9296F6BCB00CF434C /* PopupView */; };
086A3DDC297029C700CF434C /* Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 086A3DDB297029C700CF434C /* Collection.swift */; };
08700EF3295769A90019E615 /* LiveTextHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08700EF2295769A90019E615 /* LiveTextHandler.swift */; };
08700EF629576A390019E615 /* LiveText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08700EF529576A390019E615 /* LiveText.swift */; };
08700EFA29578C2B0019E615 /* Shimmering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08700EF929578C2B0019E615 /* Shimmering.swift */; };
088934AD29C66F3D00AA81D4 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 088934AC29C66F3D00AA81D4 /* AboutView.swift */; };
088934AF29C7365500AA81D4 /* MangaChapterLoaderFeature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 088934AE29C7365500AA81D4 /* MangaChapterLoaderFeature.swift */; };
Expand Down Expand Up @@ -191,8 +189,6 @@
0859979628F4C4230095422C /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
0859979B28F6DBE50095422C /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
086A3DDB297029C700CF434C /* Collection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection.swift; sourceTree = "<group>"; };
08700EF2295769A90019E615 /* LiveTextHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveTextHandler.swift; sourceTree = "<group>"; };
08700EF529576A390019E615 /* LiveText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveText.swift; sourceTree = "<group>"; };
08700EF929578C2B0019E615 /* Shimmering.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Shimmering.swift; sourceTree = "<group>"; };
088934AC29C66F3D00AA81D4 /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = "<group>"; };
088934AE29C7365500AA81D4 /* MangaChapterLoaderFeature.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MangaChapterLoaderFeature.swift; sourceTree = "<group>"; };
Expand All @@ -202,6 +198,7 @@
08A8F45D2902A9F5001EECD9 /* AuthorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorView.swift; sourceTree = "<group>"; };
08AC1BDB28C8501800017CAA /* UIDevice.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIDevice.swift; sourceTree = "<group>"; };
08B1346A28D2A8D000D1C85B /* Set.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Set.swift; sourceTree = "<group>"; };
08C237CB2A322646003E122D /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
08CF177929B9F1F500A91E94 /* OnlineMangaViewLoaderFeature.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnlineMangaViewLoaderFeature.swift; sourceTree = "<group>"; };
08E0B077293EC0C60021D5EC /* ChapterLoaderFeature.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChapterLoaderFeature.swift; sourceTree = "<group>"; };
08E23C7D28D34A3600149889 /* Hanami.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Hanami.entitlements; sourceTree = "<group>"; };
Expand Down Expand Up @@ -444,15 +441,6 @@
path = Settings;
sourceTree = "<group>";
};
08700EF429576A230019E615 /* LiveText */ = {
isa = PBXGroup;
children = (
08700EF2295769A90019E615 /* LiveTextHandler.swift */,
08700EF529576A390019E615 /* LiveText.swift */,
);
path = LiveText;
sourceTree = "<group>";
};
088934B029C738DC00AA81D4 /* MangaChapterLoader */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -501,7 +489,6 @@
2220E151283123FD0046F08A /* Utils */ = {
isa = PBXGroup;
children = (
08700EF429576A230019E615 /* LiveText */,
2291EF5C2880E15B007FE0B0 /* NetworkMonitor.swift */,
222ED96E28C6E2C6009C361E /* DeviceUtil.swift */,
2225265C28B15ED3009F6FA3 /* HapticUtil.swift */,
Expand Down Expand Up @@ -607,6 +594,7 @@
224C656F2827204000AAEF2E = {
isa = PBXGroup;
children = (
08C237CB2A322646003E122D /* Config.xcconfig */,
224C657A2827204100AAEF2E /* Hanami */,
224C65792827204100AAEF2E /* Products */,
33240CCD5BD875E1E9324710 /* .gitignore */,
Expand Down Expand Up @@ -1025,7 +1013,6 @@
228D8D57287B2DD000F988CC /* MangaMO+CoreDataProperties.swift in Sources */,
2205CBA02856A91900421888 /* UINavigationController.swift in Sources */,
22F4A85628AB29C9008C11A7 /* ChapterFeature.swift in Sources */,
08700EF629576A390019E615 /* LiveText.swift in Sources */,
22D0CA70287DE15F005D06ED /* HomeClient.swift in Sources */,
080D1DCB294FF879008B813C /* SearchParams.swift in Sources */,
228DD05028A5278300F70162 /* HUDClient.swift in Sources */,
Expand All @@ -1043,7 +1030,6 @@
22F4A85928AB29C9008C11A7 /* PagesView.swift in Sources */,
22D74BFA287AE115000616D3 /* ChapterDetailsMO+CoreDataClass.swift in Sources */,
088934B229C738EF00AA81D4 /* MangaChapterLoaderView.swift in Sources */,
08700EF3295769A90019E615 /* LiveTextHandler.swift in Sources */,
2220E15728312D400046F08A /* MangaThumbnailFeature.swift in Sources */,
22D74BFC287AE115000616D3 /* MangaMO+CoreDataClass.swift in Sources */,
080D1DB8294FDD99008B813C /* CoreDataVersion.swift in Sources */,
Expand Down Expand Up @@ -1116,6 +1102,7 @@
/* Begin XCBuildConfiguration section */
224C659A2827204300AAEF2E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 08C237CB2A322646003E122D /* Config.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -1176,6 +1163,7 @@
};
224C659B2827204300AAEF2E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 08C237CB2A322646003E122D /* Config.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions Hanami/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,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>API_URL</key>
<string>$(API_URL)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
11 changes: 11 additions & 0 deletions Hanami/Tools/Defaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ enum Defaults {
URL(string: "https://mangadex.org/title/\(mangaID.uuidString.lowercased())")!
}
}

enum Feedback {
static var feedbackDomain: URL? {
if AppUtil.appConfiguration != .debug, var urlString = Bundle.main.infoDictionary?["API_URL"] as? String {
urlString = "https://" + urlString
return URL(string: urlString)
}

return nil
}
}
}
24 changes: 24 additions & 0 deletions Hanami/Utils/AppUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,28 @@ enum AppUtil {
encoder.dateEncodingStrategy = .formatted(AppUtil.dateFormatter)
return encoder
}()

enum AppConfiguration {
case debug
case testFlight
case appStore
}

static let appConfiguration: AppConfiguration = {
let isDebug: Bool = {
#if DEBUG
true
#else
false
#endif
}()

if isDebug {
return .debug
} else if Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" {
return .testFlight
} else {
return .appStore
}
}()
}
152 changes: 0 additions & 152 deletions Hanami/Utils/LiveText/LiveText.swift

This file was deleted.

Loading

0 comments on commit 306a46b

Please sign in to comment.