I just made a simple game with flash professional 6.0 and adobe AIR sdk 3.4 for iPhone.
The problem is this: when I lock the iphone pressing the power button, the screen switches off as usual, but the music of the game still sounds. If I exit the game pressing the home button it exits fine. Is only when locking the phone with the app opened.
Also, I opted-out of multitasking for my app, so if I close my app with the home button and I reload it, it loads the main menu.
Anyone knows how can I solve this?
Ok, after a lot of reading, it is a very very simple solution, just with this at the start of the app:
SoundMixer.audioPlaybackMode = AudioPlaybackMode.AMBIENT;
With this playback mode, the sound mutes when the app goes to the background.
I have created a universal app in x code 4 and am attempting to use their "launch images". I am however running into an issue where once the iPad splash screen displays it will flash to the iPhone splash screen quickly before going into the application. Has anyone else run into this and is there a fix?
Thanks!
I experienced this on a universal app, but it was because I implemented a custom fade sequence that referenced the iPhone default.png during launch (even on an iPad). Once I figured that out, I just set a check for whether the device was an iPad, and if so, disabled the fade call. Do you reference the file in any way aside from the typical launch?
hallo, i am newbie in developing iphne/ios application and i have
encountered some problem
generrraly my app (which is iphone camera image processing app) has no
visible errors at today stage except the one
when i press the home button to send my app off screen (putting to the
background), and then press the app icon to 'wake it up' again
it crashes
what would it be...? what the reason of it would be?
what is done to my app (seen from the view of programmer
- i mean internal game state) by this home buton operation?
- what i should take care of before "applicationDidEnterBackground"
eventually?
thanx for answer
Is this happening when you are running it from Xcode? Xcode does not like it if you hit the home button and start it again from within the device/simulator. Is it crashing if you launch it from the device (or simulator) without Xcode running? If not, then there probably isn't a problem.
When this app (douban.fm) is running, the default volume bar could control it playing/next instead of the iPod app. and there's a play icon in the status bar. and I believe the headset control could control the app as well.
I'm developing a similar music app and wondering how to accomplish this functionality that when my app is running, users could use the control bar or headset control to play/next?
the play icon in status bar (near the battery icon)
https://picasaweb.google.com/nicoster/201134?feat=directlink#5580079059148648786
system music control now controls douban.fm
https://picasaweb.google.com/nicoster/201134?feat=directlink#5580079159380140162
see this question. I think it'll help :)
How to enable iPod controls in the background to control non-iPod music in iOS 4?
I was scratching my brains over something when this popped in my mind. Can we set the simulator's home-screen background image to an image of our choice? Case in point is Xcode 3.2.2 simulator 3.1.3.
Certain versions of the simulator appear to support this, not just for the home screen but for the lock screen too (which you get to with Command ⌘+L):
Drag an image from your Mac to the simulator.
Mobile Safari opens. Click and hold the image.
Choose Save Image.
Go to Photos.app, and into the photo album.
Choose your image, and set it as the home screen background like you do on a device.
You may need to restart the simulator.
Note that since this isn't exactly officially supported, it may or may not work for you depending on your version of Xcode or the simulator.
It is possible (again) with the iOS Simulator version 6 (for iOS6).
First, add some images to your photo library. You can do this by using Mobile Safari (either surf the web or drag a local image to the simulator). Then perform a long press and save to camera roll.
Second, open "Photos", select the image and set as Background.
Third, restart the simulator (this irritated me at first, as it doesn't seem to work immediately)
How to do this for the Simulator in 11.4.
Drag and drop a photo on the phone.
Go to photo app and view app.
On the bottom bar you should see 3 icons. Hit the icon with the Arrow coming out of the box like you would AirDrop it to someone.
On the Options panel you should see Use as Wallpaper right below the AirPlay option.
Cheers
Hmm. Probably, since you cannot set backgroundimage on your homescreen(exept from the locked view) on on actual iPhone pre iOS4, you cannot do so in the simulator either.
Dragged the image onto the simulator (iOS 9.3) as #boltclock suggests, but nothing happened. However, I then noticed that the images I dragged were showing up in the Photos app on the simulator. From there I just set the wallpapers the same way that you set them on a physical device. Did not need to restart the simulator.
I thought I wasn't able to do this, but then I dragged the bottom row of options to the left and low and behold, there is the "Set as wallpaper" option.
:-)
Since this is an old question, I want to confirm this works in Simulator 13.2 for the iPhone 13 Pro Max (I'm running it on on macOS 12.2 Monterey).
In the simulator take Safari to the image you want to set as the background
Right click (or 2-finger press-click on trackpad)
Selected "Add to Photo"s from Pop-up menu
Open Photos app, and click the 'sharing' icon (box with up arrow coming out of it)
Scroll the popup upwards until you see the "Use As Wallpaper" menu item (if you have a Magic Trackpad, you can scroll with a three-finger swipe-up up on the screen)
That's it. You can set the Home and Lock screen that way.
While developing an iOS iPhone app using the simulator, I copied a space scene with just stars for the background and and moved the app icons all to the home screen except left my app icon alone on a different page that way I minimized light and clutter.