Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vendored XCFramework example project
- Loading branch information
Showing
119 changed files
with
5,201 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
examples/Vendored XCFramework Example/AmazingMacApp/AmazingMacApp.entitlements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
<key>com.apple.security.files.user-selected.read-only</key> | ||
<true/> | ||
</dict> | ||
</plist> |
39 changes: 39 additions & 0 deletions
39
examples/Vendored XCFramework Example/AmazingMacApp/AppDelegate.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// AppDelegate.swift | ||
// AmazingMacApp | ||
// | ||
// Created by Eric Amorde on 2/29/20. | ||
// Copyright © 2020 CocoaPods. All rights reserved. | ||
// | ||
|
||
import Cocoa | ||
import SwiftUI | ||
|
||
@NSApplicationMain | ||
class AppDelegate: NSObject, NSApplicationDelegate { | ||
|
||
var window: NSWindow! | ||
|
||
|
||
func applicationDidFinishLaunching(_ aNotification: Notification) { | ||
// Create the SwiftUI view that provides the window contents. | ||
let contentView = ContentView() | ||
|
||
// Create the window and set the content view. | ||
window = NSWindow( | ||
contentRect: NSRect(x: 0, y: 0, width: 480, height: 300), | ||
styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView], | ||
backing: .buffered, defer: false) | ||
window.center() | ||
window.setFrameAutosaveName("Main Window") | ||
window.contentView = NSHostingView(rootView: contentView) | ||
window.makeKeyAndOrderFront(nil) | ||
} | ||
|
||
func applicationWillTerminate(_ aNotification: Notification) { | ||
// Insert code here to tear down your application | ||
} | ||
|
||
|
||
} | ||
|
58 changes: 58 additions & 0 deletions
58
...ndored XCFramework Example/AmazingMacApp/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "16x16", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "32x32", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "128x128", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "256x256", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "mac", | ||
"size" : "512x512", | ||
"scale" : "2x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/Vendored XCFramework Example/AmazingMacApp/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
683 changes: 683 additions & 0 deletions
683
examples/Vendored XCFramework Example/AmazingMacApp/Base.lproj/Main.storyboard
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
examples/Vendored XCFramework Example/AmazingMacApp/ContentView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// ContentView.swift | ||
// AmazingMacApp | ||
// | ||
// Created by Eric Amorde on 2/29/20. | ||
// Copyright © 2020 CocoaPods. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct ContentView: View { | ||
var body: some View { | ||
Text("Hello, World!") | ||
.frame(maxWidth: .infinity, maxHeight: .infinity) | ||
} | ||
} | ||
|
||
|
||
struct ContentView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
ContentView() | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
examples/Vendored XCFramework Example/AmazingMacApp/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIconFile</key> | ||
<string></string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>LSMinimumSystemVersion</key> | ||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string> | ||
<key>NSHumanReadableCopyright</key> | ||
<string>Copyright © 2020 CocoaPods. All rights reserved.</string> | ||
<key>NSMainStoryboardFile</key> | ||
<string>Main</string> | ||
<key>NSPrincipalClass</key> | ||
<string>NSApplication</string> | ||
<key>NSSupportsAutomaticTermination</key> | ||
<true/> | ||
<key>NSSupportsSuddenTermination</key> | ||
<true/> | ||
</dict> | ||
</plist> |
6 changes: 6 additions & 0 deletions
6
...d XCFramework Example/AmazingMacApp/Preview Content/Preview Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/Vendored XCFramework Example/AwesomeWatchApp Extension/ContentView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
import SwiftUI | ||
|
||
struct ContentView: View { | ||
var body: some View { | ||
Text("Hello, World!") | ||
} | ||
} | ||
|
||
struct ContentView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
ContentView() | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
examples/Vendored XCFramework Example/AwesomeWatchApp Extension/ExtensionDelegate.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
import WatchKit | ||
|
||
class ExtensionDelegate: NSObject, WKExtensionDelegate { | ||
|
||
func applicationDidFinishLaunching() {} | ||
func applicationDidBecomeActive() {} | ||
func applicationWillResignActive() {} | ||
|
||
func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) { | ||
// Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one. | ||
for task in backgroundTasks { | ||
// Use a switch statement to check the task type | ||
switch task { | ||
case let backgroundTask as WKApplicationRefreshBackgroundTask: | ||
// Be sure to complete the background task once you’re done. | ||
backgroundTask.setTaskCompletedWithSnapshot(false) | ||
case let snapshotTask as WKSnapshotRefreshBackgroundTask: | ||
// Snapshot tasks have a unique completion call, make sure to set your expiration date | ||
snapshotTask.setTaskCompleted(restoredDefaultState: true, estimatedSnapshotExpiration: Date.distantFuture, userInfo: nil) | ||
case let connectivityTask as WKWatchConnectivityRefreshBackgroundTask: | ||
// Be sure to complete the connectivity task once you’re done. | ||
connectivityTask.setTaskCompletedWithSnapshot(false) | ||
case let urlSessionTask as WKURLSessionRefreshBackgroundTask: | ||
// Be sure to complete the URL session task once you’re done. | ||
urlSessionTask.setTaskCompletedWithSnapshot(false) | ||
case let relevantShortcutTask as WKRelevantShortcutRefreshBackgroundTask: | ||
// Be sure to complete the relevant-shortcut task once you're done. | ||
relevantShortcutTask.setTaskCompletedWithSnapshot(false) | ||
case let intentDidRunTask as WKIntentDidRunRefreshBackgroundTask: | ||
// Be sure to complete the intent-did-run task once you're done. | ||
intentDidRunTask.setTaskCompletedWithSnapshot(false) | ||
default: | ||
// make sure to complete unhandled task types | ||
task.setTaskCompletedWithSnapshot(false) | ||
} | ||
} | ||
} | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
examples/Vendored XCFramework Example/AwesomeWatchApp Extension/HostingController.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
import WatchKit | ||
import Foundation | ||
import SwiftUI | ||
|
||
class HostingController: WKHostingController<ContentView> { | ||
override var body: ContentView { | ||
return ContentView() | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
examples/Vendored XCFramework Example/AwesomeWatchApp Extension/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleDisplayName</key> | ||
<string>AwesomeWatchApp Extension</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
<key>NSExtension</key> | ||
<dict> | ||
<key>NSExtensionAttributes</key> | ||
<dict> | ||
<key>WKAppBundleIdentifier</key> | ||
<string>org.cocoapods.VendoredXCFrameworkExample.watchkitapp</string> | ||
</dict> | ||
<key>NSExtensionPointIdentifier</key> | ||
<string>com.apple.watchkit</string> | ||
</dict> | ||
<key>WKExtensionDelegateClassName</key> | ||
<string>$(PRODUCT_MODULE_NAME).ExtensionDelegate</string> | ||
</dict> | ||
</plist> |
81 changes: 81 additions & 0 deletions
81
...ored XCFramework Example/AwesomeWatchApp/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"size" : "24x24", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "notificationCenter", | ||
"subtype" : "38mm" | ||
}, | ||
{ | ||
"size" : "27.5x27.5", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "notificationCenter", | ||
"subtype" : "42mm" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "watch", | ||
"role" : "companionSettings", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"size" : "29x29", | ||
"idiom" : "watch", | ||
"role" : "companionSettings", | ||
"scale" : "3x" | ||
}, | ||
{ | ||
"size" : "40x40", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "appLauncher", | ||
"subtype" : "38mm" | ||
}, | ||
{ | ||
"size" : "44x44", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "appLauncher", | ||
"subtype" : "40mm" | ||
}, | ||
{ | ||
"size" : "50x50", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "appLauncher", | ||
"subtype" : "44mm" | ||
}, | ||
{ | ||
"size" : "86x86", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "quickLook", | ||
"subtype" : "38mm" | ||
}, | ||
{ | ||
"size" : "98x98", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "quickLook", | ||
"subtype" : "42mm" | ||
}, | ||
{ | ||
"size" : "108x108", | ||
"idiom" : "watch", | ||
"scale" : "2x", | ||
"role" : "quickLook", | ||
"subtype" : "44mm" | ||
}, | ||
{ | ||
"idiom" : "watch-marketing", | ||
"size" : "1024x1024", | ||
"scale" : "1x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/Vendored XCFramework Example/AwesomeWatchApp/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
examples/Vendored XCFramework Example/AwesomeWatchApp/Base.lproj/Interface.storyboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="11134" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="3mp-fW-waa"> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="11055"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Interface Controller--> | ||
<scene sceneID="aou-V4-d1y"> | ||
<objects> | ||
<hostingController id="3mp-fW-waa" customClass="HostingController" | ||
customModuleProvider="target"/> | ||
</objects> | ||
</scene> | ||
</scenes> | ||
</document> |
Oops, something went wrong.