Firebase integration through Carthage gives error - ios

I have created an SDK(framework) in Objective C, which can be integrated by other third-party apps.
My SDK uses Firebase's MLVision, MLVisionFaceModel, and other features. While integrating with any third-party app, that other app must use the Firebase framework. The SDK integration works fine when a third party app uses CocoaPods for Firebase.
But the issue occurs when I try to use Carthage instead of CocoaPods for Firebase. With Carthage, I see library loading issue at run-time. I get an error message like below.
dyld: Library not loaded: #rpath/MyFramework.framework/MyFramework
Referenced from:
/Users//Library/Developer/CoreSimulator/Devices/A3651DD6-F31D-4866-963F-12A57C575BEC/data/Containers/Bundle/Application/B4D47B47-16B0-42EC-8321-5BFD7D58DD45/FaceRectCarthage.app/FaceRectCarthage
Reason: image not found
I have been trying to solve this issue for many days, but couldn't find any solution for it. Other people have also reported similar issues at Github.
https://github.com/firebase/firebase-ios-sdk/issues/1862
It is also mentioned that the Carthage distribution is still experimental.
https://github.com/firebase/firebase-ios-sdk/blob/master/Carthage.md
Now I am really not sure whether there is any solution for my problem available or not.
I am really bound to use Carthage only for one of my projects. CocoaPods is not an option for me for that particular project.
Can anyone please help me with this? Any help would be appreciated.

Firebase is distributed as static frameworks and can not be linked into dynamic frameworks.
Firebase either needs to be linked directly into the app or MyFramework must be linked statically instead of dynamically.

Related

Getting error: ld: framework not found Fabric for architecture armv7 in App

I have build a iOS framework eg: abc.framework. Now in abc.framework I have added FirebaseDatabase and FirebaseMessaging. The abc.framework compiles and builds properly. However when I add the abc.framework and abc.bundle in my iOS project eg: xyz.project then it is giving error "framework not found Fabric for architecture armv7". I have not added Fabric in abc.framework and not in my xyz.project. However when I remove the Firebase from the abc.framework then the error disappears from xyz.project and the project compiles and run without errors.
If anyone has encountered the same issue then please let me know how should I solve the issue. I have to integrate Firebase in abc.framework and that framework will be added in xyz.project
Nested frameworks are not allowed in IOS , it's only allowed in MacOSX , to create a frameWork it must be of a pure code , fabric is in Firebase , also framework must support all architecture armv7,64 and soon on this configured when you build it, I encountered the same situation posted in Apple forums and find that
If CocoaPods is an option for you, the recent CocoaPods 1.4.0 release has added the static framework podspec option, which enables the definition of static frameworks that allow depending upon other static frameworks like Fabric.

XCode Project Invalid Bundle on App Store Upload

When submitting our app to the app store the validation process for the build keeps getting rejected with the following error.
Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path.
Has anyone else had issues with this error? I feel like I've tried just about everything. I'd done the suggested otool -L on the main app as well as the watch app. The only library that it shows linked for is the Mixpanel library. The only other two libraries we are using is Fabric and Crashlytics. From my understanding those are not actual real frameworks? I've also tried to set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to YES as many posts online suggest. The project builds and runs fine so I'm completely lost as to how to resolve this issue.
This is a React Native iOS app if that has anything to do with it. I'm not the most experience when it comes to iOS stuff but I can find my way around xcode. Anyone have any suggestions? Maybe the best solution is to just create a new xcode project and set everything up again and copy/paste in the code from the previous project?

dyld: Library not loaded realm

i added a framework that i developed in ios to the new project. I tried to make the app universal (one framework work both in device and simulator) according to this tutorial
create an ios universal framework
. When i run my demo project using this universal framework i get this errors
dyld: Library not loaded: #rpath/Realm.framework/Realm
Referenced from: /private/var/mobile/Containers/Bundle/Application/DDF71B22-F535-43E5-B770-D3425419B108/DemoSDk2.app/Frameworks/#######.framework/#########
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/DDF71B22-F535-43E5-B770-D3425419B108/DemoSDk2.app/Frameworks/########.framework/Frameworks/Realm.framework/Realm: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/DDF71B22-F535-43E5-B770-D3425419B108/DemoSDk2.app/Frameworks/##########.framework/Frameworks/Realm.framework/Realm'
both in device and simulator the demo app crash
Dynamic frameworks are by definition not statically linked into binaries that link them.
This means dynamic frameworks must be shipped with the binaries that link them.
The typical way to do this for iOS apps is to have a build phase to copy the framework into your app bundle after compilation.
Due to restrictions by Apple for app store deployment it is not possible to dynamically link frameworks. This is an issue that is common amongst frameworks and not specific to Realm.
The following link is from Realm's GitHub discussion and explains in further detail and offers some work arounds (though none are particularly elegant.
https://github.com/realm/realm-cocoa/issues/3051

Necessary to link libraries with AdMob & Firebase?

I'm currently adding AdMob banner ads to an iOS app.
I was following some tutorials online that explained that it was necessary to "Link Binary With Libraries" by adding the following frameworks.
The SDK library references the following iOS development frameworks
which may not already be part of your project:
-AdSupport
-AudioToolbox
-AVFoundation
-CoreGraphics
-CoreTelephony
-EventKit
-EventKitUI
-MessageUI
-StoreKit
-SystemConfiguration
However on Google's current Get Started AdMob page there is no mention of the linking of these frameworks. Does this mean that this step can now be ignored?
Usually, yes, you can ignore that step. If you're importing the Google Mobile Ads SDK as a framework, it should handle the dependencies for you.
On a related note, if you're comfortable using Cocoapods for dependency management, there's an iOS screencast in this video that will walk you through setting up AdMob with Firebase in your app.

Improper IDFA usage, Apps contains IDFA but app is not respecting the Limit Ad Tracking settings in iOS

Please see attached all frameworks I have referenced in my project. Still I get this Limit Ad track settings failed validation error. Could someone please suggest me which framework might be responsible or what may I need to do. I am just stuck and have been struggling for last 1 days :( . Thanks for your help!
I have
Tapjoy
facebook
adsupport
libFlurry_4.4..0.a
iad
uikit
frameworks in my code. If I remove ADsupport, mygame fails with message that it needs for running on ios 6.0, although I am targeting for ios 7.0 as deployment target. Any help is greatly appreciated. thanks
Apple changed their IDFA scanning procedures recently. Not only do you have to check the appropriate checkboxes after you click on the "prepare for upload", but your code (or any other third party library that you have must use IDFA by using the class directly.
Someone suggested to do this:
"you can do that by replacing direct refs to ASIdentifierManager with NSClassFromString(#"ASIdentifierManager")"
DO NOT load this class using this approach! New scanning procedure will look specifically for this and if it is found instead of direct references - Apple seems to assume that there is some strange usage of the tracking identifier. I can't say I disagree with that decision.
It may not be easy to find exactly which library is at fault. Latest AdMob SDK for example is using the class directly and is NOT the source of a problem.
One way you can find out which library is the source of the problem is to remove AdSupport.Framework from your project and see which libraries fail to link. Those libraries are NOT the problem. See if you have other advertising libraries that do not require you to include AdSupport.Framework - those are most likely the culprit.
It sounds a bit counter intuitive, but the direct referencing is not the problem, dynamic (weak) loading of that class is.
My guess is that Tapjoy is the culprit since I did use the latest Flury and iAd without issues.
Hope this helps you - we were pulling our hair out for a few days before we figured it out.
grep for ASIdenfierManager on the folder of your project
in that way I found ASIdenfierManager in the libGoogleConversionTracking library

Resources