voydz / souyuz Goto Github PK
View Code? Open in Web Editor NEWFastlane build plugin for building Xamarin.iOS and Xamarin.Android applications
License: MIT License
Fastlane build plugin for building Xamarin.iOS and Xamarin.Android applications
License: MIT License
As Xamarin states in his release notes (https://developer.xamarin.com/releases/ios/xamarin.ios_10/xamarin.ios_10.4/):
MSBuild IPA Changes: This version of Xamarin.iOS (C9) no longer outputs
*.ipa
files in a timestamped directory located under the directory defined by theOutputPath
MSBuild variable by default. Instead, the default behavior has changed such that the*.ipa
file will be created as an immediate child of the directory defined by theOutputPath
MSBuild variable. TheIpaPackagePath
MSBuild variable will still be defined by the build process and so it is expected that CI and other build scripts that properly use this variable to locate the*.ipa
file generated by the build will continue to work as expected. Also of note is that theClean
target will now delete the*.ipa
file created during the build.
This may result in wrong "IPA_OUTPUT_PATH" resolving. This has to be checked.
Hi,
I had migrate the app(Xamarin.Forms) from Android 9 to 12 but when I try to install the APK into device, fails with follow error:
ERROR: Target SDK version 31 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme
My question is: the Souyuz plugin is predisposed to sign the app with APK Signature V2 or higher ? Or I should change the property file in the project ?
Hi,
I have this problem when build iOS App:
Users/****/.rvm/gems/ruby-2.7.4/gems/souyuz-0.11.1/lib/souyuz/runner.rb:135:in compress_and_move_dsym': \e[31m[!] undefined method
empty?' for nil:NilClass\e[0m (NoMethodError)
Can someone help me ?
I've installed this plugin to use with Drone CI, the build process fails with "sh: 1: set: Illegal option -o pipefail" when trying to execute the following:
[12:07:53]: $ set -o pipefail && msbuild /p:Configuration=Release /p:SolutionDir=/drone/src/bitbucket.org/company/test-app/commits/33f665f98291013a5e17ecd09bec87cc638e6220/ /t:Build /t:SignAndroidPackage /drone/src/bitbucket.org/company/test-app/commits/33f665f98291013a5e17ecd09bec87cc638e6220/Droid/Test.Droid.csproj
[12:07:53]: ▸ sh: 1: set: Illegal option -o pipefail
sh: 1: set: Illegal option -o pipefail
[12:07:53]: Exit status: 2
Does the plugin need to include that in the build command?
I've been working on setting up fast lane tools for my Xamarin project. Everything was going pretty smoothly until I got to this plugin,... for some reason I'm unable to successfully install fastlane-plugin-souyuz. I've been stuck on this for hours and I'm hoping some kind soul could shed some insight into what might be going on here.
During my troubleshooting process I installed Ruby 2.4.0
Heres the error message:
Building native extensions. This could take a while...
ERROR [2017-06-17 11:30:21.35]: Error loading plugin 'fastlane-plugin-souyuz': ERROR: Failed to build gem native extension.
current directory: /Users/{user}/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/nokogiri-1.8.0/ext/nokogiri
/Users/{user}/.fastlane/bin/bundle/bin/ruby -r ./siteconf20170617-41107-1t6unw9.rb extconf.rb
checking if the C compiler accepts ... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/{user}/.fastlane/bin/bundle/bin/$(RUBY_BASE_NAME)
--help
--clean
/Users/{user}/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/{user}/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:571:in `block in try_compile'
from /Users/{user}/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:522:in `with_werror'
from /Users/{user}/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:571:in `try_compile'
from extconf.rb:138:in `nokogiri_try_compile'
from extconf.rb:162:in `block in add_cflags'
from /Users/{user}/.fastlane/bin/bundle/lib/ruby/2.2.0/mkmf.rb:619:in `with_cflags'
from extconf.rb:161:in `add_cflags'
from extconf.rb:407:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/{user}/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/nokogiri-1.8.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/{user}/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/nokogiri-1.8.0 for inspection.
Results logged to /Users/{user}/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/nokogiri-1.8.0/gem_make.out
DEBUG [2017-06-17 11:30:21.36]: uninitialized constant Souyuz
ERROR [2017-06-17 11:30:21.36]: It seems like you wanted to load some plugins, however they couldn't be loaded
ERROR [2017-06-17 11:30:21.36]: Please follow the troubleshooting guide: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/PluginsTroubleshooting.md
...
An error occurred while installing json (2.1.0), and Bundler cannot
continue.
Make sure that `gem install json -v '2.1.0'` succeeds before bundling.
absolute_ipa_path = File.expand_path(::Souyuz::Manager.new.work(values))
I've hit the issue recently that the script is only returning the ipa name rather than the full path.
resulting in IPA can not be found error.
I've worked around the issue like so:
::Souyuz::Manager.new.work(values)
absolute_ipa_path = File.join(values[:output_path], "#{values[:assembly_name]}.ipa")
By default, nokogiri 1.7.0.1 doesn't seem to be able to compile on macOS Sierra.
Here's how I managed to fix it (and get fastlane-plugin-souyuz installed):
brew install libxml2
bundle config build.nokogiri --use-system-libraries --with-xml2-include=$(brew --prefix libxml2)/include/libxml2
bundle install
bundle exec fastlane add_plugin fastlane-plugin-souyuz
Hello,
My project has a android and ios target and I can't find any way to build only one of them - like ios.
It seems that msbuild just builds everything.
Can somebody help me with that ?
Thank you
How does one auto increment the Version Number in an Android / iOS app with souyuz
?
/app.iOS/bin/iPhone/Debug//app_iOSapp.iOS.app.dSYM.zip /app.iOS/bin/iPhone/Debug//app_iOSapp.iOS.app.dSYM
[18:28:27] [Step 5/6] [18:28:27]: ▸ zip warning: name not matched: /app.iOS/bin/iPhone/Debug//app_iOSapp.iOS.app.dSYM
[18:28:27] [Step 5/6] [18:28:27]: ▸ zip error: Nothing to do! (try: zip -r /app.iOS/bin/iPhone/Debug//app_iOSapp.iOS.app.dSYM.zip . -i /app.iOS/bin/iPhone/Debug//app_iOSapp.iOS.app.dSYM)
I just mentioned some weird characters before the build starts:
[19:36:30]: ▸
Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Wed Oct 25 12:26:03 EDT 2017) for Mono
[19:36:30]: ▸ Copyright (C) Microsoft Corporation. All rights reserved.
^[[24;15R[19:36:31]: ▸ Build started 1/29/2018 7:36:31 PM.
When I suppress logging by disabling the CommandExecutor printing, everything looks good.
In my particular case, I need xbuild to have /p:SolutionDir
defined, so that Realm will compile for Android:
realm/realm-dotnet#656
EDIT: My temporary fix is to add a shell script to my Fastfile, then inside the shell script run the xbuild command, adding /p:SolutionDir=$(pwd)/..
to the command. Hope this is easy to fix/implement in souyuz.
To maintain the functionality and quality of this project throughout upcoming changes, we have to add tests.
Currently I am thinking of a good way to do this. I am not quite sure, yet.
Thanks for making this awesome plugin happen! :)
Does anybody know where exactly should the mobile provisioning be placed in order to avoid this error when building iOS via terminal?
"/Users/mircea/Documents/readmatrix-client-xamarin/PressMatrix.sln" (Build target) (1) ->
"/Users/mircea/Documents/readmatrix-client-xamarin/PressMatrix.UI.TestHarness.iOS/PressMatrix.UI.TestHarness.iOS.csproj" (default target) (15) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.Common.targets(646,3): error : Could not find any available provisioning profiles for iOS. [/Users/mircea/Documents/readmatrix-client-xamarin/PressMatrix.UI.TestHarness.iOS/PressMatrix.UI.TestHarness.iOS.csproj]
v0.9.0 seems to have change how the fastlane plugin spec file sets the version, which breaks the plugin entirely:
bundler: failed to load command: fastlane (/Users/vagrant/.rbenv/versions/2.6.3/bin/fastlane)
ArgumentError: Malformed version number string undefined
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/version.rb:212:in `initialize'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/version.rb:203:in `new'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/version.rb:203:in `new'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/plugins/plugin_update_manager.rb:29:in `block in show_update_status'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/plugins/plugin_update_manager.rb:26:in `each'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/plugins/plugin_update_manager.rb:26:in `show_update_status'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:43:in `ensure in start'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/commands_generator.rb:53:in `start'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fastlane-2.137.0/bin/fastlane:23:in `<top (required)>'
/Users/vagrant/.rbenv/versions/2.6.3/bin/fastlane:23:in `load'
/Users/vagrant/.rbenv/versions/2.6.3/bin/fastlane:23:in `<top (required)>'
Downgrading back to v0.8.1 fixes it for now.
Some kind of example config file would be greatly appreciated.
Tried Googling, but haven't found much so far.
EDIT: The wiki has broken links too (https://github.com/voydz/souyuz/wiki)
Are there any plans to switch from xbuild to msbuild?
If not, could you provide an option for using msbuild instead of xbuild?
Xamarin/Mono/etc. are all moving towards msbuild, and from what I've tested it's as simple as replacing xbuild
with msbuild
in the build commands, since the parameters/options are the same.
The zipalign command requires $ANDROID_HOME env variable to be set, we should add an existence-check to prevent "misleading" error messages like in #21: "no implicit conversion of nil into String"
Hi,
is this plugin useful to build Xamarin.Forms projects which contains a core, a .Droid and a .iOS components? Do you have any Fastfile examples or more documentation to understand how can I structure my lanes to build and sign .ipa and .apk apps with specific certificates/provisioning profiles/keystores?
Thank you in advance!
I have separate .apk files for different ABIs i.e.
but souyuz signs only one .apk which is com.xxx..app.apk
$ jarsigner -sigalg MD5withRSA -digestalg SHA1 -storepass "****" -keystore "****" -tsa http://timestamp.digicert.com -signedjar "./src/App.Droid/bin/Release/com.****.app.apk-unaligned" ./src/App.Droid/bin/Release/coml.****.app.apk ****
Is it possible to sign also these two .apks?
Will I be able to build xamarin android projects using fastlane/fastlane-souyuz plugin?
Seeing this error when trying to install the plugin using homebrew version of fast lane:
Error loading plugin 'fastlane-plugin-souyuz': Unable to activate souyuz-0.10.4, because highline-2.0.3 conflicts with highline (~> 1.7)
When using bundler bundle install
and a Gemfile version 0.7.0 of the plugin being resolved Using fastlane-plugin-souyuz 0.7.0
. This breaks builds since that version reverts to using xbuild.
Hi,
Thanks for all your hard work.
Is it possible to add an example fastfile?
Thanks.
Regards,
Hi all,
I am using souyuz plugin to build my Xamarin hybrid apps (I am in a Jenkins CI environment that starts build on a Mac build server with full Visual Studio 2017 installed) choosing between two iOS SDK installed respectively in /Applications/Xcode8.app and /Applications/Xcode9.app directories.
There is a way to change the sdk dir path at build time in the Fastfile or in my pipeline Jenkins or in any other files ? I tried to change the default iOS SDK set in Visual Studio for Mac -> Preferences -> Projects -> SDK Locations -> Apple -> /Applications/Xcode8.app in many ways without success.
Thank's in advance for the help!
I was wondering why my CI builds kept failing, then realized that while they worked fine in Xamarin Studio, they for some reason fail when building with souyuz, most likely due to an issue with .NET Standard libraries.
Could it also be an msbuild vs xbuild issue?
/Library/Frameworks/Mono.framework/Versions/4.8.1/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->
JsonExtensions.cs(13,81): error CS0012: The type `System.Object' is defined in an assembly that is not referenced. Consider adding a reference to assembly `System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
keystore_path: "{PATH_TO_YOUR_KEYSTORE}",
keystore_alias: "{ALIAS_OF_YOUR_KEYSTORE}",
keystore_password: "{YOUR_SUPER_SECRET_KEYSTORE_PASSWORD}"
This plugin only works if the password for the alias is the same as for the store file itself. If the password is different, souyuz just hangs.
While signing, the plugin expect to find apk files
while should give the way to sign aab files if the android project create aab files.
I discovered this when trying to use this plugin in a jenkins environemnt where each job names hapened to contain spaces:
Since the build_command_generator.rb does not quote the path to the project or solution it fails to find the solution or project since you are using absolute paths.
Solution
if config[:solution_path]
solution_dir = File.dirname(config[:solution_path])
options << "-p:SolutionDir=#{solution_dir}/"
end
Project
path << Souyuz.config[:project_path] # if Souyuz.project.android?
As part of my CI flow, I'm running UI tests in the iOS simulator as release builds.
Right now, souyuz isn't compatible with this, as it's trying to create a zip archive for MyApp.dSYM, which naturally doesn't exist for simulator builds.
Question is, is this a bug or a feature, and can I work around it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.