-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Tech Debt] Change TARGET_OS_IPHONE
macros in code
#82
Comments
Are we certain that Based on this: https://stackoverflow.com/a/37891230/496295, and That said, if you're using Swift, the @mindgraffiti – do you know what we should be migrating to instead? :) |
@jkmassel The goal is to take the code that is isolated by Thoughts? |
Most of the use of Paging @astralbodies – is macOS support something we ought to polish up and get working, or would it be preferable to clean it up until we need it for something? I'm happy to add that to my list, if needed :) |
@jkmassel I believe we are using the Tracks library in Simplenote Mac. Right @jleandroperez? |
Wow. I didn't know this was used in the map app too. Good call @jkmassel 👍 |
Yup @jkmassel this is being used by Simplenote Mac (thanks for spotting that @astralbodies !!!). |
@mindgraffiti – this should be mostly resolved in e6e6a19. The code is a bit simpler now – each method exists no matter what, and we modify the internal implementation depending on the target. A bit more repeating ourselves, but I find it's far easier to work with. One thing that may cause issues is the fact that unless you have a watch paired to the simulator, this block might add a note to the log about not having a paired device: Automattic-Tracks-iOS/Automattic-Tracks-iOS/TracksDeviceInformation.m Lines 115 to 121 in e6e6a19
Given the fact that we don't do much watch development, I'm inclined to just return WDYT? |
@jkmassel frankly, I don't know. @stevebaranski you have experience with watchOS dev right? What's your take on ☝️? It's not really a decision I should be making because I wouldn't be the one to build a watch app (if one was created in the future). |
@mindgraffiti & @jkmassel thanks for reaching out. Looking at the underlying method, it looks like it's just checking value in If you encounter spurious logging related to Apple Watch, I'd guess that it's occurring in the initializer. It should be easy enough to test, but I think we should be good with the reliance on There are a few other things that might be worth mentioning.
|
Xcode 10 and Swift 4.2 no longer recognize the
TARGET_OS_IPHONE
macro, which was deprecated in Swift 3 and removed in 4.2. The side effect of this is that Xcode is now executing code that was not meant for simulators.The code need reviewed and all
TARGET_OS_IPHONE
macros replaced. I don't have a specific recommendation because this project may also need updated to target iOS 9.2 instead of 9.0 for full compatibility with the new macros.Ref. #78
Ref. woocommerce/woocommerce-ios#475
The text was updated successfully, but these errors were encountered: