-
Notifications
You must be signed in to change notification settings - Fork 491
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
Fix for Mac Catalyst #247
Conversation
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 never used Catalyst, and never thought about using Instructions in Catalyst, so thanks a lot for this PR! I asked a couple of questions, because I'm curious about what it entails.
I'm requesting changes only because of the .DS_Store
that creeped in the PR. It needs to be removed. I have them ignored in a global gitconfig, but you can add it to the project gitignore if you want.
Everything else looks good to me, thanks again!
@@ -1,6 +1,8 @@ | |||
// Copyright (c) 2018-present Frédéric Maquin <fred@ephread.com> and contributors. | |||
// Licensed under the terms of the MIT License. | |||
|
|||
#if targetEnvironment(macCatalyst) |
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.
@@ -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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I got it!
<!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 comment
The 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 comment
The 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.
Thank you for your review!
OK, I'll add new Please check my changes again :) |
@0x0c I'll have a look, sometimes it's just because XCUITest isn't great great and there's a race condition I've never been able to eliminate. It won't prevent the merge. That said, 👍 for using a generated .gitignore, but in the process you removed some of the ignores I had put there previously (the most important one are
Hang in there, it's nearly merged. Thanks for your work! |
@ephread Thanks for your quick reply!
Thank you! FYI: These lines are already added by gitignore.io :)
See https://github.com/0x0c/Instructions/blob/main/.gitignore#L72 to https://github.com/0x0c/Instructions/blob/main/.gitignore#L78. |
Cheers!
Sure, happy to answer them. 🙂
It might just be. The original reason for the double stars is that
Yes, I think you're right. It's probably redundant. I simply didn't want to have stuff removed from the
So these are tailored to Instructions.
Sweet, I missed them, that's a good catch! Bottom line, the less change, the better! |
Oh, I found an answer of the first question. The files that are generated by Carthage are not placed at the top level of this repository and it isn't enough to ignore the files. So, I suggest adding new |
@ephread Oh no, we got a race condition lol. I posted my comment after you replied before I reload this page. Sorry. How about my suggestion?
|
@0x0c Haha, no worries 😂 We're like XCUITest now!
I think splitting the .gitignore will make things harder to maintain for me in the long run so I would prefer to keep everything in a top level file. I think |
Fix for some request to change. See ephread#247 (comment)
@ephread I agree your opinion. I updated I thank for your polite reviews! |
@0x0c almost there! The SwiftPM and Carthage files previous ignored are still committed in the PR, just need to remove them and we're good to go!
All good, thanks for working on this! |
Fix for some request to change. See ephread#247 (comment)
Looks good to me. I'm going to merge, have a look at the tests later this week and hopefully release a new version this weekend! 🎉 Thanks again for your great work! |
Thanks a lot! |
Hi ephread. Thanks for looking into merging this. What's the current status? I'm hitting this problem myself today. edit: Ah, sorry, I see you have already merged this into main. So I guess my question is actually - This change isnt coming up in my Swift Package Manager version. Do you need to make a release for this. Am I missing something - only just moved to SWP and still working it out. Thanks |
@DisobedientMedia you probably need to point to the |
Hi, I fixed the issue that this repo could not build using Mac Catalyst.
To address this issue, I added
#if targetEnvironment(macCatalyst)
to ignore using[NSLayoutManager hyphenationFactor]
that is deprecated in iOS13+.