iPhone app crashes when i try to switch between two apps? - iphone

iPhone app crashes when i try to switch between two apps one is my own app and other app which is downloaded from iTunes. Suppose my app has 2 view namely view A and view B .first I redirect my app from view A to view B then I pause my app and open another app. Then I resume my app and want to go back to view A. when I click the back button that point of time my app crashes. I can't find any reason for that and also checked all memory management & its seems OK.
Thanks in advance.

Related

App run in background to manage touch bar

I am wondering how I would use swift have one app that manages the touch bar while having another app open and being used. For example an ideal scenario is as follows:
1) The user launches touchBar app (that I have made with swift) and the app icon sits in the menu bar (with wifi, battery, time, ect.) And the app changes how the touch bar looks (eg: adds a few buttons).
2) The user launches another app and is able to use the other app while the touch bar continues to have the buttons and stuff on it.
Thanks in advance!

Going back from Calendar to my app

Im my app, I have this code at a given time:
UIApplication.sharedApplication().openURL(NSURL(string: "calshow://")!)
which takes you to the calendar of the device. How could I get back to the scene where that line is executed?
Thank you.
EDIT:
Pressing home (option+shift+h, since the frame is not shown in my iOS Simulator) takes you to home, not the app, as it should be.
A quote from this:
Unlike other platforms such as Android, iPhone does not create a stack of actions (back stacking on Android). What this means is that if you do decide to launch another application, your application will not resume when the user exits from the application you opened.
If user want to get back to your app, they should press home (option+shift+H) twice, and select the your application from the list.
iOS9 introduced a new "Back-To-App" button at top-left corner, which allow you get back to your application. You should see this button after the calendar is showed from your app.

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.

iPhone App on click of home button closing app instead suspending

Hi in my iPhone app if use for sometime and click home button of iPhone and then again tries to reopen app app is launching from beginning its not suspending(its not pausing and playing),but sometimes it works fine, in all of iPads it works fine.
What may be the reason for this any help is thanks in advance.
You might have opted out of background execution by specyfing the key 'UIApplicationExitsOnSuspend' as YES in your applications plist file. See the attached image (iOS 5) and check your application's plist.
And as you have specified that it happens only sometimes I assume that it may be an application crash.

iphone ios application home button press/applicationDidEnterBackground crash

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.