Skip to content
Merged
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
17 changes: 17 additions & 0 deletions StikDebug.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
17C744F02E20BED000834F17 /* Pipify in Frameworks */ = {isa = PBXBuildFile; productRef = 17C744EF2E20BED000834F17 /* Pipify */; };
68D569BE2E1B415700A5BA36 /* CodeEditorView in Frameworks */ = {isa = PBXBuildFile; productRef = 68D569BD2E1B415700A5BA36 /* CodeEditorView */; };
68D569C02E1B415700A5BA36 /* LanguageSupport in Frameworks */ = {isa = PBXBuildFile; productRef = 68D569BF2E1B415700A5BA36 /* LanguageSupport */; };
DC139F6E2DE97EA400F63846 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC139F6D2DE97EA400F63846 /* WidgetKit.framework */; };
Expand Down Expand Up @@ -149,6 +150,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
17C744F02E20BED000834F17 /* Pipify in Frameworks */,
68D569C02E1B415700A5BA36 /* LanguageSupport in Frameworks */,
68D569BE2E1B415700A5BA36 /* CodeEditorView in Frameworks */,
);
Expand Down Expand Up @@ -262,6 +264,7 @@
packageProductDependencies = (
68D569BD2E1B415700A5BA36 /* CodeEditorView */,
68D569BF2E1B415700A5BA36 /* LanguageSupport */,
17C744EF2E20BED000834F17 /* Pipify */,
);
productName = StikJIT;
productReference = DC6F1D372D94EADD0071B2B6 /* StikDebug.app */;
Expand Down Expand Up @@ -377,6 +380,7 @@
minimizedProjectReferenceProxies = 1;
packageReferences = (
68D569BC2E1B415700A5BA36 /* XCRemoteSwiftPackageReference "CodeEditorView" */,
17C744EE2E20BED000834F17 /* XCRemoteSwiftPackageReference "swiftui-pipify" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = DC6F1D382D94EADD0071B2B6 /* Products */;
Expand Down Expand Up @@ -971,6 +975,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
17C744EE2E20BED000834F17 /* XCRemoteSwiftPackageReference "swiftui-pipify" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/hugeBlack/swiftui-pipify";
requirement = {
branch = main;
kind = branch;
};
};
68D569BC2E1B415700A5BA36 /* XCRemoteSwiftPackageReference "CodeEditorView" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mchakravarty/CodeEditorView";
Expand All @@ -982,6 +994,11 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
17C744EF2E20BED000834F17 /* Pipify */ = {
isa = XCSwiftPackageProductDependency;
package = 17C744EE2E20BED000834F17 /* XCRemoteSwiftPackageReference "swiftui-pipify" */;
productName = Pipify;
};
68D569BD2E1B415700A5BA36 /* CodeEditorView */ = {
isa = XCSwiftPackageProductDependency;
package = 68D569BC2E1B415700A5BA36 /* XCRemoteSwiftPackageReference "CodeEditorView" */;
Expand Down
2 changes: 0 additions & 2 deletions StikJIT/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>processing</string>
<string>fetch</string>
</array>
<key>UIFileSharingEnabled</key>
<true/>
Expand Down
55 changes: 0 additions & 55 deletions StikJIT/JSSupport/PiPController.swift

This file was deleted.

5 changes: 3 additions & 2 deletions StikJIT/JSSupport/RunJSView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ class RunJSViewModel: ObservableObject {
if let semaphore {
semaphore.signal()
}
PiPController.shared.stopPiP()

DispatchQueue.main.async {
if let exception = self.context?.exception {
self.logs.append(exception.debugDescription)
}

self.logs.append("Script Execution Completed, \nYou are safe to close the PIP Window.")
self.logs.append("Script Execution Completed")
self.logs.append("You are safe to close the PIP Window.")
}
}
}
Expand All @@ -99,6 +99,7 @@ struct RunJSViewPiP: View {
.onReceive(timer) { _ in
self.logs = model?.logs ?? []
}
.frame(width: 300, height: 150)
}
}

Expand Down
1 change: 0 additions & 1 deletion StikJIT/StikJIT-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
#include "idevice/idevice.h"
#include "idevice/heartbeat.h"
#include "JSSupport/JSSupport.h"
#include "Utilities/PiP/PiPController.h"
29 changes: 0 additions & 29 deletions StikJIT/Utilities/PiP/PiPController.h

This file was deleted.

138 changes: 0 additions & 138 deletions StikJIT/Utilities/PiP/PiPController.m

This file was deleted.

26 changes: 7 additions & 19 deletions StikJIT/Views/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI
import UniformTypeIdentifiers
import Pipify

extension UIDocumentPickerViewController {
@objc func fix_init(forOpeningContentTypes contentTypes: [UTType], asCopy: Bool) -> UIDocumentPickerViewController {
Expand Down Expand Up @@ -59,19 +60,6 @@ struct HomeView: View {
Color(colorScheme == .dark ? .black : .white)
.edgesIgnoringSafeArea(.all)

if useDefaultScript {
VideoPlayerView(view: RunJSViewPiP(model: $jsModel))
.frame(width: 200, height: 150)
.background(Color.clear)
.cornerRadius(10)
.onAppear() {
Timer.scheduledTimer(withTimeInterval: 0.3, repeats: false) { _ in
PiPController.shared.startPiP()
}
}
.overlay(colorScheme == .dark ? .black : .white)
}

VStack(spacing: 25) {
Spacer()
VStack(spacing: 5) {
Expand Down Expand Up @@ -237,12 +225,7 @@ struct HomeView: View {
.onReceive(timer) { _ in
refreshBackground()
checkPairingFileExists()

if useDefaultScript {
PiPController.shared.startPiP()
} else {
PiPController.shared.stopPiP()
}

}
.fileImporter(isPresented: $isShowingPairingFilePicker, allowedContentTypes: [UTType(filenameExtension: "mobiledevicepairing", conformingTo: .data)!, .propertyList]) {result in
switch result {
Expand Down Expand Up @@ -320,6 +303,9 @@ struct HomeView: View {
startJITInBackground(with: selectedBundle)
}
}
.pipify(isPresented: $isProcessing) {
RunJSViewPiP(model: $jsModel)
}
.sheet(isPresented: $scriptViewShow) {
NavigationView {
if let jsModel {
Expand All @@ -328,6 +314,7 @@ struct HomeView: View {
ToolbarItem(placement: .topBarTrailing) {
Button("Done") {
scriptViewShow = false
isProcessing = false
}
}
}
Expand Down Expand Up @@ -433,6 +420,7 @@ struct HomeView: View {
DispatchQueue.global(qos: .background).async {
do {
try jsModel?.runScript(path: selectedScriptURL)
isProcessing = false
} catch {
showAlert(title: "Error Occurred While Executing the Default Script.".localized, message: error.localizedDescription, showOk: true)
}
Expand Down
Binary file removed StikJIT/black.MP4
Binary file not shown.