Closed nicinabox closed 9 years ago
Hi Nic, Have you followed the install at the bottom of the readme? This would be the case if you don't have the files copied to your build phases + set the Objc bridging header. Hope this helps!
Huh okay. I did have trouble with one of the steps.
Search for Objective-C Bridging Header
This row doesn't exist (maybe that's expected?). I tried adding it as a User Defined setting, but had to name it "Objective_C_Bridging_Header". Perhaps that's the issue?
Ok - yes it should be there, if you go click your project on the left, select your project name from the 'targets', then build settings, hopefully it should be there?
I got nothin.
If I add a new blank swift file it seems to trigger that, but not when I add the files to the project.
Oh ok - and what if you add the RNSwiftSocketIO group to your CuraMessenger group as opposed to libraries?
Same thing.
Ok as in its not adding the field when you move them to your project? Also worth double checking all the RNSwiftSocketIO files are in your Compile Sources
Correct.
There was nothing in Compile Sources aside from AppDelegate.m and main.m, so attempting to add the directory there gives this:
It doesn't appear to have any children, but lets me add the directory anyway. Object-C Bridging Header still not available though.
Interesting - I think it may be worth removing the files and running through the install again. I think that the problem will have stemmed from originally adding the group to libraries rather than the main package. Let me know if you have any luck.
Just tried with a newly generated project (react-native init ...
) and see the same thing. Seems like it never recognizes the swift files.
Hmm - the only other thing that I can see effects it is if you change the settings on here:
(If just creating references it fails)
AH! That changes things.
I get all the swift files in Compile Sources and the Objective-C Bridging Header option.
Nice work!
Awesome - cheers mate!
Thanks for your help @kirkness!
It seems the initial SocketIO require returns undefined causing the initialization to fail down the line.
I checked NativeModules and it doesn't appear to have a SocketIO key. Any ideas?
Using React Native 0.4.4.