Skip to content

Commit

Permalink
1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
haxi0 authored Nov 6, 2022
1 parent 59a4e06 commit a855677
Show file tree
Hide file tree
Showing 27 changed files with 965 additions and 0 deletions.
592 changes: 592 additions & 0 deletions Reporizator/Reporizator.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"images" : [
{
"filename" : "Icon-20@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "Icon-20@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "Icon-29@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "Icon-29@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "Icon-40@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "Icon-40@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "Icon-60@2x.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "Icon-60@3x.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "Icon-20.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "Icon-20@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "Icon-29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "Icon-29@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "Icon-40.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "Icon-40@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "Icon-76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "Icon-76@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "Icon-83_5@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions Reporizator/Reporizator/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "org.haxi0.reporizator.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"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.
57 changes: 57 additions & 0 deletions Reporizator/Reporizator/ContentView.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
//
// ContentView.swift
// Reporizator
//
// Created by Анохин Юрий on 06.11.2022.
//

import SwiftUI

struct ContentView: View {
@AppStorage("repo") private var repo = ""
@Environment(\.openURL) var openURL
@State private var showingOptions = false

var body: some View {
NavigationView {
TextEditor(text: $repo)
.navigationTitle("Reporizator")
.padding()
.keyboardType(.URL)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
Image("Reporizator")
.resizable()
.frame(width: 32.0, height: 32.0)
.cornerRadius(5)
}
}
}
Button(action: {
showingOptions.toggle()
hideKeyboard()
}) {
Text("Open In")
}.buttonStyle(CustomButtonStyle())
.padding()
.confirmationDialog("Open In...", isPresented: $showingOptions, titleVisibility: .visible) {
Button("Sileo") {
openURL(URL(string: "sileo://source/https://\(repo)")!)
}

Button("Cydia") {
openURL(URL(string: "cydia://url/https://cydia.saurik.com/api/share#?source=https://\(repo)")!)
}

Button("Zebra") {
openURL(URL(string: "zbra://sources/add/https://\(repo)")!)
}
}
}
}

struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
31 changes: 31 additions & 0 deletions Reporizator/Reporizator/Extensions.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// Extensions.swift
// Reporizator
//
// Created by Анохин Юрий on 06.11.2022.
//

import SwiftUI

public struct CustomButtonStyle: ButtonStyle {
public func makeBody(configuration: Self.Configuration) -> some View {
configuration.label
.font(Font.body.weight(.medium))
.padding(.vertical, 12)
.foregroundColor(Color.white)
.frame(maxWidth: .infinity)
.background(
RoundedRectangle(cornerRadius: 14.0, style: .continuous)
.fill(Color.orange)
)
.opacity(configuration.isPressed ? 0.4 : 1.0)
}
}

#if canImport(UIKit)
extension View {
func hideKeyboard() {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
17 changes: 17 additions & 0 deletions Reporizator/Reporizator/ReporizatorApp.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ReporizatorApp.swift
// Reporizator
//
// Created by Анохин Юрий on 06.11.2022.
//

import SwiftUI

@main
struct ReporizatorApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
36 changes: 36 additions & 0 deletions Reporizator/ReporizatorTests/ReporizatorTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// ReporizatorTests.swift
// ReporizatorTests
//
// Created by Анохин Юрий on 06.11.2022.
//

import XCTest
@testable import Reporizator

final class ReporizatorTests: XCTestCase {

override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.
}

override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
// Any test you write for XCTest can be annotated as throws and async.
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
}

func testPerformanceExample() throws {
// This is an example of a performance test case.
self.measure {
// Put the code you want to measure the time of here.
}
}

}
41 changes: 41 additions & 0 deletions Reporizator/ReporizatorUITests/ReporizatorUITests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//
// ReporizatorUITests.swift
// ReporizatorUITests
//
// Created by Анохин Юрий on 06.11.2022.
//

import XCTest

final class ReporizatorUITests: XCTestCase {

override func setUpWithError() throws {
// Put setup code here. This method is called before the invocation of each test method in the class.

// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false

// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}

override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
}

func testExample() throws {
// UI tests must launch the application that they test.
let app = XCUIApplication()
app.launch()

// Use XCTAssert and related functions to verify your tests produce the correct results.
}

func testLaunchPerformance() throws {
if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
// This measures how long it takes to launch your application.
measure(metrics: [XCTApplicationLaunchMetric()]) {
XCUIApplication().launch()
}
}
}
}
32 changes: 32 additions & 0 deletions Reporizator/ReporizatorUITests/ReporizatorUITestsLaunchTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// ReporizatorUITestsLaunchTests.swift
// ReporizatorUITests
//
// Created by Анохин Юрий on 06.11.2022.
//

import XCTest

final class ReporizatorUITestsLaunchTests: XCTestCase {

override class var runsForEachTargetApplicationUIConfiguration: Bool {
true
}

override func setUpWithError() throws {
continueAfterFailure = false
}

func testLaunch() throws {
let app = XCUIApplication()
app.launch()

// Insert steps here to perform after app launch but before taking a screenshot,
// such as logging into a test account or navigating somewhere in the app

let attachment = XCTAttachment(screenshot: app.screenshot())
attachment.name = "Launch Screen"
attachment.lifetime = .keepAlways
add(attachment)
}
}

0 comments on commit a855677

Please sign in to comment.