Flutter build archives for iOS fails in stable - iphone

I am using Flutter stable 1.22.5 for my app and its running perfect on iPhone 14.2. But I can't archive my build to release it on TestFlight.
I got errorParse Issue Group
ios/Runner/GeneratedPluginRegistrant.m:10:9: Module 'apple_sign_in' not found. Same error in master and beta. I have already tried to remove iOS folder and create it again, but that doesn't work. The following terminal commands have also been used:
Flutter clean
rm -Rf iOS/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
pod cache clean —all
Flutter get packages
pod install and update.
My issue only appears at archive build for release on iPhone. How do I fix this?
Podfile
Uncomment this line to define a global platform for your project
platform :ios, '9.3'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_ios_podfile_setup
def flutter_install_ios_plugin_pods(ios_application_path = nil)
# defined_in_file is set by CocoaPods and is a Pathname to the Podfile.
ios_application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)
raise 'Could not find iOS application path' unless ios_application_path
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
symlink_dir = File.expand_path('.symlinks', ios_application_path)
system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.
symlink_plugins_dir = File.expand_path('plugins', symlink_dir)
system('mkdir', '-p', symlink_plugins_dir)
plugins_file = File.join(ios_application_path, '..', '.flutter-plugins-dependencies')
plugin_pods = flutter_parse_plugins_file(plugins_file)
plugin_pods.each do |plugin_hash|
plugin_name = plugin_hash['name']
plugin_path = plugin_hash['path']
if (plugin_name && plugin_path)
symlink = File.join(symlink_plugins_dir, plugin_name)
File.symlink(plugin_path, symlink)
if plugin_name == 'flutter_ffmpeg'
pod 'flutter_ffmpeg/https-gpl', :path => File.join('.symlinks', 'plugins', plugin_name, 'ios')
else
pod plugin_name, :path => File.join('.symlinks', 'plugins', plugin_name, 'ios')
end
end
end
end
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end

Related

Bitbake Add Third Party GitHub Repo

I am attempting to add a new layer to my bitbake build. There is a GitHub repo that provides code that can read a CAN frame and parse it using a DBC file. I am having trouble getting bitbake to approve of this. The repo is here and it relies on three submodules.
My bb file so far contains:
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRCREV_FORMAT = "linux"
SRC_URI = "git://github.com/xR3b0rn/dbcppp.git;protocol=https;branch=master \
gitsm://github.com/jarro2783/cxxopts.git;protocol=https;branch=master \
gitsm://github.com/GNOME/libxml2.git;protocol=https;branch=master \
gitsm://github.com/xR3b0rn/libxmlmm.git;protocol=https;branch=master \
"
PV = "1.0+git${SRCPV}"
SRCREV = "${AUTOREV}"
S = "${WORKDIR}/git"
When adding the third gitsm line gitsm://github.com/xR3b0rn/libxmlmm.git;protocol=https;branch=master \ I start getting errors.
ERROR: dbcppp-1.0+gitAUTOINC+linux-r0 do_configure: oe_runmake failed
ERROR: dbcppp-1.0+gitAUTOINC+linux-r0 do_configure: Execution of '/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/dbcppp/1.0+gitAUTOINC+linux-r0/temp/run.do_configure.39779' failed with exit code 1
ERROR: Logfile of failure stored in: /home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/dbcppp/1.0+gitAUTOINC+linux-r0/temp/log.do_configure.39779
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/michael/Documents/MAIN_Application/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_10.2.bb:do_populate_sysroot', 'virtual:native:/home/michael/Documents/MAIN_Application/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', '/home/michael/Documents/MAIN_Application/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.66.bb:do_populate_sysroot', '/home/michael/Documents/MAIN_Application/sources/poky/meta/recipes-devtools/gcc/gcc-cross_10.2.bb:do_populate_sysroot', 'virtual:native:/home/michael/Documents/MAIN_Application/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', '/home/michael/Documents/MAIN_Application/sources/poky/meta/recipes-core/glibc/glibc_2.33.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['gcc-runtime', 'pseudo-native', 'quilt-native', 'gcc-cross-arm', 'patch-native', 'glibc', 'linux-libc-headers', 'libgcc', 'xz-native', 'libmpc-native', 'autoconf-native', 'automake-native', 'mpfr-native', 'binutils-cross-arm', 'zlib-native', 'gmp-native', 'libtool-native', 'flex-native', 'texinfo-dummy-native', 'gnu-config-native', 'attr-native', 'gettext-minimal-native', 'm4-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_configure
| NOTE: make clean
| Makefile:4: *** config.mk not built. Run configure script.. Stop.
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/michael/Documents/MAIN_Application/build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/dbcppp/1.0+gitAUTOINC+linux-r0/temp/run.do_configure.39779' failed with exit code 1
ERROR: Task (/home/michael/Documents/MAIN_Application/MAIN_layers/meta-MAINapplication/recipes-core/dbcppp/dbcppp_0.0.bb:do_configure) failed with exit code '1'
This is an oe_runmake error. This confuses me as I have not attempted to add a do_install or do_install_append step.
Note that my goal is to build this code and include it as a library for my application to use.
Edit 1: I updated the bb file (below). The resulting error leads to me to believe that I have to build this, set some rules for oe_runmake to follow.
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRCREV_FORMAT = "xR3b0rn"
SRC_URI = "git://github.com/xR3b0rn/dbcppp.git;protocol=https;branch=master \
gitsm://github.com/jarro2783/cxxopts.git;protocol=https;branch=master \
gitsm://github.com/GNOME/libxml2.git;protocol=https;branch=master \
gitsm://github.com/xR3b0rn/libxmlmm.git;protocol=https;branch=master \
"
PV = "0.0+gitr${SRCPV}"
SRCREV = "${AUTOREV}"
SRCREV_xR3b0rn = "${AUTOREV}"
S = "${WORKDIR}/git"
Edit 2: Using the solution from ensc I am able to build, but I get an odd error.
ERROR: dbcppp-1.0+gitAUTOINC+917c925638-r0 do_packagedata: QA Issue: Package version for package dbcppp-src went backwards which would break package feeds (from 0:1.0+git0+linux-r0 to 0:1.0+git0+917c925638-r0) [version-going-backwards]
ERROR: dbcppp-1.0+gitAUTOINC+917c925638-r0 do_packagedata: QA Issue: Package version for package dbcppp-dbg went backwards which would break package feeds (from 0:1.0+git0+linux-r0 to 0:1.0+git0+917c925638-r0) [version-going-backwards]
ERROR: dbcppp-1.0+gitAUTOINC+917c925638-r0 do_packagedata: QA Issue: Package version for package dbcppp-staticdev went backwards which would break package feeds (from 0:1.0+git0+linux-r0 to 0:1.0+git0+917c925638-r0) [version-going-backwards]
ERROR: dbcppp-1.0+gitAUTOINC+917c925638-r0 do_packagedata: QA Issue: Package version for package dbcppp-dev went backwards which would break package feeds (from 0:1.0+git0+linux-r0 to 0:1.0+git0+917c925638-r0) [version-going-backwards]
ERROR: dbcppp-1.0+gitAUTOINC+917c925638-r0 do_packagedata: QA Issue: Package version for package dbcppp-doc went backwards which would break package feeds (from 0:1.0+git0+linux-r0 to 0:1.0+git0+917c925638-r0) [version-going-backwards]
ERROR: dbcppp-1.0+gitAUTOINC+917c925638-r0 do_packagedata: QA Issue: Package version for package dbcppp-locale went backwards which would break package feeds (from 0:1.0+git0+linux-r0 to 0:1.0+git0+917c925638-r0) [version-going-backwards]
ERROR: dbcppp-1.0+gitAUTOINC+917c925638-r0 do_packagedata: QA Issue: Package version for package dbcppp went backwards which would break package feeds (from 0:1.0+git0+linux-r0 to 0:1.0+git0+917c925638-r0) [version-going-backwards]
write directly
SRC_URI = "gitsm://github.com/xR3b0rn/dbcppp.git;protocol=https;branch=master"
The gitsm fetcher is for downloading repositories with submodules but not for downloading the submodules itself.
As ensc said, gitsm will download submodules too.
Regarding Edit 2, Package version for package dbcppp-src went backwards means that you downgraded package version (you have already built higher version of package then you are trying to build currently).
You should do cleansstate of your package and rerun the build to solve it.
bitbake dbcppp -c cleansstate

pod install flutter failure

I'm using cocoapods 1.7.5 ,when I execute pod install, I'm getting this error :
[!] Invalid `Podfile` file: undefined method `+' for nil:NilClass.
# from /Users/yuhan/jiemian_project/iOS_MoerFinance/A-源代码/MoerFinance/Podfile:71
# -------------------------------------------
# location = flutter_podhelper.index(post_install_string)
> location += post_install_string.length
#
# -------------------------------------------
Did anyone face the same problem before?I don't know why flutter_podhelper.index(post_install_string)return nil,I can find podhelperin the directory.In another computer, pod installis success, but in this computer, show the error above.
podfile some code
def multiple_post_install(flutter_application_path)
#read podhelper from flutter_application_path
flutter_podhelper = File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb'))
#find the post_install end location by hardcoding
post_install_string = 'post_install do |installer|'
location = flutter_podhelper.index(post_install_string)
location += post_install_string.length
Try using this. It will resolve this issue
1- Upgrade flutter (make sure to always point master channel else switch to master channel)
2- update cocoapods
3- flutter clean
4- rm -Rf ios/Pods
5- rm -Rf ios/.symlinks
6- rm -Rf ios/Flutter/Flutter.framework
7- rm -Rf ios/Flutter/Flutter.podspec
build again and check

How do I solve: "Errno::ENOENT - No such file or directory # rb_sysopen - "?

I am trying to merge React-Native into a swift application. I created a new podfile and added in all the dependencies. After trying 'pod install' many times, it will still not install the pods.
I have tried to delete the podfolder and also delete the node folder and run 'npm install' again. I have tried updating my ruby software. Everything that I can find on GitHub and on here that seems applicable I have tried.
CocoaPods : 1.7.3
Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
RubyGems : 2.5.2.3
Host : Mac OS X 10.14.5 (18F132)
Xcode : 10.2.1 (10E1001)
Git : git version 2.20.1 (Apple Git-117)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 690c5ee7cf52451dc2c72cde937bc1b92a98cc86
Plugins
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.3.1
cocoapods-try : 1.1.0
Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'LMWPOS' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for LMWPOS
pod 'Alamofire'
pod 'AlamofireObjectMapper', '~> 5.0'
pod 'SwiftyJSON'
pod 'DLRadioButton'
pod 'NVActivityIndicatorView'
pod 'TextFieldEffects'
pod 'GoogleSignIn'
pod 'RealmSwift', '~> 3.11.2'
pod 'NotificationBannerSwift', '~> 1.6.3'
pod 'MarqueeLabel/Swift', '~> 3.1.6'
pod 'FBSDKCoreKit', '~> 4.36.0'
pod 'FBSDKLoginKit', '~> 4.36.0'
pod 'PromiseKit/Alamofire', '~> 6.0'
pod 'AlamofireImage'
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # Needed for debugging
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end
I expected it to install the pods and got this:
Error
Errno::ENOENT - No such file or directory # rb_sysopen - /Users/lmwmarketing/Desktop/LMW-Source-Codes/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/open-uri.rb:37:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/external_sources/podspec_source.rb:19:in `block in fetch'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/external_sources/podspec_source.rb:11:in `fetch'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:854:in `fetch_external_source'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:833:in `block (2 levels) in fetch_external_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:832:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:832:in `block in fetch_external_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:831:in `fetch_external_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer/analyzer.rb:111:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:398:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:221:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:220:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/command/install.rb:51:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.7.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
All of the node files were searching for two directories up when it was only one directory up.
pod 'DoubleConversion', :podspec => './node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => './node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => './node_modules/react-native/third-party-podspecs/Folly.podspec'

rubocop error on ExpandPathArguments

I have this rubocop error
Offenses:
fastlane-plugin-lizard.gemspec:1:12: C: Style/ExpandPathArguments: Use expand_path('lib', __dir__) instead of expand_path('../lib', __FILE__).
lib = File.expand_path("../lib", __FILE__)
^^^^^^^^^^^
10 files inspected, 1 offense detected
RuboCop failed!
Exited with code 1
How do I fix this error? cos follow rubocop advise I will get another error
#!/bin/bash -eo pipefail
bundle check || bundle install --jobs=4 --retry=3 --path vendor/bundle
[!] There was an error parsing `Gemfile`:
[!] There was an error while loading `fastlane-plugin-lizard.gemspec`: cannot load such file -- fastlane/plugin/lizard/version
Does it try to require a relative path? That's been removed in Ruby 1.9. Bundler cannot continue.
Change
lib = File.expand_path("../lib", __FILE__)
to
lib = File.expand_path("lib", __dir__)

correct way to create symlink in deploy.rb

I have an error when i deploy an application:
[neon.locum.ru] executing command
*** [err :: neon.locum.ru] find: `/home/hosting_grandinvest/projects/demo/releases/20130116145843/public/images /home/hosting_grandinvest/projects/demo/releases/20130116145843/public/stylesheets /home/hosting_grandinvest/projects/demo/releases/20130116145843/public/javascripts': Нет такого файла или каталога
command finished in 91ms
triggering after callbacks for `deploy:update_code'
* 2013-01-16 16:58:45 executing `make_images_link'
* executing "ln -s /home/hosting_grandinvest/projects/demo/shared/public/images /home/hosting_grandinvest/projects/demo/releases/20130116145843/public/images"
As you see it's because first it tries to find /public/images dir. and only then creates a symlink for that directory.
beggining of my deploy.rb
require 'bundler/capistrano'
after "deploy:update_code", :make_images_link
task :make_images_link, roles => :app do
images_dir = "#{shared_path}/public/images"
run "ln -s #{images_dir} #{release_path}/public/images"
end
the deploy finishes
Gem.source_index called from /home/hosting_grandinvest/projects/demo/shared/gems/ruby/1.8/gems/rails-2.3.15/lib/rails/gem_dependency.rb:21.
master process ready
worker=0 ready
reaped #<Process::Status: pid=18656,exited(0)> worker=0
master complete
in public/images dir are located some files used by css ( background: url(/images/front/logo.gif) no-repeat 0 0;) and they are Not displayed !but when i try to access these files directly
(http://hosting.net/images/front/logo.gif) i can see them!
Any suggestions on how to solve this error and make capistrano work?
UPDATE 1
I've included public/images/front in repo and after code deployment swap empty folder with a link
after "deploy:update_code", :make_images_link
task :make_images_link, roles => :app do
images_dir = "#{shared_path}/public/images"
realease_images = "#{release_path}/public/images"
run "rm -rf #{realease_images}"
run "ln -s #{images_dir} #{realease_images}"
end
When i deploy error still exists, but images appeared!
In the end i've included 'public'images' dir in my repository.
and as step 2 i run a callback that i've specified in update 1.