Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 8    Views: 118

Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
05/01/14 12:04 PM (10 years ago)

Cocoapods... anyone using it?

I've been noticing a lot of the third party libraries are moving to cocoapod distribution, and was wondering if anyone here is currently using it? I know when creating a BT plugin that requires third party SDK's, it confuses me a bit. I know I've tried to load a project that was built with cocoapods, and I didn't have the pod files, so I'm wondering if I create a plugin using cocoapods, do I have to instruct the users how to setup cocoapods on their system, or can I simply add the pod files to my plugin directory, have the user install the plugin like normal, and everything will magically appear in xcode when they download their project? Yeah, I know... wishful thinking... I'm sure it's not that easy, lol. I've actually wondered the same thing about regular libraries as well, so doesn't hurt to ask. Cocoapods looks a bit intimidating at first... whats everyones opinion?
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/01/14 07:32 PM (10 years ago)
I forget who ... A notable developer said on his blog that CocoaPods are a hack that will inevitably break when Apple changes up Xcode. -- Niraj
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
05/02/14 06:36 AM (10 years ago)
I've got it setup on my system but I don't use it. Just getting it installed requires root access to your mac and then you will also have to install Git and Ruby and probably update Xcode. I think it's too much command line stuff for the average BT user to comprehend. I'd rather see you crank out more plugins than walking people thru setting cocoapods up on their system. BT projects are not really designed/setup to use Xcode workspaces. What you download is really a single project that is it's own workspace and doesn't use any dependencies. I've just found it easier to clone a repository I need, unzip it and drag the classes I want into my project. I do think pods deals with versioning better than cloning github repositories, so I can see why they are used.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 10:07 AM (10 years ago)
Yeah, that seemed to be my thinking as well. I installed it, and even installed an Xcode plugin that will automatically go retrieve whatever cocoapod is required for a loaded project and import it into the project automatically... but it seems like a ton of extra stuff that isn't required. So question... if I create a plugin that requires a third party SDK library... how do I bundle the plugin? Do I add it to my plugin folder, and when the plugin is downloaded in the users project, will it automatically be linked? Or will they still need to go to their build settings and link the included library (even though it's in the plugins folder, I'm assuming thats ok and that it doesn't need to be in the frameworks folder to work)? Or do I not include it at all and just give the users a link to download the required library and instructions on how to import it into their project?. I've tried using third party libraries in a plugin test before, and it gave me "could not find whatever.h" in a mach-o error message, so I'm assuming it's not as simple as just including the lib or .a file in the plugin directory. I'm trying to figure out the difference between a .a, .dylib, and a .bundle too... I know they are all library files, but not sure the difference... thats a topic for a different discussion though. So far most of the frameworks I've imported are .bundle (like facebook), I I think it has the other two kinds inside of it.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/02/14 10:45 AM (10 years ago)
I prefer the Github projects to be included within the Plugin as original source code files. That way I can inspect the files to learn, debug and to stare at in awe.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
05/02/14 11:06 AM (10 years ago)
The only BT plugins on the market that use a 3rd party SDK are the Parse, GeoMoby and Scringo Chat I believe. I don’t have them but I don’t think they package the SDK with the code. 3rd party SDKs can be a sticky wicket. I built a plugin with the Aviary SDK but haven’t uploaded it to the market quite yet (hammering out some ipad issues with it) I’ve worked with Parse a ton as have many others here and folks have created guides with tips on how to integrate the Parse SDK into a BT project. Before we had a .pch file and ARC it was difficult to integrate these SDK’s into a BT project. It’s much easier now but they can still conflict and this is when you'll see those mach-0 errors. Linker flags an SDK requires can trigger those too. The key IMO is really the SDK version. If you build and test a plugin with say ver 1.22 of an SDK, I would suggest noting that in your instructions and zipping and bundling that SDK into an archive somewhere because you’ll need it when they update their SDK. It can be hard to find the previous version of some SDK's. When an SDK is updated they always change/add/remove something that can break your plugin. For the Aviary plugin I’m building I’m just stating what version of the SDK I built and tested on. I will point users to the Aviary SDK install instructions and leave it at that. Keep it simple. BT users for the most part are really not advanced coders. BT has added some awesome Partners like QuickBlox, Kinvey and ShowKit but no one is really utilizing them for a reason…. A github repository and an SDK can be different animals. An SDK can contain a framework, bundle and a library. Bundles are usually just resources like images and strings an SDK uses. By defination an SDK is a kit to help build other software, like an app with advanced features. True you'll find lots of SDK's as repositories on github - but most of the github repositories folks are turning into plugins of late are 'controls', not SDK's.
 
Angry Ninja
Aspiring developer
Profile
Posts: 1045
Reg: Aug 25, 2013
Maine
17,150
like
05/02/14 11:12 AM (10 years ago)
Cool, thanks for the explanation. I wonder if the easiest way to keep it simple is to include the .bundle framework in the plugins path, and then give them instructions on how to import the framework, using the /bt_plugins/pluginname/sdk.bundle as the source. Might make it easier for some than trying to download a correct version. I want to do a live chat plugin, but any type of this is going to require a third party library (looks like maybe firebase SDK might be the way to go)
 
Uelsimon
Lost but trying
Profile
Posts: 272
Reg: Mar 25, 2012
NYC
4,470
like
05/02/14 09:02 PM (10 years ago)
woohoo AVIARY!! FINALLY. thought I was gonna have to do it myself.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/02/14 11:20 PM (10 years ago)
Yeah -- Tim let that cat outta the bag! :-)
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.