You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Christopher Wyllie (JIRA)" <ji...@apache.org> on 2018/05/23 10:33:00 UTC
[jira] [Commented] (CB-14057) cordova build command fails when
including FBSDK pods
[ https://issues.apache.org/jira/browse/CB-14057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16487056#comment-16487056 ]
Christopher Wyllie commented on CB-14057:
-----------------------------------------
Hi!
We are seeing a very similar issue to this with our SDK plugin. We recently updated the plugin to depend on our native SDK from CocoaPods (KumulosSdkObjectiveC), which in turn depends on a couple of other pods.
When installing and building, we also see errors finding headers of our SDK dependencies (AFNetworking for example).
Our SDK includes these headers with `#import <AFNetworking/AFNetworking.h>`, and we also note in the verbose build output that the headers include path seems incorrect: `-I/Users/cgwyllie/Projects/CordovaTesting/platforms/ios/Pods/Pods/Headers/Private` (note the `Pods/Pods` path).
In our search around this issue, we encountered some possibly related issue reports (including this one):
* [https://github.com/CocoaPods/CocoaPods/issues/6767#issuecomment-312583478]
* [https://github.com/OneSignal/OneSignal-Cordova-SDK/issues/264]
We can build successfully if we manually modify the pod's Target Support/*.xcconfig files to set HEADER_SEARCH_PATHS with the $SRCROOT variable instead of $PODS_ROOT as outlined in the linked CocoaPods issue. Obviously this isn't ideal and we'd rather not need to modify the platforms directory.
Maybe this suggests that $SRCROOT is getting overwritten with $PODS_ROOT at some point during the build.
We're keen to resolve this issue as soon as possible, how can we help?
Thanks,
Chris
---
cordova-ios 4.4.0, 4.5.0, 4.5.2, 4.5.4
cordova --version
8.0.0
xcodebuild -version
Xcode 9.3.1
Build version 9E501
pod --version
1.5.2
macOS
10.13.4
> cordova build command fails when including FBSDK pods
> -----------------------------------------------------
>
> Key: CB-14057
> URL: https://issues.apache.org/jira/browse/CB-14057
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-ios
> Affects Versions: cordova-ios@4.5.4
> Reporter: Chris Williams
> Assignee: Suraj Pindoria
> Priority: Minor
>
> Including the FBSDK as a pod causes the build to fail using the command line.
> Building with Xcode still works.
>
> Command that fails:
> cordova build ios --release
> Error Message:
> 'Bolts/BFAppLink.h' file not found
> #import <Bolts/BFAppLink.h>
>
> The plugin includes the FBSDK as:
> <framework src="FBSDKCoreKit" type="podspec" spec="4.32.0" />
> <framework src="FBSDKLoginKit" type="podspec" spec="4.32.0" />
> <framework src="FBSDKShareKit" type="podspec" spec="4.32.0" />
> The PodFile looks like:
> # DO NOT MODIFY -- auto-generated by Apache Cordova
> platform :ios, '8.0'
> target 'MegaFameCasino' do
> project 'MegaFameCasino.xcodeproj'
> pod 'FBSDKCoreKit', '4.32.0'
> pod 'FBSDKLoginKit', '4.32.0'
> pod 'FBSDKShareKit', '4.32.0'
> end
>
> The FBSDKCoreKit pod depends on the Bolts pod and includes header files from it.
> ----------------------------------------------------------------------------------------------
> I think there may be some sort of issue with the ${SRCROOT} variable in xcodebuild or
> something cordova is doing that I couldn't find
> Looking at the commands run by xcodebuild, the include paths are getting set as ios/Pods/Pods/xxxx
> I assume this is incorrect
> -I/project-path/platforms/ios/Pods/Pods/Headers/Public/Bolts
> If I go into "platforms/ios/Pods/Target Support Files/Pods/MegaFameCasino/Pods-MegaFameCasino.release.xcconfig"
> and remove the trailing /Pods from PODS_ROOT:
> PODS_ROOT = ${SRCROOT}/Pods ----> PODS_ROOT = ${SRCROOT}
> then the includes look correct:
> -I/project-path/platforms/ios/Pods/Headers/Public/Bolts
>
> Doing this gets the build further down past the pods, but it will then fail later at
> diff: /project-path/platforms/ios/Manifest.lock: No such file or directory
> error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
>
>
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org