function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
msreekm1.394150795020999E12msreekm1.394150795020999E12 

ios force.com sdk hybrid app -changes not reflecting in simulator

Iam having issues with pushing any changes to html code to simulator, it always shows the old code , even after clearing the simulator contents. So was wondering if there is a better way to push this. 

This is my steps- make changes to www folder in xcode, press ctrl-r to run the app in simulator.

any suggestions?
Ashish_SFDCAshish_SFDC

Hi , 


See the settings there, 


The iPhone simulator application is published by Apple as part of the iPhone SDK, and the simulator is available only for the most recent release of the Macintosh operating system (10.5.x) running on Macintosh computers with Intel processors. Salesforce provides the simulator version of Salesforce Classic as an update to the standard iPhone simulator.

To set up the iPhone simulator:

Visit the Apple iPhone development page at http://developer.apple.com/iphone.
Download the latest version of the iPhone SDK.Note
You must be a registered iPhone developer to download the iPhone SDK. You can sign up for free at the Apple iPhone development page.
Double-click the DMG file to launch the installer for the iPhone SDK.
During the installation, make sure that the iPhone SDK checkbox is selected. If the checkbox is not selectable, you are running an incompatible version of the Macintosh operating system. Use Software Update to get the latest update of the operating system.
Verify that the installation was successful by running the iPhone simulator.
The path to the simulator application in Finder is Macintosh HD/Developer/Platforms/iPhonesSimulator.platform/Developer/Applications/iPhone Simulator. Drag-and-drop the simulator icon to the dock for fast access to the application.
Quit the simulator if it's running.
Navigate to the following URL: http://downloads.salesforce.com/downloads/mobile/index.html.
Under iPhone, click Simulator Updater.
Save the SalesforceiPhoneSimulator.dmg file.
Open the downloaded DMG file.
Copy the Download Salesforce for iPhone Simulator application to your Applications folder.
Double-click to launch the Download Salesforce for iPhone Simulator application from your Applications folder.
Launch the iPhone simulator from your dock. You can also run it using the following path in Finder: Macintosh HD/Developer/Platforms/iPhonesSimulator.platform/Developer/Applications/iPhone Simulator.
Click the Salesforce icon on the Home screen.
Click I Accept.
On the activation screen, enter your Salesforce username and password. Click Done to close the keyboard.
Click Activate.Warning
Do not close the window or let the device lock. If the application closes, the iPhone operating system stops the application from running, which causes the activation to fail.
When prompted, create your five-digit passcode. You must use a passcode—which is different than your Salesforce password—to access the mobile application after it locks due to inactivity.
Enter your passcode again for confirmation.

http://www.salesforce.com/us/developer/docs/mobileImplGuide/Content/mobile_simulators.htm


The current version, 2.0, of the Mobile SDK moves away from the Xcode templates in favor of the forceios/forcedroid command line tools for project creation. These tools are installed via npm - for example, on the Mac:

sudo npm install forceios -g
You then create a Mobile SDK app with

forceios create
You no longer need to pull the code from GitHub unless you want to modify the SDK. See the Mobile SDK Development Guide for more info.

http://salesforce.stackexchange.com/questions/16219/how-to-get-salesforce-native-app-templates-to-show-in-xcode


Also see the discussion in the below thread, 

http://stackoverflow.com/questions/12372289/can-anyone-help-me-setting-up-the-salesforce-mobile-sdk-for-ios


Regards,

Ashish

msreekm1.394150795020999E12msreekm1.394150795020999E12
Ashish- I was not looking for setup instructions. i have a specific issue- www folder is getting cached bt Xcode and changes are not getting copied over to simulator.

thanks
akhilesh_sfdcakhilesh_sfdc
Try cleaning up the cached build by going to xcode and using the option "Product" > "Clean". Then run the project again.

If you still see cached www content, try resetting your simulator using "Reset Content and Settings" under iOS Simulator.
Justas SerstkovasJustas Serstkovas
Hi All,

Usually in this kind of scenario I use combination of both
1. deleting simulator contants by clicking on iOS Simulator (top menu) > Clear all contents & Settings 
AND
2. (as akhilesh_sfdc advised) using Product > Clean (or CMD + K shortcut) to clean the project.
IN SOME CASE
3. Before runing the project I also quit Simulator completely (CMD + Q shortcut) - there were few accastions that actually this helped me.

Let us know if it did work please.
J
msreekm1.394150795020999E12msreekm1.394150795020999E12
Thanks for the suggestions. I cannot clear contents in simulator ,since I have to fill the app settings and also authenticate every time I do this, which is a pain and waste of time for every small changes. I am now doing a clean build (CMD-SHIFT-K) before I run the application (CMD-R), Also trying to automate the clean via pre-build script in xcode but was not successful. Sree