name: SimpleCounter projectReferences: Shared: path: ../shared/shared.xcodeproj packages: SharedTypes: path: ../shared_types/generated/swift/SharedTypes options: bundleIdPrefix: com.example.simple_counter attributes: BuildIndependentTargetsInParallel: true targets: SimpleCounter: type: application platform: iOS deploymentTarget: "15.0" sources: - SimpleCounter - path: ../shared/src/shared.udl buildPhase: sources dependencies: - target: Shared/uniffi-bindgen-bin - target: Shared/shared-staticlib - package: SharedTypes info: path: SimpleCounter/Info.plist properties: UISupportedInterfaceOrientations: - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UILaunchScreen: {} settings: OTHER_LDFLAGS: [-w] SWIFT_OBJC_BRIDGING_HEADER: generated/sharedFFI.h ENABLE_USER_SCRIPT_SANDBOXING: NO buildRules: - name: Generate FFI filePattern: "*.udl" script: | #!/bin/bash set -e # Skip during indexing phase in XCode 13+ if [ "$ACTION" == "indexbuild" ]; then echo "Not building *.udl files during indexing." exit 0 fi # Skip for preview builds if [ "$ENABLE_PREVIEWS" = "YES" ]; then echo "Not building *.udl files during preview builds." exit 0 fi cd "${INPUT_FILE_DIR}/.." "${BUILD_DIR}/debug/uniffi-bindgen" generate "src/${INPUT_FILE_NAME}" --language swift --out-dir "${PROJECT_DIR}/generated" outputFiles: - $(PROJECT_DIR)/generated/$(INPUT_FILE_BASE).swift - $(PROJECT_DIR)/generated/$(INPUT_FILE_BASE)FFI.h runOncePerArchitecture: false