4

I am trying to compile an existing xcode project written in swift. The project uses Alamofire. I installed xcode 8 beta and opened the project. There were many errors with Alamofire which I learned need to be updated to version 3.2.1.

I edited my Podfile and fixed the version number then ran pod update alamofire. Instead of only updating Alomfire, every pod was updated. This is apparently a bug.

The Podfile contains the directive use_frameworks! After updating the pods, the pods/headers directory was completely empty, without either Public or Private directories and the project failed to build with 356 missing file errors.

Changing the build search settings for ALWAYS_SEARCH_USER_PATHS to no (or yes) in accordance with a recommendation here https://github.com/CocoaPods/CocoaPods/issues/4605#issuecomment-208822149 then deleting the pods and running pod install again did nothing.

There are a number of different questions on stackoverflow asking the same question with no answers. Here is a list of the ones I can find.

Pods/Headers empty after pod install

Empty Pod Headers Folder after `pod install`

After pod install Public folder is empty

From Pods-Myproject.debug.xconfig

EMBEDDED_CONTENT_CONTAINS_SWIFT = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking" "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" "$PODS_CONFIGURATION_BUILD_DIR/Bolts-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/CocoaLumberjack" "$PODS_CONFIGURATION_BUILD_DIR/DBAlertController-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatterValueTransformer" "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD" "$PODS_CONFIGURATION_BUILD_DIR/RESideMenu-iOS8.0" "$PODS_CONFIGURATION_BUILD_DIR/RKValueTransformers" "$PODS_CONFIGURATION_BUILD_DIR/RestKit" "$PODS_CONFIGURATION_BUILD_DIR/SOCKit" "$PODS_CONFIGURATION_BUILD_DIR/TransitionKit" "$PODS_CONFIGURATION_BUILD_DIR/iCarousel-iOS8.0" "${PODS_ROOT}/Crashlytics/iOS" "${PODS_ROOT}/Fabric/iOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/Crashlytics" "${PODS_ROOT}/Headers/Public/Fabric"
LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AFNetworking/AFNetworking.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Alamofire/Alamofire.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Bolts-iOS8.0/Bolts.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/CocoaLumberjack/CocoaLumberjack.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/DBAlertController-iOS8.0/DBAlertController.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSDKCoreKit-iOS8.0/FBSDKCoreKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/FBSDKLoginKit-iOS8.0/FBSDKLoginKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ISO8601DateFormatterValueTransformer/ISO8601DateFormatterValueTransformer.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/MBProgressHUD/MBProgressHUD.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RESideMenu-iOS8.0/RESideMenu.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RKValueTransformers/RKValueTransformers.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/RestKit/RestKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/SOCKit/SOCKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/TransitionKit/TransitionKit.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/iCarousel-iOS8.0/iCarousel.framework/Headers" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/Crashlytics" -isystem "${PODS_ROOT}/Headers/Public/Fabric"
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"z" -framework "AFNetworking" -framework "Alamofire" -framework "Bolts" -framework "CocoaLumberjack" -framework "Crashlytics" -framework "DBAlertController" -framework "FBSDKCoreKit" -framework "FBSDKLoginKit" -framework "Fabric" -framework "ISO8601DateFormatterValueTransformer" -framework "MBProgressHUD" -framework "RESideMenu" -framework "RKValueTransformers" -framework "RestKit" -framework "SOCKit" -framework "Security" -framework "SystemConfiguration" -framework "TransitionKit" -framework "UIKit" -framework "iCarousel"
OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS"
PODS_BUILD_DIR = $BUILD_DIR
PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}/Pods

I really need to find a solution to this problem so I would be grateful if anybody can answer this question.

Community
  • 1
  • 1
markhorrocks
  • 1,199
  • 19
  • 82
  • 151

2 Answers2

2

git add -A followed by Product -> Clean removed all errors except Alamofire.

markhorrocks
  • 1,199
  • 19
  • 82
  • 151
0

When you want to update a particular POD, you run pod update PODNAME as given in the Docs. I suggest you delete all the pods and run pod install with the latest version of Alamofire.

Mtoklitz113
  • 3,828
  • 3
  • 21
  • 40
  • I did that but as stated above it did not ONLY install the named pod it updated all pods. Further, it did not write new header files to pods/headers it emptied pods/headers. Neither pod install or pod update would write the header files. – markhorrocks Jun 28 '16 at 11:02
  • Are you sure you're using the Pods.xconfig in your project? – Mtoklitz113 Jun 28 '16 at 11:09
  • No, where and how to use that file? – markhorrocks Jun 28 '16 at 11:22
  • Select your project file, then select it in the second pane again and open the Info section in the third pane. Under configurations you should select Pods.xcconfig for each configurations requiring your installed pods. – Mtoklitz113 Jun 28 '16 at 11:23
  • I am a noob to xcode and swift. Which file is my project file? I am unable to find any file with the extension xconfig. Can you tell me which directory to find it please? – markhorrocks Jun 28 '16 at 11:59
  • Might I suggest an easy alternative for pods? Why don't you use [Carthage](https://github.com/Carthage/Carthage). Things will be really easy if you use this dependency manager. Though if you insist on using cocoapods, I'll try helping but carthage is easier to handle. – Mtoklitz113 Jun 28 '16 at 12:07
  • I am part of a team so need to work with cocoapods. There are 4 xconfig files listed in the project dir after deleting Pods and running pod install but the Pods/Headers dir is empty.; I very much appreciate your help. – markhorrocks Jun 28 '16 at 12:12
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/115841/discussion-between-markhorrocks-and-dershowitz123). – markhorrocks Jun 28 '16 at 12:20