Hi everyone,
I'm encountering an issue when trying to run Xcode Previews for my HelloWorldApp on a real iPhone device. The app fails to install, and I get the following error message:
Development Environment:
Xcode Version: 16C5032a
macOS Version: 23H420
Test Device (iPhone): iPhone 12 mini, iOS 15.5 (19F77)
MacBook: MacBook Air (M1, arm64e)
Error Message:
Whenever I attempt to preview the app using SwiftUI Previews on my iPhone (iPhone của Định), I get the following installation error:
FailedToInstallAppError: Failed to install ”HelloWorldApp.app”
Could not install the preview host ”HelloWorldApp.app” on iPhone của Định
Here’s part of the detailed log:
agentBundle = com.DihNgx.HelloWorldApp {
url: file:///Users/dihngx/Library/Developer/Xcode/DerivedData/HelloWorldApp-eyeszqttvaydocbdmoiwcczlazrt/Build/Intermediates.noindex/Previews/iphoneos/HelloWorldApp/Products/Debug-iphoneos/HelloWorldApp.app
signingInformation:
Code Signing {
identifier: com.DihNgx.HelloWorldApp
identity: A9A830FA23874E2047C974D6621D441EB9CBC7CC
hasGetTaskAllow: true
isSandboxed: false
}
}
Device Information:
Device Name: iPhone của Định
Device Identifier: 00008101-001C482922C0001E
iOS Version: 15.5
Provisioning profile installed: "iOS Team Provisioning Profile: com.DihNgx.HelloWorldApp"
Steps I’ve already tried (but the issue persists):
Ensured that Xcode recognizes the iPhone and that the device is connected properly.
Checked Code Signing and Provisioning Profile (no issues were shown).
Cleaned the build folder (Cmd + Shift + K) and deleted Derived Data.
I’d really appreciate any advice or suggestions on how to solve this issue. Has anyone else faced a similar error or knows how to fix this? Thanks so much in advance!
Selecting any option will automatically load the page