Could not build Objective-C module 'ChameleonFramework' - objective-c

I am trying to include the ChameleonFramework in my project but it shows this message:
Could not build Objective-C module 'ChameleonFramework'
I install the framework using cocoapods and solve like 49 errors in the code because I'm using Swift 5 and Xcode 12.2.
Also, I delete the cache for the project, uninstall the pods and install them from the console, but still not working.

Related

xCode 12 Beta 4, Lexical or Preprocessor issue - header file not found. Simulator only - works on device

macOS Catalina 10.15.5. xCode 11.6, xCode 12 beta 4. Objective-c app with 7 cocoapods. The app runs fine in xCode 11 and in xCode 12 on device. It fails to compile in xCode 12 simulator with Lexical or Preprocessor issue on the first cocoapod it encounters. If I eliminate that one it fails on the next. I've tried the standard steps - clean build folder, restart xCode, delete pod files and reinstall, pod repo update, clean derived data, etc. This was also an issue in beta 3.
Any ideas?
Try upgrading the Project Xcode compatibility to Xcode 11 and change the VALID_ARCHS to $(ARCHS_STANDARD).
It worked for me
you can try: add "x86_64" at "TARGETS ->Build Settings -> User-Defined -> VALID_ARCHS", and it's works too.
I started getting this error with a project when building it with Xcode 12.5 Beta3 for the first time when it was working previously with Xcode 12.4. The error was occurred during the build process when it encountered the Firebase packages that I had installed via the Swift Package Manager (not Cocoapods).
The simple solution for me was to just update the packages to the latest versions via File -> Swift Packages -> Update to Latest Package Versions.

Build iOS Framework with dependency of other frameworks

I am building iOS Framework that depends on another 3 frameworks. To do that in my Framework project I installed pods and the structure looks like this now:
Ok so far so good. I created podspec and added the nessecery dependecies such as AFNetworking, Socket Rocket and pjsip. When I run pod install cheryz I get in my test project this structure:
When I compile the Test project I got error:
I understand why this is happening. Because on the framework project I use workspace and the imports are made <SocketRocket/SRWebRocket> but on my Test projet where I install my framework with the dependencies I will need to write something like import "SRWebRocket.h" to work.
How I can fix this. I guess I am doing wrong the framework project. It should not be with workspace and additional frameworks such as AFNetworking in pod project ?
Also when I execute pod spec lint I get error on building. I guess this is the reason

FBSDKCoreKit and the include of non-modular header inside framework module errors

None of the following threads (and many similar) helped me:
Include of non-modular header inside framework module
XCode6: Receiving error "Include of non-modular header inside framework module"
While trying to install the Facebook SDK in my iOS project via cocoapods, I ran into that error:
Inside the FBSDKCoreKit.h header:
Include of non-modular header inside framework module 'FBSDKCoreKit.FBSDKCoreKit'
As I said, I tried the solutions proposed in the answers above without any success.
It's important to mention that this use to work fine on Xcode 7.
Turn on allowing modular headers
Upgrading to the latest version of CocoaPods (1.5.3), the latest Facebook SDK, removing my Pods folder, and doing a fresh pod install fixed this issue for me.
Just deleted the Swift Package Manager Facebook library and run a pod update

xCode 7.1: Could not build Objective-C module 'GoogleMaps'

I am using the GoogleMaps iOS SDK in my app and added it with cocoapods. However, after updating xCode from 7.0 to 7.1 I'm suddenly getting the following error: Could not build Objective-C module 'GoogleMaps'
In addition xCode also gives me an error in the GoogleMaps.h file in the GoogleMaps.framework:
Include of non-modular header inside framework module 'GoogleMaps'
I already deleted my DerivedData folder, updated cocoapods, reinstalled the GoogleMaps iOS SDK and cleaned and build the framework's scheme and my app's scheme. But nothing helped so far.
Answered in this similar question: xCode 7 error: include of non-modular header inside framework module with Google Maps
...but essentially you'll need to create an Objective-C bridging header file whereas you may not have needed one with Xcode 7.0. The why still eludes me.
you should open the .xcworkspace not .xcodeproj
once you added cocoa pods your project folder will contain the .xcworkspace file

Facebook sdk framework not found ios7, xcode5

I am new to Facebook SDK with iOS. I want to send invitation to friends on Facebook for using my app for this I am using Facebook (developer.facebook.com)sdk api I have registered my app installed sdk and imported framework. After importing got error as,
ld: warning: directory not found for option '-
F/Users/vijaywebsolutions/Documents/FacebookSDK'
ld: framework not found FacebookSDKkk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Why don't you try CocoaPods for your projects its the dependency manager for Objective-C projects.
Refer CocoaPods
Simple Setup
Open Terminal and type sudo gem install cocoapods
Once installed you need to create a simple Pod file in your project directory and add the dependency to that file example.
Go to your project root directory and create Pod File by typing in terminal touch Podfile
Once created add the following line to the podfile.
platform :ios
pod 'Facebook-iOS-SDK', '~> 3.11.0'
Save the file and then in the terminal(where pod file exist) run pod install
Now it will install the requested dependencies and will create a Workspace for your project, you don't need to take any effort to configure it.
Its the best way to manage your dependencies. Give it a try you won't regret.
First you have to include facebook sdk in you project, steps as follows :
click on your project folder in xcode.
go to general tab and find Linked framework and libraries.
in that click on + sign and provide path to FacebookSDK.framework
These steps will facebook sdk in your project.
Then you have to import it in any of .m file where you want to use is it. like following line :
#import <FacebookSDK/FacebookSDK.h>
I also ran into similar error when integrating FacebookSDK into my app. I have added the framework in the Link Binary with Libraries, however, error persisted. One important thing to note when app is built, is it should be build against source Facebook iOS SDK and NOT binary SDK. I got latest source from here Facebook iOS SDK, downloaded Bolts-iOS and XCTOOL and then ran build_framework.sh Once completed, copied FacebookSDK.framework to my app and everything worked perfect.