Post

Replies

Boosts

Views

Activity

Xcode12: Application Target's "Module-Swift.h" File Not Found
When upgrading from Xcode11.7 to Xcode12.0 (12A7209), after performing the basic necessary project updates and resolving any new warnings, my main app target's Swift interface header is not found when compiling. We've had a mixed ObjC/Swift app for the last ~4 years and have successfully mixed the two with this header since the beginning. With almost no changes to our project file or build settings, Xcode12 will not locate this file and so our ObjC code does not compile. I went through and commented out all of our ObjC code that references our Swift code and commented out all imports of the Swift header, at which point the build succeeded without warnings. Re-adding a single #import "Remind101-Swift.h" line in our ObjC code yields the error again. Different incantations of #include do not fix the issue (brackets instead of quotes, fully qualified with module name "Remind101/Remind101-Swift.h"). The file is being generated correctly; I've inspected it in the $(DERIVED_FILES_DIR) directory and its contents look correct. Swift interface headers from other targets in my application are properly resolved and accessible from my ObjC code, both within those targets and from other targets, e.g. #import <RemindData/RemindData-Swift.h>. The same Copy Remind101-Swift.h build command appears to be getting executed on both Xcode11 and Xcode12, with the same file paths, but Xcode12 does not successfully find the file after this. Ditto /Users/aleffelman/Library/Developer/Xcode/DerivedData/Remind101-apkkgwscepuagogklsdprmjnyjpa/Build/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/Remind101.build/DerivedSources/Remind101-Swift.h /Users/aleffelman/Library/Developer/Xcode/DerivedData/Remind101-apkkgwscepuagogklsdprmjnyjpa/Build/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/Remind101.build/Objects-normal/x86_64/Remind101-Swift.h (in target 'Remind101' from project 'Remind101') &#9;&#9;cd /Users/aleffelman/Documents/Code/r101-ios-teacher &#9;&#9;/usr/bin/ditto -rsrc /Users/aleffelman/Library/Developer/Xcode/DerivedData/Remind101-apkkgwscepuagogklsdprmjnyjpa/Build/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/Remind101.build/Objects-normal/x86_64/Remind101-Swift.h /Users/aleffelman/Library/Developer/Xcode/DerivedData/Remind101-apkkgwscepuagogklsdprmjnyjpa/Build/Intermediates.noindex/Remind101.build/Developer-iphonesimulator/Remind101.build/DerivedSources/Remind101-Swift.h I've added the path $(CONFIGURATION_TEMP_DIR)/$(PROJECT_NAME).build/DerivedSources/ to both the "User Header Search Paths" and "Header Search Paths" in an effort to tell Xcode where to locate the file, but even though that path resolves correctly to where the header file is, I still get the error. Ultimately, everything was working with our mixed language project in Xcode11 and it is not working with Xcode12, and I've exhausted everything I could think of to debug the situation.
2
1
6.6k
Sep ’20
UIKitCore Crash When Entering Foreground
Hey friends, I have a crash that's been plaguing me for some time now that I've made no progress on, so I'm throwing a hail-mary here.General information:- This stack trace is taken from Fabric/Firebase.- It is only happening on iOS13, across all versions of iOS 13 that appear active for our users, from 13.1.3 up to and including 13.3.0- It's happening to all live versions of our application that support iOS 13 (it is affecting versions that were released before iOS 13 came out, so it's not something we introduced recently)- It has impacted around 10k of our users in the last month and is by far the most prevalent crash we're experiencing.- The app is a messaging app- Though the stack trace includes a lot of scene delegate frames, our app has not implemented a UISceneDelegate, everything still goes through our UIAppDelegate implementation only.Debugging Information:- I've been unable to reproduce the crash, either with the live AppStore build or running locally through Xcode on device or simulator- I've set symbolic breakpoint on -[UIView(Internal) _addSubview:positioned:relativeTo:], which is called a ton, but haven't seen a stack trace with similar elements to the stack trace of this crash when resuming the app from background.- Since the symbolic breakpoint is set on an internal function, I'm unaware of any logging I could include to gain additional information- The last (or nearly last) entry in our crash logging is a record of applicationDidEnterBackground: being called, so I initially assumed the app was simply crashing in the background, but then noticed that each of the stack traces include -[UIApplication _sendWillEnterForegroundCallbacks], so I'm led to believe that this is happening when the user resumes the app from a backgrounded state.I generally understand what the crash code means and that objc_msgSend means a message is being sent to a deallocated object, but without being able to reproduce I don't know of any course of action I can take to move towards resolving this. Any clues or pointers or information or ideas you might have would be greatly appreciated. Cheers.Stack Trace:Crashed: com.apple.main-threadEXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000010Crashed: com.apple.main-thread0 libobjc.A.dylib 0x18325cfb0 objc_msgSend + 161 UIKitCore 0x187ae2ba0 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 5402 UIKitCore 0x18741c61c -[UIInputWindowController changeToInputViewSet:] + 16563 UIKitCore 0x18741d0d4 __43-[UIInputWindowController setInputViewSet:]_block_invoke + 644 UIKitCore 0x187adbfc0 +[UIView(Animation) performWithoutAnimation:] + 1045 UIKitCore 0x18741cdd8 -[UIInputWindowController setInputViewSet:] + 7326 UIKitCore 0x187417358 -[UIInputWindowController performOperations:withAnimationStyle:] + 607 UIKitCore 0x1871325c4 -[UIInputResponderController setKeyWindowSceneInputViews:animationStyle:] + 21848 UIKitCore 0x187131d14 -[UIInputResponderController setInputViews:animationStyle:] + 2169 UIKitCore 0x1871343b4 -[UIInputResponderController forceOrderOutAutomaticExceptAccessoryView] + 48410 UIKitCore 0x1879ff32c -[UIKeyboardAutomatic willResume:] + 73211 Foundation 0x18391306c __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke_2 + 2812 CoreFoundation 0x1834a099c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 2813 CoreFoundation 0x1834a09ec ___CFXRegistrationPost1_block_invoke + 6814 CoreFoundation 0x18349fce4 _CFXRegistrationPost1 + 39615 CoreFoundation 0x18349f97c ___CFXNotificationPost_block_invoke + 10816 CoreFoundation 0x183418910 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 142417 CoreFoundation 0x18349f2ac _CFXNotificationPost + 126818 Foundation 0x183801bfc -[NSNotificationCenter postNotificationName:object:userInfo:] + 6419 UIKitCore 0x18764d06c -[UIApplication _sendWillEnterForegroundCallbacks] + 28420 UIKitCore 0x186dce420 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 178021 UIKitCore 0x18727e9f8 _UIScenePerformActionsWithLifecycleActionMask + 11222 UIKitCore 0x186dcdc90 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 21223 UIKitCore 0x186dcd6c0 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 30424 UIKitCore 0x186dcdaac -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 75225 UIKitCore 0x186dcd330 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 34026 UIKitCore 0x186dd1ab0 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 19627 UIKitCore 0x18729887c ___UISceneSettingsDiffActionPerformChangesWithTransitionContext_block_invoke + 2828 UIKitCore 0x1871aac9c +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 86829 UIKitCore 0x187298834 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 26030 UIKitCore 0x186dd17c8 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 15231 UIKitCore 0x18729871c _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 10832 UIKitCore 0x186dd1624 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 39233 UIKitCore 0x186c399a0 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 64034 UIKitCore 0x186c38464 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 25635 UIKitCore 0x186c396d0 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 23636 UIKitCore 0x187632c10 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 56437 UIKitCore 0x1871ccb9c -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 37638 FrontBoardServices 0x18872ae10 -[FBSSceneImpl _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 45239 FrontBoardServices 0x188751aa0 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke.168 + 11640 FrontBoardServices 0x188735ef4 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 24041 FrontBoardServices 0x188751734 __86-[FBSWorkspaceScenesClient sceneID:createWithParameters:transitionContext:completion:]_block_invoke + 34442 libdispatch.dylib 0x1831edfd8 _dispatch_client_callout + 2043 libdispatch.dylib 0x1831f0d1c _dispatch_block_invoke_direct + 26444 FrontBoardServices 0x188778254 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 4845 FrontBoardServices 0x188777f00 -[FBSSerialQueue _queue_performNextIfPossible] + 43246 FrontBoardServices 0x18877846c -[FBSSerialQueue _performNextFromRunLoopSource] + 3247 CoreFoundation 0x1834c4108 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 2848 CoreFoundation 0x1834c405c __CFRunLoopDoSource0 + 8449 CoreFoundation 0x1834c37c8 __CFRunLoopDoSources0 + 18450 CoreFoundation 0x1834be694 __CFRunLoopRun + 106851 CoreFoundation 0x1834bdf40 CFRunLoopRunSpecific + 48052 GraphicsServices 0x18d73b534 GSEventRunModal + 10853 UIKitCore 0x187636a60 UIApplicationMain + 194054 Remind101 0x10232aa8c main + 16 (main.m:16)55 libdyld.dylib 0x18333ce18 start + 4(16 other threads appear dormant)
4
0
4.5k
Jan ’20