How to add dependencies in two custom iOS framework? - frameworks

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

Related

Deploy application in example folder of flutter package

My company has an internal library with an app which is used inside the company. This app heavily uses the library. To test this heavily test this library using the company app I need to move this app to the example folder of the flutter package (internal library). How can I rename the app inside the example folder and configure deployment configurations for this app.
I understand this might not be suggested but we really need this to heavily test the library using integration tests and QA.
Is there any specific steps to do this in my case?

Xcode how to remove invalid architecture in framework project not in the client app

i have ios framework and i am distributing it.
I am not using dependency management tool like cocoapods.
There is a lot of document that explain how to remove invalid architectures. But all of them i saw making it in client project not in the framework side.
example: https://www.tirupatibalan.com/2019/01/05/create-fat-framework.html
The question is how can i remove invalid architecture in my framework project when client app try to archive?
I don't want add extra script in client app, therefore i must solve this in framework project side
I have a fat library. And i am creating this library with script in build phases with aggregate target.
Thanks.

are #flurry supporting Swift Package manager

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.

How to create a UWP Package that`s shipping Microsoft.NET.CoreRuntime.1.0 with it

I`m struggling with the following issue:
I try to deploy my uwp app with a Mobile Device Management System (MobileIron). it's only accepts .appxbundle, no .appxupload files. When i try to install/deploy the app on a device, i get the error
Can not install package XY because the package xy has a dependency to Microsoft.NET.CoreRuntime.1.0. This package is needed for the installation. Deploy this Framework together with your package
(my custom translation ;) )
The problem is, I dont know how to create a package, that's shipping the needed CoreRuntime within. When i create a DEBUG Package, i get a appxbundle and a folder with the missing CoreRuntime.appx, but only the powershell script is shipping the CoreRuntime Framework to the Device, not the bundle itself.
When i create a RELEASE Package, it`s running agains .NET Native, in this case i have no CoreRuntime...
Hope i explained my problem good enought and someone can help me or give me a hind.
You need to enable .NET Native, From your Project Properties:
Make sure that your configuration is for Release. And check
Compile with .NET Native tool chain
and
Optimize code
finally make sure to create your packages from Store->Create App Packages. With the following configurations:

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.