exclude watch app conditionally in build phase as well#3815
Conversation
Entelligence AI Vulnerability ScannerStatus: No security vulnerabilities found Your code passed our comprehensive security analysis. |
Review Summary |
WalkthroughThis PR configures the iOS Xcode project to properly handle the watchOS companion app (omiWatchApp) build process. The changes ensure the watch app is only built and embedded when targeting physical iOS devices, preventing build errors on the iOS simulator. Key modifications include adjusting the build phase settings for the watch app, adding platform filters to restrict the dependency to physical devices (iphoneos), and excluding the watchOS app binary from all simulator build configurations (Debug-dev, Debug-prod, Profile, Profile-dev, Profile-prod, and Release). Changes
Sequence DiagramThis diagram shows the interactions between components: sequenceDiagram
participant XcodeBuild as Xcode Build System
participant Runner as iOS App (Runner)
participant WatchApp as omiWatchApp.app
participant BuildConfig as Build Configuration
Note over XcodeBuild,BuildConfig: Watch App Integration Setup
XcodeBuild->>BuildConfig: Configure build settings
activate BuildConfig
alt Building for Physical Device (iphoneos)
BuildConfig->>Runner: Set platformFilter = iphoneos
BuildConfig->>Runner: Include omiWatchApp.app in build
Runner->>WatchApp: Add as target dependency
activate WatchApp
WatchApp-->>Runner: Watch app compiled
deactivate WatchApp
Runner->>Runner: Execute "Embed Watch Content" phase
Note over Runner: buildActionMask = 8<br/>Copy to $(CONTENTS_FOLDER_PATH)/Watch
Runner->>Runner: Embed omiWatchApp.app
else Building for Simulator (iphonesimulator)
BuildConfig->>Runner: Set EXCLUDED_SOURCE_FILE_NAMES
Note over Runner: omiWatchApp.app excluded<br/>from simulator builds
Runner->>Runner: Skip Watch app embedding
Note over Runner,WatchApp: Watch app not included<br/>in simulator build
end
deactivate BuildConfig
Note over XcodeBuild,BuildConfig: Applied to all configurations:<br/>Debug, Release, Profile<br/>(dev/prod variants)
XcodeBuild->>Runner: Build complete
🔗 Cross-Repository Impact AnalysisEnable automatic detection of breaking changes across your dependent repositories. → Set up now Learn more about Cross-Repository AnalysisWhat It Does
How to Enable
Benefits
Note for WindsurfPlease change the default marketplace provider to the following in the windsurf settings:Marketplace Extension Gallery Service URL: https://marketplace.visualstudio.com/_apis/public/gallery Marketplace Gallery Item URL: https://marketplace.visualstudio.com/items Entelligence.ai can learn from your feedback. Simply add 👍 / 👎 emojis to teach it your preferences. More shortcuts belowEmoji Descriptions:
Interact with the Bot:
Also you can trigger various commands with the bot by doing The current supported commands are
More commands to be added soon. |
There was a problem hiding this comment.
Code Review
This pull request updates the Xcode project file (project.pbxproj) to correctly configure the omiWatchApp. The changes include explicitly embedding the omiWatchApp.app into the main application's build phase, adding a platformFilter = iphoneos to the omiWatchApp target dependency, and excluding omiWatchApp.app from source files when building for the iOS simulator across various build configurations (Profile, Debug-prod, Release, Profile-dev, Profile-prod, Debug-dev).
EntelligenceAI PR Summary
This PR configures the iOS Xcode project to properly build and embed the watchOS companion app only on physical devices, preventing simulator build errors.