-
Notifications
You must be signed in to change notification settings - Fork 484
Fix for Mac Catalyst #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Mac Catalyst #247
Changes from 2 commits
3cbe9bc
bba190c
a36feb4
19dbd49
e18915b
99cb0d8
1ed9e5b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// Copyright (c) 2018-present Frédéric Maquin <[email protected]> and contributors. | ||
// Licensed under the terms of the MIT License. | ||
|
||
#if targetEnvironment(macCatalyst) | ||
#else | ||
import Foundation | ||
|
||
@testable import Instructions | ||
|
@@ -40,3 +42,4 @@ class BaseSnapshotTests: FBSnapshotTestCase { | |
}.first | ||
} | ||
} | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// Copyright (c) 2018-present Frédéric Maquin <[email protected]> and contributors. | ||
// Licensed under the terms of the MIT License. | ||
|
||
#if targetEnvironment(macCatalyst) | ||
#else | ||
@testable import Instructions | ||
@testable import InstructionsExample | ||
import FBSnapshotTestCase | ||
|
@@ -142,3 +144,4 @@ class DefaultExampleSnapshotTests: BaseSnapshotTests, | |
} | ||
} | ||
} | ||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,10 @@ internal class CustomCoachMarkBodyView: UIView, CoachMarkBodyView { | |
self.hintLabel.font = UIFont.systemFont(ofSize: 15.0) | ||
self.hintLabel.isScrollEnabled = false | ||
self.hintLabel.textAlignment = .justified | ||
#if targetEnvironment(macCatalyst) | ||
#else | ||
self.hintLabel.layoutManager.hyphenationFactor = 1.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 I'll do a sweep after this PR to remove them, I didn't realised it was deprecated in iOS 14 and unavailable in Catalyst. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got it! |
||
#endif | ||
self.hintLabel.isEditable = false | ||
|
||
self.nextButton.translatesAutoresizingMaskIntoConstraints = false | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?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>com.apple.security.app-sandbox</key> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these entitlements required by Catalyst? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To run an app on macOS Catalina, we have to notarize the app. This file is added by Xcode when I ran an example app on my mac. So I think, as you mentioned, the entitlements required by Catalyst. |
||
<true/> | ||
<key>com.apple.security.network.client</key> | ||
<true/> | ||
</dict> | ||
</plist> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question about the snapshot tests and catalyst. Are they conditionally excluded because
iOSSnapshotTestCase
doesn't support catalyst? Did you run into issues?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not use

iOSSnapshotTestCase
on macOS as following error.I tried
carthage update --platform macOS
but I got an errorDependency "ios-snapshot-test-case" has no shared framework schemes for any of the platforms: Mac
.I think
iOSSnapshotTestCase
does not support macOS.