Static version of parse library - ios

Not sure why it is down voted? If the person can provide me a reason, I will try to correct?
Does parse (parse.com) provide a static version of parse IOS library?
We want to statically link parse to our proprietary (static) library and by that way our library users will not be troubled with the requirement of adding the parse SDK libraries etc.
Kindly provide information as whether it is possible to completely hide parse inside our library?
Thanks

Parse.com does not provide static libraries.
You can compile a custom static library that includes the parse.com SDK, but I would not recommend it. Parse probably does not want you rolling their code into an obfuscated version and would prefer to keep the linking process in place. Parse updates their API and SDK regularly, and your static library would have to be updated to match each time.

Related

Data Serialisation in Objective-C (Avro alternative)

I've been the last week trying to serialise all of the classes of one iOS project (Objective-C).
Due to I use to do it in Android projects with Avro (Apache) library, I've been trying to do the same in the iOS project, however, the first thing that I noticed is that there is not too much information about Avro in iOS.
First thing I tried:
Implement the library ObjectiveAvro using CocoaPods but some classes in the library Avro C were not found when imported.
Second thing I tried:
Remove and do again the previous process but this time only with the Avro C library but the same error appeared.
Third thing I tried:
Implement BlueSteel framework using Carthage. This is a swift library but I wanted to try if I could use it somehow in an Objective-C project. I couldn't.
I just need to serialise and deserialise data providing a schema as you can do with Avro (Android) in an Objective-C project and the last thing that I want to do is convert the whole project to Swift.
So do you know what's the current way to do that in Objective-C?
I could figure it out how to do the Third thing I tried:
Basically, it's necessary to import the library through Carthage, then create a new Swift class which is the one that is going to "talk" with the Swift library, due to we are in an Objective-C project. XCode will ask you to add a "header-class" and press "yes".
Then it's as simple as using the Swift to call the library methods and call the Swift class from the current classes. Swift class in Objective-C project
Finally just to inform that the BlueSteel framework is a nightmare due to is really limited and really poor documented therefore I still don't know a real alternative.
However, if you're going to use it, have in mind that the classes are not autogenerated so you need to do manually the conversion to Avro and sign results.

Google Flatbuffer iOS

Currently, I got a task to explore google flatbuffers on iOS and OSX. I explored the documentation provided by Google.
Also found some libraries on Github on swift language like FlatBuffersSwift and others that implement the flatbuffers.
So, I have mainly two concerns on that
Will Apple approve my app if I used this in my iOS application?
Is it possible to create schema on runtime from JSON ? or we must manually create schemas (.fbs) and use flatc library for creating model binaries (like .swift) files.
Any help please
Thanks in advance
1) There's nothing in the Apple approval process that has to do with your choice of serialization library.
2) To get the benefits of this library, you want to create a schema and generate code for it ahead of compilation time. If your use case is so dynamic that you want to be able to do everything at runtime, you're probably better off with a good JSON library.

How do I build a Cocoapod framework for swift, while keeping implementation details hidden?

I am trying to build an iOS swift framework to display encrypted photos. Photos are sent by my server (something like a hashed binary file) after calling a specific API with specific details. I will then decrypt the photo, and display it to the user.
Correct and point me in the right direction if I am wrong, but swift only allows frameworks - meaning no static library. And this will expose my implementation details (such as the method to decrypt my photo).
What I would like to achieve is to create a cocoapod distributable framework for paid developers to implement (once they subscribe to me). It is supposed to expose simple public APIs, and hide implementation details.
I have tried various ways to achieve that but to no avail. I would really like to keep the implementation to swift codes only, with minimal Obj-C codes.
Build a swift framework, and build an objective-c static library as a wrapper
But I cannot seem to get it to work. Any idea if this is possible?
Build a swift framework in a swift framework
Stupid idea, i'm able to see the framework's implementation details within the other framework...
Build a swift framework, and build an objective-c framework as a wrapper
I cannot seem to get this to work either...
I have been working on this project for about 2 weeks now, and have been all over Googling for it. Just in case anybody would like to try, you may try to do the following and check if it works.
Cocoapods Friendly Framework
Implementation Details Hidden
Uses Alamofire (or any public framework that connects to internet)
Any help would be appreciated, thanks!

iOS Facebook SDK: show progress of received data with FBURLConnection

I'm using the Facebook-SDK to make some FQL queries. Now I want to know how much of the requested data has already been transferred to the app to visualize the loading process in a progressbar.
So I used this https://github.com/nyankichi820/FBRequestConnection-FBRequestConnection_progress plugin which extends the FBURLConnection class to provide the progress of a data transfer.
The problem is, that I included the Facebook-SDK as an XCode framework into the project and the header file FBURLConnection.h which is necessary for the plugin is not published in the framework and cannot be found.
So how can I include the header file FBURLConnection.h into the frameworks visible headers so that I can access it? I dont't want to include all the FB-SDK files, I wanted to do this by relying on the XCode framework structure. Thanks in advance.
You should probably include the source of the framework yourself manually or much more simply using cocoapods.
Here is the github link to the SDK source: https://github.com/facebook/facebook-ios-sdk
The official cocoapod is named "Facebook-iOS-SDK", if you decide to go that route. I recommend doing this as it is much simpler to install the SDK and update it later on. Cocoapods are very nice for external components in general and will almost certainly save you time and frustration in the long run.

Use two versions of the same library

I'm working in a iOS project that includes a static library created by another company.
The library include an old version of AFNeworking and I don't have any source files.
Now i need to use a more recent (and less bugged) version of afneworking, but i cannot include the same class twice in the project (of course) because all the "duplicate symbols".
I understand that it's impossible replacing the version included in the library, but how can i include another version along the old one?
There is a (easy) way to refactor the entire framework before include in my project?
thanks
You'll have to repackage the static library to remove the embedded AFNetworking files.
Unpack the library with:
$ ar x libwhatever.a
And re-package it, including all files except the AFNetworking object files:
$ ar cr libwhatever.a file1.o ... fileN.o
You will then have to link your executable with the new AFNetworking static library and hope that there haven't been API changes which will break the code in libwhatever.a. If there are then I doubt there is much you can do.
I'm afraid this isn't easy to do. Very few environments allow you to link against two separate versions of the same framework at the same time, and Xcode / iOS is not one of them.
As I see it, you have three options:
1) Link against their library and use the same version of AFNetworking they use.
2) Link against their library, and manually load the newer version of AFNetworking and pull symbols from it. Be warned: this will get ugly fast and future maintainers will wonder what you were smoking.
3) Get them to update their library.
On a side note, I don't know the circumstances here, but in general they should be providing you with sources. It's a very backwards practice to provide only a static (static!) library and no way to know what it's doing inside. You'll have to sign a software license agreement and whatnot to protect their interests.
The best and most proper way of handling this would be to contact the the creator of the static library and get them to resolve the situation. They could resolve it either by updating the embedded version of AFNetworking, removing their dependence on AFNetworking, or adding a prefix for their embedded copy of AFNetworking. The last one is probably a good idea anyway when a third party library embeds a different library, because otherwise it would be impossible to use two libraries simultaneously that both include the same third party library.
You could also refactor the copy of AFNetworking that you include yourself to change the names of classes to have a prefix, although this should be unnecessary, as the static library vendor should have done this themselves already.
Lastly, you could find a different library that accomplishes the same thing as your current one but that doesn't embed AFNetworking.

Resources