Comments (24)
@erisu looks like your PR was merged 👍
I've confirmed this fixes the problem for me as well. It's merged to master, but not 4.5.x branch. Do we know what the release schedule is for the next ios platform version?
If 4.5.6 - I think this should be merged to that branch also.
If 4.6 with a new branch from master, then it will be included without additional merging.
In the meantime:
- I've downloaded the raw file as ios-updated-build.js in root of my project
- verified it's the only diff from the current default 4.5.5 ios version
- added a resource-file line to my config.xml under ios platform and that's got my local project building again
<platform name="ios">
<resource-file src="ios-updated-build.js" target="../../cordova/lib/build.js" />
...
from cordova-ios.
Confirmed it with plugin cordova-plugin-firebase-messaging
:
/Users/shaz/Desktop/foo/platforms/ios/Pods/FirebaseCore/Firebase/Core/FIRLogger.m:18:9: fatal error:
'GoogleUtilities/GULAppEnvironmentUtil.h' file not found
#import <GoogleUtilities/GULAppEnvironmentUtil.h>
Doesn't build with cordova build
but builds properly with the workspace.
from cordova-ios.
@jpgilchrist I just submitted a PR but will finalize tomorrow.
What I mean by removing
, as I said previously, I only commented out the xcconfig
option that is declared in the build.js
You can see the changes here: #398
from cordova-ios.
#398 has been released in [email protected]
.
from cordova-ios.
@shazron sorry I was on vacation. So what is the recommended course of action? Is it safe to build w/o the xcconfig defined in Cordova? Or will there be issues with that? I really can't afford to build/export this thing manually from xcode each time.
from cordova-ios.
Hello
I am using cordova-plugin-firebase-dynamiclinks. During the build process, I ran into the problem described in this issue. After fix build.js
build was success.
But If I run application via dynamic link I get error. Please see image below
Perhaps error is related to this issue
from cordova-ios.
Also weird side note, I had to add a run_pods.sh script to get things to work as well...
<hook src="run_pods.sh" type="after_platform_add" />
#!/usr/bin/env bash
pod install --project-directory='./platforms/ios'
touch run_pods_exec
from cordova-ios.
hi @jpgilchrist, thanks for the report. Is there a plugin that we can use to repro the issue and investigate? So that we will be on the same page. Thanks!
from cordova-ios.
In the command line build:
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/FirebaseAnalytics/Frameworks" "${PODS_ROOT}/FirebaseInstanceID/Frameworks" "${PODS_ROOT}/GoogleAppMeasurement/Frameworks"
I manually checked the paths referenced, and I couldn't find GoogleUtilities.framework
in there, so that is partially the root of the problem.
from cordova-ios.
HEADER_SEARCH_PATHS = $(inherited) ${PODS_ROOT}/Firebase/CoreOnly/Sources "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Firebase" "${PODS_ROOT}/Headers/Public/FirebaseAnalytics" "${PODS_ROOT}/Headers/Public/FirebaseCore" "${PODS_ROOT}/Headers/Public/FirebaseInstanceID" "${PODS_ROOT}/Headers/Public/FirebaseMessaging" "${PODS_ROOT}/Headers/Public/GoogleUtilities" "${PODS_ROOT}/Headers/Public/Protobuf" "${PODS_ROOT}/Headers/Public/nanopb"
Note that the search paths are all for Public
headers, when <GoogleUtilities/GULAppEnvironmentUtil.h>
is a Private
header.
from cordova-ios.
The right Headers
folder is sent, even the Private
one, when the file is compiled. However, the path is wrong(!), it duplicates Pods
. i.e. -I/Users/shaz/Desktop/foo/platforms/ios/Pods/Pods/Headers/Private
from cordova-ios.
The duplicate Pods
is the only difference I can see, when viewing the log for compiling the same file (where the error occurs) on the command line vs Xcode.
Found another bug: when I switched command line tools to Xcode 10 beta 4, it seemed to build (no errors) but I don't think it actually built anything (no build artifacts) and may have failed silently because of a config issue.
from cordova-ios.
Found this duplicate issue: https://issues.apache.org/jira/browse/CB-14057
from cordova-ios.
I'm also seeing these same issues with Cordova 8.0.0, XCode 9.4.1, Pod version 1.5.3. Works fine from inside the XCode UI. Fails no matter what I do when trying to run it via cordova build, etc.
Been stuck on this issue for several days now. Is there any known workaround?
Also has to do with GoogleUtilities/GULAppEnvironmentUtil.h not being found.
from cordova-ios.
I was able to find a workaround which involves bypassing cordova for now:
Reconstruct the command being passed to xcodebuild from cordova, you can see the list of arguments passed in at the bottom of the stack trace, but remove the -xcconfig argument altogether. (Based on this comment)
Your command should look something like this:
EDIT: See next comment for full details
Replace YourProjectName with your project name, and note that the ... paths should be your actual paths
from cordova-ios.
I did quite a bit more exploring and was able to successfully get an IPA exported with the following process:
Step 1: Build the app and archive using the following command
xcodebuild clean build -workspace YourApp.xcworkspace -scheme YourApp -configuration Debug -destination generic/platform=iOS -archivePath .../YourApp.xcarchive archive CONFIGURATION_BUILD_DIR=.../cordova/platforms/ios/build/device SHARED_PRECOMPS_DIR=.../cordova/platforms/ios/build/sharedpch EMBEDDED_CONTENT_CONTAINS_SWIFT=YES ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO LD_RUNPATH_SEARCH_PATHS="@executable_path/Frameworks"
Step 2: Create a ExportOptions.plist file with the following information:
<?xml version="1.0" encoding="UTF-8"?>
<!--
https://www.matrixprojects.net/p/xcodebuild-export-options-plist/
-->
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
<key>provisioningProfiles</key>
<dict>
<key>YOUR.BUNDLE.ID</key>
<string>PROVISIONING_PROFILE_UUID OR XCODE NAME</string>
</dict>
<key>method</key>
<string>ad-hoc OR app-store OR enterprise OR development</string>
<key>uploadSymbols</key>
<true/>
</dict>
</plist>
Step 3: Export the archive to build the IPA
xcodebuild -exportArchive -archivePath .../SmartPiggy.xcarchive -exportPath $(EXPORT_PATH) -exportOptionsPlist .../ExportOptions.plist
from cordova-ios.
(Use ``` to format XML)
from cordova-ios.
I believe @erisu had run into a similar build issue where removing -xcconfig
fixed the problem, but I thought he was testing against Xcode beta and I don't know if his attempt involved CocoaPods. He was trying to make a minimal reproducible test case to investigate further, so CC'ing him in case this issue provides some additional details.
from cordova-ios.
@jonathanrevell yes I have deduced the same thing and @dpogue is correct it's something to do with the -xcconfig but no one really knows what. The trouble I'm finding is that no one seems to know if it's a crodova issue or an xcodebuild issue, but it seems people are learning towards an xcodebuild issue.
I too am still waiting on a decent solution. I really don't want to change all of my automated build scripts because of this issue.
from cordova-ios.
Lucky me I'm in the process of writing my build scripts for the first time and was tearing my hair out wondering what I did wrong with them only to find out there's some sort of cordova-xcodebuild bug right now. So I'm just going to be using xcodebuild straight up for the time being until the root cause is diagnosed and fixed.
I'm happy to at least have found a workaround so I can automate things in the meantime because I do not want to manually build these things all the time. 🤷🏼♂️
from cordova-ios.
@dpogue The beta issue was something different.
In one of my environments that builds for iOS with CocoaPods, I had also seen the CocoaPods issue. In that environment, I had also completely removed the the xcconfig
flag. Apps continued to build successfully for iOS with CocoaPods after this change.
Since the xcconfig
is applied for entire project's workspace, during code signing step, it tries to signing the libraries that were imported by CocoaPods. This caused the build to error.
from cordova-ios.
@erisu WRT your comment "I had also completely removed the xcconfig flag"... how did you do this? I, too, would like to get my scripts back in working order. I would guess you just bypassed cordova build ios
and ran xcodebuild
directly?
from cordova-ios.
@erisu looks like your PR was merged 👍
from cordova-ios.
@erisu looks like your PR was merged 👍
I've confirmed this fixes the problem for me as well. It's merged to master, but not 4.5.x branch. Do we know what the release schedule is for the next ios platform version?
If 4.5.6 - I think this should be merged to that branch also.
If 4.6 with a new branch from master, then it will be included without additional merging.In the meantime:
- I've downloaded the raw file as ios-updated-build.js in root of my project
- verified it's the only diff from the current default 4.5.5 ios version
- added a resource-file line to my config.xml under ios platform and that's got my local project building again
<platform name="ios"> <resource-file src="ios-updated-build.js" target="../../cordova/lib/build.js" /> ...
this may help other this is the file to download
/bin/templates/scripts/cordova/lib/build.js
from cordova-ios.
Related Issues (20)
- Please remove org_apache_cordova_UIView_Extension because it isn't necessary since iOS 8.
- SplashScreen not loading on [email protected] HOT 8
- Cannot run new iOS app since latest upgrade HOT 18
- Trouble to open Instagram App HOT 2
- Any alternative to CDVCommandDelegateImpl which is removed from public classes? HOT 6
- [Next Major] Delete bin/cordova_plist_to_config_xml script
- Several template project bin scripts are broken
- Add preferences to config.xml to control which are the "Supported Destinations"
- Issue with `<privacy-manifest>` and `cordora prepare ios` HOT 3
- The CDVURLProtocol no longer exists, so how should we modify the interception? HOT 3
- The startURLSchemeTask method in CDVURLSchemeHandler was not executed HOT 2
- Copy deployment-target from root config.xml to platform-specific config.xml before usage in Podfile HOT 5
- WKWebViewConfiguration is always ignored
- Missing API declaration on iOS app submission to App Store HOT 5
- CDVPlugin's viewController should just be a CDVViewController
- CDVWebViewUIDelegate should take a CDVViewController
- Cordova ios 7.1.0 - Build failed with "Command failed with exit code 65" HOT 4
- Several version checks fail after cordova-ios platform add [email protected] HOT 2
- Target Identity info missing Display Name, Version, Build HOT 1
- plugin_not_installed errors after upgrading from 6.3.0 HOT 7
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 cordova-ios.