| 1 | name: TwidgetDemo |
| 2 | options: |
| 3 | bundleIdPrefix: org.telegram.widgetsandbox |
| 4 | deploymentTarget: |
| 5 | iOS: "16.0" |
| 6 | xcodeVersion: "26.0" |
| 7 | packages: |
| 8 | WidgetSandbox: |
| 9 | path: ../../.. # the repo root holds Package.swift (packages/ios) |
| 10 | targets: |
| 11 | TwidgetDemo: |
| 12 | type: application |
| 13 | platform: iOS |
| 14 | sources: |
| 15 | - path: Sources |
| 16 | - path: Corpus |
| 17 | type: folder |
| 18 | buildPhase: resources |
| 19 | preBuildScripts: |
| 20 | - name: Build the Blitz renderer (cargo; TW_NATIVE_RENDERERS=YES only) |
| 21 | script: "[ \"$TW_NATIVE_RENDERERS\" = YES ] || exit 0; \"$SRCROOT/../../renderer-blitz/build-apple.sh\"" |
| 22 | basedOnDependencyAnalysis: false |
| 23 | - name: Build the litehtml renderer (cmake; TW_NATIVE_RENDERERS=YES only) |
| 24 | script: "[ \"$TW_NATIVE_RENDERERS\" = YES ] || exit 0; \"$SRCROOT/../../renderer-litehtml/build-apple.sh\"" |
| 25 | basedOnDependencyAnalysis: false |
| 26 | dependencies: |
| 27 | - package: WidgetSandbox |
| 28 | info: |
| 29 | path: Info.plist |
| 30 | properties: |
| 31 | UILaunchScreen: {} |
| 32 | UISupportedInterfaceOrientations: [UIInterfaceOrientationPortrait] |
| 33 | NSAppTransportSecurity: |
| 34 | NSAllowsLocalNetworking: true |
| 35 | settings: |
| 36 | base: |
| 37 | SWIFT_VERSION: "5.0" |
| 38 | # Native renderer prototypes (dev tooling, frozen since 2026-10-30: docs/decisions.md, |
| 39 | # "The renderer prototypes are frozen"): the Rust static library from renderer-blitz/ |
| 40 | # and the C++ one from renderer-litehtml/, built by the pre-build script phases, linked |
| 41 | # and compiled in (Swift condition TW_NATIVE_RENDERERS) only when the build passes |
| 42 | # TW_NATIVE_RENDERERS=YES, e.g. on the xcodebuild command line. |
| 43 | TW_NATIVE_RENDERERS: NO |
| 44 | TW_NATIVE_RENDERER_CONDITION_YES: TW_NATIVE_RENDERERS |
| 45 | TW_NATIVE_RENDERER_LDFLAGS_YES: ["-ltwidget_blitz", "-ltwidget_litehtml", "-lc++", "-framework", "CoreText", "-framework", "CoreGraphics", "-framework", "ImageIO", "-liconv"] |
| 46 | SWIFT_ACTIVE_COMPILATION_CONDITIONS: ["$(inherited)", "$(TW_NATIVE_RENDERER_CONDITION_$(TW_NATIVE_RENDERERS))"] |
| 47 | SWIFT_OBJC_BRIDGING_HEADER: BridgingHeader.h |
| 48 | LIBRARY_SEARCH_PATHS: ["$(inherited)", "$(SRCROOT)/../../renderer-blitz/target/apple/$(PLATFORM_NAME)", "$(SRCROOT)/../../renderer-litehtml/target/apple/$(PLATFORM_NAME)"] |
| 49 | OTHER_LDFLAGS: ["$(inherited)", "$(TW_NATIVE_RENDERER_LDFLAGS_$(TW_NATIVE_RENDERERS))"] |
| 50 | # Simulator builds from the CLI pass CODE_SIGNING_ALLOWED=NO. For a real |
| 51 | # iPhone pick your team in Xcode (Signing & Capabilities) or run |
| 52 | # `xcodegen generate` with TWIDGET_TEAM=<your 10-char Team ID> exported. |
| 53 | CODE_SIGN_STYLE: Automatic |
| 54 | DEVELOPMENT_TEAM: "${TWIDGET_TEAM}" |
| 55 | PRODUCT_BUNDLE_IDENTIFIER: org.telegram.widgetsandbox.TwidgetDemo |
| 56 | |