Skip to content

Commit

Permalink
Update code examples to work with Swift 5 and iOS 15
Browse files Browse the repository at this point in the history
  • Loading branch information
mbernson committed Jun 18, 2024
1 parent 603c6af commit a67e1ef
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 312 deletions.
117 changes: 39 additions & 78 deletions Examples/MonoImage/MonoImage.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,24 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
BFB892441E2F9CFF00FA9129 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFB892431E2F9CFF00FA9129 /* AppDelegate.swift */; };
BFB892461E2F9CFF00FA9129 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFB892451E2F9CFF00FA9129 /* ViewController.swift */; };
BFB8924B1E2F9CFF00FA9129 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BFB8924A1E2F9CFF00FA9129 /* Assets.xcassets */; };
BFB8924E1E2F9CFF00FA9129 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BFB8924C1E2F9CFF00FA9129 /* LaunchScreen.storyboard */; };
BFF6BB9A1E40CED10000B243 /* MetalScope.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFF6BB971E40CEC30000B243 /* MetalScope.framework */; };
BFF6BB9B1E40CED10000B243 /* MetalScope.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = BFF6BB971E40CEC30000B243 /* MetalScope.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D5F4C3322C21918F00DBC3B4 /* MetalScope in Frameworks */ = {isa = PBXBuildFile; productRef = D5F4C3312C21918F00DBC3B4 /* MetalScope */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
BFF6BB961E40CEC30000B243 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFF6BB921E40CEC30000B243 /* MetalScope.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BFB891781E2E013400FA9129;
remoteInfo = MetalScope;
};
BFF6BB981E40CECB0000B243 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFF6BB921E40CEC30000B243 /* MetalScope.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = BFB891771E2E013400FA9129;
remoteInfo = MetalScope;
};
BFF6BB9C1E40CED10000B243 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BFF6BB921E40CEC30000B243 /* MetalScope.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = BFB891771E2E013400FA9129;
remoteInfo = MetalScope;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
BFB892611E2F9D4600FA9129 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
BFF6BB9B1E40CED10000B243 /* MetalScope.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -55,20 +29,20 @@

/* Begin PBXFileReference section */
BFB892401E2F9CFF00FA9129 /* MonoImage.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MonoImage.app; sourceTree = BUILT_PRODUCTS_DIR; };
BFB892431E2F9CFF00FA9129 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppDelegate.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
BFB892451E2F9CFF00FA9129 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ViewController.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
BFB892431E2F9CFF00FA9129 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppDelegate.swift; sourceTree = "<group>"; };
BFB892451E2F9CFF00FA9129 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = ViewController.swift; sourceTree = "<group>"; };
BFB8924A1E2F9CFF00FA9129 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
BFB8924D1E2F9CFF00FA9129 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
BFB8924F1E2F9CFF00FA9129 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BFF6BB921E40CEC30000B243 /* MetalScope.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MetalScope.xcodeproj; path = ../../MetalScope.xcodeproj; sourceTree = "<group>"; };
D5F4C32F2C21916200DBC3B4 /* MetalScope */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = MetalScope; path = ../..; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
BFB8923D1E2F9CFF00FA9129 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BFF6BB9A1E40CED10000B243 /* MetalScope.framework in Frameworks */,
D5F4C3322C21918F00DBC3B4 /* MetalScope in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -79,8 +53,9 @@
isa = PBXGroup;
children = (
BFB892421E2F9CFF00FA9129 /* Sources */,
D5F4C32F2C21916200DBC3B4 /* MetalScope */,
BFB892411E2F9CFF00FA9129 /* Products */,
BFF6BB921E40CEC30000B243 /* MetalScope.xcodeproj */,
D5F4C3302C21918F00DBC3B4 /* Frameworks */,
);
indentWidth = 4;
sourceTree = "<group>";
Expand Down Expand Up @@ -108,12 +83,11 @@
path = Sources;
sourceTree = "<group>";
};
BFF6BB931E40CEC30000B243 /* Products */ = {
D5F4C3302C21918F00DBC3B4 /* Frameworks */ = {
isa = PBXGroup;
children = (
BFF6BB971E40CEC30000B243 /* MetalScope.framework */,
);
name = Products;
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
Expand All @@ -131,10 +105,11 @@
buildRules = (
);
dependencies = (
BFF6BB991E40CECB0000B243 /* PBXTargetDependency */,
BFF6BB9D1E40CED10000B243 /* PBXTargetDependency */,
);
name = MonoImage;
packageProductDependencies = (
D5F4C3312C21918F00DBC3B4 /* MetalScope */,
);
productName = MonoSphericalPhoto;
productReference = BFB892401E2F9CFF00FA9129 /* MonoImage.app */;
productType = "com.apple.product-type.application";
Expand All @@ -160,35 +135,20 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
mainGroup = BFB892371E2F9CFF00FA9129;
productRefGroup = BFB892411E2F9CFF00FA9129 /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = BFF6BB931E40CEC30000B243 /* Products */;
ProjectRef = BFF6BB921E40CEC30000B243 /* MetalScope.xcodeproj */;
},
);
projectRoot = "";
targets = (
BFB8923F1E2F9CFF00FA9129 /* MonoImage */,
);
};
/* End PBXProject section */

/* Begin PBXReferenceProxy section */
BFF6BB971E40CEC30000B243 /* MetalScope.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = MetalScope.framework;
remoteRef = BFF6BB961E40CEC30000B243 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */

/* Begin PBXResourcesBuildPhase section */
BFB8923E1E2F9CFF00FA9129 /* Resources */ = {
isa = PBXResourcesBuildPhase;
Expand All @@ -213,19 +173,6 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
BFF6BB991E40CECB0000B243 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = MetalScope;
targetProxy = BFF6BB981E40CECB0000B243 /* PBXContainerItemProxy */;
};
BFF6BB9D1E40CED10000B243 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = MetalScope;
targetProxy = BFF6BB9C1E40CED10000B243 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
BFB8924C1E2F9CFF00FA9129 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -284,6 +231,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -332,9 +280,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -344,13 +294,15 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 8J6VSUTQNX;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.eje-c.MetalScope.MonoImage";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.q42.MetalScope.MonoImage;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -360,13 +312,15 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 8J6VSUTQNX;
INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.eje-c.MetalScope.MonoImage";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.q42.MetalScope.MonoImage;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -393,6 +347,13 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
D5F4C3312C21918F00DBC3B4 /* MetalScope */ = {
isa = XCSwiftPackageProductDependency;
productName = MetalScope;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = BFB892381E2F9CFF00FA9129 /* Project object */;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Examples/MonoImage/Sources/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import UIKit
final class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = ViewController()
window?.makeKeyAndVisible()
Expand Down
Loading

0 comments on commit a67e1ef

Please sign in to comment.