Giter Site home page Giter Site logo

Comments (17)

bielikb avatar bielikb commented on May 20, 2024

Hi @GRyabkin,
could you please provide your project, including the fastlane setup, e.g. in form of a zip?

Thanks

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb I don't think it's required. The error I receive happens inside fastlane action. I duplicated my issue in their repository

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

I have set Product name in build settings, here's my fastlane config:

  desc "Export xcframework"
  lane :export_xcframework do
    create_xcframework(
      workspace: 'MySDK.xcworkspace',
      scheme: 'MySDK',
      include_bitcode: false,
      destinations: ['iOS'],
      product_name: "MySDK",
      xcframework_output_directory: 'artifacts/MySDK'
    )
  end

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

Ohh, this action builds my xcframework in a folder where the action invoked ignoring xcframework_output_directory. That's bad

from xcframeworks.

bielikb avatar bielikb commented on May 20, 2024

Im owner of both repos, thanks for bringing your issue up. To proceed further I might need to know a little more about your setup.
You can try out the running example right on this repo.
Here's the lane that creates the xcframework and exports it in the dedicated export folder

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb sorry, I can't send you my setup, but I can give you answers to questions if you have them. It's cool that the action works for some basic case

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

I have my Bundle name set as $(PRODUCT_NAME) maybe hardcoding this param helps but it's strange that it's not taken into account.

from xcframeworks.

bielikb avatar bielikb commented on May 20, 2024

Is it hard to reproduce your setup in form of a dummy project?

In terms of details, let's step back.

  1. What version of the fastlane plugin are you currently using?
  2. What version of Xcode IDE are you using?
  3. Is the target name that builds your dynamic framework the same as the "product name"?
  4. Have you tried to not include the product_name parameter in your lane?
  5. Does the fastlane plugin run fine from the terminal?
  6. Could you share the dump of the logs/any additional useful info?

Additionally you're welcome to adjust the functionality of the open sourced plugin, in that case, please follow the contribution guideline

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb yes, this is a production setup which has many third-party-dependencies, also I have signed NDA.

  1. 2.160.0
  2. Version 12.0 (12A7209)
  3. Yes
  4. Yes (the same error)
  5. I run it from the terminal always
  6. The end looks like this (names are removed):
[20:35:17]: --------------------------------
[20:35:17]: --- Step: create_xcframework ---
[20:35:17]: --------------------------------
[20:35:17]: Overwriting SKIP_INSTALL and BUILD_LIBRARY_FOR_DISTRIBUTION options
[20:35:17]: For a more detailed xcodebuild log open /Users/mypc/Library/Logs/fastlane/xcbuild/2020-11-02/70589/xcodebuild.log
[20:35:17]: $ set -o pipefail && xcodebuild -workspace "MySDK.xcworkspace" -scheme "MySDK" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES -destination "generic/platform=iOS" -archivePath "0_MySDK.xcarchive" archive | tee '/Users/mypc/Library/Logs/fastlane/xcbuild/2020-11-02/70589/xcodebuild.log' | xcpretty --color --simple
...
[20:40:10]: ▸ Archive Succeeded
[20:40:10]: For a more detailed xcodebuild log open /Users/mypc/Library/Logs/fastlane/xcbuild/2020-11-02/70589/xcodebuild.log
[20:40:10]: $ set -o pipefail && xcodebuild -workspace "MySDK.xcworkspace" -scheme "MySDK" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES -destination "generic/platform=iOS Simulator" -archivePath "1_MySDK.xcarchive" archive | tee '/Users/mypc/Library/Logs/fastlane/xcbuild/2020-11-02/70589/xcodebuild.log' | xcpretty --color --simple
....
[20:45:21]: ▸ Archive Succeeded
+------------------------------+------------------------+
|                     Lane Context                      |
+------------------------------+------------------------+
| DEFAULT_PLATFORM             | ios                    |
| PLATFORM_NAME                | ios                    |
| LANE_NAME                    | ios export_xcframework |
| XCODEBUILD_DERIVED_DATA_PATH |                        |
| XCODEBUILD_ARCHIVE           | 1_MySDK.xcarchive |
+------------------------------+------------------------+
[20:45:21]: ▸ PRODUCT_NAME was misdefined: `MySDK`. Please, provide :product_name option

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying fastlane version          | 0           |
| 2    | default_platform                    | 0           |
| 3    | update_fastlane                     | 0           |
| 4    | Switch to ios preconditions lane    | 0           |
| 5    | cocoapods                           | 22          |
| 6    | (cd ../../custom && ./custom_script.sh) | 8           |
| 💥   | create_xcframework                  | 603         |
+------+-------------------------------------+-------------+

[20:45:21]: fastlane finished with errors

[!] ▸ PRODUCT_NAME was misdefined: `MySDK`. Please, provide :product_name option

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb is it something with a default value for config item on line 242 in the file?

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb also looks like -archivePath for xcodebuild command doesn't have xcframework_output_directory appended

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb the error was generated by line 28 in the following file

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb I would like to contribute. Do you happen to share some guides on how to test the action without deploying to the Fastlane repository?

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb could it be just fixed by returning a value of @params[:product_name] after line 9 of the file

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

@bielikb today I had more time to test out your sample and compare the build settings of your sample and my framework. Well, I have figured out what was the cause of the problem. Installation directory of the framework I build was set to /Applications but in your sample $(LOCAL_LIBRARY_DIR)/Frameworks. This path used by xcodebuild create_xcframework to search for resulting binaries for combining.

I am happy I have resolved the issue, I should start to investigate your sample before digging into your code. Sorry, I did it in the late evening.

from xcframeworks.

hrabkin avatar hrabkin commented on May 20, 2024

Also, your script has a small issue: it places xcarchives at building time in the root project directory instead of output directory, and when the script succeeds copies them but if it fails they are left in the root directory.

from xcframeworks.

bielikb avatar bielikb commented on May 20, 2024

@GRyabkin Grand! Happy to hear your issue got resolved.
Ill cover the issue around xcarchives in one of the following releases ;)

from xcframeworks.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.