0

I am using MobileFirst CLI 7.1. I want to deploy my MobileFirst CLI application to an IOS device. How can I do that?

I navigated to the iphone environment and tried to double click the .xcodeproj. In the XCODE I see that the project is still being shown as library.

enter image description here

I am getting this following error when I try to deploy the application, enter image description here. I have gone through stackoverflow questions. None of them were helpful.

I want to know how can I target remote server. (In Studio we had an option to deploy to remote environment.)

1 Answers1

1

You already asked the second question: How to deploy MobileFirst CLI application to an android device?. The answer is still the same:

Also I want to know how can I target remote server. (In Studio we had an option to deploy to remote environment.)

In the Studio you did not have the option to "deploy to a remote server". You had the option to configure the application to point to a remote server (the properties you can edit in the worklight.plist(for iOS) / wlclient.properties file (for Android).

This feature does not exist in the CLI. After building the project, in case you want it to point to a different server, edit the properties in said file(s) to point to the remote server.

The first question is unclear.
I have done the following and was able to launch the project in Xcode and run the app in the iOS Simulator:

  1. mfp create myproject

  2. cd myproject

  3. mfp add hybrid

    added an app called "test"

  4. mfp add environment iphone

  5. mfp push

    opened the project folder and navigated to apps\test\iphone\native, followed by double-clicking on the .xcodeproj file. The project opened in Xcode successfully and I then clicked on the Run button, and the app launched in the iOS Simulator.

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • Thank you for your reply. After reviewing your comments, I have deleted and re-added the environment. Then I was successfully able push to simulator. But when I tried to deployed to remote server, I am getting following errors : 1. The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. This (http://stackoverflow.com/questions/32631184/the-resource-could-not-be-loaded-because-the-app-transport-security-policy-requi) was not helpful. – Sharan Ainapurapu Feb 23 '16 at 11:43
  • 2. " Response does not contain a valid certificate and client Id. device registration failed " , for which I followed the second approach you suggested here http://stackoverflow.com/questions/33237715/unable-to-login-to-app-on-device-or-simulator-after-upgrade-to-ios-9-and-mobilef. It am getting the same error. – Sharan Ainapurapu Feb 23 '16 at 11:43
  • ATS is a feature by Apple. Test without security while developing, or enable TLS 1.2: http://iosdevtips.co/post/121756573323/ios-9-xcode-7-http-connect-server-error – Idan Adar Feb 23 '16 at 11:44
  • When I tried to deploy the application on the device, it throws me this error " clang: error: linker command failed with exit code 1 (use -v to see invocation) ". It is working fine in simulator. – Sharan Ainapurapu Feb 23 '16 at 13:51
  • This link helped in solving the issue http://stackoverflow.com/questions/32623130/xcode-7-linker-command-failed-with-exit-code-1-use-v-to-see-invocation-again – Sharan Ainapurapu Feb 23 '16 at 13:57