How to run phonegap app in iphone simulator? - iphone

I'm new in Xcode. I'm having Xcode 4.6 and Mac OS 10.7. I have setup the phonegap environment to my Xcode and can create my phonegap app successfully.
My problem is, when I start to run my app into simulator it's showing the following error:
Developer Tools Access needs to take control of another process for debugging to continue. Type the name and password of a user in the "Developer Tools" group to allow this.
and also showing the username & password textbox.
I have tried to give apple develoer credential and also system credential but not getting any solution.

Related

Facebook permissions approval Watchkit app problems with ios_sim

We're trying to get user_posts approval from Facebook for a new Apple Watch app. We've created an ios simulator build per FB instructions however they use ios-sim to test and its failing to run the app. I know the app works in the iOS Simulator outside of Xcode because I've successfully loaded & tested it with XCRUN commands (loading the .app, .appex and watch kit.app objects and then running the .app or running the watchkit.app).
My thoughts on the issue are
Possibly ios-sim hasn't installed the .appex and isn't designed to test .app's with app extensions.
Possibly the user is not using the latest Xcode 6.2 and there's a problem with running Watchkit extensions
Details of the FB response below. Has anyone else successfully tested an .appex with ios-sim or successfully submitted an .appex to Facebook for testing (specifically a Watchkit .appex) or has any advice on how to proceed? Would be much appreciated.
Searching Stackoverflow hasn't shown any related questions on this topic. We've provided a feedback response to FB and posted on the FB developer forum as well. Many thanks!
Notes from our review team iPhone I received this error in my terminal
when trying to load the app:
Last login: Tue Apr 7 13:12:02 on ttys003 chandlerhol-mbp:~
chandlerholmes$ ios-sim launch ~/Downloads/Swhorl.app/ Session could
not be started: Error Domain=LaunchServicesError Code=0 "Unable to
run app in Simulator" UserInfo=0x7f9cb2a005e0
{Error=AppexBundleUnknownExtensionPointIdentifier,
ErrorDescription=Appex bundle at
/Users/chandlerholmes/Library/Developer/CoreSimulator/Devices/DF420CB7-66DA-405A-9FF8-A7AA84CE5806/data/Library/Caches/com.apple.mobile.installd.staging/temp.kV56mj/extracted/Swhorl.app/PlugIns/Swhorl
WatchKit Extension.appex with id com.verteq.Swhorl.watchkitextension
specifies a value (com.apple.watchkit) for the
NSExtensionPointIdentifier key in the NSExtension dictionary in its
Info.plist that does not correspond to a known extension point.,
NSLocalizedFailureReason=An error was encountered while running
(Domain = LaunchServicesError, Code = 0),
NSUnderlyingError=0x7f9cb2802f20 "The operation couldn’t be completed.
(LaunchServicesError error 0.)", NSLocalizedDescription=Unable to run
app in Simulator}
chandlerhol-mbp:~ chandlerholmes$
iPhone
Your provided file has been configured incorrectly. For iOS Simulator Builds, follow our instructions and resubmit. For Android
submissions, please build a .APK file for upload.
have now got an answer to this question. We are now successfully approved for the user_posts permission! :) Here's how we achieved it, hope you will find this useful.
We re-submitted the application, no changes to screen shots or the build or instructions, but with the following paragraph prominent in the Facebook login integration section on the front page of the application:
PLEASE NOTE BEFORE TESTING:  This app cannot be tested successfully
with IOS-SIM because its an Apple Watch app and it is not possible to
open an external display (Hardware/External Displays/Apple Watch) when
launched from ios-sim.  We've tested the simulator build successfully
using XCRUN, apple's own command line tools - please see user_posts
testing notes for detailed instructions and we hope this will be
satisfactory for you to your complete testing.  Many thanks
Here are the instructions that we included within the specific request for the user_posts permission:
PLEASE NOTE IOS-SIM WILL NOT WORK WITH THIS APP. Its not currently possible to test
an Apple Watch app with ios-sim, you cannot open the external display from
the simulator.
To test user_posts with Swhorl:
INSTALLATION
1. Open Xcode on a Mac with OS X Mavericks or Yosemite
a. Select Xcode menu, About Xcode Ensure you have Xcode Version 6.2 (6C131e) or later
b. Select Xcode menu, Open Developer Tool submenu, select iPhone Simulator
2. In iPhone simulator
a. IOS Simulator menu, select Reset Contents And Settings
b. Select Hardware menu, Device submenu, then iPhone6
c. Select Hardware menu, External Displays, Apple Watch 42mm
3. Locate the copy of the Swhorl simulator build uploaded with this submission place it
in a folder of your choice and double click to expand the zip file, then
a. Open Terminal and change directory to the expanded 'Release-iphonesimulator' folder
b. With the simulator running, install the 3 app components with these commands
xcrun simctl install booted Swhorl.app
xcrun simctl install booted Swhorl\ Watchkit\ App.app
xcrun simctl install booted Swhorl\ Watchkit\ Extension.appex
c. Use the following commands to run the App and Watckit app respectively in the simulator
xcrun simctl launch booted com.verteq.Swhorl
xcrun simctl launch booted com.verteq.Swhorl.watchkitapp
As a separate recommendation, when digging through the Facebook help pages we noted that its possible to get Direct Support from FB, but only once you've registered as a business and connected your app. An existing request that's failed won't automatically qualify for support, you have to re-submit. However it DOES keep all the details of your previous submission, so no major re-typing needed.
You can read how to do that here Facebook App Review Guideleine - scroll to the bottom of the page for the section on Direct Support. We didn't need it this time but I recommend it as it may provide a channel for you to discuss your submission that you would not otherwise have.
Happy submitting!

Installing a TestFlight app on iOS iPhone Simulator - Registration Failed

I'm attempting to install a TestFlight app on XCode's iOS simulator using the iPhone simulator. The link to the TestFlight app takes me to a page that says "This device will need to be registered before it can install betas."
There is a friendly Register button. When I click the register button, it says "Registering Device" and then it takes me to the iPhone's General settings page. If I navigate back to the TestFlight page, it says "Registration Failed."
Does anyone know of a way to install a TestFlight app on the iPhone Simulator? Thanks.
The app you are trying to install is an app compiled for arm architecture, which is different from the simulator (the simulator is not an emulator). The simulator only runs x86 apps compiled for it. You will need to contact the developer of the application to send you the x86 binaries, and add them directly to the application directory of the iOS simulator. The directory (on Xcode 4.5 beta 4) is /Applications/Xcode45-DP4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/Applications. Note that the simulator's sdk version has to match the version of iOS you are trying to use the simulator with.
If you need test your Release application
you can run your on a release build go to
->Product->Scheme -> Edit scheme-> in Run change debug to Release
in this you can check your release build in simulator
If I had to guess, I would presume that since the Simulator is not a valid device, it is not able to install the TestFlight Profiles onto the device, and therefore failing registration process (when you are directed to the iPhone's Settings, it tries to install a profile on your device).
May I ask why you are trying to install the app via the iPhone Simulator? If the app's code exists on GitHub, you can use the GitHub for Mac app to checkout the code, and XCode to compile the project and build it to the iOS Simulator. There should not really be any reason to have to install TestFlight on the iOS Simulator.

Error installing iOS app with Ad Hoc Profile

I have finished developing a big and heavy app. It is universal (for iPhone and iPad), and now I am trying to publish it in App Store. I have done this other times, so I know how annoying it is.
I'm using Xcode 4.2 and devices with many iOS versions (4.2.1, 5.0, 5.1). My app is enabled to send Push Notifications, and it doesn't use iCloud.
I have tested it with development certificate, and it works OK. Now I've generated and downloaded Ad Hoc Distribution Provisioning Profile in order to test it in my iPhone and iPad. It seem like all is OK, but when I'm going to install the app (with the Ad Hoc Distribution Provisioning profile) with Xcode in any device, Xcode shows an error: "Error launching remote program: failed to get the task for process".
I've read this link it suggests two causes:
I am using Ad Hoc Distribution Provisioning profile when debugging the app in my device. This is not the problem, because I'm not debugging the app.
I specify a code signing entitlements property list in my build settings which does not include a "get-task-allow" or "Can be debugged" property. This is not the problem, because I'm not specifying any entitlements property list because I don't need it (or I think so).
Some people that have the same problem solve it adding the "get-task-allow" property to the entitlements property list. But I haven't that file. So the question is, Do I need to create it just for add the "get-task-allow" property?
If I don't , which is the problem? I'm not trying to debugging and I haven't entitlements p-list in my app.
Although my app doesn't need entitlements p-list, I tried to create it and add the "get-task-allow" property in OFF following this, but it didn't solve the problem.
I have also to say that althought Xcode shows the error during the installation in the device and the app shut off, when I start again the app, the installation is done and the app runs without problem.
I read the following similar thread, but they didn't solve my problem:
iPhone Debugging: How to resolve 'failed to get the task for process'?
Profile bug (Error launching remote program: failed to get the task for process XXX.)
iPhone Debugging Error launching remote program: failed to get the task for process 907
Error launching remote program: failed to get the task for process 699
Thank you so much.
I am using Ad Hoc Distribution Provisioning profile when debugging the app in my device. This is not the problem, because I'm not debugging the app.
This is exactly the problem.
You are trying to run an ad-hoc application from the XCode - it means to debug it.
You should archive your app and install it (an ipa file) together with the correct provisioning profile.
There are few ways to install the app:
Using iTunes - not trivial
Using an iPhone Configuration Utility - easier
Using some OTA (over the air) installation service (e.g. TestFlight site) - I use this all the time, after a couple of times it gets really easy and you can distribute your Beta version to remote devices (e.g. clients, friends etc.)
The problem look like you are running App from Xcode with Ad Hoc Distribution Provisioning profile.
After Archiving (Product menu > Archive ) the App from Xcode, you can get ipa.
You can install ipa via iTunes if you device already sync with your iTunes app.
https://testflightapp.com/ , I am using testflightapp for testing the app. It's easy to use and we can distribute to for test user.

iOS app won't run until device reboot after ad hoc install

Every time I install my app to an iDevice using the ad hoc distribution method (e.g. archive, create an .ipa file and let my testers download it), the app will not run until the device is rebooted. Much like the second link posted below, I did not have this problem before upgrading to iOS 5 and XCode 4.3.1 -- currently running iOS 5.1 / XCode 4.3.2 and still having the same problem. If I connect the iPhone / iPad using USB (and run directly from xcode), the app installs normally and runs fine.
Currently, when installing ad hoc, one of two things happens:
1: The app installs "normally" and the icon is visible -- but pressing it brings up the launch image, then the app fails to black screen -- then back to springboard. App never gets any further.
• or •
2: App installation seems to proceed normally, then when the "Installing..." phase is complete, the app icon simply vanishes. Reboot the iPhone and the app icon is exactly where it is supposed to be.
In either case, after a reboot of the iPhone it runs fine.
Any suggestions??
This is the closest issue I could find, but I have this problem on iOS 5.0 / 5.1 and even when installing my app to devices for the first time:
iPhone app fails to launch after install on iOS 4, works after device reboot
I also found this article, so I checked my Entitlements setting (in Targets) -- Not enabled: ad hoc app failed to install on real iPad
I've had this exact problem before when I have a different 'Bundle Identifier' set in the Info.plist to the App Id you set up in the provisioning portal.
If that doesn't work, you might try checking the log of your device when attempting to install the ad hoc ipa.
XCode -> Window -> Organizer -> Devices -> Your device -> Console

how to run project in iphone mobile

hi i am new to iPhone application development. i developed a simple project on xcode now i check it in mobile. how can i done this ,means need to create exe file or any thing else
pls help me
The first step is to join the iPhone development program. Once you that and follow the instructions of createing a developer certificate you can run your code on a physical device. If you're using the latest version if Xcode just connect your device - choose device in the build settings and build & run. It will install the app on your device and run it.
iPhone developer program
Obtaining your iPhone Development Certificate - Requires login to apple dev center