-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift Static Libraries causing build error only with cordova build command (works fine in Xcode UI) #617
Comments
Any updates on this issue? |
No, as you can see there are not comments or other changes. Your issue doesn't show any errors in "The Project compiles with the below error:" by the way. |
@janpio, Sorry for that. I will add more details. Looks like there is a path issue when using the xcodebuild command vs the Xcode UI. I know Xcode UI uses the xcodebuild command to build the project, however I am not sure why the path gets resolved when using the Xcode UI and throws error when using the xcodebuild command. |
@janpio, I have updated the issue which reflects the error which I am facing and added additional information. |
Thanks, that might give an user or contributor that knows more about Swift/Pods/iOS something to go on. |
It's probably due to this CocoaPods bug: CocoaPods/CocoaPods#10675 (which has been sitting there for 1 year, so I'm not sure how long before, or if, it will be fixed... A workaround would be to run xcodebuild without a |
Not sure how far this will get you, or if you can unset So if something expects a specific build directory, then in theory you should be able to set it to the expected value. I don't know if this will cause any other unwanted side effects however. |
this aims to fix apache#659 and apache#617
this aims to fix apache#659 and apache#617
Once upon a time, Xcode's default directory values had issues when there were spaces in project names, so we override the CONFIGURATION_BUILD_DIR and SHARED_PRECOMPS_DIR variables with our own paths. However, this can interfere with Cocoapods, and Xcode should be able to handle things sensibly nowadays. Unfortunately, that results in our build artifacts living somewhere in a randomly-named Xcode DerivedData directory, and then we can't do things like run the app in a simulator or on a device because we don't know the path to it. Setting SYMROOT allows us to control the output directory of the built products, with the caveat that Xcode always creates a subdirectory named with the current configuration. So instead of `build/emulator`, we'll have `build/Debug-iphonesimulator` and instead of `build/device`, we'll have `build/Release-iphoneos`. Hypothetically this is better because now we are sure that debug and release files never get mixed up in the same output directory. The downside is that this is a breaking change because it alters the path for the output .ipa files. Closes apache#617. Closes apache#659. Closes apache#671. Co-Authored-By: Susan Tan <[email protected]>
Once upon a time, Xcode's default directory values had issues when there were spaces in project names, so we override the CONFIGURATION_BUILD_DIR and SHARED_PRECOMPS_DIR variables with our own paths. However, this can interfere with Cocoapods, and Xcode should be able to handle things sensibly nowadays. Unfortunately, that results in our build artifacts living somewhere in a randomly-named Xcode DerivedData directory, and then we can't do things like run the app in a simulator or on a device because we don't know the path to it. Setting SYMROOT allows us to control the output directory of the built products, with the caveat that Xcode always creates a subdirectory named with the current configuration. So instead of `build/emulator`, we'll have `build/Debug-iphonesimulator` and instead of `build/device`, we'll have `build/Release-iphoneos`. Hypothetically this is better because now we are sure that debug and release files never get mixed up in the same output directory. The downside is that this is a breaking change because it alters the path for the output .ipa files. Closes apache#617. Closes apache#659. Closes apache#671. Co-Authored-By: Susan Tan <[email protected]>
Once upon a time, Xcode's default directory values had issues when there were spaces in project names, so we override the CONFIGURATION_BUILD_DIR and SHARED_PRECOMPS_DIR variables with our own paths. However, this can interfere with Cocoapods, and Xcode should be able to handle things sensibly nowadays. Unfortunately, that results in our build artifacts living somewhere in a randomly-named Xcode DerivedData directory, and then we can't do things like run the app in a simulator or on a device because we don't know the path to it. Setting SYMROOT allows us to control the output directory of the built products, with the caveat that Xcode always creates a subdirectory named with the current configuration. So instead of `build/emulator`, we'll have `build/Debug-iphonesimulator` and instead of `build/device`, we'll have `build/Release-iphoneos`. Hypothetically this is better because now we are sure that debug and release files never get mixed up in the same output directory. The downside is that this is a breaking change because it alters the path for the output .ipa files. Closes apache#617. Closes apache#659. Closes apache#671. Co-Authored-By: Susan Tan <[email protected]>
Once upon a time, Xcode's default directory values had issues when there were spaces in project names, so we override the CONFIGURATION_BUILD_DIR and SHARED_PRECOMPS_DIR variables with our own paths. However, this can interfere with Cocoapods, and Xcode should be able to handle things sensibly nowadays. Unfortunately, that results in our build artifacts living somewhere in a randomly-named Xcode DerivedData directory, and then we can't do things like run the app in a simulator or on a device because we don't know the path to it. Setting SYMROOT allows us to control the output directory of the built products, with the caveat that Xcode always creates a subdirectory named with the current configuration. So instead of `build/emulator`, we'll have `build/Debug-iphonesimulator` and instead of `build/device`, we'll have `build/Release-iphoneos`. Hypothetically this is better because now we are sure that debug and release files never get mixed up in the same output directory. The downside is that this is a breaking change because it alters the path for the output .ipa files. Closes apache#617. Closes apache#659. Closes apache#671. Co-Authored-By: Susan Tan <[email protected]>
Once upon a time, Xcode's default directory values had issues when there were spaces in project names, so we override the CONFIGURATION_BUILD_DIR and SHARED_PRECOMPS_DIR variables with our own paths. However, this can interfere with Cocoapods, and Xcode should be able to handle things sensibly nowadays. Unfortunately, that results in our build artifacts living somewhere in a randomly-named Xcode DerivedData directory, and then we can't do things like run the app in a simulator or on a device because we don't know the path to it. Setting SYMROOT allows us to control the output directory of the built products, with the caveat that Xcode always creates a subdirectory named with the current configuration. So instead of `build/emulator`, we'll have `build/Debug-iphonesimulator` and instead of `build/device`, we'll have `build/Release-iphoneos`. Hypothetically this is better because now we are sure that debug and release files never get mixed up in the same output directory. The downside is that this is a breaking change because it alters the path for the output .ipa files. Closes #617 Closes #659 Closes #671 Co-authored-by: Susan Tan <[email protected]>
Bug Report
Problem
Can't compile a project which has Pod distributed as Swift Static Library.
What is expected to happen?
The Project should compile without any errors
What does actually happen?
The Project compiles with the below error:
Information
I am trying to run the example app in here.
The
-fmodule-map-file
flag has two different path'sxcodebuild
Xcode UI
Command or Code
Environment, Platform, Device
iOS 10.0 or higher
iPhone 7
Version information
cordova-ios 5.0.1
cordova-cli latest
Checklist
The text was updated successfully, but these errors were encountered: