Skip to content

Commit 1641863

Browse files
committed
ios project fixed
1 parent 63c29da commit 1641863

File tree

11 files changed

+511
-154
lines changed

11 files changed

+511
-154
lines changed

build.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import * as esbuild from 'esbuild';
2+
3+
// Bundle deps.js to make Node modules work in the browser
4+
async function buildDeps() {
5+
try {
6+
const result = await esbuild.build({
7+
entryPoints: ['public/js/deps.js'],
8+
bundle: true,
9+
format: 'esm',
10+
outfile: 'public/js/deps.bundled.js',
11+
sourcemap: true,
12+
minify: false,
13+
target: ['es2020'],
14+
loader: { '.js': 'jsx' },
15+
});
16+
17+
console.log('Build successful:', result);
18+
} catch (error) {
19+
console.error('Build failed:', error);
20+
process.exit(1);
21+
}
22+
}
23+
24+
buildDeps();

ios/PDFConverter/PDFConverter.xcodeproj/project.pbxproj

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
1A2B3C4D5E6F7A8B9C0D1E2F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7A8B9C0D1E30 /* AppDelegate.swift */; };
11-
1A2B3C4D5E6F7A8B9C0D1E31 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7A8B9C0D1E32 /* SceneDelegate.swift */; };
12-
1A2B3C4D5E6F7A8B9C0D1E33 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7A8B9C0D1E34 /* ViewController.swift */; };
13-
1A2B3C4D5E6F7A8B9C0D1E37 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7A8B9C0D1E38 /* LaunchScreen.storyboard */; };
10+
C28A56F92A4C8D0A00123456 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C28A56F82A4C8D0A00123456 /* AppDelegate.swift */; };
11+
C28A56FB2A4C8D0A00123457 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C28A56FA2A4C8D0A00123457 /* SceneDelegate.swift */; };
12+
C28A56FD2A4C8D0A00123458 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C28A56FC2A4C8D0A00123458 /* ViewController.swift */; };
13+
C28A57052A4C8D0C00123459 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C28A57032A4C8D0C00123459 /* LaunchScreen.storyboard */; };
1414
/* End PBXBuildFile section */
1515

1616
/* Begin PBXFileReference section */
17-
1A2B3C4D5E6F7A8B9C0D1E2D /* PDFConverter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PDFConverter.app; sourceTree = BUILT_PRODUCTS_DIR; };
18-
1A2B3C4D5E6F7A8B9C0D1E30 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
19-
1A2B3C4D5E6F7A8B9C0D1E32 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
20-
1A2B3C4D5E6F7A8B9C0D1E34 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
21-
1A2B3C4D5E6F7A8B9C0D1E39 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
22-
1A2B3C4D5E6F7A8B9C0D1E3B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
17+
C28A56F52A4C8D0A00123455 /* PDFConverter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PDFConverter.app; sourceTree = BUILT_PRODUCTS_DIR; };
18+
C28A56F82A4C8D0A00123456 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
19+
C28A56FA2A4C8D0A00123457 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
20+
C28A56FC2A4C8D0A00123458 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
21+
C28A57042A4C8D0C00123459 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
22+
C28A57062A4C8D0C00123460 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2323
/* End PBXFileReference section */
2424

2525
/* Begin PBXFrameworksBuildPhase section */
26-
1A2B3C4D5E6F7A8B9C0D1E2A /* Frameworks */ = {
26+
C28A56F22A4C8D0A00123454 /* Frameworks */ = {
2727
isa = PBXFrameworksBuildPhase;
2828
buildActionMask = 2147483647;
2929
files = (
@@ -33,124 +33,124 @@
3333
/* End PBXFrameworksBuildPhase section */
3434

3535
/* Begin PBXGroup section */
36-
1A2B3C4D5E6F7A8B9C0D1E24 = {
36+
C28A56EC2A4C8D0A00123450 = {
3737
isa = PBXGroup;
3838
children = (
39-
1A2B3C4D5E6F7A8B9C0D1E2F /* PDFConverter */,
40-
1A2B3C4D5E6F7A8B9C0D1E2E /* Products */,
39+
C28A56F72A4C8D0A00123456 /* PDFConverter */,
40+
C28A56F62A4C8D0A00123455 /* Products */,
4141
);
4242
sourceTree = "<group>";
4343
};
44-
1A2B3C4D5E6F7A8B9C0D1E2E /* Products */ = {
44+
C28A56F62A4C8D0A00123455 /* Products */ = {
4545
isa = PBXGroup;
4646
children = (
47-
1A2B3C4D5E6F7A8B9C0D1E2D /* PDFConverter.app */,
47+
C28A56F52A4C8D0A00123455 /* PDFConverter.app */,
4848
);
4949
name = Products;
5050
sourceTree = "<group>";
5151
};
52-
1A2B3C4D5E6F7A8B9C0D1E2F /* PDFConverter */ = {
52+
C28A56F72A4C8D0A00123456 /* PDFConverter */ = {
5353
isa = PBXGroup;
5454
children = (
55-
1A2B3C4D5E6F7A8B9C0D1E30 /* AppDelegate.swift */,
56-
1A2B3C4D5E6F7A8B9C0D1E32 /* SceneDelegate.swift */,
57-
1A2B3C4D5E6F7A8B9C0D1E34 /* ViewController.swift */,
58-
1A2B3C4D5E6F7A8B9C0D1E38 /* LaunchScreen.storyboard */,
59-
1A2B3C4D5E6F7A8B9C0D1E3B /* Info.plist */,
55+
C28A56F82A4C8D0A00123456 /* AppDelegate.swift */,
56+
C28A56FA2A4C8D0A00123457 /* SceneDelegate.swift */,
57+
C28A56FC2A4C8D0A00123458 /* ViewController.swift */,
58+
C28A57032A4C8D0C00123459 /* LaunchScreen.storyboard */,
59+
C28A57062A4C8D0C00123460 /* Info.plist */,
6060
);
6161
path = PDFConverter;
6262
sourceTree = "<group>";
6363
};
6464
/* End PBXGroup section */
6565

6666
/* Begin PBXNativeTarget section */
67-
1A2B3C4D5E6F7A8B9C0D1E2C /* PDFConverter */ = {
67+
C28A56F42A4C8D0A00123454 /* PDFConverter */ = {
6868
isa = PBXNativeTarget;
69-
buildConfigurationList = 1A2B3C4D5E6F7A8B9C0D1E3E /* Build configuration list for PBXNativeTarget "PDFConverter" */;
69+
buildConfigurationList = C28A57092A4C8D0C00123463 /* Build configuration list for PBXNativeTarget "PDFConverter" */;
7070
buildPhases = (
71-
1A2B3C4D5E6F7A8B9C0D1E29 /* Sources */,
72-
1A2B3C4D5E6F7A8B9C0D1E2A /* Frameworks */,
73-
1A2B3C4D5E6F7A8B9C0D1E2B /* Resources */,
71+
C28A56F12A4C8D0A00123451 /* Sources */,
72+
C28A56F22A4C8D0A00123454 /* Frameworks */,
73+
C28A56F32A4C8D0A00123453 /* Resources */,
7474
);
7575
buildRules = (
7676
);
7777
dependencies = (
7878
);
7979
name = PDFConverter;
8080
productName = PDFConverter;
81-
productReference = 1A2B3C4D5E6F7A8B9C0D1E2D /* PDFConverter.app */;
81+
productReference = C28A56F52A4C8D0A00123455 /* PDFConverter.app */;
8282
productType = "com.apple.product-type.application";
8383
};
8484
/* End PBXNativeTarget section */
8585

8686
/* Begin PBXProject section */
87-
1A2B3C4D5E6F7A8B9C0D1E25 /* Project object */ = {
87+
C28A56EC2A4C8D0A00123451 /* Project object */ = {
8888
isa = PBXProject;
8989
attributes = {
9090
BuildIndependentTargetsInParallel = 1;
9191
LastSwiftUpdateCheck = 1420;
9292
LastUpgradeCheck = 1420;
9393
TargetAttributes = {
94-
1A2B3C4D5E6F7A8B9C0D1E2C = {
94+
C28A56F42A4C8D0A00123454 = {
9595
CreatedOnToolsVersion = 14.2;
9696
};
9797
};
9898
};
99-
buildConfigurationList = 1A2B3C4D5E6F7A8B9C0D1E28 /* Build configuration list for PBXProject "PDFConverter" */;
99+
buildConfigurationList = C28A56EF2A4C8D0A00123452 /* Build configuration list for PBXProject "PDFConverter" */;
100100
compatibilityVersion = "Xcode 14.0";
101101
developmentRegion = en;
102102
hasScannedForEncodings = 0;
103103
knownRegions = (
104104
en,
105105
Base,
106106
);
107-
mainGroup = 1A2B3C4D5E6F7A8B9C0D1E24;
108-
productRefGroup = 1A2B3C4D5E6F7A8B9C0D1E2E /* Products */;
107+
mainGroup = C28A56EC2A4C8D0A00123450;
108+
productRefGroup = C28A56F62A4C8D0A00123455 /* Products */;
109109
projectDirPath = "";
110110
projectRoot = "";
111111
targets = (
112-
1A2B3C4D5E6F7A8B9C0D1E2C /* PDFConverter */,
112+
C28A56F42A4C8D0A00123454 /* PDFConverter */,
113113
);
114114
};
115115
/* End PBXProject section */
116116

117117
/* Begin PBXResourcesBuildPhase section */
118-
1A2B3C4D5E6F7A8B9C0D1E2B /* Resources */ = {
118+
C28A56F32A4C8D0A00123453 /* Resources */ = {
119119
isa = PBXResourcesBuildPhase;
120120
buildActionMask = 2147483647;
121121
files = (
122-
1A2B3C4D5E6F7A8B9C0D1E37 /* LaunchScreen.storyboard in Resources */,
122+
C28A57052A4C8D0C00123459 /* LaunchScreen.storyboard in Resources */,
123123
);
124124
runOnlyForDeploymentPostprocessing = 0;
125125
};
126126
/* End PBXResourcesBuildPhase section */
127127

128128
/* Begin PBXSourcesBuildPhase section */
129-
1A2B3C4D5E6F7A8B9C0D1E29 /* Sources */ = {
129+
C28A56F12A4C8D0A00123451 /* Sources */ = {
130130
isa = PBXSourcesBuildPhase;
131131
buildActionMask = 2147483647;
132132
files = (
133-
1A2B3C4D5E6F7A8B9C0D1E33 /* ViewController.swift in Sources */,
134-
1A2B3C4D5E6F7A8B9C0D1E2F /* AppDelegate.swift in Sources */,
135-
1A2B3C4D5E6F7A8B9C0D1E31 /* SceneDelegate.swift in Sources */,
133+
C28A56FD2A4C8D0A00123458 /* ViewController.swift in Sources */,
134+
C28A56F92A4C8D0A00123456 /* AppDelegate.swift in Sources */,
135+
C28A56FB2A4C8D0A00123457 /* SceneDelegate.swift in Sources */,
136136
);
137137
runOnlyForDeploymentPostprocessing = 0;
138138
};
139139
/* End PBXSourcesBuildPhase section */
140140

141141
/* Begin PBXVariantGroup section */
142-
1A2B3C4D5E6F7A8B9C0D1E38 /* LaunchScreen.storyboard */ = {
142+
C28A57032A4C8D0C00123459 /* LaunchScreen.storyboard */ = {
143143
isa = PBXVariantGroup;
144144
children = (
145-
1A2B3C4D5E6F7A8B9C0D1E39 /* Base */,
145+
C28A57042A4C8D0C00123459 /* Base */,
146146
);
147147
name = LaunchScreen.storyboard;
148148
sourceTree = "<group>";
149149
};
150150
/* End PBXVariantGroup section */
151151

152152
/* Begin XCBuildConfiguration section */
153-
1A2B3C4D5E6F7A8B9C0D1E3C /* Debug */ = {
153+
C28A57072A4C8D0C00123461 /* Debug */ = {
154154
isa = XCBuildConfiguration;
155155
buildSettings = {
156156
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -210,7 +210,7 @@
210210
};
211211
name = Debug;
212212
};
213-
1A2B3C4D5E6F7A8B9C0D1E3D /* Release */ = {
213+
C28A57082A4C8D0C00123462 /* Release */ = {
214214
isa = XCBuildConfiguration;
215215
buildSettings = {
216216
ALWAYS_SEARCH_USER_PATHS = NO;
@@ -264,7 +264,7 @@
264264
};
265265
name = Release;
266266
};
267-
1A2B3C4D5E6F7A8B9C0D1E3F /* Debug */ = {
267+
C28A570A2A4C8D0C00123464 /* Debug */ = {
268268
isa = XCBuildConfiguration;
269269
buildSettings = {
270270
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -290,7 +290,7 @@
290290
};
291291
name = Debug;
292292
};
293-
1A2B3C4D5E6F7A8B9C0D1E40 /* Release */ = {
293+
C28A570B2A4C8D0C00123465 /* Release */ = {
294294
isa = XCBuildConfiguration;
295295
buildSettings = {
296296
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
@@ -319,25 +319,25 @@
319319
/* End XCBuildConfiguration section */
320320

321321
/* Begin XCConfigurationList section */
322-
1A2B3C4D5E6F7A8B9C0D1E28 /* Build configuration list for PBXProject "PDFConverter" */ = {
322+
C28A56EF2A4C8D0A00123452 /* Build configuration list for PBXProject "PDFConverter" */ = {
323323
isa = XCConfigurationList;
324324
buildConfigurations = (
325-
1A2B3C4D5E6F7A8B9C0D1E3C /* Debug */,
326-
1A2B3C4D5E6F7A8B9C0D1E3D /* Release */,
325+
C28A57072A4C8D0C00123461 /* Debug */,
326+
C28A57082A4C8D0C00123462 /* Release */,
327327
);
328328
defaultConfigurationIsVisible = 0;
329329
defaultConfigurationName = Release;
330330
};
331-
1A2B3C4D5E6F7A8B9C0D1E3E /* Build configuration list for PBXNativeTarget "PDFConverter" */ = {
331+
C28A57092A4C8D0C00123463 /* Build configuration list for PBXNativeTarget "PDFConverter" */ = {
332332
isa = XCConfigurationList;
333333
buildConfigurations = (
334-
1A2B3C4D5E6F7A8B9C0D1E3F /* Debug */,
335-
1A2B3C4D5E6F7A8B9C0D1E40 /* Release */,
334+
C28A570A2A4C8D0C00123464 /* Debug */,
335+
C28A570B2A4C8D0C00123465 /* Release */,
336336
);
337337
defaultConfigurationIsVisible = 0;
338338
defaultConfigurationName = Release;
339339
};
340340
/* End XCConfigurationList section */
341341
};
342-
rootObject = 1A2B3C4D5E6F7A8B9C0D1E25 /* Project object */;
343-
}
342+
rootObject = C28A56EC2A4C8D0A00123451 /* Project object */;
343+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>PDFConverter.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>

ios/PDFConverter/PDFConverter/AppDelegate.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
55
var window: UIWindow?
66

77
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
8-
// Override point for customization after application launch.
8+
// For iOS versions lower than 13, we need to set up window and root view controller here
9+
if #available(iOS 13.0, *) {
10+
// Scene delegate will handle window setup for iOS 13+
11+
} else {
12+
window = UIWindow(frame: UIScreen.main.bounds)
13+
let viewController = ViewController()
14+
let navigationController = UINavigationController(rootViewController: viewController)
15+
window?.rootViewController = navigationController
16+
window?.makeKeyAndVisible()
17+
}
918
return true
1019
}
1120

@@ -19,4 +28,4 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1928
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
2029
// Called when the user discards a scene session.
2130
}
22-
}
31+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
4+
<dependencies>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
6+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
7+
<capability name="System colors in document resources" minToolsVersion="11.0"/>
8+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9+
</dependencies>
10+
<scenes>
11+
<!--View Controller-->
12+
<scene sceneID="EHf-IW-A2E">
13+
<objects>
14+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
15+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
16+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
17+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18+
<subviews>
19+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="PDF Converter" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fge-X0-dAx">
20+
<rect key="frame" x="20" y="411" width="353" height="30"/>
21+
<fontDescription key="fontDescription" type="boldSystem" pointSize="25"/>
22+
<nil key="textColor"/>
23+
<nil key="highlightedColor"/>
24+
</label>
25+
</subviews>
26+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
27+
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
28+
<constraints>
29+
<constraint firstItem="fge-X0-dAx" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="20" id="Gc8-6R-8If"/>
30+
<constraint firstItem="fge-X0-dAx" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="jM5-NH-Dld"/>
31+
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="fge-X0-dAx" secondAttribute="trailing" constant="20" id="nUc-Jm-JnT"/>
32+
</constraints>
33+
</view>
34+
</viewController>
35+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
36+
</objects>
37+
<point key="canvasLocation" x="53" y="375"/>
38+
</scene>
39+
</scenes>
40+
<resources>
41+
<systemColor name="systemBackgroundColor">
42+
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
43+
</systemColor>
44+
</resources>
45+
</document>
46+

0 commit comments

Comments
 (0)