Skip to content

Commit 4ad0cbb

Browse files
committed
Update examples for v1.56.0
1 parent 7330cfe commit 4ad0cbb

File tree

10 files changed

+33
-19
lines changed

10 files changed

+33
-19
lines changed

CESDK-Showcases.xcodeproj/project.pbxproj

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@
11121112
path = "engine-guides-uri-resolver";
11131113
sourceTree = "<group>";
11141114
};
1115-
"TEMP_D93D152B-419D-4A0A-A872-95A196DFBCA6" /* cesdk_swift_examples */ = {
1115+
"TEMP_5018D9DD-332D-4D38-8AF0-940467276B42" /* cesdk_swift_examples */ = {
11161116
isa = PBXGroup;
11171117
children = (
11181118
08A9EA956529EFCD7B5C6079 /* editor-guides-configuration-inspector-bar */,
@@ -1237,12 +1237,14 @@
12371237
en,
12381238
);
12391239
mainGroup = 70626161758B70813AF43B5F;
1240+
minimizedProjectReferenceProxies = 1;
12401241
packageReferences = (
12411242
10597E39A033ABD8B233CD14 /* XCRemoteSwiftPackageReference "IMGLYEngine-swift" */,
12421243
0FE27C34D3DCA1C11CCC3135 /* XCRemoteSwiftPackageReference "IMGLYUI-swift" */,
12431244
150F161C090426538C39E173 /* XCRemoteSwiftPackageReference "Kingfisher" */,
12441245
4D2B057734A5412CF39C2B92 /* XCRemoteSwiftPackageReference "SwiftUI-Introspect" */,
12451246
);
1247+
preferredProjectObjectVersion = 54;
12461248
projectDirPath = "";
12471249
projectRoot = "";
12481250
targets = (
@@ -1555,7 +1557,7 @@
15551557
GCC_WARN_UNUSED_VARIABLE = YES;
15561558
GENERATE_INFOPLIST_FILE = YES;
15571559
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
1558-
MARKETING_VERSION = 1.55.2;
1560+
MARKETING_VERSION = 1.56.0;
15591561
MTL_ENABLE_DEBUG_INFO = NO;
15601562
MTL_FAST_MATH = YES;
15611563
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1645,7 +1647,7 @@
16451647
GCC_WARN_UNUSED_VARIABLE = YES;
16461648
GENERATE_INFOPLIST_FILE = YES;
16471649
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
1648-
MARKETING_VERSION = 1.55.2;
1650+
MARKETING_VERSION = 1.56.0;
16491651
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
16501652
MTL_FAST_MATH = YES;
16511653
ONLY_ACTIVE_ARCH = YES;
@@ -1720,15 +1722,15 @@
17201722
repositoryURL = "https://github.com/imgly/IMGLYUI-swift";
17211723
requirement = {
17221724
kind = exactVersion;
1723-
version = 1.55.2;
1725+
version = 1.56.0;
17241726
};
17251727
};
17261728
10597E39A033ABD8B233CD14 /* XCRemoteSwiftPackageReference "IMGLYEngine-swift" */ = {
17271729
isa = XCRemoteSwiftPackageReference;
17281730
repositoryURL = "https://github.com/imgly/IMGLYEngine-swift";
17291731
requirement = {
17301732
kind = exactVersion;
1731-
version = 1.55.2;
1733+
version = 1.56.0;
17321734
};
17331735
};
17341736
150F161C090426538C39E173 /* XCRemoteSwiftPackageReference "Kingfisher" */ = {

CESDK-Showcases.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 0 additions & 7 deletions
This file was deleted.

editor-guides-configuration-asset-library/CustomAssetLibrary.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct CustomAssetLibrary: AssetLibrary {
5757
@AssetLibraryBuilder var stickers: AssetLibraryContent {
5858
AssetLibrarySource.sticker(.titleForGroup { group in
5959
if let name = group?.split(separator: "/").last {
60-
name.capitalized
60+
"\(name.capitalized)"
6161
} else {
6262
"Stickers"
6363
}

editor-guides-configuration-basics/BasicEditorSolution.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ struct BasicEditorSolution: View {
88
// highlight-userID
99
userID: "<your unique user id>",
1010
// highlight-baseURL
11-
baseURL: URL(string: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.55.2/assets")!
11+
baseURL: URL(string: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.56.0/assets")!
1212
)
1313

1414
var editor: some View {

editor-guides-configuration-callbacks/CallbacksEditorSolution.swift

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,23 @@ struct CallbacksEditorSolution: View {
115115
}
116116
return .init(id: asset.id, groups: asset.groups, meta: newMeta, label: asset.label, tags: asset.tags)
117117
}
118-
// highlight-onUpload
118+
// highlight-onUpload
119+
// highlight-onClose
120+
.imgly.onClose { engine, eventHandler in
121+
let hasUnsavedChanges = (try? engine.editor.canUndo()) ?? false
122+
123+
if hasUnsavedChanges {
124+
eventHandler.send(.showCloseConfirmationAlert)
125+
} else {
126+
eventHandler.send(.closeEditor)
127+
}
128+
}
129+
// highlight-onClose
130+
// highlight-onError
131+
.imgly.onError { error, eventHandler in
132+
eventHandler.send(.showErrorAlert(error))
133+
}
134+
// highlight-onError
119135
}
120136

121137
@State private var isPresented = false

editor-guides-configuration-dock/DefaultDockItemsEditorSolution.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ struct DefaultDockItemsEditorSolution: View {
5151
Dock.Buttons.audioLibrary()
5252
Dock.Buttons.voiceover()
5353
Dock.Buttons.reorder()
54+
Dock.Buttons.resize()
5455
}
5556
// highlight-videoEditor-dockItems
5657
}

engine-guides-exporting-blocks/ExportingBlocks.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import IMGLYEngine
99

1010
@MainActor
1111
func exportingBlocks(engine: Engine) async throws {
12-
try engine.editor.setSettingString("basePath", value: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.55.2/assets")
12+
try engine.editor.setSettingString("basePath", value: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.56.0/assets")
1313
try await engine.addDefaultAssetSources()
1414
let sceneUrl =
1515
URL(string: "https://cdn.img.ly/assets/demo/v1/ly.img.template/templates/cesdk_postcard_1.scene")!

engine-guides-uri-resolver/URIResolver.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import IMGLYEngine
44
@MainActor
55
func uriResolver(engine: Engine) async throws {
66
// highlight-get-absolute-base-path
7-
// This will return "https://cdn.img.ly/packages/imgly/cesdk-js/1.55.2/assets/banana.jpg"
7+
// This will return "https://cdn.img.ly/packages/imgly/cesdk-js/1.56.0/assets/banana.jpg"
88
try engine.editor.getAbsoluteURI(relativePath: "/banana.jpg")
99
// highlight-get-absolute-base-path
1010

@@ -36,7 +36,7 @@ func uriResolver(engine: Engine) async throws {
3636
try engine.editor.setURIResolver(nil)
3737

3838
// Since we"ve removed the custom resolver, this will return
39-
// "https://cdn.img.ly/packages/imgly/cesdk-js/1.55.2/assets/banana.jpg" like before.
39+
// "https://cdn.img.ly/packages/imgly/cesdk-js/1.56.0/assets/banana.jpg" like before.
4040
try engine.editor.getAbsoluteURI(relativePath: "/banana.jpg")
4141
// highlight-remove-resolver
4242
}

showcases-app/App-Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CFBundleAllowMixedLocalizations</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleExecutable</key>

showcases-app/View/Examples/CustomVideoEditor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct CustomVideoEditor: View {
5050
if let name = group {
5151
switch name {
5252
case "3dstickers": "3D Stickers"
53-
default: name.capitalized
53+
default: "\(name.capitalized)"
5454
}
5555
} else {
5656
"Stickers"

0 commit comments

Comments
 (0)