X-Guard / react-native-flic2

Use Flic 2 within your React Native application with ease.
Other
8 stars 9 forks source link

Unable to build app after npm installation #16

Closed Dellybro closed 3 years ago

Dellybro commented 3 years ago

After I npm install, and pod install (I've also linked) i get the following error

ignoring file /Users/Dellybro/Desktop/Zinkn/Zinkn/node_modules/react-native-flic2/ios/Frameworks/flic2lib.framework/flic2lib, missing required architecture x86_64 in file /Users/Dellybro/Desktop/Zinkn/Zinkn/node_modules/react-native-flic2/ios/Frameworks/flic2lib.framework/flic2lib (2 slices) Undefined symbols for architecture x86_64: "_OBJCCLASS$_FLICManager", referenced from: objc-class-ref in libreact-native-flic2.a(Flic2.o)

jdegger commented 3 years ago

I guess you're trying to run it in the iOS simulator?

The flic iOS SDK does not come with simulator support by default. Head over the the iOS sdk repository from Flic to read how you can enable this.

By default, we only support running physical devices.

Dellybro commented 3 years ago

@jdegger ok, and even with rn greater then 0.60 i still need to link? Or is the link in readme obsolete?

jdegger commented 3 years ago

You indeed don't need to link. the readme is a bit outdated. I will plan to update the example and readme soon as there is some incorrect information.

Dellybro commented 3 years ago

@jdegger , i appreciate you responding so fast as the project im working on is in a time crunch.

One more question, do i need to follow the directions for flic2lib by dragging the lib into project for ios and adding a dependency call for android? Or is this all done via the npm package? All i need to do is install and pod install and thats it

jdegger commented 3 years ago

No worries, happy to help.

Iirc the libraries are included. It's been a while since I installed it so I'm not fully sure and currently typing this from my phone. The example app might also shine some light on this.

It should be noted that the example and readme are slightly outdated. Some functions were removed in the last update (like startService). If it does not exist anymore, you just don't need it.

Dellybro commented 3 years ago

@jdegger i still seem to be getting the same error even after running it on a physical device.

My current steps are

but i still seem to get the following error

ignoring file /Users/Dellybro/Desktop/Zinkn/Zinkn/node_modules/react-native-flic2/ios/Frameworks/flic2lib.framework/flic2lib, missing required architecture x86_64 in file /Users/Dellybro/Desktop/Zinkn/Zinkn/node_modules/react-native-flic2/ios/Frameworks/flic2lib.framework/flic2lib (2 slices)

On a side note i've also done the allow non-modular includes in framework modules

jdegger commented 3 years ago

Make sure that x86_64 is not included in your project build architecture for both debug and release builds. Phones don't run on x86 so you can safely omit it. That should do the trick.

Dellybro commented 3 years ago

@jdegger once again i appreciate the help.

I've added it the excluded architecture. Is this good enough or where exactly were you telling me to omit the architecture?

Screen Shot 2020-11-10 at 10 01 09 AM

jdegger commented 3 years ago

Yes that might be it. Not completely sure to be honest but I guess just try 👍

Dellybro commented 3 years ago

Alright it worked! @jdegger thank you so much!

jdegger commented 3 years ago

Great, good luck 👍