Comments (17)
Hi @GRyabkin,
could you please provide your project, including the fastlane setup, e.g. in form of a zip?
Thanks
from xcframeworks.
@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.
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.
Ohh, this action builds my xcframework
in a folder where the action invoked ignoring xcframework_output_directory
. That's bad
from xcframeworks.
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.
@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.
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.
Is it hard to reproduce your setup in form of a dummy project?
In terms of details, let's step back.
- What version of the fastlane plugin are you currently using?
- What version of Xcode IDE are you using?
- Is the target name that builds your dynamic framework the same as the "product name"?
- Have you tried to not include the product_name parameter in your lane?
- Does the fastlane plugin run fine from the terminal?
- 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.
@bielikb yes, this is a production setup which has many third-party-dependencies, also I have signed NDA.
- 2.160.0
- Version 12.0 (12A7209)
- Yes
- Yes (the same error)
- I run it from the terminal always
- 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.
@bielikb is it something with a default value for config item on line 242 in the file?
from xcframeworks.
@bielikb also looks like -archivePath
for xcodebuild
command doesn't have xcframework_output_directory
appended
from xcframeworks.
@bielikb the error was generated by line 28 in the following file
from xcframeworks.
@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.
@bielikb could it be just fixed by returning a value of @params[:product_name]
after line 9 of the file
from xcframeworks.
@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.
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.
@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)
- Cannot build the final product - No such module 'StaticLibrary' HOT 5
- PRODUCT_NAME was misdefined HOT 3
- Readme xcodebuild syntax issue HOT 1
- `lipo` is not deprecated and the suggestion to not use it is misleading HOT 2
- "No Such Module" while using a XCFramework of a framework that uses CocoaPods
- Help pls with understood how make xcframeowrks?
- I am able to create the framework but have 1GB size for XCFramework.
- S
- Pass SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO to xcodebuild HOT 3
- Add bitcode to XCFramework and not able to run the scrip for creating xcframework HOT 4
- Distributing XCFramework via SPM HOT 3
- Embed XCFramework using Run script phase HOT 12
- A library with the identifier "ios-x86_64-maccatalyst" already exists.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcframeworks.