Difficulties adding ShareKit to project
Asked Answered
D

1

9

Okay, so I seem to be having a bit of difficulty in adding ShareKit to my project.

I've downloaded the latest version via Git. I'm dragging and dropping the 'ShareKit' folder from Finder because you can't do it drag and drop from the xcode project.

I've figured out how to ignore ARC by setting ShareKit files to -fno-objc-arc in my Target > Build Phases> Compile Sources. So that gets rid of my arc warnings.

However, how do I get my "Submodules" folder to come along too? In the ShareKit project it doesn't appear in the xcode folder hierarchy, but it is in the project folder and you can access it through Finder. Sharekit's demo project compiles fine.

So without Submodules, I get errors like "SSKeyChain.h not found" (https://github.com/ShareKit/ShareKit/issues/191) among others. So I drag and drop the entire Submodules folder into my project, and that solves some, but creates others. The Submodules folder is very convoluted and I'll see errors referring to lines trying to import Cocoa/Cocoa.h, which is for mac and not iOS I believe. Some of the Submodules files are looking for files like "SampleAPIKey.h" and if they're not there, hell if I know why they aren't.

Has anyone had experience with figuring out how to do this?

Discourse answered 1/2, 2012 at 6:10 Comment(1)
A simpler path would be to import source directly into the project instead of trying to set up a workspace, which isn't as easy as it should be.Cheree
M
6

Note: Wednesday, September 19, 2012

In a project that I use ShareKit, after building in Xcode 4.5, in I was getting a number of warnings and additionally a fatal error when trying to build for the iOS 6 Simulator. After having problems updating the ShareKit code via the instructions in the ShareKit github FAQ I decided to remove and then read SK to my project from scratch. The new install instructions that on github are greatly revised and following step by step worked without a hitch, so the work around that I previously provided is most likely out of date.

End of note Wednesday, September 19, 2012

I had some difficulty doing this myself but did get it working. Assuming that you are using Xcode 4.x make sure that you follow the directions in Step 2 of the install instructions re that version, but it took a number of tries as the instructions were not perfectly clear to me.

What worked for me was to 1) drag the Submodules/ShareKit.xcodeproj file from the Finder to the project I was adding SK to at the bottom of the tree navigator UNDER the other groups and NOT adding it as if it was an additional project necessitating creating a workspace, 2) then, I dragged the Classes/ShareKit folder from the tree under the newly dragged ShareKit.xcodeproject into the main project tree and when prompted choose "Create folder references for any added folders", and finally 3) delete the ShareKit.xcodeproject and click "Remove Reference Only".

Hope this helps.

Mesenchyme answered 13/2, 2012 at 0:15 Comment(1)
This was very helpful! However, I got hung up again on the next step, which says "If you are missing any frameworks, right click the 'Frameworks' group and select Add -> Existing Frameworks. Select the framework you are missing and add it to your project." When I right click, I don't get an add option.Mushroom

© 2022 - 2024 — McMap. All rights reserved.