Skip to content

Commit

Permalink
Update examples for v1.40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
imgly-bot committed Nov 28, 2024
1 parent b29fbd2 commit b0db411
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
10 changes: 5 additions & 5 deletions CESDK-Showcases.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@
path = "engine-guides-uri-resolver";
sourceTree = "<group>";
};
"TEMP_45F7780C-719D-491F-B94C-1FCC248275C3" /* cesdk_swift_examples */ = {
"TEMP_8E42537E-951C-4484-AAF0-223BC462C93F" /* cesdk_swift_examples */ = {
isa = PBXGroup;
children = (
582BF90249D09687E7CFACDC /* editor-guides-solutions-video-editor */,
Expand Down Expand Up @@ -1466,7 +1466,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MARKETING_VERSION = 1.39.0;
MARKETING_VERSION = 1.40.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1556,7 +1556,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MARKETING_VERSION = 1.39.0;
MARKETING_VERSION = 1.40.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
Expand Down Expand Up @@ -1631,15 +1631,15 @@
repositoryURL = "https://github.com/imgly/IMGLYUI-swift";
requirement = {
kind = exactVersion;
version = 1.39.0;
version = 1.40.0;
};
};
10597E39A033ABD8B233CD14 /* XCRemoteSwiftPackageReference "IMGLYEngine-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/imgly/IMGLYEngine-swift";
requirement = {
kind = exactVersion;
version = 1.39.0;
version = 1.40.0;
};
};
150F161C090426538C39E173 /* XCRemoteSwiftPackageReference "Kingfisher" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ struct BasicEditorSolution: View {
// highlight-userID
userID: "<your unique user id>",
// highlight-baseURL
baseURL: URL(string: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.39.0/assets")!
baseURL: URL(string: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.40.0/assets")!
)

var editor: some View {
Expand Down
2 changes: 1 addition & 1 deletion engine-guides-exporting-blocks/ExportingBlocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import IMGLYEngine

@MainActor
func exportingBlocks(engine: Engine) async throws {
try engine.editor.setSettingString("basePath", value: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.39.0/assets")
try engine.editor.setSettingString("basePath", value: "https://cdn.img.ly/packages/imgly/cesdk-engine/1.40.0/assets")
try await engine.addDefaultAssetSources()
let sceneUrl =
URL(string: "https://cdn.img.ly/assets/demo/v1/ly.img.template/templates/cesdk_postcard_1.scene")!
Expand Down
10 changes: 8 additions & 2 deletions engine-guides-text-properties/TextProperties.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,19 @@ func textProperties(engine: Engine) async throws {
// highlight-setFont

// highlight-setTypeface
try engine.block.setTypeface(text, fallbackFontFileURL: typeface.fonts[3].uri, typeface: typeface)
try engine.block.setTypeface(text, typeface: typeface, in: "Alex".range(of: "lex")!)
try engine.block.setTypeface(text, typeface: typeface)
// highlight-setTypeface

// highlight-getTypeface
let currentTypeface = try engine.block.getTypeface(text)
let currentDefaultTypeface = try engine.block.getTypeface(text)
// highlight-getTypeface

// highlight-getTypefaces
let currentTypefaces = try engine.block.getTypefaces(text)
let currentTypefacesOfRange = try engine.block.getTypefaces(text, in: "Alex".range(of: "lex")!)
// highlight-getTypefaces

// highlight-toggleBold
if try engine.block.canToggleBoldFont(text) {
try engine.block.toggleBoldFont(text)
Expand Down

0 comments on commit b0db411

Please sign in to comment.