We have a Flutter project that acts as a local (development) pod, the podspec for it is here. It depends on a dynamic framework (our native iOS SDK). pod install
works fine, but when users attempt to _build_ our pod, it cannot find the header file for our native iOS dynamic framework.
The strange thing is: it works if the user isn't using use_frameworks!
. But if the user's project _does_ use use_frameworks!
, this issue pops up.
The pod to build correctly.
Xcode cannot find the header files for our native SDK.
{User project} -> {Our local Flutter pod} -> {Our native SDK, a dynamic framework}
Our local flutter pod complains that it cannot find the header files of our native SDK
CocoaPods : 1.5.3
Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
RubyGems : 2.5.2
Host : Mac OS X 10.13.5 (17F77)
Xcode : 9.4.1 (9F2000)
Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 33a4b656db9e9c9dc7720fbac0ed4dfc75f80d9b
OneSignalPro - https://github.com/Hiptic/OneSignal-iOS-SDK-PRO.git @ b92175abb35ffd4c88f52349b2cd4168cb5b2141
twilio - https://github.com/twilio/cocoapod-specs @ 87ef83a8a28f39d04729f08f0cbcddd95276a2f6
Executable Path: /usr/local/bin/pod
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
Here is our podspec for our Flutter SDK, note that it depends on OneSignalDynamic
which is our native dynamic framework:
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'onesignal'
s.version = '1.0.2'
s.summary = 'The OneSignal Flutter SDK'
s.description = 'Allows you to easily add OneSignal to your flutter projects, to make sending and handling push notifications easy'
s.homepage = 'https://www.onesignal.com'
s.license = { :file => '../LICENSE' }
s.author = { 'Brad Hesse' => '[email protected]', 'Josh Kasten' => '[email protected]' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'OneSignalDynamic', '>= 2.8.8', '< 3.0'
s.ios.deployment_target = '8.0'
end
And here is the podspec for our native SDK (the above podspec depends on this one)
It's a Flutter project, but you don't need Flutter to reproduce the issue. Just open the project in the /ios
folder and attempt to build and you'll see the missing headers error.
After doing more digging, it seems like this is even more than just an issue with my pod finding the header for the dependency framework. Even if I manually include the header, I then get ld
errors saying it cannot find the correct symbols (meaning that for whatever reason it cannot find the dynamic framework). Maybe I can fix this with framework search paths...?
Any help would definitely be appreciated
Did you try 1.6.0.beta.1?
Attempted the 1.6.0 beta 1 and the issue still happens. Posting another pod env
here. Note that the Podfile is standard for a Flutter project, it includes use_frameworks!
CocoaPods : 1.6.0.beta.1
Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
RubyGems : 2.5.2
Host : Mac OS X 10.13.5 (17F77)
Xcode : 9.4.1 (9F2000)
Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 33a4b656db9e9c9dc7720fbac0ed4dfc75f80d9b
OneSignalPro - https://github.com/Hiptic/OneSignal-iOS-SDK-PRO.git @ b92175abb35ffd4c88f52349b2cd4168cb5b2141
twilio - https://github.com/twilio/cocoapod-specs @ 87ef83a8a28f39d04729f08f0cbcddd95276a2f6
Executable Path: /usr/local/bin/pod
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
use_frameworks!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
Hi, I've fixed my application adding this code to Podfile
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 2.8.5', '< 3.0'
end
Maybe it's not what you are looking for but I hope it helps.
@Errichamonda Thanks for that, but it's a bit different than what this issue is talking about.
Our current issue is in regards to Swift projects with the use_frameworks!
option in their podfiles.
Hello, any updates?
Any news anyone?
@Nightsd01 To your knowledge, is there any workaround we could use? Unfortunately, this is blocking me from integrating onesignal in my project.
No updates / news, I don't think anyone has gotten the chance to look into this one yet.
The complexity of the example Podfile makes it a bit difficult to narrow down what exactly is going on - if anyone has a more concise example that can reproduce the issue that would be helpful
@andreamazz Does your project use any Swift? If it does not - I would recommend removing any occurrences of use_frameworks!
from your project and edit out Podfile, change OneSignalDynamic
to OneSignal
and you should be good to go. This should work as a temporary solution
@Nightsd01 Assuming your last comment was meant for me, unfortunately my project uses Swift
1.6.0 supports Swift static libraries (originally introduced in 1.5.3 I think)
I upgraded to 1.6.0.beta.2, removed use_frameworks!
and I now see errors related to other header files not being found. I'll try to see if I can make those work now instead.
@Nightsd01 Using OneSignal
directly leads to [!] The 'Pods-Runner' target has frameworks with conflicting names: onesignal.framework.
and I think this has something to do with the Flutter pod also being called onesignal
I forked the flutter onesignal plugin and got it to no longer give this conflict by renaming it also making it depend on OneSignal
and not OneSignalDynamic
. Now my OneSignalNotificationServiceExtension
fails with ld: library not found for -lAmplitude-iOS
or any other library I am using in my main project. Not sure if there's something obvious I'm missing and since I'm new to this, it feels like I'm throwing things at the wall
@andreidiaconu Can you post your Podfile?
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
# pod 'OneSignalDynamic', '>= 2.8.8', '< 3.0'
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
target 'OneSignalNotificationServiceExtension' do
# pod 'OneSignalDynamic', '>= 2.8.8', '< 3.0'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
pod 'Firebase/Database'
pod 'ImagePalette'
pod 'Purchases', :modular_headers => true
pod 'Branch'
pod 'FacebookSDK'
pod 'OneSignal'
So there are a few problems, you should declare each pod
inside of the target that you actually want it in. You do NOT want the FacebookSDK, for example, to be added to the OneSignalNotificationServiceExtension target.
First, wherever onesignal.podspec
is located, change it to use OneSignal
instead of OneSignalDynamic
.
Then, edit your Podfile to this:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
pod 'Firebase/Database'
pod 'ImagePalette'
pod 'Purchases', :modular_headers => true
pod 'Branch'
pod 'FacebookSDK'
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 2.8.8', '< 3.0'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
@andreidiaconu Also, made a mistake so I've edited the podfile I posted in the previous comment.
Please note that you should not be manually adding pod 'OneSignal'
to your "Runner" target. Our Flutter podspec should do this for you automatically.
I suspected that each target needs to declare pod dependencies individually, but this does not make the error go away. It now sais ld: library not found for -lBranch
@andreidiaconu Can you post the full error?
I've done some more investigating of this issue and I believe it is being caused by how Cocoapods strips unused architectures from universal frameworks.
I have posted a more detailed issue with Cocoapods here so I will be closing this issue: https://github.com/CocoaPods/CocoaPods/issues/8246
@Nightsd01 The error is just ld: library not found for -lBranch
as a result of trying to link.
If it helps, here is the full output I see in xcode
Ld /Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension normal arm64
cd /Users/andrei/FlutterProjects/gramstudio/ios
export IPHONEOS_DEPLOYMENT_TARGET=10.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/Amplitude-iOS -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/Bolts -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/BoringSSL -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/Branch -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/FirebaseAuth -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/FirebaseCore -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/FirebaseDatabase -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/FirebaseFirestore -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/FirebaseMessaging -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/FirebaseStorage -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/GTMSessionFetcher -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/GoogleUtilities -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/ImagePalette -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/Protobuf -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/Purchases -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/SwiftPriorityQueue -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/app_review -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/cloud_firestore -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/firebase_analytics -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/firebase_core -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/firebase_messaging -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/firebase_storage -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/flutter_amplitude -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/gRPC -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/gRPC-Core -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/gRPC-ProtoRPC -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/gRPC-RxLibrary -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/image_picker -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/leveldb-library -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/nanopb -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/onesignal -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/package_info -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/path_provider -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/revenuecat -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/share -L/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/url_launcher -F/Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos -F/Users/andrei/FlutterProjects/gramstudio/ios/Pods/../.symlinks/flutter/ios -F/Users/andrei/FlutterProjects/gramstudio/ios/Pods/FacebookSDK/FacebookSDKs-iOS-universal-4.37.0/iOS -F/Users/andrei/FlutterProjects/gramstudio/ios/Pods/FirebaseAnalytics/Frameworks -F/Users/andrei/FlutterProjects/gramstudio/ios/Pods/FirebaseInstanceID/Frameworks -F/Users/andrei/FlutterProjects/gramstudio/ios/Pods/GoogleAppMeasurement/Frameworks -F/Users/andrei/FlutterProjects/gramstudio/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework -filelist /Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -miphoneos-version-min=10.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fapplication-extension -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -add_ast_path -Xlinker /Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension.swiftmodule -ObjC -lAmplitude-iOS -lBolts -lBoringSSL -lBranch -lFirebaseAuth -lFirebaseCore -lFirebaseDatabase -lFirebaseFirestore -lFirebaseMessaging -lFirebaseStorage -lGTMSessionFetcher -lGoogleUtilities -lImagePalette -lProtobuf -lPurchases -lSwiftPriorityQueue -lapp_review -lc++ -lcloud_firestore -lfirebase_analytics -lfirebase_core -lfirebase_messaging -lfirebase_storage -lflutter_amplitude -lgRPC -lgRPC-Core -lgRPC-ProtoRPC -lgRPC-RxLibrary -licucore -limage_picker -lleveldb-library -lnanopb -lonesignal -lpackage_info -lpath_provider -lrevenuecat -lshare -lsqlite3 -lsqlite3.0 -lurl_launcher -lz -framework AdSupport -framework CFNetwork -framework FBSDKCoreKit -framework FBSDKMarketingKit -framework FirebaseAnalytics -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework Flutter -framework Foundation -framework GoogleAppMeasurement -framework MeasurementNanoPB -framework MobileCoreServices -framework OneSignal -framework SafariServices -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -framework UserNotifications -weak_framework Accounts -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework QuartzCore -weak_framework Security -weak_framework Social -weak_framework UIKit -weak_framework WebKit -ObjC -framework OneSignal -framework SystemConfiguration -framework UIKit -framework UserNotifications -e _NSExtensionMain -lPods-OneSignalNotificationServiceExtension -Xlinker -dependency_info -Xlinker /Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Intermediates.noindex/Runner.build/Debug-iphoneos/OneSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension_dependency_info.dat -o /Users/andrei/Library/Developer/Xcode/DerivedData/Runner-fbdbyrznprlszhalhrtghebufige/Build/Products/Debug-iphoneos/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension
ld: library not found for -lBranch
clang: error: linker command failed with exit code 1 (use -v to see invocation)
That means that your Extension target is still trying to link to pods/frameworks it should not be using....
You are using _exactly_ the Podfile I posted above right? Then you edited onesignal.podspec
? And then ran pod install
?
Yes. And I also do a project clean after these kind of changes. In Build
Settings, I can see that these dependencies are added because of
$(inherited)
On Sat, Nov 3, 2018, 02:14 Brad Hesse <[email protected] wrote:
That means that your Extension target is still trying to link to
pods/frameworks it should not be using....You are using exactly the Podfile I posted above right? Then you edited
onesignal.podspec? And then ran pod install?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/CocoaPods/CocoaPods/issues/8090#issuecomment-435543846,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVkvhjg42957QMg9o8Mx7LXdprRLwVoks5urN_KgaJpZM4WmX3Y
.
@andreidiaconu where do you see $(inherited)
? That should not cause the extension target to try to link to incorrect binaries
@Nightsd01 If I go to my OneSignalNotificationServiceExtension
-> Build Settings
-> Linking
-> Other Linker Flags
I see:
_Note $(inherited)
and the values it's adding._
@Nightsd01 To your knowledge, is there any workaround we could use? Unfortunately, this is blocking me from integrating onesignal in my project.
I have the same problem, any news?
@Nightsd01 If I go to my
OneSignalNotificationServiceExtension
->Build Settings
->Linking
->Other Linker Flags
I see:
_Note
$(inherited)
and the values it's adding._
I have the same problem, any news?
This Helped me 👍🏻
Delete pod files your iOS folder, execute the following commands
pod init
pod install
pod update
Most helpful comment