Xcode 15 and iOS 17 now adds extra padding to widget content, which is inconsistent with iOS 16.
Run on iOS 16:
Same code run on iOS 17, with extra paddings:
struct WidgetView : View {
var entry: Provider.Entry
var body: some View {
LicenseView(entry: entry)
.background(Color("WidgetBackground"))
.modifier {
if #available(iOS 17.0, *) {
$0.containerBackground(for: .widget) {
Color.white // to highlight the padding on iOS 17
}
} else {
$0
}
}
}
}
Post
Replies
Boosts
Views
Activity
I found that in Xcode 14.2 (Swift 5.7), the compiler is unable to check the API availability of PropertyWrappers. For example, SwiftUI.StateObject was introduced in iOS 14, but when compiling for iOS 13, the compiler doesn't give an error. This leads to runtime dylib errors.
struct ContentView: View {
class Data: ObservableObject {}
@StateObject private var data = Data() // 🤔️ No compiler error when targeting iOS 13
var body: some View {
Text("Hello")
}
}
The app will crash on iOS 13.
dyld: lazy symbol binding failed: Symbol not found: _$s7SwiftUI11StateObjectV12wrappedValueACyxGxyXA_tcfC
However, when we use StateObject in a regular statement, the compiler gives an error as expected. This is the correct behavior.
init() {
_data = StateObject(wrappedValue: Data()) // 'StateObject' is only available in iOS 14.0 or newer
}
So, it seems that the availability check for PropertyWrappers is not working.
I used ProgressView to display a countdown progress bar in a Live Activity. However, I found that since iOS 16.2, ProgressView(timerInterval:countsDown:) does not update properly in the following situations.
on Dynamic Island (either Expanded or CompactLeading/Trailing)
on the Locked Screen, after the display is turned off (isLuminanceReduced == true)
In these situations, the ProgressView for the countdown is always displayed at 100% and does not automatically update with the time. The problem only occurs in iOS 16.2. And it's confusing for users. Will it be fixed please?
I found that watchOS 9.2 seems to break the complicationForeground() modifier. In previous systems, a View modified by complicationForeground() was rendered white, while an unmodified View was rendered with the watch face tint color. This is the correct behavior.
However, in watchOS 9.2, this behavior has been reversed. The View modified by complicationForeground() renders the tint color, and the opposite is white‽ This causes third-party complications to look very inconsistent on tinted watch faces.
Of course, this issue belongs to ClockKit, and I'm not sure if there are similar issues in the new WidgetKit.
Will this issue be fixed please?
I think the previous Self._printChanges() is really helpful when debugging the SwiftUI view and data model. However, it seems deprecated and does not work any more on iOS 16. Is there something similar to the Self._printChanges() in the latest version of SwiftUI?
Hello!
I found that on the latest macOS 13 Ventura, my iOS app (iOS-App-On-Mac-With-M1/M2-Chip) is not able to restore IAP purchases or refresh receipt anymore.
When using SKReceiptRefreshRequest() to refresh the IAP receipt, I got following error.
Error Domain=SKErrorDomain
Code=0 "An unknown error occurred"
UserInfo={
NSLocalizedDescription=An unknown error occurred,
NSUnderlyingError=0x1330c1840 {
Error Domain=ASDErrorDomain Code=500 "(null)" UserInfo={
NSUnderlyingError=0x13338ebf0 {
Error Domain=NSCocoaErrorDomain
Code=513 "You don’t have permission to save the file “receipt” in the folder “StoreKit”." UserInfo={
NSFilePath=/Users/***/Library/Containers/EC7E888F-3388-418A-92C5-9CBDDC4A1846/Data/StoreKit/receipt,
NSUnderlyingError=0x13333a790 {
Error Domain=NSPOSIXErrorDomain
Code=1 "Operation not permitted"
}
}
}
}
}
}
It seems that the receipt cannot be refreshed due to a file permission issue.
Also, the SKPaymentQueue.default().restoreCompletedTransactions() function does not get the purchases properly (but also does not report an error).
This issue only appears in my iOS app on macOS 13 Ventura.
Hello everyone!
Recently my watch app has been receiving a lot of crash reports, all of them from watchOS 9.0 and 9.1. The crash reports suggest SIGNAL 11 Segmentation fault: 11 crash, and the call stack is located in the WatchConnectivity framework -[WCSession onqueue_ sendMessageData:replyHandler:errorHandler:dictionaryMessage:] + 340 (WCSession.m:674). Now it has become the most common crash of my app.
As I understand it, Segmentation fault: 11 suggests some binary or compiler-level problem. Maybe the way I'm calling the API is triggering a problem within the system?
Sample Crash Log:
Incident Identifier: ***
Hardware Model: Watch6,9
Process: WatchApp [2338]
Path: ***
Identifier: io.qifeng.HiCoffee.watchkitapp
Version: 4.1.1 (7992)
AppStoreTools: 14A305
AppVariant: 1:Watch6,9:8
Code Type: 0200000C (Native)
Role: unknown
Parent Process: launchd [1]
Coalition: io.qifeng.HiCoffee.watchkitapp [450]
Date/Time: 2022-10-11 07:14:55.0777 +0200
OS Version: Watch OS 9.0 (20R361)
Release Type: User
Baseband Version: 5.00.00
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000004
Exception Codes: 0x0000000000000001, 0x0000000000000004
VM Region Info: 0x4 is not in any region. Bytes before following region: 68141052
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 40fc000-4100000 [ 16K] r-x/r-x SM=COW ....app/WatchApp
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [2338]
Triggered by Thread: 7
Thread 0 name:
Thread 0:
0 WatchApp 0x000000000418f1dc @objc ComplicationController2.getComplicationDescriptors(handler:) + 0 (<compiler-generated>:0)
1 libdispatch.dylib 0x000000002ba6b590 _dispatch_call_block_and_release + 24 (init.c:1518)
2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560)
3 libdispatch.dylib 0x000000002ba7a114 _dispatch_main_queue_drain + 800 (inline_internal.h:2631)
4 libdispatch.dylib 0x000000002ba79de4 _dispatch_main_queue_callback_4CF + 40 (queue.c:7804)
...
Thread 1 name:
Thread 1:
0 libsystem_kernel.dylib 0x000000002c81c18c __ulock_wake + 8
...
Thread 2 name:
Thread 2:
0 libsystem_kernel.dylib 0x000000002c81b0f8 kevent_qos + 8
...
Thread 6 name:
Thread 6:
0 WatchConnectivity 0x000000005350996c __31-[WCXPCManager setupConnection]_block_invoke_2 + 0 (WCXPCManager.m:92)
1 libdispatch.dylib 0x000000002ba6b590 _dispatch_call_block_and_release + 24 (init.c:1518)
2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560)
3 libdispatch.dylib 0x000000002ba73968 _dispatch_lane_serial_drain + 548 (inline_internal.h:2631)
4 libdispatch.dylib 0x000000002ba74454 _dispatch_lane_invoke + 388 (queue.c:3939)
5 libdispatch.dylib 0x000000002ba7e2a4 _dispatch_workloop_worker_thread + 628 (queue.c:6766)
6 libsystem_pthread.dylib 0x000000006580947c _pthread_wqthread + 280 (pthread.c:2618)
7 libsystem_pthread.dylib 0x000000006580951c start_wqthread + 8
Thread 7 name:
Thread 7 Crashed: ☠️☠️☠️
0 libdispatch.dylib 0x000000002ba81fd4 dispatch_source_cancel + 8 (inline_internal.h:231)
1 WatchConnectivity 0x00000000534f84b4 __81-[WCSession onqueue_sendMessageData:replyHandler:errorHandler:dictionaryMessage:]_block_invoke + 48 (WCSession.m:675)
2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560)
3 libdispatch.dylib 0x000000002ba6fe7c _dispatch_continuation_pop + 388 (inline_internal.h:2631)
4 libdispatch.dylib 0x000000002ba81a90 _dispatch_source_invoke + 1760 (source.c:596)
5 libdispatch.dylib 0x000000002ba7cfe8 _dispatch_root_queue_drain + 332 (inline_internal.h:0)
6 libdispatch.dylib 0x000000002ba7d7a4 _dispatch_worker_thread2 + 168 (queue.c:6969)
7 libsystem_pthread.dylib 0x0000000065809440 _pthread_wqthread + 220 (pthread.c:2631)
8 libsystem_pthread.dylib 0x000000006580951c start_wqthread + 8
Thread 8 name:
Thread 8:
0 libsystem_kernel.dylib 0x000000002c81e210 kevent + 8
...
Thread 9:
0 WatchApp 0x000000000458cd70 monitorCachedData + 756 (KSCrashCachedData.c:0)
...
Thread 10:
0 libsystem_pthread.dylib 0x0000000065809514 start_wqthread + 0
I am currently unable to reproduce this problem on my own. Do you have any good suggestions for me?
I can't install the beta profile for macOS 13 RC. Is anyone else having the same problem?
Hello!
I was looking at the Build Timeline in Xcode 14 and noticed that my project generates a huge number of concurrent tasks (as shown in the image).
Hundreds of compilation tasks all seem to start and end at the same time. This made the entire build timeline meaningless, and I couldn't distinguish which tasks took longer.
I don't know if this is a bug in the build system, or if it is designed that way?
What's interesting is that this problem seems to occur only on my MBP M1 Max. The same project, built on the MBA M2, with no more than ten lines of task bars, seems to be much more useful.
Hello!
Two of my watch apps (HiCoffee and HiWater) occasionally have issues with complications not displaying properly on watchOS 9. I did NOT use the new WidgetKit to implement the complications, all the related code still uses the same previous ClockKit + SwiftUI.
I have observed several different types of wrong behaviors.
One specific complication cannot be displayed (rendered?), while others do work (from the same app). This indicates that my watch app is working properly.
All complications on the face cannot be displayed. But the app logs indicates it's running properly. In addition, when you long press the face to edit complications, yet it can be displayed normally.
Log shows CLKComplicationServer.sharedInstance().activeComplications always returns 0 no matter how many complications are added to the face. Also, the ComplicationController is NOT called by system. I'm not using WatchKit.
This part of the code in my app has been working properly for a long time and has not been changed. But after the release of watchOS 9, I received a lot of feedback from users with this problem. So I think the problem is in watchOS 9.
I haven't found a way to reproduce the problem yet. Any suggestions please?
I have a new Xcode project, and the git repository for this project contains a submodule. When I try to grant access to this submodule, App Store Connect refreshes the page directly due to an error encountered. The grant is not successful.
When I open the browser's Inspector, I can see that there are some requests in Network with 503 errors. I suspect that it is these errors that are causing the page to refresh.
This git submodule is working fine in my other Xcode Cloud projects, which I used to be able to configure properly. But not anymore, this new project's Xcode Cloud is not working at all because of this issue.
Reported: FB11548470
On iOS16, I can't open the audio chart details page via the Audio Graph defined by AXChartDescriptorRepresentable. When trying to open chart details through VoiceOver, the screen flashes for a moment (the content seems to be correct) and then disappears immediately. This behavior was normal on iOS 15, but it doesn't work from iOS 16 beta to RC.
I have uploaded the sample project to https://github.com/gongzhang/audio-graph-example. It needs to be running on a physical iOS 16 device with VoiceOver enabled to operate.
Run the sample project
Open the Audio Graph detail page, by using VoiceOver, swiping down until you hear Chart details.
The chart detail page disappears immediately.
Reported FB11479931
Hello,
I found that ScrollViewProxy.scrollTo(_:anchor:) always crash on iOS 16 beta 1-7. As soon as the Section in the List changes, the ScrollViewProxy does not scroll properly to the specified cell. This issue only appeared on iOS 16.
Sample Code (for Xcode 14)
import SwiftUI
struct ContentView: View {
@State private var hideSection1 = false
var body: some View {
ScrollViewReader { scrollView in
List {
if !hideSection1 {
Section(header: Text("Section 1")) {
ForEach(1...10, id: \.self) { i in
Text("\(i)")
}
}
}
Section(header: Text("Section 2")) {
ForEach(11...20, id: \.self) { i in
Text("\(i)")
}
}
}
.safeAreaInset(edge: .bottom, spacing: 0) {
VStack {
// Crash Steps:
// 1. Tap "Go to 20", OK ✅
// 2. Hide Section 1
// 3. Tap "Go to 20" again <--- ☠️ crash
Button("Go to 20") {
withAnimation {
scrollView.scrollTo(20, anchor: .center)
}
}
Toggle("Hide Section 1", isOn: $hideSection1)
}
.padding()
.background {
Rectangle()
.fill(.ultraThinMaterial)
.ignoresSafeArea()
}
}
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Crash Message
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempted to scroll the collection view to an out-of-bounds section (1) when there are only 1 sections. Collection view: <SwiftUI.UpdateCoalescingCollectionView: 0x13c88cc00; baseClass = UICollectionView; frame = (0 0; 390 844); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x60000323fc60>; backgroundColor = <UIDynamicSystemColor: 0x600002922dc0; name = systemGroupedBackgroundColor>; layer = <CALayer: 0x600003c2f260>; contentOffset: {0, -47}; contentSize: {390, 498.66666666666669}; adjustedContentInset: {47, 0, 129.66666666666674, 0}; layout: <UICollectionViewCompositionalLayout: 0x13c510ed0>; dataSource: <_TtGC7SwiftUI31UICollectionViewListCoordinatorGOS_19SelectionManagerBoxOs5Never__: 0x13c513670>>.'
Hello!
My app has been experiencing some strange crashes in the last few months. The crash log shows it as a Watchdog timeout error of 0x8BADF00D. I knew about this error code before, especially since here is the documentation about addressing-watchdog-terminations. But actually, the call stack shows that the crash appears in dydl and it seems that my app code has not been executed yet.
Does anyone know the cause of this problem please? I have observed this crash on iOS 15.6, 15.5, 15.4, and earlier versions.
Incident Identifier: 82D9B8D8-88B3-4016-9CB5-5AE280006628
Hardware Model: iPhone10,6
Process: *** [297]
Path: /private/var/containers/Bundle/Application/FDF7C78A-E217-482E-A20C-D602C117EB68/***.app/***
Identifier: com.***.***
Version: 3.1 (7774)
AppStoreTools: 13C90b
AppVariant: 1:iPhone10,6:15
Code Type: ARM-64 (Native)
Role: unknown
Parent Process: launchd [1]
Coalition: com.***.*** [466]
Date/Time: 2022-03-18 07:20:38.2452 +0200
Launch Time: 2022-03-18 07:19:37.6871 +0200
OS Version: iPhone OS 15.4 (19E241)
Release Type: User
Baseband Version: 5.02.02
Report Version: 104
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:process-launch watchdog transgression: application<com.***.***>:297 exhausted real (wall clock) time allowance of 60.00 seconds
ProcessVisibility: Background
ProcessState: Running
WatchdogEvent: process-launch
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 283.260 (user 283.260, system 0.000), 78% CPU",
"Elapsed application CPU time (seconds): 0.021, 0% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 Crashed:
0 dyld 0x0000000104f82b60 ___ZNK5dyld46Loader13resolveSymbolER11DiagnosticsRNS_12RuntimeStateEiPKcbbU13block_pointerFvjjRKNS0_14ResolvedSymbolEEb_block_invoke.94 + 428 (Loader.cpp:1539)
1 dyld 0x0000000104f71308 dyld4::Loader::resolveSymbol(Diagnostics&, dyld4::RuntimeState&, int, char const*, bool, bool, void (unsigned int, unsigned int, dyld4::Loader::ResolvedSymbol const&) block_pointer, bool) const + 348 (Loader.cpp:1504)
2 dyld 0x0000000104f84cd8 ___ZNK5dyld416JustInTimeLoader17forEachBindTargetER11DiagnosticsRNS_12RuntimeStateEU13block_pointerFvjjRKNS_6Loader14ResolvedSymbolEEbU13block_pointerFvS8_RbESD__block_invoke.46 + 124 (JustInTimeLoader.cpp:621)
3 dyld 0x0000000104f9a9d4 ___ZNK5dyld313MachOAnalyzer25forEachBindTarget_OpcodesER11DiagnosticsbU13block_pointerFvRKNS0_14BindTargetInfoERbES8__block_invoke.408 + 64 (MachOAnalyzer.cpp:5782)
4 dyld 0x0000000104f9a794 dyld3::MachOAnalyzer::forEachBind_OpcodesWeak(Diagnostics&, dyld3::MachOLoaded::LinkEditInfo const&, dyld3::MachOFile::SegmentInfo const*, void (char const*, dyld3::MachOLoaded::LinkEditInfo const&... + 728 (MachOAnalyzer.cpp:6161)
5 dyld 0x0000000104f99b60 dyld3::MachOAnalyzer::forEachBindUnified_Opcodes(Diagnostics&, bool, void (unsigned long long, dyld3::MachOAnalyzer::BindTargetInfo const&, bool&) block_pointer, void (unsigned long long, dyld3::Ma... + 632 (MachOAnalyzer.cpp:5763)
6 dyld 0x0000000104f9975c dyld3::MachOAnalyzer::forEachBindTarget_Opcodes(Diagnostics&, bool, void (dyld3::MachOAnalyzer::BindTargetInfo const&, bool&) block_pointer, void (dyld3::MachOAnalyzer::BindTargetInfo const&, bool&... + 148 (MachOAnalyzer.cpp:5773)
7 dyld 0x0000000104f84304 dyld4::JustInTimeLoader::forEachBindTarget(Diagnostics&, dyld4::RuntimeState&, void (unsigned int, unsigned int, dyld4::Loader::ResolvedSymbol const&) block_pointer, bool, void (dyld4::Loader::Reso... + 176 (JustInTimeLoader.cpp:608)
8 dyld 0x0000000104f732d4 dyld4::JustInTimeLoader::applyFixups(Diagnostics&, dyld4::RuntimeState&, dyld4::DyldCacheDataConstLazyScopedWriter&, bool) const + 388 (JustInTimeLoader.cpp:412)
9 dyld 0x0000000104f79758 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 1592 (dyldMain.cpp:573)
10 dyld 0x0000000104f783b0 start + 412 (dyldMain.cpp:864)
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x00000001c076a000 x1: 0x00000000000002f1 x2: 0x000000016b4aa198 x3: 0x000000016b4aa190
x4: 0x0000000000000001 x5: 0x000000016b4ac638 x6: 0x0000000000000000 x7: 0x000000016b4ad160
x8: 0x0000000180000000 x9: 0x000000034076a000 x10: 0x0000000000000000 x11: 0x0000000000000001
x12: 0x0000000104bf278b x13: 0x0000000000000000 x14: 0x00000001ffd94d24 x15: 0x0000000000000001
x16: 0x0000000104fa5070 x17: 0x0000000000000a06 x18: 0x0000000000000000 x19: 0x000000016b4ac6c8
x20: 0x0000000104c50dc0 x21: 0x0000000000000001 x22: 0x000000020b59cad8 x23: 0x000000016b4ac630
x24: 0x000000016b4aa1b0 x25: 0x0000000000000002 x26: 0x0000000000000247 x27: 0x0000000104c55a90
x28: 0x0000000000000770 fp: 0x000000016b4ac6b0 lr: 0x0000000104f82b60
sp: 0x000000016b4aa1b0 pc: 0x0000000104f82b60 cpsr: 0x20000000
esr: 0x92000007 (Data Abort) byte read Translation fault
Binary Images:
0x104f60000 - 0x104fb3fff dyld arm64 <5c4972a8ef8132dca84842cc7f7874cf> /usr/lib/dyld
EOF
Hello :)
My iOS project does not work with SwiftUI Preview in Xcode 14 beta. The project builds and runs fine, but Preview never works. The error message is as follows.
HumanReadableSwiftError
SettingsError: noExecutablePath(<IDESwiftPackageStaticLibraryProductBuildable:ObjectIdentifier(0x000060002ac3e880):'AppCenterCrashes'>)
I do use the AppCenterCrashes dependency in my project. But I'm not sure if this error message is accurate, because sometimes it reports other packages.
After I executed Generate Report, I found the following error in SerializationErrors.txt.
Error Domain=NSCocoaErrorDomain Code=516 "“LogCaffeineIntent.swift” couldn’t be linked to “Intermediates” because an item with the same name already exists." UserInfo={NSSourceFilePathErrorKey=/Users/gong/Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/HiCoffee.build/Debug-iphonesimulator/IntentsExtension.build/DerivedSources/IntentDefinitionGenerated/Intents/LogCaffeineIntent.swift, NSUserStringVariant=(
Link
), NSDestinationFilePath=/var/folders/lv/58r5dhv52j779_qn41gnq4c80000gn/T/previews-diagnostics-20220608-144336/Intermediates/LogCaffeineIntent.swift, NSFilePath=/Users/gong/Library/Developer/Xcode/DerivedData/.../Build/Intermediates.noindex/HiCoffee.build/Debug-iphonesimulator/IntentsExtension.build/DerivedSources/IntentDefinitionGenerated/Intents/LogCaffeineIntent.swift, NSUnderlyingError=0x600033223810 {Error Domain=NSPOSIXErrorDomain Code=17 "File exists"}}
The problem seems to be related to the Intent generation code. I don't know how to fix it yet.