Support for mac catalyst
This PR adds support for mac catalyst (UIKit for Mac) (#408). The main changes are:
- Enabled the Mac checkbox on iOS framework targets (AppAuth_iOS and AppAuthCore) to make them compatible with mac catalyst.
- Added a new external user agent implementation for Catalyst (
OIDExternalUserAgentCatalyst) which basically does the same thing as
OIDExternalUserAgentIOS for iOS13. I could've added the support for Catalyst in that existing class, but it would have added too much complexity to the code.
- In the 'Compile Sources' build phase, I restricted
OIDExternalUserAgentCatalyst to macOS and
OIDExternalUserAgentIOSCustomBrowser to iOS only as these two classes don't compile on macOS Catalyst.
At that point the frameworks are able to build.
Then I needed to find a way to tell Cocoapods which user agents classes are for iOS and macOS. But the thing is that there is no new platform like 'iosmac' or 'maccatalyst' to specify in the podspec. So I did like Apple mentions and enclosed the code using
I also tested using Carthage but it doesn't work. It seems that
carthage bootstrap doesn't compile the frameworks correctly for Catalyst. Support for Catalyst is in their roadmap.