Posts

Post marked as solved
7 Replies
1.1k Views
Hello, When an iOS app runs on Vision Pro in compatible mode, is there a flag such as isiOSAppOnVision to determine the underlying OS at runtime? Just like the ProcessInfo.isiOSAppOnMac. It will be useful to optimize the app for visionOS. Already checked but not useful: #if os(xrOS) does not work in compatible mode since no code is recompiled. UIDevice.userInterfaceIdiom returns .pad instead of .reality. Thanks.
Posted
by Gong.
Last updated
.
Post not yet marked as solved
22 Replies
3.8k Views
In Xcode 15 beta 6, building any Mac Catalyst project will encounter the following Linker warning. ld: warning: building for 'macCatalyst', but linking in dylib (/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa.tbd) built for 'macOS'
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
222 Views
Menu > Editor > Canvas > Export Preview Screenshot Got error message: Stream with endpoint 'C5C6DCA4-D146-451F-8BA8-AF83657E4CC7' is invalidated I don't collect diagnostic data.
Posted
by Gong.
Last updated
.
Post not yet marked as solved
2 Replies
327 Views
Hello! I've noticed that adding localizations for AppShortcuts triggers the following warnings in Xcode 15.3: warning: missing the definition of zh-Hans # variables.1.definitions warning: missing the definition of zh-Hans # variables.2.definitions This occurs with both legacy strings files and String Catalogs. Example project: https://github.com/gongzhang/AppShortcutsLocalizationWarningExample
Posted
by Gong.
Last updated
.
Post not yet marked as solved
2 Replies
515 Views
⌚️Hello, I've noticed in watchOS 10 that when a complication is in the Smart Stack, the value of WCSession.isComplicationEnabled is false. I'm not sure if this is intentional or a bug. It seems trivial at first glance, but it actually affects the communication mechanism mentioned in Implementing Two-Way Communication Using Watch Connectivity. In the following two scenarios, if the user has only added the app's complication to the Smart Stack, then the watch app will not be able to communicate properly with the iOS app. Scenario 1 - WCSession.transferCurrentComplicationUserInfo() // update complications from the iOS app if WCSession.default.isComplicationEnabled { let userInfoTransfer = WCSession.default.transferCurrentComplicationUserInfo(userInfo) // ... } As described in Implementing Two-Way Communication Using Watch Connectivity, when the iOS app proactively updates the data of the watch app, since WCSession.isComplicationEnabled is false, WCSession will refuse to transfer any data. This causes the standalone complication in Smart Stack to not be updated. Scenario 2 - WKApplicationRefreshBackgroundTask When the watch app uses WKApplication.scheduleBackgroundRefresh() to periodically update data, as long as the user has added the app's complication to the watch face, the corresponding WKApplicationRefreshBackgroundTask can be executed periodically in the background to fetch data. However, if the user has only added complication to the Smart Stack, then the watch app will be completely purged, and the background task will not be executed at all. Although WCSession.isComplicationEnabled is not directly used in this scenario, its behavior appears to be the same, that is, the complication in the Smart Stack is not considered a complication by the system. Should I submit a bug report?
Posted
by Gong.
Last updated
.
Post marked as solved
3 Replies
579 Views
Hello everyone! I recently released the native visionOS version of my app on TestFlight. I noticed that there are 8 crashes on Vision Pro on the App Store Connect website, but I can't get these crash logs in Xcode Organizer (the crash list of visionOS app is empty). Is there any way to get these crash logs now? I don't have a physical Vision Pro device so I can't reproduce the crash, I can only rely on the crash logs.
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
322 Views
Hello everyone! When I run UI Tests on Xcode Cloud, I often encounter unexpected failures. Checking the screen recording, I found that the iOS Simulator could go into a black screen with a white Apple logo and a progress bar for a period after the test starts. This behavior of the Simulator causes my app's UI Tests to fail randomly, which greatly affects the practical use of UI Tests. I suspect this phenomenon is unrelated to my app and test cases, so I'm asking if anyone else has encountered a similar issue. 🤔
Posted
by Gong.
Last updated
.
Post marked as solved
1 Replies
315 Views
Hello everyone! I've noticed that Xcode 15.2 is still not selectable as a build environment on Xcode Cloud, even though the official version of 15.2 has been out for several days. Is this part of the plan? Or is it a system bug? 🤔 I need 15.2 as the release environment, including support for building visionOS apps. I have already submitted FB13531029.
Posted
by Gong.
Last updated
.
Post marked as solved
8 Replies
2.7k Views
Hello! I can't preview the SwiftUI views of watchOS target in Xcode 15 beta 1, when the containing iOS app has a SPM dependency. Reproducing steps: Create a new watchOS app project (with a companion iOS app) in Xcode 15. Both iOS and watchOS ContentView can be previewed at this step. Add a Swift package to the iOS target (the package should be an iOS-specific package, not a watchOS one, for example, https://github.com/siteline/SwiftUI-Introspect) After you add the static library to iOS target, the watchOS preview no longer work anymore. If you check the error message, you can find the Xcode preview attempt to build the iOS package against watchOS SDK.
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
418 Views
Hello, My iOS app will support running on visionOS in compatible mode and I want to do some optimizations for the UI. Is there a flag can help to determine this compatible mode on visionOS? (Just like ProcessInfo.isiOSAppOnMac) Thanks! FB12757613
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
439 Views
Hello everyone! I've found that on the current iOS 17.0/17.1, the Button with an AppIntent within a widget can be tapped at a high frequency. Even if the AppIntent triggered by the first tap has not finished executing, the user can still trigger the AppIntent again. This can lead to repeated or accidental operations by the user. Since there is already an invalidatableContent() API, I think the system should know when an AppIntent has not finished executing. I suggest that in this state, the system should not accept repeated taps from the user. This way, the behavior and appearance of the button would be consistent.
Posted
by Gong.
Last updated
.
Post not yet marked as solved
13 Replies
8.5k Views
Hello, In Xcode 15 beta 3, if a project embedded a Swift package (no matter static or dynamic), and the package has its own dependencies, the linker will always emit following warning: ld: warning: duplicate -rpath '/Users/.../Library/Developer/Xcode/DerivedData/MyApp.../Build/Products/Debug-iphonesimulator/PackageFrameworks' ignored The warning is not appeared on beta 2 and beta 1. Reproduce Steps [1] Create a new iOS project in Xcode 15 beta 3 [2] Create a new Swift package MyLibrary, and add any dependency in the Package.swift. Example: // swift-tools-version: 5.9 import PackageDescription let package = Package( name: "MyLibrary", platforms: [.iOS(.v16)], products: [ .library(name: "MyLibrary", targets: ["MyLibrary"]), ], dependencies: [ // 👀 Add any dependency to this package. // Here I use "Version" which is a simple pure swift package: .package(url: "https://github.com/mxcl/Version.git", .upToNextMajor(from: "2.0.0")), ], targets: [ .target(name: "MyLibrary", dependencies: ["Version",]), ] ) [3] In the project page, embed MyLibrary into the iOS app target. [4] Build the project. It will succeed but with link warnings. In addition, if you create a dynamic framework and embed MyLibrary, the warnings also reproduce. And this is only a simple case. In my real project, the linker will also emit a lot of warnings like this: ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$__TtP10SPConfetti18SPConfettiDelegate_ ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$__TtP10SPConfetti18SPConfettiDelegate_ ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionTaskDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionDataDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSURLSessionDownloadDelegate ld: warning: could not associate debug note to atom l_OBJC_LABEL_PROTOCOL_$_NSObject ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionTaskDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionDataDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSURLSessionDownloadDelegate ld: warning: could not associate debug note to atom l_OBJC_PROTOCOL_REFERENCE_$_NSObject
Posted
by Gong.
Last updated
.
Post marked as solved
4 Replies
1.2k Views
Hello, I noticed that the layout of compact Dynamic Island on iOS 17 is incorrect. The edge of the circle shape is unable to be aligned with the edge of Dynamic Island. However, the layout in Xcode Preview is just perfect. And this is also the same layout on previous iOS 16: If you try to workaround the issue by adding an offset to the view, it will be cropped by a misaligned circle.
Posted
by Gong.
Last updated
.
Post not yet marked as solved
1 Replies
477 Views
One of my users' device (iOS 17.0) consistently fails to refresh the purchase receipt through SKReceiptRefreshRequest, resulting in the following error (ASDServerErrorDomain Code=500332). Error Domain=SKErrorDomain Code=0 "发生未知错误" UserInfo={NSLocalizedDescription=发生未知错误, NSUnderlyingError=0x28357f300 {Error Domain=ASDServerErrorDomain Code=500332 "Unhandled exception" UserInfo={NSLocalizedDescription=Unhandled exception, NSLocalizedFailureReason=An unknown error occurred}}} The user has tried checking their App Store account, restarting the device, etc., but none of these actions have helped. Does anyone know what might be causing this issue?
Posted
by Gong.
Last updated
.