2015-04-17 19 views
9

Sto lavorando a un progetto Swift con cocoapods. Ecco Podfile:Installazione Pod GPU L'immagine non funziona

pod 'GPUImage', '~> 0.1.4' 
  1. dopo aver eseguito pod install, provo ottenuto l'errore su file di importazione:

    importazione GPUImage enter image description here

ho disinstallato GPUImage da podfile, allora prova la seconda soluzione, ho avuto un errore diverso.

  1. Questo link è l'istruzione di progetto su github. I miei passi sono:

    • Copia e incolla & GPUImage.xcodeproj nella cartella radice del progetto, e ha aggiunto che nel mio progetto.

    • Andare a "impostazioni di generazione" -> "fasi di creazione" -> "destinazione Dipendenze", ha aggiunto PUImageFramework, in collegamento binari con le librerie sezione, ha aggiunto GPUImage.framework .

ma ho ottenuto un errore:

error: unable to read module map contents from 'Source/iOS/Framework/module.modulemap': Error Domain=NSCocoaErrorDomain Code=260 "The file “module.modulemap” couldn’t be opened because there is no such file." UserInfo=0x7f872cfb0b80 {NSFilePath=/Users/william/A/muguang-ios/Source/iOS/Framework/module.modulemap, NSUnderlyingError=0x7f87413f4dd0 "The operation couldn’t be completed. No such file or directory"} 

Qualsiasi aiuto, thx!

EDIT:

L'errore in questo momento è:

dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage 
    Referenced from: /private/var/mobile/Containers/Bundle/Application/9CF1D10C-1D78-40CB-955F-19110B3C3EA8/testGDU.app/testGDU 
    Reason: image not found 

EDIT: Per la soluzione senza l'utilizzo di cialde, qui è la soluzione:

You then need to add a new Copy Files build phase, set the Destination to Frameworks, and add the GPUImage.framework build product to that. This will allow the framework to be bundled with your application (otherwise, you'll see cryptic "dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage" errors on execution).

Ma domanda 1 con i cocoapodi ancora non funziona.

+0

ottenere lo stesso errore per SnapKit con cocoapods. Hai trovato una soluzione per i pod? – carbonr

+0

Ho smesso di installare i pod, aggiungerlo manualmente. –

+0

Ho ordinato il mio con cocoapod '0.36.4' e anche il mio aveva un problema in cui un file non aveva una definizione di classe e questa era la vera causa dell'errore, nemmeno i pod. – carbonr

risposta

2

è il mio male, ho ottenuto la soluzione:

You then need to add a new Copy Files build phase, set the Destination to Frameworks, and add the GPUImage.framework build product to that. This will allow the framework to be bundled with your application (otherwise, you'll see cryptic "dyld: Library not loaded: @rpath/GPUImage.framework/GPUImage" errors on execution).

4

ho avuto lo stesso problema con le seguenti versioni di libreria:

  • Xcode 6.3
  • Cocoapods 0,37.2

Finalmente ho risolto questo problema i seguenti passaggi:

Primo passo:

  1. Aprire Xcode
  2. fare clic su Finestra (barra dei menu)
  3. Selezionare Progetti
  4. Rimuovi tutti i progetti (es. Usa backspace)
  5. .210
  6. Chiudi Xcode

Secondo passo:

  1. Aprire un'applicazione terminale
  2. cd ~/Library/Developer/Xcode/DerivedData
  3. rm -rf Build/*vedere di seguito se si dispone di un percorso di generazione personalizzata
  4. rm -rf ModuleCache/*
  5. chiudere un'applicazione terminale

Terzo passo:

  1. Aprire Xcode
  2. prodotto> Clean
  3. prodotto> Esegui

If you have defined a custom build location:

  1. Go with Finder or the Terminal to the location of the build files. The location for these files is defined in Xcode. To check where these files are:
    • Open Xcode
    • Go to Settings -> Locations -> Derived Data
  2. Go to that location and delete the Build folder

Poi tutto funziona bene .

Spero che questo possa aiutare qualcuno in futuro.

+0

Lo ha fatto per me, inclusa l'eliminazione di tutti i file dei progetti precedenti: Vai con Finder o il Terminale alla posizione di questi file → 'Apri Xcode -> Impostazioni -> Posizioni -> Dati derivati ​​'ed elimina tutto – skofgar

+0

I è stato chiaro fallito dal tuo passaggio di risposta, i miei errori arrivano dopo la conversione da swift2 a swift3. – aircraft

+0

Mi ha salvato molte ore, grazie! – udog

Problemi correlati