Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Incompatibility with use_frameworks! #11

Description

@drahoslove

I had the same problem described in #6, however the suggested solution didn't work for me. Even with the conditional pre_install script, it was breaking some of the other pods I use.

Fortunately, there is no need to use use_frameworks! for pods with Swift, if you are using CocoaPods 1.5.0 or newer.
You can use use_modular_headers! instead. (Or :modular_headers => true for a single pod declaration.) See: https://blog.cocoapods.org/CocoaPods-1.5.0/

What worked for me was:

  1. Adding pod 'CustomerlySDK', :modular_headers => true into my Podfile.
# ios/Podfile

target 'YourApp' do
    ...
    pod 'CustomerlySDK', :modular_headers => true
    ...
end
  1. Importing the SDK with @import CustomerlySDK; instead of the #import <CustomerlySDK/CustomerlySDK-Swift.h> in my AppDelegate.m file.
// ios/YourApp/AppDelegate.m

#import "AppDelegate.h"
...
@import CustomerlySDK;

...

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    ...
    [[Customerly sharedInstance] configureWithAppId:@"YOUR_APP_ID" widgetColor:nil];
    [[Customerly sharedInstance] activateApp];
    ...

So I suggest to update the installation instruction in that manner.

Or perhaps even better, to add s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } into CustomerlySDK.podspec of the CustomerlySDK pod.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions