簡體   English   中英

ios圖表:無法將庫導入到新項目

[英]ios-charts: unable to import library to a new project

我無法將iOS圖表項目 /庫集成自定義項目中。

這是我要做的步驟:

  • 在Xcode上打開演示應用程序
  • 在原始演示代碼中找到圖表庫

在此處輸入圖片說明

  • 單擊在Finder中顯示,然后將項目復制到新項目
  • 新項目現在有2個目標。 我檢查包含視圖(ChartIn)的目標是否確實鏈接到庫。 是的
  • 我編譯庫(在新項目中)
  • 然后,我編譯並運行ChartIn,但是出現以下錯誤:

dyld:未加載庫:@ rpath / Charts.framework / Charts引用自:/private/var/mobile/Containers/Bundle/Application/0C7EC6DC-94B6-4205-8E71-0F704B2A7523/ChartIn.app/ChartIn原因:找不到圖像

在此處輸入圖片說明

我只能引用:

為了正確地編譯:

Drag the Charts.xcodeproj to your project
Go to your target's settings, hit the "+" under the "Embedded Binaries" section, and select the Charts.framework
Temporary workaround: Xcode 6.3.1 has a bug, where you have to build your project once before actually writing the @import line. So hit "Build" now!
@import Charts
When using Swift in an ObjC project:
    You need to import your Bridging Header. Usually it is "YourProject-Swift.h", so in ChartsDemo it's "ChartsDemo-Swift.h". Do not try to actually include "ChartsDemo-Swift.h" in your project :-)
    Under "Build Options", mark "Embedded Content Contains Swift Code"

如果要針對iOS 7進行編譯:

Drag the code itself (.swift files) to your project. As sadly, Swift currently does not support compiling Frameworks for iOS 7.
Make sure that the files are added to the Target membership.

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM