are #flurry supporting Swift Package manager - swift

I'm not a big fan of cocoa pods, and are trying to modernise a project, getting rid of all the cocoa pods for a start, and #flurry is one of them. is there a Swift Package manager implementation of #flurry

I don't think so no. Swift package manager is comparatively new so it would take time for developers to port their cocoapods to SPM. But, there is already a request to add SPM support that has been closed, due to the unavailability of support to add binary in SPM. Check this link.

Related

SwiftPM package discovery tool

What is a good way to discover available Swift Packages that work with Swift Package Manager and that I can import in my own Swift package?
https://swiftmodules.com/ seems to be down and IBM deprecated Swift Package Catalog (https://developer.ibm.com/swift/2017/12/07/package-catalog-sandbox-deprecation/)
Is there something like https://www.npmjs.com/ for SwiftPM?
There isn't at the moment.. IBM had one up for a while but that died down.. It appears that for now, SPM won't have the same sort of relationship as "NPM" (node package manager) does with modules.
It looks like SwiftPM has been registered at https://libraries.io. https://libraries.io/swiftpm
I received a reply on swift.org forum; sharing it here to spread the knowledge in case others are looking for more info on SwiftPM tools.
The link to the original source:
https://forums.swift.org/t/swiftpm-package-discovery-tool-website/18392
The link to the github project:
https://github.com/Ether-CLI/Ether

How to add dependencies in two custom iOS framework?

I have created custom frameworks to use in my current iOS app.
profileManager.Framework
messagemanager.Framework
requestManager.Framework
Now both profileManager.Framework & messagemanager.Framework are actually using requestManager.Framework methods so what I want is that in my Xcode project of app I only want to keep only one physical copy of the requestManager.Framework code.I want that my request manager code should have only one copy per app and the reference should be linked with other framework.
We have created this frameworks on local machine & now my problem is we can't add dependencies in profileManager.Framework or either in messagemanager.Framework. I want to know that how it can be possible that my both framework will use network manager from app with a single copy of its in application.
Have that framework at your single view application level and make sure the framework path is given correct in build settings of App and as well as Framework.
This way you maintains only one copy of framework that too at Project level and feel free to use in Project or Project Framework level.
How about trying to manage the dependencies of those frameworks with CocoaPods?
In the podspec of UserManager.Framework and InboxManager.Framework , configure the dependencey like s.dependency 'NetworkManager', '~> 1.0'. In this way, you can have only one physical copy of the NetworkManager.framework code in your app.
For example, AlamofireImage and Alamofire-SwiftyJSON both have the dependency on Alamofire but only one physical copy of the Alamofire.framework installed in the app with running pod install.
Reference: AlamofireImage.podspec, Alamofire-SwiftyJSON.podspec

Getting Realm Version in Code

Two part question:
How does one get the currently installed version of Realm in code? Swift 3, macOS. I was unable to location any Realm.version property - perhaps I overlooked it.
In a related question
What is the solution to upgrade Realm to the latest version within a project? After updating CocoaPods to the latest, and refreshing, pod install doesn't appear to update Realm. I have 2.0.3 installed and 2.2.0 is available.
If you're embedding Realm Swift as a dynamic framework directly, the version number is contained in the framework's info.plist file. It should be possible to access the plist during runtime; there's a few answers on SO discussing this.
Since CocoaPods creates dynamic frameworks for Swift, the above approach of accessing the info plists should work, but if it doesn't there might be other ways to access versions of pods.
In any case, I would definitely recommend you review why you're wanting to check the version numbers of your libraries. It's better practice to check a framework's capabilities at runtime (eg, testing a class you need exists etc) than to directly use the version number.
For your second question, you need to run pod update RealmSwift to get CocoaPods to check for an updated version of Realm.

Could Not Build Objective-C Module BranchInvite

I've installed the BranchInvite framework as a pod, it's up to date. My project even recognizes, and tries to autocomplete, the module when I try to import it but the throws the error Could Not Build Objective-C Module BranchInvite
This post, the only one I could find, did not solve the problem as I tried to import each piece in my bridging header: Swift 'Could not build Obj-C module 'BranchInvite'
I've uninstalled, reinstalled the pods. No dice. I'm running Xcode 7.1 and Swift 2.1, is this a generic issue or what could be possible work arounds/solutions?
On a side note, I would love to not have to do all of the UI and wiring involved in sending in-app invites. I can and I will but it would be a huge time saver not to. That's one of the reasons Branch was so appealing. If there aren't any solutions are there any other deep-link services that also offer out-of-the-box UI?

Handle external not-cocoapods-framework in a cocoapods project

I fell in love with Cocoapods and I want to migrate all my projects with it.
Before doing it, I've a few questions on how to handle external not-cocoapods frameworks in my projects.
1) Let's say that I'm using Cocoapods and I've included only AFNetworking framework.
At some point, I need to use some CoreGraphic animation and I need to use QuartzCore: AFNetworking is not using this framework, so QuartzCore is not included in my Pods project.
What's the best way to handle this situation?
Is better to think "I put all the frameworks in my Pods project, so in my "app project" I've only the code necessary to my app"? And if yes, how? Adding in my Pods.xconfig this code
OTHER_LDFLAGS = -ObjC ... -framework QuartzCore
? Or there are other (better) ways?
Or is better to think "this is not a Pod, so I add the framework on my "app project" as I've always done before"?
2) I've a library (saved in my HD) that is not on the main repository of Cocoapods and there is no Podspec file: what's the best way to include it on my project?
I create a podspec for that library and I link it using :local attribute on my Podfile
I add that library in my "app project" as I've always done
Of course every way works fine, so I'm not asking "How to add an external framework", I'm asking what's the best way to do it :)
Framework
CocoaPods tries, to the possible extent, to separate its files from your work. This is also needed because CocoaPods needs to control some files. For example the Pods.xcconfig is assumed to be under CocoaPods control and it is recreated during each installation. In other words any change that you make to it is lost.
So if you need a framework you should add it to your app project. In principle you should do it even if the framework is included by some Pods because they might be updated removing the dependency and your project would break.
Custom library
Both alternatives work, if you plan to reuse the library creating the podspec might come handy in future. You could also create a custom repo (see the wiki) so you don't need to use the :local option.