Open alien190 opened 2 years ago
This is caused by a namespace conflict between the Vungle SDK and the Reachability
Cocoapod used by the connectivity_plus
plugin. Because the Reachability
pod is distributed as source, it can be fixed by editing the Pods/Reachability/Reachability.m
file in the generated iOS app.
Replace the following line:
NSString *const kReachabilityChangedNotification = @"kReachabilityChangedNotification";
With something like:
NSString *const kMY_COMPANY_NAMEReachabilityChangedNotification = @"kReachabilityChangedNotification";
Don’t change the actual value of the string, just the constant name. Then edit the one use of it further down the file:
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:kMY_COMPANY_NAMEReachabilityChangedNotification
object:self];
});
Save the file, and the app should build.
Hello, @ltrubov
Thanks for your reply and proposed solution.
Could you please correct me if I mistake: 1) This solution will work only on my workstation. For example, if another developer pulls an application repo, the problem will occur once again. 2) If pods are updated after implementation of this solution, the problem will occur because Pods/Reachability/Reachability.m will be rewritten.
Thank you.
pubspec.yaml:
connectivity_plus: ^1.0.6 freestar_flutter_plugin: ^1.0.3
podfile:
pod 'FreestarAds-AdColony', '~> 4.0'
pod 'FreestarAds-AppLovin', '~> 4.0'
pod 'FreestarAds-Mopub', '~> 4.0'
pod 'FreestarAds-Googleadmob', '~> 5.0'
pod 'FreestarAds-Tapjoy', '~> 4.0'
pod 'FreestarAds-Unity', '~> 5.0'
pod 'FreestarAds-Vungle', '~> 4.0'
pod 'FreestarAds-Google', '~> 4.0'
pod 'FreestarAds-Criteo', '~> 2.0'
pod 'FreestarAds-GAM', '~> 4.0'
pod 'FreestarAds-Nimbus', '~> 2.0'
pod 'FreestarAds-TAM', '~> 1.0'
flutter build ios
fails with error:duplicate symbol '_kReachabilityChangedNotification' in: ../build/ios/Release-iphoneos/Reachability/libReachability.a(Reachability.o) ../ios/Pods/VungleSDK-iOS/VungleSDK.framework/VungleSDK(VungleReachability.o) ld: 1 duplicate symbol for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)