5

I am using a share extension and I get the following runtime warning:

Note: Even adding the share extension on a new project and running throws the same runtime warning

[Foundation] *** -[NSXPCDecoder validateAllowedClass:forKey:]: NSSecureCoding allowed classes list contains [NSObject class], which bypasses security by allowing any Objective-C class to be implicitly decoded. Consider reducing the scope of allowed classes during decoding by listing only the classes you expect to decode, or a more specific base class than NSObject. This will become an error in the future. Allowed class list: {(
    "'NSObject' (0x7fff862bc6e8) [/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib]"
)}

Given below is the Extension's info.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSExtension</key>
    <dict>
        <key>NSExtensionAttributes</key>
        <dict>
            <key>NSExtensionActivationRule</key>
            <dict>
                <key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
                <integer>1</integer>
            </dict>
        </dict>
        <key>NSExtensionMainStoryboard</key>
        <string>MainInterface</string>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.share-services</string>
    </dict>
</dict>
</plist>

Questions:

  • What should I do to fix this warning?
user1046037
  • 16,755
  • 12
  • 92
  • 138
  • Having same issue. Did you find any solution to this? – alionthego Dec 03 '21 at 15:20
  • I'm adding the share extension on a new project and let extension's info.plist same as yours. But I don't see any runtime warning. My Xcode version is 13.1 and macOS 11.6 and runs app on iOS 15.1.1. Could you give more information you do? – ShaoJen Chen Dec 05 '21 at 13:17
  • Run the share scheme, then open safari and share the link using your app, that is when the runtime purple warning is shown. – user1046037 Dec 05 '21 at 17:30
  • 1
    @alionthego I got an official confirmation from Apple that it is a bug at their end while using share features, I have filed a bug report and have told them about the feedback ID. Hopefully it gets some time, for now you can ignore the purple warning – user1046037 Dec 08 '21 at 00:38
  • Thanks very much for letting me know. – alionthego Dec 08 '21 at 00:41
  • @alionthego Just ensure your app works fine, if yes then you can ignore the error – user1046037 Dec 08 '21 at 00:43

2 Answers2

8

Conclusion:

  • I got an official confirmation from Apple that it is a bug at their end while using share features
  • I have filed a bug report and have told them about the feedback ID.
  • I was told that I could ignore the error as long as I don't see any issues with my app.

Note:

As new OS, Xcode has been released, it would be better to raise a bug and check with Apple DTS to confirm this

user1046037
  • 16,755
  • 12
  • 92
  • 138
4

Just hit this issue on IOS16.1 and Xcode 14.

Can anyone confirm this if this is still a bug? Any way to suppress the warning?

Zack
  • 41
  • 3