react-native-fast-image
react-native-fast-image copied to clipboard
[iOS] Use of undeclared identifier 'SDImageCodersManager'
Hi all! I have problem with "archive" build for ios. i have
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ...
// Register WebP format support
[SDImageCodersManager.sharedManager addCoder:SDImageWebPCoder.sharedCoder];
// ...
}
but i get error: Use of undeclared identifier 'SDImageCodersManager'
Maybe anybody get the same error and can help me
@Fedorrychkov , I just had this issue now and fixed it.
can you make sure you are not wrapping importing for the lib in if-else block? Just make sure you are including them in "release/production" build.
#import "SDImageCodersManager.h"
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
@Fedorrychkov , I just had this issue now and fixed it.
can you make sure you are not wrapping importing for the lib in if-else block? Just make sure you are including them in "release/production" build.
#import "SDImageCodersManager.h" #import <SDWebImageWebPCoder/SDImageWebPCoder.h>
@Terfender Hi! I no longer work on that project, but I remember that the imports were correct. Anyway, I got around this problem by using different modules for different image formats. Thanks for you answer!
@Fedorrychkov , I just had this issue now and fixed it.
can you make sure you are not wrapping importing for the lib in if-else block? Just make sure you are including them in "release/production" build.
#import "SDImageCodersManager.h" #import <SDWebImageWebPCoder/SDImageWebPCoder.h>
@Terfender how to include SDImageCodersManager.h to release/production build?
@AustinZuniga ,
Add these headers to you AppDelegate.m
file
#import "SDImageCodersManager.h"
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
And [SDImageCodersManager.sharedManager addCoder:SDImageWebPCoder.sharedCoder];
if the below method/function as done by Fedorrychkov
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ...
// Register WebP format support
[SDImageCodersManager.sharedManager addCoder:SDImageWebPCoder.sharedCoder];
// ...
}
@Fedorrychkov , I just had this issue now and fixed it.
can you make sure you are not wrapping importing for the lib in if-else block? Just make sure you are including them in "release/production" build.
#import "SDImageCodersManager.h" #import <SDWebImageWebPCoder/SDImageWebPCoder.h>
thanks you saved my day.