Skip to content

Commit 0ee13fb

Browse files
Bump version
1 parent 3743faf commit 0ee13fb

8 files changed

Lines changed: 241 additions & 39 deletions

File tree

DebToIPA.xcodeproj/project.pbxproj

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@
1010
CE1D968128F9E3D7006AC6D2 /* Zip in Frameworks */ = {isa = PBXBuildFile; productRef = CE1D968028F9E3D7006AC6D2 /* Zip */; };
1111
CE1D968428F9E781006AC6D2 /* SWCompression in Frameworks */ = {isa = PBXBuildFile; productRef = CE1D968328F9E781006AC6D2 /* SWCompression */; };
1212
CE1D968B28FA045B006AC6D2 /* DebToIPA.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1D968A28FA045B006AC6D2 /* DebToIPA.swift */; };
13+
CE3EEFC528FB23FD00096E1D /* DebToIPAView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE3EEFC428FB23FD00096E1D /* DebToIPAView.swift */; };
1314
CE66018B28F83F33000EC344 /* DebToIPAApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE66018A28F83F33000EC344 /* DebToIPAApp.swift */; };
14-
CE66018D28F83F33000EC344 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE66018C28F83F33000EC344 /* ContentView.swift */; };
1515
CE66018F28F83F34000EC344 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE66018E28F83F34000EC344 /* Assets.xcassets */; };
1616
CE66019228F83F34000EC344 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE66019128F83F34000EC344 /* Preview Assets.xcassets */; };
1717
CE66019A28F85705000EC344 /* ArArchiveKit in Frameworks */ = {isa = PBXBuildFile; productRef = CE66019928F85705000EC344 /* ArArchiveKit */; };
1818
/* End PBXBuildFile section */
1919

2020
/* Begin PBXFileReference section */
2121
CE1D968A28FA045B006AC6D2 /* DebToIPA.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebToIPA.swift; sourceTree = "<group>"; };
22+
CE3EEFC428FB23FD00096E1D /* DebToIPAView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebToIPAView.swift; sourceTree = "<group>"; };
2223
CE66018728F83F33000EC344 /* DebToIPA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DebToIPA.app; sourceTree = BUILT_PRODUCTS_DIR; };
2324
CE66018A28F83F33000EC344 /* DebToIPAApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DebToIPAApp.swift; sourceTree = "<group>"; };
24-
CE66018C28F83F33000EC344 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
2525
CE66018E28F83F34000EC344 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2626
CE66019128F83F34000EC344 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
27+
CEB681E628FB539E00E65A2B /* AppSupport.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppSupport.framework; path = ../../../theos/sdks/iPhoneOS14.5.sdk/System/Library/PrivateFrameworks/AppSupport.framework; sourceTree = "<group>"; };
28+
CEC141FF28FE024600596DC3 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
2729
/* End PBXFileReference section */
2830

2931
/* Begin PBXFrameworksBuildPhase section */
@@ -60,9 +62,9 @@
6062
CE66018928F83F33000EC344 /* DebToIPA */ = {
6163
isa = PBXGroup;
6264
children = (
63-
CE66018A28F83F33000EC344 /* DebToIPAApp.swift */,
64-
CE66018C28F83F33000EC344 /* ContentView.swift */,
6565
CE1D968A28FA045B006AC6D2 /* DebToIPA.swift */,
66+
CE3EEFC428FB23FD00096E1D /* DebToIPAView.swift */,
67+
CE66018A28F83F33000EC344 /* DebToIPAApp.swift */,
6668
CE66018E28F83F34000EC344 /* Assets.xcassets */,
6769
CE66019028F83F34000EC344 /* Preview Content */,
6870
);
@@ -80,6 +82,8 @@
8082
CE7B175B28F9D4E000B65A74 /* Frameworks */ = {
8183
isa = PBXGroup;
8284
children = (
85+
CEC141FF28FE024600596DC3 /* CoreServices.framework */,
86+
CEB681E628FB539E00E65A2B /* AppSupport.framework */,
8387
);
8488
name = Frameworks;
8589
sourceTree = "<group>";
@@ -121,6 +125,7 @@
121125
TargetAttributes = {
122126
CE66018628F83F33000EC344 = {
123127
CreatedOnToolsVersion = 14.0;
128+
LastSwiftMigration = 1400;
124129
};
125130
};
126131
};
@@ -164,7 +169,7 @@
164169
isa = PBXSourcesBuildPhase;
165170
buildActionMask = 2147483647;
166171
files = (
167-
CE66018D28F83F33000EC344 /* ContentView.swift in Sources */,
172+
CE3EEFC528FB23FD00096E1D /* DebToIPAView.swift in Sources */,
168173
CE1D968B28FA045B006AC6D2 /* DebToIPA.swift in Sources */,
169174
CE66018B28F83F33000EC344 /* DebToIPAApp.swift in Sources */,
170175
);
@@ -223,7 +228,7 @@
223228
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
224229
GCC_WARN_UNUSED_FUNCTION = YES;
225230
GCC_WARN_UNUSED_VARIABLE = YES;
226-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
231+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
227232
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
228233
MTL_FAST_MATH = YES;
229234
ONLY_ACTIVE_ARCH = YES;
@@ -277,7 +282,7 @@
277282
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
278283
GCC_WARN_UNUSED_FUNCTION = YES;
279284
GCC_WARN_UNUSED_VARIABLE = YES;
280-
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
285+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
281286
MTL_ENABLE_DEBUG_INFO = NO;
282287
MTL_FAST_MATH = YES;
283288
SDKROOT = iphoneos;
@@ -292,28 +297,33 @@
292297
buildSettings = {
293298
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
294299
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
300+
CLANG_ENABLE_MODULES = YES;
301+
CODE_SIGN_ENTITLEMENTS = "";
295302
CODE_SIGN_STYLE = Automatic;
296303
CURRENT_PROJECT_VERSION = 1;
297304
DEVELOPMENT_ASSET_PATHS = "\"DebToIPA/Preview Content\"";
298305
DEVELOPMENT_TEAM = 92S6JX27W2;
299306
ENABLE_PREVIEWS = YES;
300307
GENERATE_INFOPLIST_FILE = YES;
308+
INFOPLIST_FILE = DebToIPA/Info.plist;
301309
INFOPLIST_KEY_CFBundleDisplayName = DebToIPA;
302310
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
311+
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "This app requires library permission";
303312
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
304313
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
305314
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
306315
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
307316
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
308-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
317+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
309318
LD_RUNPATH_SEARCH_PATHS = (
310319
"$(inherited)",
311320
"@executable_path/Frameworks",
312321
);
313322
MARKETING_VERSION = 1.0.2;
314-
PRODUCT_BUNDLE_IDENTIFIER = "net.sourceloc.deb-to-ipa-app";
323+
PRODUCT_BUNDLE_IDENTIFIER = net.sourceloc.DebToIPA;
315324
PRODUCT_NAME = "$(TARGET_NAME)";
316325
SWIFT_EMIT_LOC_STRINGS = YES;
326+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
317327
SWIFT_VERSION = 5.0;
318328
TARGETED_DEVICE_FAMILY = "1,2";
319329
};
@@ -324,26 +334,30 @@
324334
buildSettings = {
325335
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
326336
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
337+
CLANG_ENABLE_MODULES = YES;
338+
CODE_SIGN_ENTITLEMENTS = "";
327339
CODE_SIGN_STYLE = Automatic;
328340
CURRENT_PROJECT_VERSION = 1;
329341
DEVELOPMENT_ASSET_PATHS = "\"DebToIPA/Preview Content\"";
330342
DEVELOPMENT_TEAM = 92S6JX27W2;
331343
ENABLE_PREVIEWS = YES;
332344
GENERATE_INFOPLIST_FILE = YES;
345+
INFOPLIST_FILE = DebToIPA/Info.plist;
333346
INFOPLIST_KEY_CFBundleDisplayName = DebToIPA;
334347
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
348+
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "This app requires library permission";
335349
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
336350
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
337351
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
338352
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
339353
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
340-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
354+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
341355
LD_RUNPATH_SEARCH_PATHS = (
342356
"$(inherited)",
343357
"@executable_path/Frameworks",
344358
);
345359
MARKETING_VERSION = 1.0.2;
346-
PRODUCT_BUNDLE_IDENTIFIER = "net.sourceloc.deb-to-ipa-app";
360+
PRODUCT_BUNDLE_IDENTIFIER = net.sourceloc.DebToIPA;
347361
PRODUCT_NAME = "$(TARGET_NAME)";
348362
SWIFT_EMIT_LOC_STRINGS = YES;
349363
SWIFT_VERSION = 5.0;

DebToIPA.xcodeproj/xcuserdata/exerhythm.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,21 +68,5 @@
6868
landmarkType = "7">
6969
</BreakpointContent>
7070
</BreakpointProxy>
71-
<BreakpointProxy
72-
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
73-
<BreakpointContent
74-
uuid = "8DED8990-5711-4391-A4E6-47B84448250C"
75-
shouldBeEnabled = "Yes"
76-
ignoreCount = "0"
77-
continueAfterRunningActions = "No"
78-
filePath = "DebToIPA/DebToIPA.swift"
79-
startingColumnNumber = "9223372036854775807"
80-
endingColumnNumber = "9223372036854775807"
81-
startingLineNumber = "99"
82-
endingLineNumber = "99"
83-
landmarkName = "extractDeb(_:statusUpdate:)"
84-
landmarkType = "7">
85-
</BreakpointContent>
86-
</BreakpointProxy>
8771
</Breakpoints>
8872
</Bucket>

DebToIPA.xcodeproj/xcuserdata/exerhythm.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<dict>
55
<key>SchemeUserState</key>
66
<dict>
7-
<key>deb-to-ipa-app.xcscheme_^#shared#^_</key>
7+
<key>DebToIPA.xcscheme_^#shared#^_</key>
88
<dict>
99
<key>orderHint</key>
1010
<integer>0</integer>

DebToIPA/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"images" : [
33
{
4-
"filename" : "1024.png",
4+
"filename" : "Icon.png",
55
"idiom" : "universal",
66
"platform" : "ios",
77
"size" : "1024x1024"
144 KB
Loading

DebToIPA/DebToIPA.swift

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,38 @@
55
// Created by exerhythm on 14.10.2022.
66
//
77

8-
import Foundation
98
import ArArchiveKit
109
import Zip
1110
import SWCompression
11+
import UIKit
1212

1313
class DebToIPA {
1414
private static let fm = FileManager.default
1515
private static var tempDir: URL { fm.temporaryDirectory }
1616

1717
/// Converts .deb app to .ipa, returns url of .ipa
18-
static func convert(_ url: URL, statusUpdate: (String) -> ()) throws -> URL {
18+
static func convert(_ url: URL, statusUpdate: (String) -> ()) throws -> SavedIpa {
1919
try cleanup()
20+
var savedIpa = SavedIpa(name: "IPA", bundleID: "Bundle ID unknown", version: "Unknown version", url: nil)
2021
let payloadDir = tempDir.appendingPathComponent("Payload")
2122

2223
// Extract .deb
23-
let appURLs = try extractDeb(url, statusUpdate: statusUpdate)
24+
let appURLs = try fm.contentsOfDirectory(at: try extractDeb(url, to: tempDir.appendingPathComponent("deb_extracted"), statusUpdate: statusUpdate).appendingPathComponent("Applications/"), includingPropertiesForKeys: nil)
25+
guard fm.fileExists(atPath: tempDir.appendingPathComponent("deb_extracted/Applications/").path) else { throw ConversionError.unsupportedApp }
2426

2527
statusUpdate("Creating .ipa archive")
2628
// Create .ipa archive
2729
try fm.createDirectory(at: payloadDir, withIntermediateDirectories: true)
2830
for url in appURLs {
31+
if let infoPlist = NSDictionary(contentsOf: url.appendingPathComponent("Info.plist")) {
32+
savedIpa.name = (infoPlist["CFBundleDisplayName"] ?? infoPlist["CFBundleName"]) as? String ?? "Unknown"
33+
savedIpa.version = infoPlist["CFBundleVersion"] as? String ?? "Unknown"
34+
savedIpa.bundleID = infoPlist["CFBundleIdentifier"] as? String ?? "Unknown"
35+
// if let iconFiles = (infoPlist["CFBundleIconFiles"] ?? infoPlist["CFBundleIcons~ipad"]) as? [String], let name = iconFiles.first {
36+
// savedIpa.image = try Data(contentsOf: url.appendingPathComponent(name))
37+
// }
38+
}
39+
2940
try fm.moveItem(at: url, to: payloadDir.appendingPathComponent( url.lastPathComponent))
3041
}
3142

@@ -40,14 +51,13 @@ class DebToIPA {
4051
try fm.moveItem(at: zipFilePath, to: destIpaURL)
4152

4253
statusUpdate("Opening share sheet...")
43-
return zipFilePath.deletingPathExtension().appendingPathExtension("ipa")
54+
savedIpa.url = destIpaURL
55+
return savedIpa
4456
}
4557

4658

4759
/// Extracts deb and returns .app urls
48-
static func extractDeb(_ url: URL, statusUpdate: (String) -> ()) throws -> [URL] {
49-
let extractedDir = tempDir.appendingPathComponent("extracted")
50-
let appsDir = tempDir.appendingPathComponent( "extracted/Applications/")
60+
static func extractDeb(_ url: URL, to extractedDir: URL, statusUpdate: (String) -> ()) throws -> URL {
5161
statusUpdate("Reading .deb")
5262
let reader = try ArArchiveReader(archive: Array<UInt8>(Data(contentsOf: url)))
5363
var foundData = false
@@ -100,13 +110,12 @@ class DebToIPA {
100110
}
101111
print(entry.info)
102112
}
103-
guard fm.fileExists(atPath: appsDir.path) else { throw ConversionError.unsupportedApp }
104113
}
105114

106115
if !foundData {
107116
throw ConversionError.noDataFound
108117
}
109-
return try fm.contentsOfDirectory(at: appsDir, includingPropertiesForKeys: nil)
118+
return extractedDir
110119
}
111120

112121
static func cleanup() throws {

DebToIPA/DebToIPAApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import SwiftUI
1111
struct deb_to_ipa_appApp: App {
1212
var body: some Scene {
1313
WindowGroup {
14-
ContentView()
14+
DebToIPAView()
1515
}
1616
}
1717
}

0 commit comments

Comments
 (0)