AFNetworking for WinObjC - ios

Since Microsoft's WinObjC is still under development, they have not supported third party library like AFNetworking. Is there any other way around to use already existing AFNetworking in iPhone. And, is Pods supported in the latest WinObjC library?

I work on the iOS bridge project at Microsoft. AFNetworking isn't currently supported so you won't be able to reuse those parts of your codebase at the moment, but it's a big priority for us and we're looking to add support in the next few months. You can see our current roadmap here:
https://github.com/Microsoft/WinObjC/wiki/Roadmap
We also don't currently support CocoaPods since our clang compiler front end doesn't support virtual filesystems, which CocoaPods depends on. Again, this is a feature request we get a lot so it's a top priority for us.
Thanks for checking out the project – if you have any other questions, comments or suggestions, feel free to file issues on Github!
https://github.com/Microsoft/WinObjC/

Related

Akavache Sqlite linking errors

I am having an issue with SqlCipher and Akavache on iOS. When I add the Akavache library to my project with an existing implementation of SqlCipher I get a number of duplicate sqlite errors during linking.
What is the current behavior?
When I build iOS with Link SDK assemblies I receive the following
Sqlite Linking Errors
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Install/Implement SqlCipher
Install Akavache
Build Xamarin.iOS project
What is the expected behavior?
That Akavache Sqlite and SqlCipher Sqlite just work together.
Which versions of Akavache, and which platform / OS are affected by this issue? Did this work in previous versions of Akavache?
Akavache 5.0.0
iOS 10.3
I wouldn't know. SqlCipher was implemented months ago, and we are just now adding Akavache to the project.
Other information (e.g. stacktraces, related issues, suggestions how to fix)
Linking is set to SDK Asemblies only
This is a Xamarin Forms project and the Android Linking does not produce the same result.
I am actually able to execute the code on Android and have proven that the technologies play nice (from what I can tell)
I contacted SqlCipher and the recommended approach is to fork Akavache and swamp the following line of code with another
implementation.
https://github.com/akavache/Akavache/blob/develop/src/Akavache.Sqlite3/SQLite.cs#L224
Before I go down the road of maintaining a fork, I was wondering if there is better way?
What you're effectively doing here is adding Akavache, which contains a custom SQLite build, to an app which already contains a custom SQLite build. And because of the way iOS linking is done, that's a problem.
I doubt you actually need a "fork" of Akavache. What you really need, IMO, is an implementation of Batteries_V2.Init() which talks to the SQLCipher instance you already have in your app.
This is doable, as SQLitePCL.raw already contains multiple implementations of this "bundle" concept, and uses bait and switch to change from one to another.
Your question is equivalent to one I get from time to time: "How do I use a custom SQLite build with SQLitePCL.raw?" The only difference in your situation is that you already have such a custom build as part of your app. Anyway, it's similar, and unfortunately, SQLitePCL.raw doesn't make this as easy as it should.
Anyway, explaining how to bridge the gap between Akavache and your existing SQLCipher build is probably beyond the scope of this SO answer, but I might be able to help you head in the right direction. You can post an issue on https://github.com/ericsink/SQLitePCL.raw and I will see it.
I have minimal interest in adding Cipher support to Akavache. If you can find a non-terrible way to do it then release it on GitHub for others. Akavache already has an encryption API via http://kent-boogaart.com/blog/password-protected-encryption-provider-for-akavache
It's a little concerning that the authors of Sqlite Cipher are recommending removing that line as it means you'll also run into and experience problems with the greater Sqlite ecosystem, including azure mobile services.

Why we have to use dependency manager?

I am developing an app for IOS,and I have to use some framework.
as you know Cocoa pods and Carthage are dependancy manager for iOS and mac OS
my question is "why we have to use dependancy manager?, instead of using dependancy manager just clone that project[was written by other programmer and can be used as framework] and drag and drop to your project ??"
Thanks for your answers
Few things that you need to think about is:
Updating your dependencies when new versions came out.
Updating dependencies for multiple platforms.
Interdependent frameworks and different framework versions for dependant frameworks.
Basically, time that you will spend on maintaining dependancies for your project will grow as your project grows. Dependancy managers allow you to avoid all this unnecessary and boring work.
There are a lot of other reasons to use DM instead of just importing frameworks. More about you can find here. And here.
At some point you might want to use 3rd party code to get extra features or something, you can copy the source code but how you will update it in the future? keep coping it again!!
Also some of your 3rd party code might depend on other 3rd part code, and if you copied it twice, you will get duplicate symbols.
Dependency managers handle all this for you.
My advice is to use Carthage or submodules, but do not use CocoPods, anything that touches the project file is not a good practice with Apple.
Why Libraries are Your Friend
While you aren’t strictly required to use third-party libraries or
frameworks, they can definitely save you a lot of time and let you
focus on polishing your app instead of typing out countless lines of
code that you simply don’t need to write.
You can use third-party frameworks and libraries without a dependency
manager too, and you can get hands-on tutorials about them right here
on this site. For example, there’s our Alamofire tutorial, and our
SwiftyJSON tutorial.
Without a dependency manager, you simply add each library’s code to
your project manually. However, this approach has several
disadvantages:
Updating a library to a new version can be difficult, especially if several libraries must be updated together because one depends on
another.
Including a library in your project makes it tempting to make local changes to the code, making it harder to update to a newer version
later.
Determining the current versions of libraries used in your app can be hard to do, especially if you don’t proactively keep track of them.
Finding new libraries can be difficult without a central location to see all the available libraries.
CocoaPods helps you overcome all of these issues and more. It fetches library code, resolves dependencies between libraries, helps
you search for and discover new libraries, and even sets up the right
environment to build your project with minimum hassle.
Courtesy
https://www.raywenderlich.com/97014/use-cocoapods-with-swift

Which is the most reliable way to use a API. integrating/downloading an SDK to your application, or using the URL-HTTP-GET method

I want to know which is the best and most reliable method. i have looked on here for an answer but didn't come across any.
I Want to use multiple API'S in my project so please keep that in mind when answering. Any advice about the best way of doing this and most reliable method will really be appreciated. Thanks in advance!
Isit possible to download multiple SDK's into an iOS application through Xcode?
Pros of SDK:
Can be used offline
Most SDKs are small in file size
All of the functioning code is visible to you, the SDK developer can't keep many secrets
Cons of SDK:
Larger binary
More clutter in your Xcode project
Pros of API:
Smaller binary
Less 3rd party frameworks cluttering your Xcode project
Cons of API:
Can't be used offline
Tends to be a blackbox
App will need to be updated every time the API is updated
In terms of reliability, the SDK will always be functional assuming
It worked in the first place
It doesn't rely on an API in the background
You can integrate SDK using Cocoapods library.CocoaPods is a ruby gem that downloads all the third party libraries that you want for your project.
Getting a specific version of a pod is done by specifying the version number, and CocoaPods downloads that specific version for you saving you from searching through commits for it.
With CocoaPods, updating your dependancies is easily done with the pod update command.
CocoaPods also provides a central place where third party libraries can be found. This improves discoverability of open source libraries that you can use in your projects. You can use the search engine at cocoapods.org to search for pods.

Is it safe to follow Fabric's instructions for integrating TwitterKit into an iOS project?

EDIT: this question is outdated - TwitterKit is now available via CocoaPods
It seems to involve downloading an application, giving that application the path to my project, and adding one of their executables as a build phase.
It seems like that requires placing a lot of trust in Fabric...
Is there a good reason they're not providing the option to download TwitterKit in a more standard way, like a framework or a cocoapod?
Great question, the short answer is that we built the application to reduce friction when implementing any of the kits (TwitterKit, Crashlytics and MoPub).
Longer answer - there are various reasons for the Fabric application vs a "native" implementation. Currently the Fabric application provides a bunch of functionality that reduced friction for folks trying to implement any of the kits (i.e. Crashlytics, Twitter and MoPub). On the Crashlytics side we do a variety of things like take the dsym to replace the symbols in the crash logs with the appropriate methods names so crash reports are readable (also this makes it v.easy to provide a linkage between accounts, without the need for a key variable in the code). On the TwitterKit side it's fairly similar story, rather than take measures to get your keys/secrets from apps.twitter.com you can simply use the application that does some heavy lifting.
You can rest assured that the team isn't trying to do anything shady here. Feel free to reply here if you have any questions :-)
You are also free to download Twitter Kit as a CocoaPod: https://cocoapods.org/pods/TwitterKit
Just add the following to your Podfile:
pod 'TwitterKit`

In the osx/ios world, what is a library and what is a framework? [duplicate]

This question already has answers here:
What is the difference between a framework and a library? [closed]
(22 answers)
Closed 8 years ago.
I am learning development on osx and ios. So far, coding is ok. The most difficult is to handle all the files, all the configuration issues (of xcode), and so on. I thought hearing from a guru about libraries/frameworks would help me a lot!
I would like to know more about libraries and frameworks.
What is a library, what is a framework (and what's the difference between them)?
Where can I find a list of all the frameworks (of all the libraries?)? Or: what are the most important frameworks?
What can I do without any framework?
Your first question is very well explained here
Finding the right frameworks is half the fun coding with iOS. There are loads of lists out there and depending on what you are doing there are some frameworks that are very used. One great tool to look at is cocoapods. It can not only help you find frameworks but it also manages the frameworks in your project. Adding cocoapods in my opinion should be the fist thing you do in a project. All that said, my three favorite frameworks are:
AFNetworking: To handle network requests.
RestKit: To transform JSON into objects. (it's actually built on top of AFNetworking)
SVProgressHUD: A lightweight progress HUD
Finally you can do everything without ever using an external framework but why would you recode something that is already coded and battle tested.
In addition to my comment, some informations about frameworks on OS X/iOS.
A framework on OS X/iOS is a bundle used to distribute shared resources, including library code, resource files, header files… For more details see
A list of system frameworks available on OS X here

Resources