使用use_frameworks通过CocoaPods安装ScoutMaps SDKTools

时间:2015-10-08 09:32:36

标签: ios cocoapods skmaps

我有一个Swift应用程序,除了两个ScoutMaps pod之外还使用Alamofire和SwiftyJSON。

目前我手动包含Alamofire和SwiftyJSON,并通过Cocoapods安装ScoutMaps,但我也希望通过Cocoapods切换到包含它们。为此,我需要启用use_frameworks! podfile中的标志。但是,这会导致

我的新podfile如下所示:

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '8.0'
use_frameworks!

pod 'ScoutMaps-iOS-SDK'
pod 'ScoutMaps-iOS-SDKTools'
pod 'Alamofire'
pod 'SwiftyJSON'

然而,当我尝试构建应用程序时,我收到以下错误

SKTDownloadObjectHelper.m:8:9: 'AFNetworking.h' file not found with <angled> include; use "quotes" instead

编辑该文件以使用"AFNetworking.h"<AFNetworking/AFNetworking.h>然后会导致一系列链接器错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_AFHTTPRequestSerializer", referenced from:
      objc-class-ref in SKTDownloadObjectHelper.o
  "_OBJC_CLASS_$_AFNetworkReachabilityManager", referenced from:
      objc-class-ref in SKTDownloadManager.o
  "_OBJC_CLASS_$_SKAdvisorSettings", referenced from:
      objc-class-ref in SKTNavigationManager+Factories.o
  "_OBJC_CLASS_$_SKAnimationSettings", referenced from:
      objc-class-ref in SKTNavigationManager+UI.o
  "_OBJC_CLASS_$_SKAnnotation", referenced from:
      objc-class-ref in SKTNavigationManager+UI.o
  "_OBJC_CLASS_$_SKMapView", referenced from:
      objc-class-ref in SKTNavigationManager+Styles.o
  "_OBJC_CLASS_$_SKMapViewStyle", referenced from:
      objc-class-ref in SKTNavigationConfiguration.o
  "_OBJC_CLASS_$_SKMapsService", referenced from:
      objc-class-ref in SKTDownloadManager+Additions.o
      objc-class-ref in SKTDownloadObjectHelper.o
  "_OBJC_CLASS_$_SKNavigationSettings", referenced from:
      objc-class-ref in SKTNavigationManager.o
  "_OBJC_CLASS_$_SKPositionerService", referenced from:
      objc-class-ref in SKTNavigationManager+BackgroundMode.o
      objc-class-ref in SKTNavigationManager+Factories.o
      objc-class-ref in SKTNavigationManager+NavigationState.o
      objc-class-ref in SKTNavigationManager+UI.o
      objc-class-ref in SKTNavigationManager.o
      objc-class-ref in SKTNavigationUtils.o
  "_OBJC_CLASS_$_SKReverseGeocoderService", referenced from:
      objc-class-ref in SKTNavigationUtils.o
  "_OBJC_CLASS_$_SKRouteSettings", referenced from:
      objc-class-ref in SKTNavigationManager+Factories.o
  "_OBJC_CLASS_$_SKRoutingService", referenced from:
      objc-class-ref in SKTNavigationManager+BackgroundMode.o
      objc-class-ref in SKTNavigationManager+NavigationState.o
      objc-class-ref in SKTNavigationManager+Settings.o
      objc-class-ref in SKTNavigationManager+Styles.o
      objc-class-ref in SKTNavigationManager+UI.o
      objc-class-ref in SKTNavigationManager.o
  "_OBJC_CLASS_$_SKTrailSettings", referenced from:
      objc-class-ref in SKTNavigationManager.o
  "_OBJC_CLASS_$_SKVisualAdviceConfiguration", referenced from:
      objc-class-ref in SKTNavigationManager+Factories.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

现在我已经恢复了旧的做事方式,但有没有人有任何建议让ScoutMaps-iOS-SDKTools与use_frameworks一起玩球?

0 个答案:

没有答案