framework not found CometChatSDK - ios

I have integrated CometChat Ready UI SDK in my iOS App. But when I try to build the code at that time I am getting following linker error ld: framework not found CometChatSDK
Following things I have added in my project
1) Framework search path is set to $(PROJECT_DIR) -> recursive
2) I have added -all_load , -ObjC , -lc++ in Other Linker Flag
3) Cometchat SDK is also showing in the Project -> Build Phases -> Link Binaries with Libraries

As you can see in beginner's guide of cometchat: https://support.cometchat.com/documentation/php/ios-chat-sdk/custom-ui/initial-setup/
Put the following in your Build Phases -> Link binary with libraries:
SystemConfigurarion.framework
MobileCoreServices.framework
CoreGraphics.framework
CFNetwork.framework
libxml2.dylib
libz.dylib
Next, Click on Targets → Your app name → and then the ‘Build Settings’ tab. Scroll down to the ‘Linking’ section, and double-click to the right of where it says ‘Other Linker Flags’. Click on the “+” button to add the following:
ObjC
all_load
Try semantic import if everything fail.

I have found following solution form the cometChat support team.
1) Change CometChatSDK.framework name to MessageSDKFramework.framework
2) Change your Import Statement #import<CometChatSDK/MessageSDK.h> to #import<MessageSDKFramework/MessageSDK.h>
Thank You

Related

Xcode - Bundle format unrecognized, invalid, or unsuitable

Ok so I have just about managed to get to this point on my own but am now having some issues code signing the app specifically with the AdMob framework. I am getting this error:
Command /usr/bin/codesign failed with exit code 1 the details it are giving are as follows: Applications/MyApp.app/Frameworks/GoogleMobileAds.framework: bundle format unrecognized, invalid, or unsuitable
I have read the other posts on the site and tried many different ways of fixing this. If I untick 'Code Sign On Copy' the archive builds successfully but then fails on validation with a match error. This is how I have my frameworks set up currently:
Any help would be much appreciated!
I saw this same issue with a different framework.
The solution for me was removing the framework from the 'Embedded Binaries' section and only adding it to the 'Linked Frameworks and Libraries' section in the target 'General' tab.
I have just seen the same issue but with a different framework that was the social framework and then I did below:
go to build phase -> embed frameworks -> press copy only when installing check box
then it worked with me with no error
I had a similar problem but with a different framework. The solution for me was to make sure that the framework was present in these three places:
General tab:
Embedded Binaries
Linked Frameworks and Libraries
Build Phases tab:
Embed Frameworks
I ran into this issue when using a different framework.
Clear the DerivedData solve this issue.
https://docs.sentiance.com/sdk/troubleshooting/ios/bundle-format-unrecognized-invalid-or-unsuitable
Go to Xcode menu bar and select File > Project Settings (or Workspace Settings).
Under Per-User Workspace Settings, find the shortcut to DerivedData folder and open it via Finder.
Remove the entire content of the folder and empty the Trash.
Restart Xcode.
In Xcode 11.*
Target -> General -> Linked Frameworks and Libraries
change related framework with option "Do Not Embed"
Else Check on the :
Target -> Build Phase -> Link Binary With Libraries
Check status with Required/Optional - try it with required first.

Google Maps works in simulator but not in device

Google Maps works in iPhone simulator, when I run my project on device, it is not working.
Here is error description:
CoreData: Failed to load optimized model at path
'/var/mobile/Containers/Bundle/Application/01B85FB4-C777-467D-9E61-92B4B3240B91/demo/GoogleMaps.bundle/GMSCacheStorage.momd/Storage.omo'
Add -ObjC to "Other Linker Flags"
(Build Settings -> Linking -> Other Linker Flags).
This solved it for me.
After I added this flag I received some errors regarding missing symbols (such as _CBAdvertisementDataManufacturerDataKey).
I added the Accelerate and CoreBluetooth frameworks in Build Phases -> Link Binary With Libraries.
try this link please see https://code.google.com/p/gmaps-api-issues/issues/detail?id=8524 for information about debugging
This has been fixed in 1.10.4.

Swift project with cocoapods new errors when watchkit added

I have a working Swift IOS project that uses an Objective C SDK. The SDK code is installed and updated with cocoapods. There is a bridging header file in the Swift project. This project has been compiled and run many times, and is fully operational. And of course, since it has been built and run, the workspace file is how it is opened...
I added a watchkit extension to it. I ran pod update to make a new lock file. I confirmed the search path in the watchkit includes the pods/recursive. I added the header file to Watchkit Extension.
Those three steps are the only suggestions I've been able to find regarding making cocoapods managed code work with Watchkit.
I get three errors. they are:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_SparkCloud", referenced from:
__TMaCSo10SparkCloud in InterfaceController.o
"_OBJC_CLASS_$_SparkDevice", referenced from:
__TMaCSo11SparkDevice in InterfaceController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone have a suggestion for further steps that may allow the project to compile?
As mentioned in the question, this Swift IOS project uses cocoapods to manage an objective C SDK that provides access to a Cloud API.
Take these steps after adding the WatchKit Extension to the Xcode project.
In the project main folder (blue, top) Info tab, note that in the section Debug,there is an entry of None beside the WatchKit Extension. Change this to Pods.debug. Click on it and choose Pods.debug.
Under the Release section, change the WatchKit Extension from None to Pods.release
Now click on the WatchKit Extension Target and choose the General tab. Here the Linked Frameworks and Libraries will be empty. Click the plus sign and choose from the list libPods.a and add it, make sure the Required option (to the right) is selected.
That should finish the job of getting your cocoapods library accessible to the InterfaceController.swift file under WatchKit Extension, which is where you write the code that "runs" the watch.
It looks like you are missing the SparkCloud.framework in your project. You can add it by:
Clicking on your project in the upper left of the left pane (the blue icon).
Navigate to "Build phases."
Under "Link Binary With Libraries", click on the plus button.
Find the SparkCloud.framework from the list and hit Add. You may also want to add any other frameworks that are required for the Spark SDK.
This will ensure that the Spark frameworks are found by the linker.
Click build, and the error should go away.

link conflict with library

I am creating an SDK that will be distributed as a lib (.a)
My SDK uses AFNetworking internally. If I try to put it in a project that also uses AFNetworking, I cannot link (I get duplicate symbols for the AFNetworking symbols)
Is there any way around this ?
Just notify linker to –force_load your static library,
Go to "Build Settings" -> "Other Linker Flags" and add "–force_load lib/your-lib/libyourlib.a" option.

Cordova/PhoneGap: Linker Error after installing calendarPlugin

Ive just installed the calenderPlugin for Cordova iOS from here https://github.com/phonegap/phonegap-plugins/tree/master/iOS/CalendarPlugin
I followed the instructions and drop the m and h files into the plugins folder, then added the key value paris in the cordova.plist file
But when I run the app I get a linker error. Does anyone know what I did wrong?
I discovered why this was occurring. I needed to also install the EventKit and EventKitUI frameworks.
Click on the xcode icon, then you should see the project icon and
the target icon. click on the target icon, then click build phases.
Click the dropdown for "Link Binary with libraries. Click the plus
sign at the bottom of the window, then search for both frameworks. Add
both of those frameworks, rebuild the project and run it.
https://groups.google.com/forum/?fromgroups=#!topic/phonegap/ylTBtmq30xg

Resources