flurry / unity-flurry-sdk

Unity plugin for Flurry SDK
Apache License 2.0
25 stars 5 forks source link

ios build issue on windows platform #24

Open Bonbeart opened 1 year ago

Bonbeart commented 1 year ago

1.

Since my main PC is Windows, I build the build in two steps:

  1. exporting (Build) the project from Unity to Xcode on Windows PC
  2. Building the project in Xcode itself on MacOs.

But Flurry SDK gives an error when building - thinking that the build is happening on MacOS, although I'm building the project for iOS itself on Windows.

ArgumentNullException: Value cannot be null.
Parameter name: path1
System.IO.Path.Combine (System.String path1, System.String path2) (at <75633565436c42f0a6426b33f0132ade>:0)
FlurrySDK.Editor.ShellCommand.AppendingHome (System.String path) (at Assets/Plugins/iOS/Editor/FlurryCommandRunner.cs:25)
FlurrySDK.Editor.ShellCommand.AddPossibleRubySearchPaths () (at Assets/Plugins/iOS/Editor/FlurryCommandRunner.cs:29)
FlurrySDK.Editor.PodInstalling.OnPostprocessBuild (UnityEditor.BuildTarget target, System.String path) (at Assets/Plugins/iOS/Editor/FlurryPodInstalling.cs:45)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <75633565436c42f0a6426b33f0132ade>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

image


Platform: Windows / MacOS Unity: 2021.3.16f1 SDK: Flurry SDK 6.0.0

Bonbeart commented 1 year ago

2.

I also see that because of this error the process is interrupted and some code is no longer processed: 66. // add xcframeworks to UnityFramework "Link binary with libraries"

Accordingly, the required dependencies will not be added to the project.

It would be good to add a check, so that pod install will run only on a MacOS device.

image

Bonbeart commented 1 year ago

3.

The method that looks for ruby locations - will not detect it if it was installed with homebrew.

FlurryCommandRunner.cs

        internal static void AddPossibleRubySearchPaths() {
            AddSearchPath(AppendingHome(".rbenv/shims"));
            AddSearchPath(AppendingHome(".rvm/scripts/rvm"));
            AddSearchPath("/usr/local/bin/");
        }

gem env (after brew install ruby)

RubyGems Environment:
  - RUBYGEMS VERSION: 3.3.26
  - RUBY VERSION: 3.1.3 (2022-11-24 patchlevel 185) [x86_64-darwin20]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/3.1.0
  - USER INSTALLATION DIRECTORY: /Users/mac/.local/share/gem/ruby/3.1.0
  - RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
  - GIT EXECUTABLE: /usr/local/bin/git
  - EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/3.1.0/bin
  - SPEC CACHE DIRECTORY: /Users/mac/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/3.1.3/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-darwin-20
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/3.1.0
     - /Users/mac/.local/share/gem/ruby/3.1.0
     - /usr/local/Cellar/ruby/3.1.3/lib/ruby/gems/3.1.0
Bonbeart commented 1 year ago

However, the project runs without any problems and flurry analytics - works