iPhone simulator not scrolling on windows (not Windows™, a window brought up on a website) - iphone

I'm working on a website that's optimized for mobile devices that can also be used on a desktop. In order to test the functionality of it without setting up a server, I'm using the iPhone simulator that comes with XCode. The website's purpose is to give a manager for the business a way of approving or rejecting potential offers the marketers have in mind to give to customers when they are away from their desk. When you get to the Approve/Reject page, you can click either the Approve or Reject button. Each button, once pressed will bring up a window (not a separate page) where the manager can add comments. On the iPhone simulator, whenever the window comes up, the iPhone will not let you scroll down at all on the window as, for some reason, the scroll function still seems to be connected to the main page, not the window that just came up. The problem only occurs on the iPhone part of the simulator, but not on the iPad part. I've been beaten by this problem for several days and I can't find anything on the internet that gives suggestions. Does anybody have any idea on what I should do with the coding, or if it's just what happens when you run the server locally on the simulator? Any help will be appreciated, as I've exhausted all I can think of.
Note: I'm using Ruby-on-Rails and the window that is popping up us a Bootstrap modal

Try Modal box on iPhone no scroll
The modal becomes a static height on the screen and it should allow you to scroll all the way to the bottom of that window.
Change the height setting so that it fits.

Related

iOS7 - App causes device (not app) to crash

Our company has an app which is basically an eBook reader.
We use the RMSDK to perform book downloads & read.
Now, something very strange is happening in iOS7 devices (not in the simulator):
I download a book using the fulfillment method in the RMSDK
I wait for the book to finish downloading. The book is saved in the NSCachesDirectory (for App Store guidelines reasons) - so far, everything works fine
I hit the home button, the app moves to the background
I hit the app button to bring the app back, that's when the problem happens:
The app gets completely stuck. Hitting the home button does nothing, hitting the power button shuts down the screen, but then hitting the power button again does nothing.
The device itself has effectively crashed.
After a few minutes, the Apple logo appears on the device and the device comes back to life after a reboot.
I have no idea what in my code could be causing the device to act this way. Shouldn't the iOS7 sandbox prevent me from being able to crash the whole device?
Any ideas on why this could be happening and what I can do to prevent it would be greatly appreciated.
EDIT:
I placed a breakpoint on the -(void)applicationDidBecomeAcvive: method in the AppDelegate, and it's not being called when clicking on the app icon in the last phase before the crash.
EDIT:
The RMSDK is using libcurl to download the books. Could this be a cause for this behavior?
EDIT:
The problem is happening if I click on ANY app after I click on the home button, not just on the same app. So for example, I click on the home button, then I try to open Fruit Ninja, and the device crashes.
We managed to solve this issue by disabling functions in RMSDK, which call mkfifo(). I'm not sure how much I can say here due to NDA but they're all located in one file and can be cleanly converted to no-ops with a nice preprocessor #if defined()
Its an OS level bug. iOS 7 is still unstable in areas, for example my Apps report crashes in places that are part of iOS 7 itself and couldn't be caused by my app.

How to relaunch an Air-based iOS application from the very first page?

My application is an Air-based iPhone app. It opens with the last page I visited before clicking the Home button, each time I relaunch the app, while I need to open with the splash screen onward. How can I resolve this issue?
Thank you for any help.
When you press the Home button, you don't terminate a running app. I'm sure that many of us developers have stuck with this mental model of how iOS used to work without multitasking.
So, the splash screen, or rather, the default image (Default.png) should really appear once (when your application launches). Some times, the default image appears when coming out from the background state, but this happens only if your app takes too long to show its UI. In fact, on fast iPhones, the default image disappears almost instantly even on launch (for well-written apps, that is).
I should also note that Apple actively discourages the use of the default image for splash screens. These should only be used for creating an illusion of transition, from a "launching state" (which the default image is supposed to portray), to the running state.
However, if you really have to show a splash screen every time, you should implement such a mechanism in code. applicationDidBecomeActive: is a good place to start, if you are writing code in Objective-C.
I don't know the event model in Air, so I can't really give you any hints for that.
The above answer, though old, does not answer the question. Sure, Apple gives guidelines regarding splash screen and all, but the poster asks how to prevent the app from resuming from it's previous position. If you want the app to terminate when put in the background you need to look into the UIApplicationExitsOnSuspend option. There's also an Adobe blog post explaining a bit more about different background behaviors.

Default.png problem with iPhone OS 4?

What should Default.png contain? Currently it seems that iPhone OS makes snapshots of the screen before closing the app, and next time it launches with that exact snapshot as "splash screen image".
A guy here in Russia told me that this is only happening when Multitasking works on the device.
What would I show in Default.png now? I don't want that the app launch sucks for users without multitasking, and I don't want it to suck for users with multitasking where the app had to hardcore-launch anyways (i.e. first launch at all). So what would that contain? A screenshot of the app screen how it looks after a hard launch from scratch? But what if my app is clever and saved state, and the UI looks completely different after launch?
What are you guys putting in Default.png and why?
If fast-app switching is working on the app as part of multi-tasking, you are correct in stating that the OS will take a snapshot and restore your app to this state after it comes out of the background. If the OS is saving state for you, then coming out of the background doesn't "suck" since it brings you app back into view looking just like it did when it left. It's almost like minimizing a window on Mac OSX and then maximizing it again... you just pick up from where you left off before.
Be advised though that the app could get killed at anytime in the background without warning or notifications being sent to you. In that case, you should still save state and try to create a splash screen that works with all of your views (i.e. has a tab bar at the bottom, or a nav bar at the top, etc). If you can't do that, you might consider just doing what Jesse has done with a company or app splash screen (even though Apple doesn't endorse this, but they won't reject you for it either).
As Jesse stated, Apple recommends creating an outline of the main elements to familiarize the user with your app and to give the appearance of faster loading. More information is here
For iPhone splash screens I am still using a company logo splash. for iPad, a basic "outline" of what the screen i am coming into will look like (a splitview basically, depending on orientation). The fact that default.png isn't editable does make this tricky though.

iPhone: quickly quitting an app then relaunching briefly shows last screen then black, then starts fresh

Trying to finish up an app I've been developing and have hit an odd bug that I'm not sure if it's on my end? a bug on apple's end? or perhaps the underpinnings of multitasking showing themselves.
My current app is doing this weird thing when you press the home button to quit the app, and then immediately relaunch the app. You see the Default.png image as the app starts up, but when it goes to display the window/view it briefly shows the screen as it was just before you quit the app, then goes to black for about 2 seconds and then displays the correct screen as if you were starting up fresh. I'm see this on all devices, iPods, iPhones, and iPad.
This is not just me, however, I've been trying other apps to see if they do it, and have found that the Air Hockey ( http://itunes.apple.com/us/app/air-hockey/id286106725?mt=8 ) is an example of an app that does this same thing. My instinct is that there are many apps that do. But the bulk of apps dont seem to have this issue.
I've done everything I can do make sure all views and view controllers are properly released, but it's almost like the device is taking a while to truly shut down even though the app has visually disappeared, and if you restart the app within probably 3 seconds or less then it still has something in the window buffer, or tht the full on view controller hasn't truly been released yet.
Anybody seen something like this and been able to solve it?
I'm the dev of that Air Hockey - It looks like it's probably Flurry that's causing it. I have a version without Flurry & it doesn't do it.
I solved this problem by updating my Flurry files to the latest version. http://dev.flurry.com/iphone_uploadNewVersion.do

iPhone Mobile App (safari): which javascript events like onblur, onfocus or onbeforeunload are available?

So I just made my web-application "iPhone Friendly". So you can add it to your home screen and it has an icon, no chroming, etc etc.
The problem is that I want to display a custom splash-screen every time it is opened from the iPhone home screen. Right now it just shows the last screen viewed while it basically runs a refresh.
I have tried attaching events to window.onfocus, window.onblur, window.onbeforeunload, and NONE of them seem to work right when the app is being run in "mobile-app" mode.
Am I being dumb? Er.... don't answer that. Does anyone know what is wrong?
Unfortunately, with the restrictions Apple imposes, this is impossible.
My recommendation is to create a App Store application with a full-screen WebView. Then, you can use a default.png file and a ImageView for your splash screen. Also, you get a ton more visibility on the App Store. (Also, if you go this route, check out PhoneGap - http://phonegap.com/).
Update!! In the iPhone 3.0 update, mobile safari now supports the ability to specify an image to be used on startup:
Remember this only works with iPhones that are running 3.0+
The loading screen you are talking about is the loading screen for an APPLICATION, not a webpage, i.e its the loading screen for Safari. This has nothing to do with "the restrictions Apple imposes", just with the fact that because your web app still runs in the browser, the browser needs to load first. Like was also said, if you want to get around this you need to build your own app, in which you can specify the splash screen.
Are you using this?
<meta name="apple-mobile-web-app-capable" content="yes" />
If yes, it should refresh every time when you exit the web app and enter again. It will NOT show the last screen viewed. Hence you can show your splash-screen every time when it is opened. In another words, you should show a full screen div / image every time when you load the page.