Skip to content

Commit 0269c3a

Browse files
authored
Add HostingExample (#52)
1 parent 314d5d4 commit 0269c3a

File tree

10 files changed

+409
-1
lines changed

10 files changed

+409
-1
lines changed

Example/Example.xcodeproj/project.pbxproj

+185-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
27CD0B552AFC8D38003665EB /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27CD0B542AFC8D38003665EB /* Preview Assets.xcassets */; };
1414
27CD0B5D2AFC8DA7003665EB /* OpenGraph in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0B5C2AFC8DA7003665EB /* OpenGraph */; };
1515
27CD0B5F2AFC8DA7003665EB /* OpenSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 27CD0B5E2AFC8DA7003665EB /* OpenSwiftUI */; };
16+
27D49DFB2BA604FB00F6E2E2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D49DFA2BA604FB00F6E2E2 /* AppDelegate.swift */; };
17+
27D49DFD2BA604FB00F6E2E2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D49DFC2BA604FB00F6E2E2 /* SceneDelegate.swift */; };
18+
27D49DFF2BA604FB00F6E2E2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D49DFE2BA604FB00F6E2E2 /* ViewController.swift */; };
19+
27D49E022BA604FB00F6E2E2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27D49E002BA604FB00F6E2E2 /* Main.storyboard */; };
20+
27D49E042BA604FC00F6E2E2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27D49E032BA604FC00F6E2E2 /* Assets.xcassets */; };
21+
27D49E072BA604FC00F6E2E2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27D49E052BA604FC00F6E2E2 /* LaunchScreen.storyboard */; };
22+
27D49E0E2BA60AF600F6E2E2 /* OpenSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = 27D49E0D2BA60AF600F6E2E2 /* OpenSwiftUI */; };
1623
/* End PBXBuildFile section */
1724

1825
/* Begin PBXFileReference section */
@@ -23,6 +30,14 @@
2330
27CD0B522AFC8D38003665EB /* Example.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Example.entitlements; sourceTree = "<group>"; };
2431
27CD0B542AFC8D38003665EB /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
2532
27CD0B612AFC8E0E003665EB /* OpenSwiftUI */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = OpenSwiftUI; path = ..; sourceTree = "<group>"; };
33+
27D49DF82BA604FB00F6E2E2 /* HostingExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HostingExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
34+
27D49DFA2BA604FB00F6E2E2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
35+
27D49DFC2BA604FB00F6E2E2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
36+
27D49DFE2BA604FB00F6E2E2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
37+
27D49E012BA604FB00F6E2E2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
38+
27D49E032BA604FC00F6E2E2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
39+
27D49E062BA604FC00F6E2E2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
40+
27D49E082BA604FC00F6E2E2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2641
/* End PBXFileReference section */
2742

2843
/* Begin PBXFrameworksBuildPhase section */
@@ -35,6 +50,14 @@
3550
);
3651
runOnlyForDeploymentPostprocessing = 0;
3752
};
53+
27D49DF52BA604FB00F6E2E2 /* Frameworks */ = {
54+
isa = PBXFrameworksBuildPhase;
55+
buildActionMask = 2147483647;
56+
files = (
57+
27D49E0E2BA60AF600F6E2E2 /* OpenSwiftUI in Frameworks */,
58+
);
59+
runOnlyForDeploymentPostprocessing = 0;
60+
};
3861
/* End PBXFrameworksBuildPhase section */
3962

4063
/* Begin PBXGroup section */
@@ -43,14 +66,17 @@
4366
children = (
4467
27CD0B612AFC8E0E003665EB /* OpenSwiftUI */,
4568
27CD0B4B2AFC8D37003665EB /* Example */,
69+
27D49DF92BA604FB00F6E2E2 /* HostingExample */,
4670
27CD0B4A2AFC8D37003665EB /* Products */,
71+
27D49E0C2BA60AF600F6E2E2 /* Frameworks */,
4772
);
4873
sourceTree = "<group>";
4974
};
5075
27CD0B4A2AFC8D37003665EB /* Products */ = {
5176
isa = PBXGroup;
5277
children = (
5378
27CD0B492AFC8D37003665EB /* Example.app */,
79+
27D49DF82BA604FB00F6E2E2 /* HostingExample.app */,
5480
);
5581
name = Products;
5682
sourceTree = "<group>";
@@ -75,6 +101,27 @@
75101
path = "Preview Content";
76102
sourceTree = "<group>";
77103
};
104+
27D49DF92BA604FB00F6E2E2 /* HostingExample */ = {
105+
isa = PBXGroup;
106+
children = (
107+
27D49DFA2BA604FB00F6E2E2 /* AppDelegate.swift */,
108+
27D49DFC2BA604FB00F6E2E2 /* SceneDelegate.swift */,
109+
27D49DFE2BA604FB00F6E2E2 /* ViewController.swift */,
110+
27D49E002BA604FB00F6E2E2 /* Main.storyboard */,
111+
27D49E032BA604FC00F6E2E2 /* Assets.xcassets */,
112+
27D49E052BA604FC00F6E2E2 /* LaunchScreen.storyboard */,
113+
27D49E082BA604FC00F6E2E2 /* Info.plist */,
114+
);
115+
path = HostingExample;
116+
sourceTree = "<group>";
117+
};
118+
27D49E0C2BA60AF600F6E2E2 /* Frameworks */ = {
119+
isa = PBXGroup;
120+
children = (
121+
);
122+
name = Frameworks;
123+
sourceTree = "<group>";
124+
};
78125
/* End PBXGroup section */
79126

80127
/* Begin PBXNativeTarget section */
@@ -99,19 +146,42 @@
99146
productReference = 27CD0B492AFC8D37003665EB /* Example.app */;
100147
productType = "com.apple.product-type.application";
101148
};
149+
27D49DF72BA604FB00F6E2E2 /* HostingExample */ = {
150+
isa = PBXNativeTarget;
151+
buildConfigurationList = 27D49E092BA604FC00F6E2E2 /* Build configuration list for PBXNativeTarget "HostingExample" */;
152+
buildPhases = (
153+
27D49DF42BA604FB00F6E2E2 /* Sources */,
154+
27D49DF52BA604FB00F6E2E2 /* Frameworks */,
155+
27D49DF62BA604FB00F6E2E2 /* Resources */,
156+
);
157+
buildRules = (
158+
);
159+
dependencies = (
160+
);
161+
name = HostingExample;
162+
packageProductDependencies = (
163+
27D49E0D2BA60AF600F6E2E2 /* OpenSwiftUI */,
164+
);
165+
productName = HostingExample;
166+
productReference = 27D49DF82BA604FB00F6E2E2 /* HostingExample.app */;
167+
productType = "com.apple.product-type.application";
168+
};
102169
/* End PBXNativeTarget section */
103170

104171
/* Begin PBXProject section */
105172
27CD0B412AFC8D37003665EB /* Project object */ = {
106173
isa = PBXProject;
107174
attributes = {
108175
BuildIndependentTargetsInParallel = 1;
109-
LastSwiftUpdateCheck = 1500;
176+
LastSwiftUpdateCheck = 1520;
110177
LastUpgradeCheck = 1500;
111178
TargetAttributes = {
112179
27CD0B482AFC8D37003665EB = {
113180
CreatedOnToolsVersion = 15.0;
114181
};
182+
27D49DF72BA604FB00F6E2E2 = {
183+
CreatedOnToolsVersion = 15.2;
184+
};
115185
};
116186
};
117187
buildConfigurationList = 27CD0B442AFC8D37003665EB /* Build configuration list for PBXProject "Example" */;
@@ -130,6 +200,7 @@
130200
projectRoot = "";
131201
targets = (
132202
27CD0B482AFC8D37003665EB /* Example */,
203+
27D49DF72BA604FB00F6E2E2 /* HostingExample */,
133204
);
134205
};
135206
/* End PBXProject section */
@@ -144,6 +215,16 @@
144215
);
145216
runOnlyForDeploymentPostprocessing = 0;
146217
};
218+
27D49DF62BA604FB00F6E2E2 /* Resources */ = {
219+
isa = PBXResourcesBuildPhase;
220+
buildActionMask = 2147483647;
221+
files = (
222+
27D49E072BA604FC00F6E2E2 /* LaunchScreen.storyboard in Resources */,
223+
27D49E042BA604FC00F6E2E2 /* Assets.xcassets in Resources */,
224+
27D49E022BA604FB00F6E2E2 /* Main.storyboard in Resources */,
225+
);
226+
runOnlyForDeploymentPostprocessing = 0;
227+
};
147228
/* End PBXResourcesBuildPhase section */
148229

149230
/* Begin PBXSourcesBuildPhase section */
@@ -156,8 +237,37 @@
156237
);
157238
runOnlyForDeploymentPostprocessing = 0;
158239
};
240+
27D49DF42BA604FB00F6E2E2 /* Sources */ = {
241+
isa = PBXSourcesBuildPhase;
242+
buildActionMask = 2147483647;
243+
files = (
244+
27D49DFF2BA604FB00F6E2E2 /* ViewController.swift in Sources */,
245+
27D49DFB2BA604FB00F6E2E2 /* AppDelegate.swift in Sources */,
246+
27D49DFD2BA604FB00F6E2E2 /* SceneDelegate.swift in Sources */,
247+
);
248+
runOnlyForDeploymentPostprocessing = 0;
249+
};
159250
/* End PBXSourcesBuildPhase section */
160251

252+
/* Begin PBXVariantGroup section */
253+
27D49E002BA604FB00F6E2E2 /* Main.storyboard */ = {
254+
isa = PBXVariantGroup;
255+
children = (
256+
27D49E012BA604FB00F6E2E2 /* Base */,
257+
);
258+
name = Main.storyboard;
259+
sourceTree = "<group>";
260+
};
261+
27D49E052BA604FC00F6E2E2 /* LaunchScreen.storyboard */ = {
262+
isa = PBXVariantGroup;
263+
children = (
264+
27D49E062BA604FC00F6E2E2 /* Base */,
265+
);
266+
name = LaunchScreen.storyboard;
267+
sourceTree = "<group>";
268+
};
269+
/* End PBXVariantGroup section */
270+
161271
/* Begin XCBuildConfiguration section */
162272
27CD0B562AFC8D38003665EB /* Debug */ = {
163273
isa = XCBuildConfiguration;
@@ -349,6 +459,67 @@
349459
};
350460
name = Release;
351461
};
462+
27D49E0A2BA604FC00F6E2E2 /* Debug */ = {
463+
isa = XCBuildConfiguration;
464+
buildSettings = {
465+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
466+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
467+
CODE_SIGN_STYLE = Automatic;
468+
CURRENT_PROJECT_VERSION = 1;
469+
DEVELOPMENT_TEAM = VB7MJ8R223;
470+
GENERATE_INFOPLIST_FILE = YES;
471+
INFOPLIST_FILE = HostingExample/Info.plist;
472+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
473+
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
474+
INFOPLIST_KEY_UIMainStoryboardFile = Main;
475+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
476+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
477+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
478+
LD_RUNPATH_SEARCH_PATHS = (
479+
"$(inherited)",
480+
"@executable_path/Frameworks",
481+
);
482+
MARKETING_VERSION = 1.0;
483+
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.HostingExample;
484+
PRODUCT_NAME = "$(TARGET_NAME)";
485+
SDKROOT = iphoneos;
486+
SWIFT_EMIT_LOC_STRINGS = YES;
487+
SWIFT_VERSION = 5.0;
488+
TARGETED_DEVICE_FAMILY = "1,2";
489+
};
490+
name = Debug;
491+
};
492+
27D49E0B2BA604FC00F6E2E2 /* Release */ = {
493+
isa = XCBuildConfiguration;
494+
buildSettings = {
495+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
496+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
497+
CODE_SIGN_STYLE = Automatic;
498+
CURRENT_PROJECT_VERSION = 1;
499+
DEVELOPMENT_TEAM = VB7MJ8R223;
500+
GENERATE_INFOPLIST_FILE = YES;
501+
INFOPLIST_FILE = HostingExample/Info.plist;
502+
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
503+
INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
504+
INFOPLIST_KEY_UIMainStoryboardFile = Main;
505+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
506+
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
507+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
508+
LD_RUNPATH_SEARCH_PATHS = (
509+
"$(inherited)",
510+
"@executable_path/Frameworks",
511+
);
512+
MARKETING_VERSION = 1.0;
513+
PRODUCT_BUNDLE_IDENTIFIER = top.kyleye.HostingExample;
514+
PRODUCT_NAME = "$(TARGET_NAME)";
515+
SDKROOT = iphoneos;
516+
SWIFT_EMIT_LOC_STRINGS = YES;
517+
SWIFT_VERSION = 5.0;
518+
TARGETED_DEVICE_FAMILY = "1,2";
519+
VALIDATE_PRODUCT = YES;
520+
};
521+
name = Release;
522+
};
352523
/* End XCBuildConfiguration section */
353524

354525
/* Begin XCConfigurationList section */
@@ -370,6 +541,15 @@
370541
defaultConfigurationIsVisible = 0;
371542
defaultConfigurationName = Release;
372543
};
544+
27D49E092BA604FC00F6E2E2 /* Build configuration list for PBXNativeTarget "HostingExample" */ = {
545+
isa = XCConfigurationList;
546+
buildConfigurations = (
547+
27D49E0A2BA604FC00F6E2E2 /* Debug */,
548+
27D49E0B2BA604FC00F6E2E2 /* Release */,
549+
);
550+
defaultConfigurationIsVisible = 0;
551+
defaultConfigurationName = Release;
552+
};
373553
/* End XCConfigurationList section */
374554

375555
/* Begin XCSwiftPackageProductDependency section */
@@ -381,6 +561,10 @@
381561
isa = XCSwiftPackageProductDependency;
382562
productName = OpenSwiftUI;
383563
};
564+
27D49E0D2BA60AF600F6E2E2 /* OpenSwiftUI */ = {
565+
isa = XCSwiftPackageProductDependency;
566+
productName = OpenSwiftUI;
567+
};
384568
/* End XCSwiftPackageProductDependency section */
385569
};
386570
rootObject = 27CD0B412AFC8D37003665EB /* Project object */;
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// AppDelegate.swift
3+
// HostingExample
4+
//
5+
// Created by Kyle on 2024/3/17.
6+
//
7+
8+
import UIKit
9+
10+
@main
11+
class AppDelegate: UIResponder, UIApplicationDelegate {
12+
13+
14+
15+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16+
// Override point for customization after application launch.
17+
return true
18+
}
19+
20+
// MARK: UISceneSession Lifecycle
21+
22+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
23+
// Called when a new scene session is being created.
24+
// Use this method to select a configuration to create the new scene with.
25+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
26+
}
27+
28+
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
29+
// Called when the user discards a scene session.
30+
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
31+
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
32+
}
33+
34+
35+
}
36+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"platform" : "ios",
6+
"size" : "1024x1024"
7+
}
8+
],
9+
"info" : {
10+
"author" : "xcode",
11+
"version" : 1
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
5+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
7+
</dependencies>
8+
<scenes>
9+
<!--View Controller-->
10+
<scene sceneID="EHf-IW-A2E">
11+
<objects>
12+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
13+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
14+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
15+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16+
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
17+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
18+
</view>
19+
</viewController>
20+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
21+
</objects>
22+
<point key="canvasLocation" x="53" y="375"/>
23+
</scene>
24+
</scenes>
25+
</document>

0 commit comments

Comments
 (0)