Skip to content

Commit

Permalink
Build 1.0 (18)
Browse files Browse the repository at this point in the history
- Adds Mail
- Fixes Youtube using outdated data
  • Loading branch information
zzanehip committed Nov 23, 2021
1 parent 70e15e5 commit b38ffb0
Show file tree
Hide file tree
Showing 61 changed files with 3,893 additions and 78 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Postal"]
path = Postal
url = https://github.com/snipsco/Postal.git
864 changes: 822 additions & 42 deletions OldOS/OldOS.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@
"version": "1.5.0"
}
},
{
"package": "MailCore2",
"repositoryURL": "https://github.com/MailCore/mailcore2",
"state": {
"branch": "master",
"revision": "1434761709b4d9dd5acc5b7185a3b32aa4845ba8",
"version": null
}
},
{
"package": "OAuth2",
"repositoryURL": "https://github.com/p2/OAuth2.git",
"state": {
"branch": null,
"revision": "30f46ad74bcbe7013fb340e54f41bc9e6d2ce994",
"version": "5.3.2"
}
},
{
"package": "PureSwiftUI",
"repositoryURL": "https://github.com/CodeSlicing/pure-swift-ui.git",
Expand Down Expand Up @@ -64,6 +82,15 @@
"version": "2.0.2"
}
},
{
"package": "SwiftKeychainWrapper",
"repositoryURL": "https://github.com/jrendel/SwiftKeychainWrapper",
"state": {
"branch": null,
"revision": "185a3165346a03767101c4f62e9a545a0fe0530f",
"version": "4.0.1"
}
},
{
"package": "Introspect",
"repositoryURL": "https://github.com/siteline/SwiftUI-Introspect.git",
Expand Down
78 changes: 78 additions & 0 deletions OldOS/OldOS.xcodeproj/xcshareddata/xcschemes/OldOS12.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0DBD28C0274C70F8003120D9"
BuildableName = "OldOS12.app"
BlueprintName = "OldOS12"
ReferencedContainer = "container:OldOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "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 = "0DBD28C0274C70F8003120D9"
BuildableName = "OldOS12.app"
BlueprintName = "OldOS12"
ReferencedContainer = "container:OldOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "0DBD28C0274C70F8003120D9"
BuildableName = "OldOS12.app"
BlueprintName = "OldOS12"
ReferencedContainer = "container:OldOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
62 changes: 59 additions & 3 deletions OldOS/OldOS/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
//

import UIKit

//import GoogleSignIn
import CoreData
import OAuth2
@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

Expand All @@ -32,8 +32,46 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
]
)
UIDevice.current.isBatteryMonitoringEnabled = true

//Google email setup
// GIDSignIn.sharedInstance.restorePreviousSignIn { user, error in
// if error != nil || user == nil {
// // Show the app's signed-out state.
// } else {
// // Show the app's signed-in state.
// }
// }

return true
}

// func application(
// _ app: UIApplication,
// open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]
// ) -> Bool {
// var handled: Bool
//
// handled = GIDSignIn.sharedInstance.handle(url)
// if handled {
// return true
// }
//
// // Handle other custom URL types.
//
// // If not handled by this app, return false.
// return false
// }

// func application(_ app: UIApplication,
// open url: URL,
// options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
// // you should probably first check if this is the callback being opened
// // if <# check #> {
// // if your oauth2 instance lives somewhere else, adapt accordingly
// oauth2.handleRedirectURL(url)
// return true
// // }
// }

// MARK: UISceneSession Lifecycle

Expand All @@ -49,7 +87,25 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}

lazy var persistentEmailContainer: NSPersistentContainer = {
let container = NSPersistentContainer(name: "Emails")
container.loadPersistentStores { _, error in
if let error = error as NSError? {
fatalError("Unresolved error \(error), \(error.userInfo)")
}
}
return container
}()


}

//let config = GIDConfiguration.init(clientID: "814260428968-hd7t3jtn7q3hu3p0o1fotenp35986uk2.apps.googleusercontent.com")

var oauth2 = OAuth2CodeGrant(settings: [
"client_id": "814260428968-hd7t3jtn7q3hu3p0o1fotenp35986uk2.apps.googleusercontent.com",
"authorize_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://www.googleapis.com/oauth2/v3/token",
"scope": "https://mail.google.com", // depends on the API you use
"redirect_uris": ["com.googleusercontent.apps.814260428968-hd7t3jtn7q3hu3p0o1fotenp35986uk2:/oauth"],
])
8 changes: 4 additions & 4 deletions OldOS/OldOS/AppStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ class TopPaidAndFreeApplicationsObserver: ObservableObject { //<-
func parse_data() {
print("parsing data")
//Top Free
let free_url = URL(string: "https://rss.itunes.apple.com/api/v1/us/ios-apps/top-free/all/25/explicit.rss?at=10laCr")!
let free_url = URL(string: "https://rss.applemarketingtools.com/api/v2/us/apps/top-free/25/apps.rss")!
let free_parser = FeedParser(URL: free_url)
free_parser.parseAsync(queue: DispatchQueue.global(qos: .userInitiated)) { (result) in
DispatchQueue.main.async {
Expand All @@ -1039,7 +1039,7 @@ class TopPaidAndFreeApplicationsObserver: ObservableObject { //<-
}
}
//Top Paid
let paid_url = URL(string: "https://rss.itunes.apple.com/api/v1/us/ios-apps/top-paid/all/25/explicit.rss?at=10laCr")!
let paid_url = URL(string: "https://rss.applemarketingtools.com/api/v2/us/apps/top-paid/25/apps.rss")!
let paid_parser = FeedParser(URL: paid_url)
paid_parser.parseAsync(queue: DispatchQueue.global(qos: .userInitiated)) { (result) in
DispatchQueue.main.async {
Expand All @@ -1062,7 +1062,7 @@ class TopPaidAndFreeApplicationsObserver: ObservableObject { //<-
}
}
//Top Grossing
let grossing_url = URL(string: "https://rss.itunes.apple.com/api/v1/us/ios-apps/top-grossing/all/25/explicit.rss?at=10laCr")!
let grossing_url = URL(string: "https://rss.applemarketingtools.com/api/v2/us/apps/top-grossing/25/apps.rss")!
let grossing_parser = FeedParser(URL: grossing_url)
grossing_parser.parseAsync(queue: DispatchQueue.global(qos: .userInitiated)) { (result) in
DispatchQueue.main.async {
Expand Down Expand Up @@ -1100,7 +1100,7 @@ class FeaturedApplicationsObserver: ObservableObject {
}
func parse_data() {
print("parsing data")
let url = URL(string: "https://rss.itunes.apple.com/api/v1/us/ios-apps/new-apps-we-love/all/25/explicit.rss?at=10laCr")! //If it continues to not work switch to 10
let url = URL(string: "https://rss.applemarketingtools.com/api/v2/new-apps-we-love/25/apps.rss")! //If it continues to not work switch to 10
let parser = FeedParser(URL: url)
parser.parseAsync(queue: DispatchQueue.global(qos: .userInitiated)) { (result) in
DispatchQueue.main.async {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b38ffb0

Please sign in to comment.