Cocoapods is a dependency manager for iOS & OSX projects see http://cocoapods.org/ for more details.
It would be useful if I could add the SDK to my project via cocoapods.
You need to write a cocoapods spec file, and add it to the specs repo, pretty straight forward, i did it for zkSforce, it works great.
That looks pretty cool. I'll take a look.
Do you have any news about Cocoapods request?
We've reorganized our dependencies for our upcoming 2.0 release, so I hope to be able to add Cocoapods support soon.
Any update on this? We're about to go down a path to create private pod specs for the binaries, but if this is going to be done any time soon we may wait it out.
We're likely going to take on this work as part of our next release. So hopefully we'll get something started in the near future.
Are there any updates on this? We'd love to use Salesforce as a dependency managed by Cocoapods. If you guys need any help with setting cocoapods up I could quickly get a podspec up and running.
We would like to be able to use this SDK as a pod too.
@paweldudek please let us know if you build the podspec, because we would be interested on using it. Thanks!
@veducm I've managed to get whole SDK up and running on cocoapods, but with a few caveats so don't get your hopes up yet.
First, due to a bit tangled dependency tree I had to separate code into five repositories:
The second caveat is that I had to use custom repos for all this stuff, meaning you'll probably end in merging hell in a few years. The good news here is that SFDC is pretty nicely separated into modules (excluding the dependency of common tools, which got elegantly solved by shared pod), so it might not end up that bad.
Third caveat is that pod definitions for SFDC are located at internal (and thus private) pod specs definition repo at my company. You might want to set up your own private pod spec repo (I can point you to some tutorials), which is pretty simple once you get a hang of how it works.
Fourth and final caveat is that originally our SFDC Mobile SDK repository, on which I've based the main Native component, was private and I have to consult whether I can make it public.
Last but not least, I haven't even touched the hybrid version, so you'd probably have to do a bit more work if you need that version. Good news is that foundation is already laid out. ;)
@paweldudek Woooow!! Thanks for your explanation. Definitely, it's not an easy task. I will try to see if I can mimic what you did and make it work. Luckily for us, we don't need the hybrid version either.
FYI you might also run into an issue with the static library containing cocoa lumberjack symbols. I've removed with some lipo hackery, you can grab the modified version here: https://github.com/Taptera/SalesforceCommonUtils-Taptera
There's also a pod spec there, you can use for your own dependencies too. I might still do some work there so the version 1.0 can still change.
If you're using Cococa Lumberjack as a dependency you won't be able to use the aforementioned component. You can consult this #430 issue for more info.
@veducm I've managed to solve all the issues with using SF as a dependency, so it's definitely doable. You can check out the repos I set up for this, they have all the required pod specs. The changes I made to code are minimal, if any.
@paweldudek That's awesome! We'll take a look too, when we get to the work. CocoaPods is still up the priority list on our radar, but not at the top. Hopefully we'll make some traction in the next couple of months.
@khawkins it did require a bit of a different attitude when it comes to builds settings, however I haven't touched anything else, so far. Let me know if there're any details you need to get this working officially!
@paweldudek Thanks for sharing the great work! I will take a look again and see if I manage to replicate it for us.
Anyway, I really hope this gets supported officially soon!
We were able to hack something together with binaries and a private CocoaPods repo, but it's a bit of a nightmare to keep up to date. We also had problems similar to @paweldudek with the custom fork of MKNetworking. Long story short, it would be great to have an officially-supported spec in the master repo!
+1 for official support for a cocoapod. Is there a technical reason Saleforce doesn't support it? If not, very disappointing...
We are working on providing this support with our next release. Stay tuned.. #safeharbor
Excellent news! Thank you
Sent from my iPhone
On 18 Sep 2014, at 18:18, akhileshgupta firstname.lastname@example.org wrote:
We are working on providing this support with our next release. Stay
Reply to this email directly or view it on GitHub
Yes, great news. In the meantime do you have a recommended approach to integrate the SDK into an existing project?
Sorry for delayed response. I just updated the steps to add the SDK to existing projects. You can find that here: SalesforceMobileSDK-iOS-Distribution Repo
CocoaPods spec is now available on our unstable branch. Take a look and please post if you run into any issues.
With a Podfile like:
pod 'SalesforceMobileSDK-iOS/SalesforceRestAPI', :git => 'https://github.com/forcedotcom/SalesforceMobileSDK-iOS.git', :branch => 'unstable'
I get an error:
Installing SalesforceMobileSDK-iOS (3.0.0)
sed -i -e 's/#import \"Categories\//#import \"/g' external/MKNetworkKit/MKNetworkKit/MKNetworkKit.h
sed: external/MKNetworkKit/MKNetworkKit/MKNetworkKit.h: No such file or directory
Make sure to use :submodules => true, in your Podfile, as the Mobile SDK makes use of them.
:submodules => true
Why was MKNetworking forked?
There have been some Salesforce-specific additions that have been made to our fork of MKNetworkKit.
Try to build solution with CocoaPods.
Build Failed with error: 'SalesforceCommonUtils/SFLogger.h' file not found
Could you help me with this "'SalesforceCommonUtils/SFLogger.h' file not found" error?
You can join the discussion in progress on our community, if you'd like to post details.
The issue with the missing header file(s) has been resolved. Give it a shot with the latest version on master.
👍 it works now