Posts

Post not yet marked as solved
0 Replies
422 Views
Hi, I thought I'd ask as this sounds like the perfect use for Swift Macros and I'm betting other people ran into the same issue :) I'm currently trying to simplify [weak self] captures in some of my code. For example: // Usual syntax someAlert.addTextField { [weak self] textField in guard let self else { return } textField.text = somethingInSelf() } Adding a macro seems to trade one kind of wordiness for another: // Using a macro works, but is wordy because it requires non-trailing syntax someAlert.addTextField(configurationHandler: #weakSelf { textField in textField.text = somethingInSelf() }) Ideally I imagine there must be a way to do something like the code below: // Using the same macro fails when applied to a trailing closure someAlert.addTextField #weakSelf { textField in textField.text = somethingInSelf() } Does anyone have any suggestions? I feel this is probably a known/solved problem and I'm being a bit slow on the uptake :D
Posted Last updated
.
Post marked as solved
5 Replies
1.8k Views
The usual problem, has to happen at least once each summer I suppose :) Could the person responsible take a moment and update the relevant records please? It's been days now, thanks! ERROR ITMS-90744: "Unsupported Xcode or SDK Version. Your app was built with a version of Xcode or SDK that is not yet supported for upload to App Store Connect. For more information about supported versions of Xcode and SDK for Testflight or App Store submissions, view the App Store Connect What's New page (https://developer.apple.com/app-store-connect/whats-new/)."
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.6k Views
Filed as FB9486500 Once a local DispatchSemaphore is released by the system, the app crashes in the Xcode 13 beta 5 simulator, but works correctly on the device running iOS 15 beta 5. This is very simple to reproduce. E.g. adding this on a boilerplate Xcode beta 5 project's VC: override func viewDidAppear(_ animated: Bool) {     super.viewDidAppear(animated)     let semaphore = DispatchSemaphore(value: 0)     // If this was a strong instance property the crash does not occur     DispatchQueue.main.asyncAfter(deadline: .now() + 2) {         semaphore.signal()     }     DispatchQueue.global().async {         print("Waiting on semaphore...")         semaphore.wait()         print("Semaphore has been signalled, iOS sim will crash about 10 seconds after this message, device will be fine.")     } } This issue occurs only on the sim, not a device, on iOS 15 beta 5. In case it's relevant, running on an M1 Mac. The most critical API affected by this so far is NSFileCoordinator, which totally breaks in the sim when it internally tries to handle semaphores.
Posted Last updated
.
Post marked as solved
4 Replies
1.3k Views
Is anyone else having trouble accessing this link? https://download.developer.apple.com/Developer_Tools/Xcode_13_beta_5/Xcode_13_beta_5.xip
Posted Last updated
.
Post not yet marked as solved
10 Replies
5.2k Views
Since the launch of iOS 13.2, we've been seeing a steadily rising level of a specific crash, as described below in the stack-trace. This crash seems to be completely inside UIKit, although some action in our app is obviously "triggering" it.From the trace and logs, we can definitely assume some things:- The crash is specifically on iOS 13.2.0, no other versions.- It's not a regression in our app, since it's started appearing on versions which have been out for a month or so.- It seems to occur across various iPhone models (this an iPhone-only app)- It occurs when, as part of foregrounding, the OS issues a foreground notification to UIKit(Additionally, the stack trace suggests that the issue is keyboard-related, although how and why isn't clear at the moment.)Our priority at this point is not to fix iOS 13.2 but to identify what behaviour could lead UIKit to break like this. Any advice or input on this would be greatly appreciated.This is a good representative stack trace of the issue:----Exception Type: EXC_BAD_ACCESS (SIGSEGV)Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000010VM Region Info: 0x10 is not in any region. Bytes before following region: 4333502448 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START---> __TEXT 00000001024c0000-00000001024c4000 [ 16K] r-x/r-x SM=COW ...ut.app/[Redacted App Name]Termination Signal: Segmentation fault: 11Termination Reason: Namespace SIGNAL, Code 0xbTerminating Process: exc handler [1772]Triggered by Thread: 0Thread 0 name:Thread 0 Crashed:0 libobjc.A.dylib 0x0000000199ec0fb0 objc_msgSend + 161 UIKitCore 0x000000019e73ce10 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 540 (UIView.m:15405)2 UIKitCore 0x000000019e07779c -[UIInputWindowController changeToInputViewSet:] + 1656 (UIInputWindowController.m:2590)3 UIKitCore 0x000000019e078254 __43-[UIInputWindowController setInputViewSet:]_block_invoke + 64 (UIInputWindowController.m:2683)4 UIKitCore 0x000000019e736230 +[UIView(Animation) performWithoutAnimation:] + 104 (UIView.m:13662)5 UIKitCore 0x000000019e077f58 -[UIInputWindowController setInputViewSet:] + 732 (UIInputWindowController.m:2681)6 UIKitCore 0x000000019e0724d8 -[UIInputWindowController performOperations:withAnimationStyle:] + 60 (UIInputWindowController.m:1675)7 UIKitCore 0x000000019dd8e890 -[UIInputResponderController setKeyWindowSceneInputViews:animationStyle:] + 2184 (UIInputResponderController.m:1053)8 UIKitCore 0x000000019dd8dfe0 -[UIInputResponderController setInputViews:animationStyle:] + 216 (UIInputResponderController.m:0)9 UIKitCore 0x000000019dd90680 -[UIInputResponderController forceOrderOutAutomaticExceptAccessoryView] + 484 (UIInputResponderController.m:1312)10 UIKitCore 0x000000019e659e50 -[UIKeyboardAutomatic willResume:] + 732 (UIKeyboardAutomatic.m:193)11 Foundation 0x000000019a57607c __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 28 (NSNotification.m:519)12 CoreFoundation 0x000000019a103ae0 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 28 (CFNotificationCenter.c:787)13 CoreFoundation 0x000000019a103b30 ___CFXRegistrationPost1_block_invoke + 68 (CFNotificationCenter.c:175)14 CoreFoundation 0x000000019a102e28 _CFXRegistrationPost1 + 396 (CFNotificationCenter.c:198)15 CoreFoundation 0x000000019a102ac0 ___CFXNotificationPost_block_invoke + 108 (CFNotificationCenter.c:1371)16 CoreFoundation 0x000000019a07ba58 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1424 (CFXNotificationRegistrarOld.m:168)17 CoreFoundation 0x000000019a1023f0 _CFXNotificationPost + 1268 (CFNotificationCenter.c:1359)18 Foundation 0x000000019a464c1c -[NSNotificationCenter postNotificationName:object:userInfo:] + 64 (NSNotification.m:576)19 UIKitCore 0x000000019e2a7da0 -[UIApplication _sendWillEnterForegroundCallbacks] + 284 (UIApplication.m:10499)20 UIKitCore 0x000000019da2a910 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransiti... + 1828 (_UISceneLifecycleMultiplexer.m:571)21 UIKitCore 0x000000019ded9e08 _UIScenePerformActionsWithLifecycleActionMask + 112 (_UISceneLifecycleState.m:109)22 UIKitCore 0x000000019da2a150 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransiti... + 212 (_UISceneLifecycleMultiplexer.m:500)23 UIKitCore 0x000000019da29b80 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 304 (_UISceneLifecycleMultiplexer.m:449)24 UIKitCore 0x000000019da29f6c -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionSto... + 752 (_UISceneLifecycleMultiplexer.m:499)25 UIKitCore 0x000000019da297f0 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340 (_UISceneLifecycleMultiplexer.m:405)26 UIKitCore 0x000000019da2dfa0 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsFo... + 196 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:102)27 UIKitCore 0x000000019def3c8c ___UISceneSettingsDiffActionPerformChangesWithTransitionContext_block_invoke + 28 (_UISceneSettingsDiffAction.m:45)28 UIKitCore 0x000000019de06f44 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 868 (BSAnimationSettings+UIKit.m:50)29 UIKitCore 0x000000019def3c44 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 260 (_UISceneSettingsDiffAction.m:43)30 UIKitCore 0x000000019da2dcb8 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsFo... + 152 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:87)31 UIKitCore 0x000000019def3b2c _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 108 (_UISceneSettingsDiffAction.m:35)32 UIKitCore 0x000000019da2db14 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUISc... + 392 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:85)33 UIKitCore 0x000000019d895c38 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 640 (UIScene.m:1338)34 UIKitCore 0x000000019d8946fc -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256 (UIScene.m:1071)35 UIKitCore 0x000000019d895968 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 236 (UIScene.m:1315)36 UIKitCore 0x000000019e28d808 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 564 (UIApplication.m:3764)37 UIKitCore 0x000000019de28e44 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 376 (UIApplicationSceneClientAgent.m:45)38 FrontBoardServices 0x000000019f375ec0 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 452 (FBSSceneImpl.m:431)39 FrontBoardServices 0x000000019f39cb50 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_... + 116 (FBSWorkspaceScenesClient.m:318)40 FrontBoardServices 0x000000019f380fa4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:357)41 FrontBoardServices 0x000000019f39c7e4 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_... + 344 (FBSWorkspaceScenesClient.m:317)42 libdispatch.dylib 0x0000000199e51fd8 _dispatch_client_callout + 20 (object.m:495)43 libdispatch.dylib 0x0000000199e54d1c _dispatch_block_invoke_direct + 264 (queue.c:466)44 FrontBoardServices 0x000000019f3c3304 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:173)45 FrontBoardServices 0x000000019f3c2fb0 -[FBSSerialQueue _queue_performNextIfPossible] + 432 (FBSSerialQueue.m:216)46 FrontBoardServices 0x000000019f3c351c -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:247)47 CoreFoundation 0x000000019a12724c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1922)48 CoreFoundation 0x000000019a1271a0 __CFRunLoopDoSource0 + 84 (CFRunLoop.c:1956)49 CoreFoundation 0x000000019a12690c __CFRunLoopDoSources0 + 184 (CFRunLoop.c:1992)50 CoreFoundation 0x000000019a1217d8 __CFRunLoopRun + 1068 (CFRunLoop.c:2882)51 CoreFoundation 0x000000019a121084 CFRunLoopRunSpecific + 480 (CFRunLoop.c:3192)52 GraphicsServices 0x00000001a436f534 GSEventRunModal + 108 (GSEvent.c:2246)53 UIKitCore 0x000000019e291698 UIApplicationMain + 1940 (UIApplication.m:4758)54 [Redacted App Name] 0x00000001024c6828 main + 68 (AppDelegate.swift:24)55 libdyld.dylib 0x0000000199fa0e18 start + 4
Posted Last updated
.