Run the 'CouchbaseLiteSwift' pod lib on mac os? - ios

Was anyone able to run the 'CouchbaseLiteSwift' pod lib on mac os? I am getting:
building for Mac Catalyst, but linking in dylib built for iOS Simulator, file '.../Pods/CouchbaseLite-Swift/iOS/CouchbaseLiteSwift.framework/CouchbaseLiteSwift' for architecture x86_64
I also found no application that runs CouchbaseLite on macOS except: https://github.com/couchbaselabs/CouchbaseLiteViewer that uses objC libraries.

I also faced the same issue by using Cocoapod. But you can do it another way.
First download Couchbase Lite
Then, unzip the file and drag CouchbaseLiteSwift.framework from your Finder to the Xcode navigator.
Click on Project > General > Embedded Binary and add CouchbaseLiteSwift.framework to this section.
Import the framework and start using it in your project.

Related

Not able to run my app on Simulator which using Agora iOS SDK

I am building an iOS application which is using Agora iOS SDK pod 'AgoraRtcEngine_iOS' version 3.3.2
When I run application using real device it is working fine. But when I build application using simulator it gives an error:
Framework not found AgoraAIDenoiseExtension
My laptop has Apple M1 chip and OS Big Sur version 11.2
Please help!
I solved this issue by adding AgoraAIDenoiseExtension.xcframework file in Frameworks and Libraries
Steps to follow:
Select your project
Go to General Tab
Go to Frameworks and Libraries and click on + button.
Add respective framework files
Clean and Run your project
I see that you've solved it with a temporary fix Dalijeet, but another solution would be to use swift package manager here:
https://github.com/AgoraIO/AgoraRtcEngine_iOS

FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture x86_64 building for Mac Catalyst

I run my project for mac with catalyst, I got a below error. for Firebase
Please see below link for pod file.
/Users/ios/Desktop/xxxxxx/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector(FIRConnectorUtils_d79571aba36a7d46e5c6ca87a6fec1c1.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '/Users/ios/Desktop/xxxxxx/Pods/FirebaseAnalytics/Frameworks/FIRAnalyticsConnector.framework/FIRAnalyticsConnector' for architecture x86_64
Remove pod Firebase/Analytics from the Podfile.
Firebase Analytics does not currently support Catalyst. Full details about Firebase support for Catalyst at https://github.com/firebase/firebase-ios-sdk#development-for-catalyst.
Add a thumbs-up to https://github.com/firebase/firebase-ios-sdk/issues/4563 to indicate interest in Analytics support.
In the meantime, a workaround to conditionally add Analytics only for iOS, see https://stackoverflow.com/a/58768815/556617
While Cocoapods is not yet supported, I've been able to install and run Firebase Analytics & Crashlytics in a Mac Catalyst app using Swift Package Manager (documentation here)
In Xcode, install the Firebase libraries by navigating to File > Swift Packages > Add Package Dependency…
In the prompt that appears, select the Firebase GitHub repository:
https://github.com/firebase/firebase-ios-sdk.git
Select the desired Frameworks (Analytics, Crashlytics...)
Make sure to add the same frameworks in Build Phases / Link Binary with Libraries of your target.

library not found for -lAppAuth

I try build IPA file on Xcode from .xcodeproj file and I obtain next error log:
library not found for -lAppAuth
And I never installed that package.
After that, I've decided to install this package, but error continues
Steps:
Generic iOS device
Product>Archive
Enviroment
React v16.9.0
React Native v0.61.2
MacOS Movaje 10.14.3
Xcode 10.3 (not update because i can't update OS)
Try to change the setting of build active architecture to No in Build Settings tab of your project.

Issue with Mac Catalyst - linking in object file built for iOS Simulator

I am trying to build my iOS/iPadOS project on my mac using the new Mac Catalyst. When I build it on the simulator for iPhone everything is fine but when I build it on my Mac, I get this error.
in /Users/nevin/Documents/[projectName]/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics(CLSInternalReport.o), building for Mac Catalyst, but linking in object file built for iOS Simulator, file '/Users/nevin/Documents/[projectName]/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics' for architecture x86_64
This happens for multiple pods so if I remove Crashlytics for example, I get a similar error for another pod. Does anybody know if this is something that Crashlytics needs to fix or is it something that I can fix within my project?
Mac Catalyst uses x86_64 but compiled with a target for Mac Catalyst.
I have a project that compiles for Mac Catalyst, you need to add these flags:
https://github.com/ezored/conan-darwin-toolchain/blob/stable/1.1.0/conanfile.py#L183-L188
If your frameworks are not compatible, don't link it in "General > Frameworks", but select "iOS" instead of "macOS + iOS". Example:
And in your swift code add IF code to check if your framework can be imported and used with this:
#if targetEnvironment(macCatalyst)
print("UIKit running on macOS")
#else
print("Your regular code")
#endif
With this, you can make apps compatible with Mac Catalyst. And when your frameworks (like Crashlytics) be compatible check "macOS + iOS" again and remove check on code.
Another option is to make another target for Mac Catalyst and put only things for Mac Catalyst, but with my first option, you can build without problems.
And if you want to make frameworks with Mac Catalyst support with C++ code you can check my framework (https://github.com/ezored/ezored).

How do you build FFmpeg for Mac Catalyst

With XCode 11 and macOS 10.15 (Catalina), you can now build iPad apps to run on a Mac by checking Mac in the General settings of the target. I have an iPhone/iPad app that uses ffmpeg. When I try to build it for the Mac I get this linker error:
Building for Mac Catalyst, but the linked library 'libavformat.a' was built for iOS + iOS Simulator. You may need to restrict the platforms for which this library should be linked in the target editor, or replace it with an XCFramework that supports both platforms.
So my question is, how do you build a static library for Mac Catalyst or create an XCFramework for ffmpeg? I am using build-ffmpeg.sh from FFmpeg-iOS-build-script on GitHub to bulild the ffmpeg static libraries for iOS.

Resources