Head's up: It's not working for android either. See #56
__
Description:
After following every step, to the letter of the Official SDK Setup, when running
bash
flutter build ios --release
The job fails with
````
Building social.openbook.app for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: GAR7B57RXU
Running pod install... 1.6s
Starting Xcode build...
Xcode build done. 1.3s
Failed to build iOS app
Error output from Xcode build:
↳
* BUILD FAILED *
Xcode's output:
↳
=== BUILD TARGET Pods-Runner OF PROJECT Pods WITH CONFIGURATION Release-production ===
ld:
'/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/TOCropViewController/libTOCropViewController.a(TOActivityCroppedIm
ageProvider.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or
disable bitcode for this target. file
'/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/TOCropViewController/libTOCropViewController.a' for architecture
armv7
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
ld:
'/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/TOCropViewController/libTOCropViewController.a(TOActivityCroppedIm
ageProvider.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or
disable bitcode for this target. file
'/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/TOCropViewController/libTOCropViewController.a' for architecture
arm64
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
=== BUILD TARGET Pods-Runner OF PROJECT Pods WITH CONFIGURATION Release-production ===
error: the following command failed with exit code 254 but produced no further output
Ld
/Users/lifenautjoe/Library/Developer/Xcode/DerivedData/Runner-fyejgxaqxiysevckyfsvnqjhzfai/Build/Intermediates.noindex/Runner.build/Release-production-iphoneos/O
neSignalNotificationServiceExtension.build/Objects-normal/arm64/OneSignalNotificationServiceExtension normal arm64
````
I really have no clue what this might be.
Environment
@lifenautjoe please post your Podfile
Sorry about that.
Here it is
````
platform :ios, '10.2'
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
# 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.9.3', '< 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
````
This is what I get when I try to build on XCode

Hour 7 of breaking my head..
Reading through the iOS SDK Setup, I've noticed it's mentioned that after adding the service extension, the project must be always built from the xcode workspace, rather than the xcode project.
So I closed XCode, reopened the workspace file, hit build and it built successfully.
However...
From flutter commands such as flutter run or flutter build, it fails with errors related to not being able to locate directories.
````
Building social.openbook.app for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: GAR7B57RXU
Running pod install... 1.6s
Starting Xcode build...
Xcode build done. 2.2s
Failed to build iOS app
Error output from Xcode build:
↳
* BUILD FAILED *
Xcode's output:
↳
ld: warning: directory not found for option '-L/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/image_cropper'
ld: warning: directory not found for option '-L/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/video_player'
ld: library not found for -limage_cropper
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld: warning: directory not found for option '-L/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/image_cropper'
ld: warning: directory not found for option '-L/Users/lifenautjoe/Documents/code/openbook/openbook-app/build/ios/Release-production-iphoneos/video_player'
ld: library not found for -limage_cropper
clang: error: linker command failed with exit code 1 (use -v to see invocation)
````
My best bet is that flutter doesnt take into consideration the workspace mode and rather tries to build the project, therefore it fails (?)
Please, save me from having to use Firebase notifications 😢.
Update: Archiving the app from XCode does not work, only running it.
Errors are the same. Libraries not found.
@lifenautjoe sorry you’ve spent so much time on this! Unfortunately Flutter uses Cocoapods in a rather......unique.....way, and this can lead to issues like this.
It appears you’re facing a similar issue to #42
Do you need badge count notifications, images, etc? If not, removing the extension service entirely should fix this for you.
If you do, unfortunately Flutter’s Cocoapods scripts don’t play nice with projects that have app extensions, there’s not much we can do. I would suggest creating an issue on the Flutter repo
Hi @Nightsd01 ,
Sorry to hear that... Don't really know where to start to explain this to the Flutter team. I have no expertise with iOS nor Cocoapods.
For now.. I guess no other choice but to use Firebase Messaging...
Cheers.
@lifenautjoe if you intend to use rich push notifications with images you will likely run into the same issue with Firebase. The user in #42 found a workaround - I’d suggest starting there
@lifenautjoe I would also suggest trying to run our example project. Do you run into the same problem there?
Alright, hoping on the person to shed some light into his solution.
Will try running the project tomorrow morning first hour.
Cheers for now and thanks for being around!
I got this error:
Xcode's output:
↳
=== BUILD TARGET firebase_core OF PROJECT Pods WITH CONFIGURATION Debug ===
In file included from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalCategories.m:28:
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalCategories.h:28:9: fatal error: 'OneSignal/OneSignal.h' file not found
#import <OneSignal/OneSignal.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
@lifenautjoe any updates on this?
@Allan-Nava please post your Podfile....
@Nightsd01
hi i'm having the same issue
this is my pod file, please notice that i added use_framework! to the OneSignalNotificationServiceExtension target as cocoa complained that i don't have both targets (runner and the extension) set to use it
I'm having the same issue as @Allan-Nava
```# Uncomment this line to define a global platform for your project
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignal', '>= 2.9.3', '< 3.0'
end
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
```
How can I fix?
Il giorno dom 10 feb 2019 alle 21:04 thedude61636 notifications@github.com
ha scritto:
@Nightsd01 https://github.com/Nightsd01
hi i'm having the same issue
this is my pod file, please notice that i added use_framework! to the
OneSignalNotificationServiceExtension target as cocoa complained that i
don't have both targets (runner and the extension) set to use itI'm having the same issue as @Allan-Nava https://github.com/Allan-Nava
platform :ios, '9.0'
CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}target 'OneSignalNotificationServiceExtension' do
use_frameworks!
pod 'OneSignal', '>= 2.9.3', '< 3.0'
enddef 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
endtarget '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')
}
endpost_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—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/57#issuecomment-462167041,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVdMg1Pttq5lm_vXSUEbrWlndbZWkwdBks5vMHtVgaJpZM4aciF2
.
@thedude61636 this issue has been discussed (extensively). If you use use_frameworks! in your Podfile, our SDK simply will not work - there is currently no way around this unfortunately. Please see #21 for more detail.
@Allan-Nava Really...? Please post your Podfile.....
@Nightsd01 okay, noted.
does downloading the sdk directly from the repo work? because as far as i understand the issue is with cocoa
I'm new to ios so please bare with me
@thedude61636 the problem is that our Flutter SDK depends on our native iOS SDK, so it’s not a direct dependency. If you can figure out a way to do it I’d love to hear it.
Hi everyone. I fixed it with help of @smjcdowall.
It's a work-around and I hope a temporal one.
The steps are here https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/42#issuecomment-459473364 .
Cheers.
I got this error:
Xcode's output:
↳
In file included from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalPlugin.m:28:
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalPlugin.h:29:9: fatal error: 'OneSignal/OneSignal.h' file not found
#import <OneSignal/OneSignal.h>
^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:31: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
- (void)safariViewController:(SFSafariViewController *)controller
^
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:1: note: annotate 'safariViewController:didCompleteInitialLoad:' with an availability attribute to silence this warning
- (void)safariViewController:(SFSafariViewController *)controller
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:40: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
^
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:1: note: annotate 'safariViewControllerDidFinish:' with an availability attribute to silence this warning
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
^
API_AVAILABLE(ios(9.0))
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: warning: 'openURL:options:completionHandler:' is only available on iOS 10.0 or newer [-Wunguarded-availability]
[application openURL:url
^~~~~~~~~~~
In module 'UIKit' imported from /Users/ies/Desktop/work/nlite/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:135:1: note: 'openURL:options:completionHandler:' has been explicitly marked partial here
- (void)openURL:(NSURL*)url options:(NSDictionary<UIApplicationOpenExternalURLOptionsKey, id> *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS("");
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: note: enclose 'openURL:options:completionHandler:' in an @available check to silence this warning
[application openURL:url
^~~~~~~~~~~
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
Could not build the precompiled application for the device.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: note: enclose 'SFSafariViewController' in an @available check to silence this warning
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: note: enclose 'SFSafariViewController' in an @available check to silence this warning
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:31: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
- (void)safariViewController:(SFSafariViewController *)controller
^
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:1: note: annotate 'safariViewController:didCompleteInitialLoad:' with an availability attribute to silence this warning
- (void)safariViewController:(SFSafariViewController *)controller
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:40: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
^
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:1: note: annotate 'safariViewControllerDidFinish:' with an availability attribute to silence this warning
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
^
API_AVAILABLE(ios(9.0))
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: warning: 'openURL:options:completionHandler:' is only available on iOS 10.0 or newer [-Wunguarded-availability]
[application openURL:url
^~~~~~~~~~~
In module 'UIKit' imported from /Users/ies/Desktop/work/nlite/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:135:1: note: 'openURL:options:completionHandler:' has been explicitly marked partial here
- (void)openURL:(NSURL*)url options:(NSDictionary<UIApplicationOpenExternalURLOptionsKey, id> *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS("");
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: note: enclose 'openURL:options:completionHandler:' in an @available check to silence this warning
[application openURL:url
^~~~~~~~~~~
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: note: enclose 'SFSafariViewController' in an @available check to silence this warning
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here
@interface SFSafariViewController : UIViewController
^
/Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: note: enclose 'SFSafariViewController' in an @available check to silence this warning
SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url];
^~~~~~~~~~~~~~~~~~~~~~
5 warnings generated.
I used the same pod @thedude61636
@Allan-Nava if you are using the same Podfile as @thedude61636 then the comment I posted for him would apply in your case as well. Our framework is not compatible with use_frameworks! at the moment...
Ok tomorrow I will try
Il giorno mar 12 feb 2019 alle 20:17 Brad Hesse notifications@github.com
ha scritto:
@Allan-Nava https://github.com/Allan-Nava if you are using the same
Podfile as @thedude61636 https://github.com/thedude61636 then the
comment I posted for him would apply in your case as well. Our framework is not
compatible with use_frameworks! at the moment...—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/57#issuecomment-462895872,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVdMg178XAo9dQtzj5UMsy61phQqRGkbks5vMxNkgaJpZM4aciF2
.
@lifenautjoe when I use your PodFile I got this error:
[!] Unable to integrate the following embedded targets with their respective host targets (a host target is a "parent" target which embeds a "child" target like a framework or extension):
- Runner (true) and OneSignalNotificationServiceExtension (false) do not both set use_frameworks!.
@Allan-Nava you have to remove use_framework! from the podfile
@thedude61636 this is my Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
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
target 'OneSignalNotificationServiceExtension' do
pod 'OneSignal', '>= 2.9.5', '< 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
I got this error:
Xcode's output: ↳ In file included from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalPlugin.m:28: /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.0.5/ios/Classes/OneSignalPlugin.h:29:9: fatal error: 'OneSignal/OneSignal.h' file not found #import <OneSignal/OneSignal.h> ^~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:31: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] - (void)safariViewController:(SFSafariViewController *)controller ^ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:1: note: annotate 'safariViewController:didCompleteInitialLoad:' with an availability attribute to silence this warning - (void)safariViewController:(SFSafariViewController *)controller ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:40: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller { ^ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:1: note: annotate 'safariViewControllerDidFinish:' with an availability attribute to silence this warning - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller { ^ API_AVAILABLE(ios(9.0)) /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: warning: 'openURL:options:completionHandler:' is only available on iOS 10.0 or newer [-Wunguarded-availability] [application openURL:url ^~~~~~~~~~~ In module 'UIKit' imported from /Users/ies/Desktop/work/nlite/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:135:1: note: 'openURL:options:completionHandler:' has been explicitly marked partial here - (void)openURL:(NSURL*)url options:(NSDictionary<UIApplicationOpenExternalURLOptionsKey, id> *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: note: enclose 'openURL:options:completionHandler:' in an @available check to silence this warning [application openURL:url ^~~~~~~~~~~ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: Could not build the precompiled application for the device. /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: note: enclose 'SFSafariViewController' in an @available check to silence this warning SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: note: enclose 'SFSafariViewController' in an @available check to silence this warning SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ 5 warnings generated. /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:31: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] - (void)safariViewController:(SFSafariViewController *)controller ^ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:26:1: note: annotate 'safariViewController:didCompleteInitialLoad:' with an availability attribute to silence this warning - (void)safariViewController:(SFSafariViewController *)controller ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:40: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller { ^ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:38:1: note: annotate 'safariViewControllerDidFinish:' with an availability attribute to silence this warning - (void)safariViewControllerDidFinish:(SFSafariViewController *)controller { ^ API_AVAILABLE(ios(9.0)) /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: warning: 'openURL:options:completionHandler:' is only available on iOS 10.0 or newer [-Wunguarded-availability] [application openURL:url ^~~~~~~~~~~ In module 'UIKit' imported from /Users/ies/Desktop/work/nlite/ios/Pods/Target Support Files/url_launcher/url_launcher-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:135:1: note: 'openURL:options:completionHandler:' has been explicitly marked partial here - (void)openURL:(NSURL*)url options:(NSDictionary<UIApplicationOpenExternalURLOptionsKey, id> *)options completionHandler:(void (^ __nullable)(BOOL success))completion NS_AVAILABLE_IOS(10_0) NS_EXTENSION_UNAVAILABLE_IOS(""); ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:94:18: note: enclose 'openURL:options:completionHandler:' in an @available check to silence this warning [application openURL:url ^~~~~~~~~~~ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:3: note: enclose 'SFSafariViewController' in an @available check to silence this warning SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: warning: 'SFSafariViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability] SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ In module 'SafariServices' imported from /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:5: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/System/Library/Frameworks/SafariServices.framework/Headers/SFSafariViewController.h:27:12: note: 'SFSafariViewController' has been explicitly marked partial here @interface SFSafariViewController : UIViewController ^ /Users/ies/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-4.0.1/ios/Classes/UrlLauncherPlugin.m:122:38: note: enclose 'SFSafariViewController' in an @available check to silence this warning SFSafariViewController *safari = [[SFSafariViewController alloc] initWithURL:url]; ^~~~~~~~~~~~~~~~~~~~~~ 5 warnings generated.I used the same pod @thedude61636
With this Podfile I got this error again
I had the error bellow
=== BUILD AGGREGATE TARGET FirebaseAnalytics OF PROJECT Pods WITH CONFIGURATION Debug ===
ld: warning: directory not found for option '-L/Users/kvyrodov/Projects/project/build/ios/Debug-iphonesimulator/FBSDKCoreKit'
ld: warning: directory not found for option '-L/Users/kvyrodov/Projects/project/build/ios/Debug-iphonesimulator/FBSDKLoginKit'
ld: warning: directory not found for option
'-L/Users/kvyrodov/Projects/project/build/ios/Debug-iphonesimulator/flutter_facebook_login'
ld: library not found for -lFBSDKCoreKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've linked all missed libraries and this fixed the error:

Thanks to this comment
@lifenautjoe sorry you’ve spent so much time on this! Unfortunately Flutter uses Cocoapods in a rather......unique.....way, and this can lead to issues like this.
It appears you’re facing a similar issue to #42
Do you need badge count notifications, images, etc? If not, removing the extension service entirely should fix this for you.
If you do, unfortunately Flutter’s Cocoapods scripts don’t play nice with projects that have app extensions, there’s not much we can do. I would suggest creating an issue on the Flutter repo
How do you remove app extention
I'm closing this issue as it is a duplicate of #42 . You can follow any updates on the issue there.
same error than @Allan-Nava
/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.1.0/ios/Classes/OneSignalCategories.h:28:9: fatal error:
'OneSignal/OneSignal.h' file not found
#import
^~~~~~~
1 warning and 1 error generated.
Any Update?
Thx A lot
same error than @Allan-Nava
/development/flutter/.pub-cache/hosted/pub.dartlang.org/onesignal-1.1.0/ios/Classes/OneSignalCategories.h:28:9: fatal error:
'OneSignal/OneSignal.h' file not foundimport
^
~~~~~~
1 warning and 1 error generated.
Any Update?
Thx A lot
I was able to fix this issue by following the steps here:
https://github.com/Baseflow/flutter-geolocator/issues/168
I had to update information in the pod file.
It is when you have links in your app to open in safari, it seems Apple made changes so when you run build through Xcode it is requiring the policy updates and minimum requirements are met. Part of it I think is you can not run an older swift version aimed at ios 9.0 on a version you may set as 11.0
Most helpful comment
Hi everyone. I fixed it with help of @smjcdowall.
It's a work-around and I hope a temporal one.
The steps are here https://github.com/OneSignal/OneSignal-Flutter-SDK/issues/42#issuecomment-459473364 .
Cheers.