-
Notifications
You must be signed in to change notification settings - Fork 69
Fix imports #44
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 imports #44
Conversation
|
@chfuller-petsmart Can you explain a little more? A screenshot of the errors would help. If I am not wrong, you shouldn't be facing any compile issues on a brand new Xcode project. |
|
Hi. Sure. New Xcode projects no longer have precompiled prefix headers. The prefix headers traditionally included both Foundation and UIKit. So any classes that utilized them were always free to do so. But now, each class that uses those frameworks needs to explicitly import the ones it needs. The HSAppearance and HSAttachment classes use UIKit but are not importing it, so the build fails. Now as far as the HSDeskGear, HSHappyFoxGear and HSZenDeskGear classes go, they are simply using a non-namespaced import for an AFNetworking class, and this also prevents the build on a new Xcode project. Using a namespaced import, meaning prefacing with "AFNetworking", allows the compiler to locate those classes within the AFNetworking framework. See attached screenshot. This is a brand new Xcode project with AFNetworking added as a framework. Once I change the imports as they are in this pull request, all the errors are fixed. Thanks! |
|
It should be noted that this test was done without Cocoapods. When including AFNetworking via Cocoapods, the AFNetworking imports do work as is. But the imports should be fixed so that HelpStack will compile on both Cocoapods and non-Cocoapods projects. |
|
Hi, just thought I'd check in on this PR. Does the information I provided seem accurate? Or am I missing anything? Please just let me know if you need any further details. Thanks! |
|
Hey @chfuller-petsmart. Sorry for the delay. Will look into this as soon as I can. |
|
Hi @anirudh24seven. Simply checking in again. Have you had a chance to review this PR? |
|
Thanks for the PR @chfuller-petsmart! |
Develop: Merge pull request #44 from PetSmartLab/fix-imports
|
Thanks @anirudh24seven! |

This simply fixes incorrect imports that prevent the code from compiling on a brand new Xcode project. (Apple changed the default setup for new Xcode projects related to imports and also removed the precompiled header). This PR allows the code to compile on a brand new Xcode project without any config changes. Thanks!