- In a new or existing project called
MyProject
(for example) add the .h, .m and .swift files to the/ios/
directory - Put the ReactNativeSwiftPromises file wherever you like
- Launch/compile your react native project. Note: whenever you change the native files you'll need to recompile with XCode
NOTE: if this example doesn't compile/work let me know. I just pasted random bits from a project without checking if it compiles. I'm using 9.2 with RN 0.55.2
Got some questions regarding the threading. Let's assume the login method makes a network request, and calls a closure (not necessarily on the main thread). Is it still safe to call the resolve or reject in that closure? How would that work?