I am trying to install Phonegap developer app on the iOS simulator (ios-sim), but it looks like it's only possible through App Store, which is disabled on the simulator.
What is the easiest way to install it, or what am I doing wrong? Is there any other way to use phonegap serve command on simulator?
The "Phonegap developer app" is only needed if you want to test/debug/run you phonegap applications on your phone. You don't need the "Phonegap developer app" to be installed on an emulator to test it on an emulator.
To run a Phonegap application in the appropriate emulators (assuming you have the Phonegap CLI installed), run the following command(s):
phonegap run ios --verbose --stack-trace
phonegap run android --verbose --stack-trace
You may need to install the emulators if you haven't got them already)
Related
I'm using Expo to code my apps with React-Native. I can test my apps on Android devices running them from the Expo client app or building an APK and running it as standalone.
On iOS I can run my app from the Expo client but I couldn't find a way to run the app as standalone. In this case, I would like to test the "native" facebook login functionality.
Is it possible to run an app as standalone (without using the Expo client) on iOS?
Note: I'm trying to avoid going through TestFlight for this, that will make my workflow painfully slow. I am using Mac OS.
Run expo build:ios -t simulator to create an iOS standalone simulator build.
Wait for build to finish, then download and unpack YourAppName.tar.gz
Start an iOS simulator and run xcrun simctl install booted YourAppName.app
I developed an application for mobile, using FlashDevelop's AIR Mobile AS3 App Project template.
Following AIR_Android_readme.txt and AIR_iOS_readme.txt, I successfully packaged it into both apk and ipa.
I can easily test the apk on the computer via bat/RunApp.bat provided by FlashDevelop.
However once I modify RunApp.bat to ios-debug in order to test the ipa, I get the following log in the cmd:
Packaging application for debugging on iOS -interpreter
Packaging: dist\AppName-debug-interpreter.ipa using certificate:
cert\iphone_dev.p12...
Installing application for testing on iOS ()
No Devices Detected
Installing the app on the device failed
Press any key to continue . .
.
I have android studio and sdk installed and working, however I didn't install anything similar for IOS development, I have iTunes in case it matters.
Any idea what's wrong and how to fix it?
FlashDevelop searches for actual devices connected to the computer in order to install the application, I mistook it for an IOS simulator for PC.
I'm currently developing a mobile app using Meteor v1.0 and trying to test iOS devices using the iOS Simulator.
For Cordova apps, I'm used to doing something like:
cordova emulate ios --target "iPad"
For Meteor, the alternative is:
meteor run ios
On my Mac, running the above Meteor command leads to the app being run on an iPhone 4S emulator. I'm unable to choose what device to emulate like I could when using Cordova.
I've tried switching device through the iOS Simulator after the app gets loaded initially but the app is not available on the device I switch to.
The only solution I have found is to navigate to the Cordova directory (.meteor/local/cordova-build) and run the iOS Simulator directly from Cordova.
Does anyone know a better solution by using Meteor itself or is this not currently possible? I haven't been able to find anything in the documentation. I'm open to testing it using something else but it would be nice to keep everything together with Meteor.
The current solution is to open Xcode by running meteor run ios-device and then select the correct simulator inside Xcode. Unfortunately, ios-sim (the package Meteor uses for the simulator) doesn't make it easy to select the device to simulate.
meteor run ios-device -p 3000 is what I do. Then download the phone gap app for iPad and run it on your IP:
ipconfig getifaddr en0
Then put that in on the phone gap app. So example: 192.168.0.8:3000
I am trying to create a simple project with last phonegap version:
$ phonegap create my-project
$ phonegap build ios
$ phonegap install ios
All works perfectly and I see emulator with my simple application.
But I can't find documentation on how to run my application on device(iphone, for example) and not on a simulator.
All documentation by cordova / phonegap based on examples with cordova's template for xcode.
But last cordova's version don't have template for xcode and all that I need - cli, if I understand correctly?
I already registered as IOS developer and I have a valid iPhone development certificate.
When I connect my device - I can see it in xcode and I can run native application on my device.
But only via xcode.
I will be grateful to any advice.
If the cordova app builds and runs on the simulator, try running cordova run ios --device
This worked for me, when before it was only hitting the simulator.
Alternatively, if that STILL doesn't work for you, when you run codova build ios, to just build the app, you could use itunes to sync the generated .app file in <project_folder>/platforms/ios/build/device/AppName.app
There is an Apple CLI tool canned xcodebuild, as well as this wrapper around it by Facebook. I'd suggest trying out either that or look at the build-in xcodebuild shipped with xcode.
Hopefully one of them will work.
https://github.com/facebook/xctool
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcodebuild.1.html
If you use Cordova CLI, you should be able to do this:
cordova run ios
My iOS emulator is no longer opening when I run "phonegap run ios" in the terminal on Mac OS X. I receive no error messages and:
[phonegap] Platform "ios" deployed to emulator.
[phonegap] successfully installed onto emulator
While this is currently a known bug, you can run the emulate command more directly (note you need to build separately):
phonegap local build ios
/platforms/ios/cordova/emulate
You can also run the application using the same technique:
phonegap local build ios
/platforms/ios/cordova/run
NOTE: When using this method to run the app on your phone, the task might get stuck on the splash screen. To fix this, launch the Activity Monitor on your Mac and quit any processes with the name "ios-deploy". From there you can launch the application on your phone by clicking the application icon.
Or, you can even look inside the generated /platforms/ios folder and launch XCode project directly to test in an emulator or on your device. Open project and click the RUN button.
IMPORTANT: with all of the above methods, you MUST run the build command before running:
phonegap local build ios
Not really an answer, but I can say this is a known bug. Here is the bug so you can track it:
https://issues.apache.org/jira/browse/CB-5103
I only had this problem after upgrading to 3.1. I downgraded to 3.0 and it works more reliably:
npm uninstall -g phonegap
npm install -g phonegap#3.0
Also had to delete the platform/ios dir and plugins/ios.json and then run 'phonegap build ios' and 'phonegap run ios'