Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.87k stars 1.54k forks source link

Unable to Install IGListKit with Swift Package Manager #1557

Open popoolasubomi opened 2 years ago

popoolasubomi commented 2 years ago

New issue checklist

General information

Debug information

# Please include debug logs using the following lldb command:
po [IGListDebugger dump]

Installing IGListKit with spm produces the following issue making code unable to compile:

Lexical or Preprocessor Issue IGListKit/spm/Sources/IGListKit/include/IGListSupplementaryViewSource.h:8:9: 'PikaOptimizationsMacros/PikaOptimizationsMacros.h' file not found

Is there any way to resolve this or install this framework without using carthage or cocoapods?

almeidalf commented 2 years ago

I have the same problem in SPM, I have to use the penultimate commit: https://github.com/Instagram/IGListKit/commits/main

b22a10e47ffa87c79993ea19db7b52605e83ebbf

this works for me!

canbalkaya commented 2 years ago

Same issue.

If I use exact version of 4.0.0, I get an error below:

canbalkaya commented 2 years ago

I have the same problem in SPM, I have to use the penultimate commit: https://github.com/Instagram/IGListKit/commits/main

b22a10e

this works for me!

@almeidalf, when I try to add the version that you wrote, I get this alert and can't use it:

Screen Shot 2022-03-24 at 6 02 05 05PM

Are you using IGListKit locally?

almeidalf commented 2 years ago

Estou com o mesmo problema no SPM, tenho que usar o penúltimo commit: https://github.com/Instagram/IGListKit/commits/main b22a10e isso funciona para mim!

@almeidalf , quando tento adicionar a versão que você escreveu, recebo este alerta e não consigo usá-lo: Captura de tela 24/03/2022 às 6 02 05 05PM

Você está usando o IGListKit localmente?

@canbalkaya So you are using the commits link, you should use the hash of the penultimate commit which would be the value below the link.

instead of using branch select commit and add this hash

b22a10e47ffa87c79993ea19db7b52605e83ebbf

phonix-dev commented 2 years ago

The project successfully compiled Thanks! I think you meant the hash in full b22a10e47ffa87c79993ea19db7b52605e83ebbf

phonix-dev commented 2 years ago

I'm still having a weird bug. Everything compiles and runs but CellForItem(at index: Int) && sizeForItem(at index: Int) aren't working within ListSectionControllers. I put breakpoints on numberOfItems() function and can see that is working but the rest are not responding

phonix-dev commented 2 years ago

Refer to link for the solution

bajjajjrajjesh commented 2 years ago

I have the same problem in SPM, I have to use the penultimate commit: https://github.com/Instagram/IGListKit/commits/main

b22a10e

this works for me!

This worked for me @almeidalf, Thanks

almeidalf commented 2 years ago

Apparently they removed the implementation that was giving error. From what I've tested we can use the main branch again \o/

NOTE: commit that solved the problem. https://github.com/Instagram/IGListKit/commit/d2f12cd92c998a1b0fecabfa14a253bd9cb2b82f