I have a SwiftUI app that is developed for all iOS devices and silicon Mac OS as well.
I have added ActivityKit Widget for the iOS devices and it works well. But when I submitted to the appStore I got the following error:
ITMS-90863: Macs with Apple silicon support issue – The app links with
libraries that aren’t present in macOS:/System/Library/Frameworks/ActivityKit.framework/ActivityKit
I don’t wish to uncheck Mac because this app will be for Mac OS as well as iOS. How can I exclude the widget for only iOS to fix this warning?
2
Answers
I fixed this issue in my project:
ActivityKit
andWidgetKit
if they’re not already thereOptional
After those changes I was able to run the iOS app on macOS.
One option is to add the ActivityKit as an optional library as this answer instructs. This did not work for me – the app still hangs on startup when downloading and opening it from TestFlight or App Store.
On top of that, you can try to add
#if canImport(ActivityKit)
to everywhere you reference to ActivityKit. It helps to momentarily add aMac Catalyst
destination for your iOS app and try to run that locally. If adding thecanImport
doesn’t work (as it didn’t for me), you can even start to distribute standalone macOS app with the Mac Catalyst build.For me maintaining a standalone macOS distribution is not worth it so I had to just stop supporting macOS platform. This needs to be resolved Apple!