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
Switched library to use bootstrapped library formatting #1
Conversation
Wow - never had a SO question answered with a pull request. Thanks for taking the time to look into this. Tried cloning the repo you forked and executed the following:
Opened up the .xcworkspace file and the library seems to build ok. I see the usual Pods and ios-etsy-sdk projects in the workspace. However, if I try to run the tests for ios-etsy-sdk, I just get errors saying that a .pch file is missing:
Do I need to clean up the project file's reference to ios-etsy-sdk-Prefix.pch before importing the pods? Or, should the ios-etsy-sdk-Prefix.pch be still included in the project, but just have no references to the global import? Thanks for your help again, Sean |
I didn't look at porting the tests. I removed the pch file in exchange for having it added via the podspec itself, but might have been too vigilant. You might need to look at creating a new one for the tests, or referring to the apps pch file. |
I tried removing the reference to the .pch file in the project and and it seems to have helped somewhat. However, the test project doesn't seem to have access to the ios-etsy-sdk library. Here's the error I'm seeing:
clang: error: linker command failed with exit code 1 (use -v to see invocation) The ios-etsy-sdk library file seems to be available in the workspace when I try to adding it from the workspace, but the linking command never seems to work out when running the tests. Here's what my Build Phases tab looks like for my test target: Tried finding all .a files in my DerivedData folder after running a build and this is what I see:
unknown98d6bb7ec333:Xcode osheas$ So, it looks like the ios-etsy-sdk library isn't getting built anymore when running the build? Any ideas on why this might be the case? Excuse my ignore on your previous comment, but I'm not 100% sure what you mean by adding a pch file for the tests or referring to the app's .pch file. There isn't any app associated with this project (it's supposed to be a static library project) & I'm not sure how I'd add a .pch file just for the tests to have it run. Therefore, I tried removing all references to the .pch file in the project and ended up going down the path I outlined above. |
So it looks like I had what the xcode project did, this is the first library I've seen that just runs unit tests. So I've configured pods to only work with the unit test, I've set the reference back up for the pch file (it was still referring to a filepath that didn't exist. ) so it shouldn't build the static library anymore, that is done in the pods project your unit tests are just running off the cocoapods library instead of creating a library that refers to cocoapods that is then tested you just test your code off the main library. |
Switched library to use bootstrapped library formatting
@orta Thanks for the pull request. Gonna see if I can submit this for a CocoaPod now. Cheers! |
Switched library to use bootstrapped library formatting
I've moved your app for bootstrapping your library into another folder and given it a podfile that refers to the library behind it locally, this means you can edit the files in that app and the changes will be accurately reflected in git. Also made that fix mentioned in SO re prefix headers.