Local notifications won't show up on device? - objective-c

I made an iphone app for my girlfriend and it works fine on my iphone.
On her's iphone too except the local notifications won't show up.
The app also won't show up in the notification center of the iphone settings itself.
I searched for differences in my iphone settings and her's but I can't find the problem.
I did not paste my notification code because I think the problem lays somewhere else..
Any help?

Is she using iOS 8? If so, make certain you call UIApplication's registerUserNotificationSettings: method so the app can display local notifications.
You can determine if it worked by adding a application:didRegisterUserNotificationSettings: method to your app delegate.

Related

ReactNative doesn't respond to OrientationChanges

I'm trying to implement a navigation that pushes the user to a different screen when switching to landscape mode. I've tried for several hours now to implement an event listener to respond to an orientation change, which didn't work (I tried different examples from different websites).
Now, I took a full code example from here and here which also didn't work at all. (The first one just changes the text on the screen depending on the orientation, even that didn't work for me -.- )
I also tried to look into ScreenOrientation from Expo-Cli directly (expo-screen-orientation), but don't really get the documentation tbh.
I tried the orientation change on both an android emulator and my android phone (both Android 10).
Is there something I'm terribly missing here? How come that my app not respond to orientation changes?
Have you checked that the Device Orientation is not forced to Portrait in Xcode ? To check this go in Project -> General -> Device Orientation
Had the Device Orientation locked inside the app.json -.-

iOS8 Today Widget inside an iOS7 App?

Given that the current uptake of iOS8 is only 50% I don't want to make my next release exclusive to iOS8.
It would appear from playing with Xcode that one can compile a target, such as the today extension, for iOS8 without changing the main App and leaving it at iOS7.
Has anyone successfully updated an App which is iOS7+ including an iOS8 Today Widget extension?
I managed to get my iOS7.0+ App, with an iOS8.0 "Today Extension", past Apple iTunes review and into the store. It works well too.
So to answer my own question, yes you can put an iOS8 Today Widget inside an iOS7 App.
Just make sure you have the correct "Deployment Target" iOS version set under "Targets" for the App and the extension.

Converting iPhone app to Universal, XCode 5.1 using Xib files

Our application(only for iPhone) is already in iTunes. Which was developed using xib files. Now client wants same app should support both iPhone & iPad.
1. If I change "Development Info -> Devices -> Universal", will this work properly in both kind of devices?
A. If Yes for above : If I change version of an app on iTunes with the same project name. How this can be achieved?
B. What Settings should I do in plist file and with xib files?
Plz suggest.
Thanks in Advance
You can change to Universal, so the application will RUN in both iPhone and iPad. Nonetheless, you will have to make changes to xib depending on the behavior of your app. Usually, iPads use list and detail views if it's in landscape, for example:
or in portrait view:
both look something like:
I want to point out again, on how your app behaves. Is not mandatory to use master-detail style, only if it fits your app.
And you can upload your binary to iTunes without problems. You could have problems if your app is using Universal and changing to iPhone or iPad only. And don't touch your plist.

how to keep ios app using opentok video chat in foreground

I've integrated opentok ios sdk in my iOS 7 app, it is working fine, except this problem:
During video chat if I don't access iPhone for 5-10 seconds..then my app moves into background, causing viewer at other end to hear only audio. Video is disabled after app goes to background state.
I've observed same thing with their official example
https://github.com/opentok/opentok-ios-sdk/tree/master/samples/OpenTokFullTutorial
How can I avoid my app going to background while video chat is ongoing. Skype is working fine in this case, I want to achieve same thing.
What you want to do is prevent the iPhone from going to sleep. To do this, you cant try this:
[UIApplication sharedApplication].idleTimerDisabled = YES;
Here is iOS documentation on idleTimerDisabled
If you don't want the app going into background at all (like when the user taps on home button), you can opt to kill the app when it's not running instead of having it run in the background. To do that, check out iOS guide on opting out of background execution
If you do not want your app to run in the background at all, you can
explicitly opt out of background by adding the
UIApplicationExitsOnSuspend key (with the value YES) to your app’s
Info.plist file. When an app opts out, it cycles between the
not-running, inactive, and active states and never enters the
background or suspended states. When the user presses the Home button
to quit the app, the applicationWillTerminate: method of the app
delegate is called and the app has approximately 5 seconds to clean up
and exit before it is terminated and moved back to the not-running
state.
Hope that helped!

geofencing no longer relaunch app from terminated state in ios7?

I'm developing an app which uses ibeacon to determine if the user entered a specific region.
Now I'm using the CoreLocation framework to implement this geofencing-based feature.
I've read the document below.
https://developer.apple.com/library/mac/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html
in which the Apple is saying that:
"In iOS, the regions you register with the location manager persist between launches of your application. If a region crossing occurs while your iOS app is not running, the system automatically wakes it up (or relaunches it) in the background so that it can process the event. When relaunched, all of the regions you configured previously are made available in the monitoredRegions property of any location manager objects you create. "
I discovered that it's true just before the ios 7.
From ios 7, An app will be waken-up from background but it will actually no longer could be re-launched from terminated-state (slided out from the task manager which displayed by double-clicking the home button).
If it's due to the Apple's policies, why does Apple not update the above official document?
So I'm thinking of an ios7's bug because the Reminder App (a built-in app) is also not relaunched in ios7 even though it's relaunched in ios6.
Is this issue due to Apple's policies? or an ios7's bugs?
It takes me more than 2 days to google for a solution.
Any ideas for this issue?
The documentation is simply out of date. This is intended behavior in iOS7. Apple produced a video explicitly discussing this change. The idea is that if the user explicitly terminates the app, the user does not want it running. See this thread.
Is this such a big deal? How often will users really do this? Remember, if users are annoyed by you app, they can always uninstall it, too. This was true in iOS6.
iOS 7.1 reversed this policy. That is even if the user kills your app the iOS still launches your app upon crossing the region.