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
Can no longer distribute app with Validation Error "Found an unexpected Mach-O header code: 0x72613c2" on flutter master #166
Comments
@lifenautjoe I recommend removing If are you still seeing an issue I recommend following this guide: |
Hmm, build fails saying the extension must have also use_frameworks if it is to be embedded in the Runner app
|
Removing use_frameworks! also from the |
I've also tried to follow the recommended guide. There's no double frameworks to remove in any of the targets... So pretty stuck... 😞 |
Thanks for your patience while we continue to investigate |
Thank you for letting us know you’re on it.
Much appreciated Rodrigo.
…On Thu, 7 Nov 2019 at 23:11, Rodrigo Gomez Palacio ***@***.***> wrote:
Thanks for your patience while we continue to investigate
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#166?email_source=notifications&email_token=ADBFXZI45QTC52VQKB3SLPDQSSG75A5CNFSM4JH4KGMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDOAHYQ#issuecomment-551289826>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADBFXZOTVYGMT5HSWOGGVIDQSSG75ANCNFSM4JH4KGMA>
.
|
This is a breaking Issue. Just having exactly the same problem. |
I don't want to open my own ticket right now, because I have gone through the #168 , #157, #130 and this one and tried all the suggestions there. My issue seems to be with the Branch.io SDK. To make it short:
I will debug this a bit more myself. But this seems to be an important issue at the moment and I wanted to weigh in with my own error report. (Everything works fine under Android, btw. I'm really, really happy with OneSignal so far! Good job, guys! 👍 ) |
Hi @SvenSchoene , If you are still seeing the issue, some folks have been able to resolve similar problems by following the instructions here |
Oh, indeed, I wanted to write something here, but I forgot. Unfortunately, I don't have anything truly helpful or insightful to contribute. Here's what I ended up with:
Now, the big question is: What did I do to make 2. work? I wish I could give a good answer for this. I played around with too many settings to be able to properly trace it back now. I also updated to the latest beta-channel Flutter version and also removed all dependencies/packages that were existent before. FWIW I'm using the Legacy Build System (in XCode: File --> Workspace Settings). Also, I made sure to allow I know that it's frustrating that I cannot pinpoint it any better. I hope there's something here that helps someone. Working with OneSignal now is absolutely amazing, though. It works really, really well. 👍 |
I'm glad this worked! I haven't heard from anyone else in a while. Is this safe to close? |
Uhh, our current setup only worked because we manually put the pods framework not to be embedded but linked after building the app, but before archiving it. It's a hack I've been doing ever since to get it to submit to the store. Will try what Sven said next time. |
1- Make sure there's no duplicates in link binary with libraries and Embed frameworks for your project target and OneSignalNotificationServiceExtension |
same error, please any help!!!! |
Hi everyone. I posted our "hack" solution to this over here |
Closing this issue as the problem is with Flutter |
Updated cocoapods with Then, changed in pods file: Change Then Done 👏 |
Some folks are still seeing this issue |
Hi, I still have that issue: I can't remove the use_frameworks! from the extension target (Runner needs it so the extension as well). |
I had the same issue as @vscafuto87, this only happens when you try to archive the build, not in "development mode". |
Here's my solution:
Hope this useful! |
I am still facing this issue
# 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'
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
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |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)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# 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')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
install! 'cocoapods', :disable_input_output_paths => true
target 'OneSignalNotificationServiceExtension' do
use_frameworks!
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'] = 'YES'
end
end
end I have tried setting |
I finally solved it Hope this helps |
I'm glad this is resolved. Will close for now. Please comment if this issue is still ocurring even with the workarounds mentioned above. |
Description:
After ugprading to the flutter master channel and using the latest build system where both the one signal package and the runner use
use_frameworks!
, everything runs perfectly on test devices, but when trying to distribute to iOS, the distribution fails with the errorI've opened an issue in Github on this and the person taking a look is convinced that this is an issue of the OneSignal extension and not flutter itself.
You can see the issue and comments here.
flutter/flutter#43499
The extension is the one created following the integration tutorial and has not been modified otherwise.
Environment
Pubspec
In Podfile
Steps to Reproduce Issue:
Given a project with the OneSignal extension
Anything else:
(crash stacktraces, as well as any other information here)
The text was updated successfully, but these errors were encountered: