Ibm Worklight 6.1 - Failed Re-Generating the iPhone Native Folder

IBM Worklight 6.1 - Failed re-generating the iPhone native folder

Try the following:

  1. Close Eclipse
  2. Locate your temp folder (Windows, OS X, Linux)
  3. Delete the wlBuildResources folder
  4. Open Eclipse
  5. Re-build

IBM Worklight 6.1 - Settings page not disappearing

Make sure to Product > Clean the project in Xcode after the re-building in Eclipse.

If this somehow did not help, then:

Delete the app from the device / reset the iOS Simulator and re-run, then it will disappear. This is "cache residue" in the OS.

IBM Worklight - does not re-generate iphone .zip in iphone enviroment's package folder

Starting Worklight 6.2, the package folder that used to exist under the iphone folder has been removed.

If you'd like to create a zip of your generated Xcode project (= the iphone\native folder after you select Run As > Run on Worklight Development Server), find the native folder in your file system and zip it yourself.

You can find the native folder's location by right-clicking on it in Eclipse and select Properties.

IBM Worklight 6.1 - How to add custom written native code from Eclipse to Xcode?

If you delete the native folder, then any user-files you've placed in it will be deleted as well. When building the application again after deleting the native folder Worklight can only re-generate the Worklight-files, not user-files...

Your files are your responsibility.

Thoughts:

  1. You can place the class files (the .m and .h files) in the iphone\nativeResoures\Classes folder (create this Classes folder). Now upon every build in Worklight Studio the class files will be copied from the iphone\nativeResources\Classes folder to the iphone\native\Classes folder. So this is a sort of a back-up in case you delete the native folder.

    But note! Copying via nativeResources or manually placing the class files in the iphone\native\Classes folder in Eclipse, is not enough. Eclipse does not know how to reference your class files in the Xcode project. This is something you must do in Xcode so that they will be referenced in the project's .pbxproj file.

    Eclipse cannot do this for you and I would not recommend on doing this referencing manually.

    This is also explained in the "Adding native functionality to hybrid application with Apache Cordova plugin" training module provided in the IBM Worklight Getting Started training materials.

  2. If you develop in Mac, then you can open the .xcodeproj file (located in the native folder) from the Eclipse workspace after you build the project; this means that any changes you will do in Xcode will be part of your project in Eclipse (because you are working on the same files)... So this too is a way to ease on development.

    But be careful if you do this while also using the nativeResources approach, because then you will lose your changes in Xcode upon build in Eclipse.

You can use both of these approaches if you act carefully. Always backup your class files to the nativeResources folder before building in Eclipse after changing the .m or .h files in Xcode.

You are working with 2 IDEs, so you need to juggle...

IBM Worklight 6.1 - Unable to deploy upgraded project

Unfortunately this currently works for me.

  1. In Worklight 6.0.0.1 I've created a new Worklight project and application with the Android environment, built and deployed it
  2. I then exported the Worklight project as a .zip file
  3. In Worklight 6.1.0 I've imported the above .zipped project, built and deployed it
  4. Ran the generated Android project in the Android emulator

This was with a blank new app; it's possible yours is more intricate than that.

Suggestions:

  • Delete the native folder and re-build and deploy.
    • Make sure to back-up any native Java classes and other artifacts you may have previously added to the native folder.
  • Provide your Worklight project (the original from 6.0.0.x) in a Dropbox download link for analysis...

Worklight 6.1 - All Build fails and gives java.lang.NullPointerException

Try the following:

  1. Delete the native folder
  2. Close Eclipse
  3. Locate your temp folder (Windows, OS X)
  4. Delete the wlBuildResources folder
  5. Open Eclipse
  6. Re-build

If you have native code in your native\ folder, you can do the following for Android (and similarly for iOS):

  1. copy android\native\res\xml\config.xml to android\nativeResources\res\xml folder (if the folder doesn't exist, create it)
  2. copy android\native\src\com\your-app-name\*.java files to android\nativeResources\src\com\your-app-name folder (if the folder doesn't exist, create it)
  3. copy android\native\AndroidManifest.xml to android\nativeResources folder

This way you do not need to fear removing the native folder; upon build time the files will be copied to their location in the native folder.



Related Topics



Leave a reply



Submit