I've seen problems with multiple windows in my own app. It seemed like using File->New was more likely to work than my own button to create a new scene, but that could just be a coincidence. Bizarelly, I found that if I run the app directly (not through Xcode), I could never make it crash!Spotlight wouldn't always find the app to launch manually. I found it myself by expanding the "Products" folder in the Xcode project hierarchy, right clicked on the target and chose Show in Finder. Double-clicking on the app in the Finder window launched it outside of Xcode and I could create and destroy windows without any problems.
Post
Replies
Boosts
Views
Activity
Sumitted as Feedback 7599197
As far as I can tell, it looks like Xcode is embedding an entitlements file with com.developer.user-fonts included into both the iOS and Catalyst builds. But the provisioning profile it automatically creates for Catalyst does not include it, creating the run-time mismatch. The iOS provisioning profile does have it.It seems to be impossible to have separate entitlements for iOS and Catalyst (unless I create a separate target, but I can't do that because this is a universal app with the same bundle id for iOS and Catalyst). Maybe there is some way I can add a custom build step to strip user-fonts out of the entitlements file after it has been copied to the DerivedSources folder during a Catalyst build. But I'm not really sure how to do that!
For what it's worth I have a Catalyst app which doesn't have any drag and drop support at all. I see a crash with similar entries in the stack trace:NSCoreDragTrackingProcDoTrackingMessageCoreDragStartDraggingJordansmithnz's suggestion to embed my root view controller in a navigation controller (with hidden bars) worked around the issue. Thank you!Interestingly, embedding my main view controller in a dummy parent view controller did NOT work. So the problem is not just about a parent view controller being absent.
I was able to work around this issue by reaching into the intermediate files that Xcode creates during a build and to remove the com.apple.developer.user-fonts entitlement when building for Mac Catalyst. I added a Run Script to the build phases for my app. I added it before "Compile Sources", which is probably earlier than it needs to be:if [ "${IS_MACCATALYST}" = "YES" ]; then
ENTITLEMENTS_FILE="${TARGET_TEMP_DIR}/${FULL_PRODUCT_NAME}.xcent"
echo "Removing com.apple.developer.user-fonts entitlement on Mac Catalyst from ${ENTITLEMENTS_FILE}"
plutil -remove "com\.apple\.developer\.user-fonts" "${ENTITLEMENTS_FILE}"
fi
Alternate icons cannot be in the asset catalog, they must be added directly to the app bundle. Here's a gist with an extract from an Info.plist I used in one of my own apps. I provided icons for both iPhone and iPad.
https://gist.github.com/hacknicity/2d56919ecd5b2f4cf9970a93abc27418
Apple recommends that apps do NOT have their own in-app settings for changing languages.
It's easier to support multiple languages if you can rely on iOS restarting your app when the user changes their language. Since iOS 13 the user can configure which language they would like to use on an app-by-app basis. I think the user has to add at least one extra language in Settings->General->Language & Region for the app-specific language settings to become visible.
See https://developer.apple.com/news/?id=u2cfuj88 for more details.
An update on this issue. Apple updated Feedback 7599197 and said:
Please verify this issue with the Xcode 12 beta 1 and update your bug report with your results by logging into https://feedbackassistant.apple.com/ or by using the Feedback Assistant app. I'm still using macOS 10.15.5 (not Big Sur) and disabled my workaround that removes the entitlement when building for Catalyst. When I archive and attempt to upload to the notarisation service I now get an error:
Cannot create a Mac Catalyst Developer ID provisioning profile for "com.hacknicity.adaptivity.a". The App Groups and Fonts capabilities are not available for Mac Catalyst Developer ID Provisioning profiles. Disable these features and try again. So, that's progress, I guess. But it still seems Catalyst apps don't support User Installed Fonts. Again, I did this on macOS 10.15.5 and not macOS 11 but I don't imagine that would make any difference.
My workaround for hacking the entitlements file when building for Catalyst should keep working.
Showing SF Symbols in app screenshots on a web page should be fine, but just using the images themselves would seem very unlikely to be allowed. There was a web set set up last year (sf symbols dot com) which listed all the images. It originally had the images but quickly had to remove them: "Please note that no icons are displayed on this site due to license restrictions."
This is the usual flow, but on the first start, instead of presenting the IntroVC a OnboardingVC is presented.
The Onboarding has a little introduction and after the introduction it should push the user into the CanvasVC directly without pushing the MenuVC. Instead of pushing the CanvasVC onto the stack from the OnboardingVC, use the navigation controller's setViewControllers:animated: method to pass an array with the MenuVC and CanvasVC. That will replace the OnboardingVC with the MenuVC and when you pop back from CanvasVC you will return to the MenuVC (and it will be the top-most view controller in the navigation stack).
It's not clear if the user can ever navigate back from the MenuVC to your IntroVC. Probably not. So you could do the same thing to remove IntroVC from the stack and release its memory. Although it sounds like you might be using some sort of custom presentation (pushViewControllerWithWaveTransition) so that might not work.
I have exactly this issue. Interface Builder has "forced" my split view controller into double width style. When run on iOS 13 it all seems to work, when run on iOS 14 I get problems because it isn't behaving like it used to.
In my app (Adaptivity) I deliberately want to be able to show the user how the Classic style split view controller behaves because it is different. For example, in a double/triple column split view the primary view controller is actually wider than what appears on screen (420 points instead of 320) with a leading margin which is 100 points larger than the trailing margin to cancel out the effect.
It would be really useful if we could select 'Classic' in Interface Builder to keep using the old initialiser.
Oh my god, finally somebody else is seeing this! It seems like all keypresses are being duplicated. Often the second one results in the alert beep, but things like CMD-T will open *two* tabs and CMD-W will close *two* tabs. CMD-N to add a new file shows the template chooser but also an alert saying "An assistant session is already running on this window".
What on earth is going on?
Like the original poster, I only see this on Xcode Version 12.0 beta 3 (12A8169g). But I am seeing it on macOS 10.15.6 (19G73).
I'm experiencing this too. Only fixed by restarting Xcode. Have to do it a handful of times an hour. For me restarting Xcode didn't seem to fix it. Maybe the trigger happened really quickly for me.
But Xcode 12 beta 4 seems to be fixed for me! I hope so.
It seems that Xcode 12 GM can't build Mac Catalyst apps which use classes/properties etc. that were added in iOS 14. I get a similar error in one of my apps when I try and build the Catalyst version:
unknown type name 'UISplitViewControllerSplitBehavior' Xcode 12 beta 6 will build fine but, of course, can't be used to submit for review.
I can build a different app for Catalyst on Xcode 12 GM, presumably because that code doesn't use iOS 14 features.
It seems that Xcode 12 GM completely breaks builds of Mac Catalyst apps which have iOS 14 features. Code that would build fine in Xcode 12 beta 6 no longer builds. It's as if the GM thinks Mac Catalyst is only capable of iOS 13 features.
You can prevent the widget from being included in the Catalyst build (which probably isn't what you want): https://stackoverflow.com/questions/59795971/extension-is-not-available-when-building-for-mac-catalyst
That will get you past that particular error. But you will probably then find code that won't compile for Catalyst. Xcode complains that iOS 14 symbols just don't exist: https://developer.apple.com/forums/thread/660274?page=1#632760022