0
votes

I have few native .m /.h files, and .a files in my Worklight iPhone NativeResources folder. While building the environment those files are added to the respective folders of the iPhone Native folder. But if i open the iPhone environment as xCode Project, those .m/.h/.a files are not loaded in the Xcode project. But it present in the folder.

Any settings required to load those files in xcode project automatically while opening it in xCode.

Thanks.

1

1 Answers

3
votes

This is the expected behavior.

Only Xcode is able to generate a .pbxproj file that contains the references to the .m and .h files.

The way to make it work is to:

  1. Place the .m and .h files in nativeResources\Classes
  2. Run As > Run on Worklight Development Server
  3. Open in Xcode
  4. Add the .m and .h files via the Xcode interface
  5. Run in Xcode

If you would like to later on run it via Eclipse, you can then copy the .pbxproj file from Xcode to the nativeResources folder; but remember that the nativeResources folder will always overwrite code you place in the native folder, so be careful...