-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when building for iOS after following SDK setup tutorial #57
Comments
@lifenautjoe please post your Podfile |
Sorry about that. Here it is
|
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
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:
|
@lifenautjoe any updates on this? @Allan-Nava please post your Podfile.... |
hi i'm having the same issue I'm having the same issue as @Allan-Nava
|
How can I fix?
Il giorno dom 10 feb 2019 alle 21:04 thedude61636 <[email protected]>
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 it
I'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'
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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVdMg1Pttq5lm_vXSUEbrWlndbZWkwdBks5vMHtVgaJpZM4aciF2>
.
|
@thedude61636 this issue has been discussed (extensively). If you use |
@Allan-Nava Really...? Please post your Podfile..... |
@Nightsd01 okay, noted. |
@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 #42 (comment) . Cheers. |
I got this error:
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 |
Ok tomorrow I will try
Il giorno mar 12 feb 2019 alle 20:17 Brad Hesse <[email protected]>
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
<#57 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVdMg178XAo9dQtzj5UMsy61phQqRGkbks5vMxNkgaJpZM4aciF2>
.
|
@lifenautjoe when I use your PodFile I got this error:
|
@Allan-Nava you have to remove use_framework! from the podfile |
@thedude61636 this is my Podfile:
|
With this Podfile I got this error again |
I had the error bellow
I've linked all missed libraries and this fixed the error: Thanks to this comment |
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 |
I was able to fix this issue by following the steps here: I had to update information in the pod file. |
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
The job fails with
I really have no clue what this might be.
Environment
The text was updated successfully, but these errors were encountered: