I am new to iOS.
The app I am working on has in Settings under Notification Center the Alert style set by default to Banners.
I would like to change that to Alerts. How can I do that?
After doing some search on google i found that this should be changed from Info.plist using NSUserNotificationAlertStyle.
I need some help. I don t know how to set this. Thank you
That variable is only valid on OSX Apps, not on iOS Apps.
On iOS, the style of the notification is set on the settings of the phone, so the user decides what style he wants for all apps.
Is not possible on iOS to change the style within the app and for just that app.
Check here for confirmation:
https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html
Related
Xcode and iOS App
Is there any solution that will programmatically allow me to set custom ringtones for people on my contact list for an iOS device? I've came across a thread that says it's not possible. I'm just trying to verify if this is true or not?
If it not true, how to do this?
I know we could change the app icon of the application in iOS 10.3 above and I achieved this successfully, but my question is that could we achieve this using a custom url.
Suppose that the app icon is stored in the backend server and the icon while changed according to the user login in the system. Is it possible?
This is not possible. Any alternate icons must be predefined the the app's info.plist file and are subject to app review.
Check out the documentation here: https://developer.apple.com/documentation/uikit/uiapplication/2806818-setalternateiconname
Apple's Human Interface Guidelines discusses some of the limitations of custom app icons: https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/
I'm fairly new to iOS development and I am porting an Android app to iOS 7. The Android app provides a screen that allows the user to change a number of non persistent settings. Because these are not saved, it doesn't seem appropriate to me to expose them, on iOS, as preferences via a settings bundle and the built-in Settings app. So I'm looking at an in-app settings screen, which I understand is allowed - but perhaps not encouraged - by Apple.
Some questions:
Am I correct that an in-App approach is allowed by Apple? Most example code seems to use settings bundles. Am I going to have problems when the app is submitted to the App Store?
I can put the settings UI in a simple UITableViewController, but is there an approved way to expose this to the user? XCode 5 doesn't provide a settings identifier (and icon) for toolbar buttons, and the "Info" identifier (letter i inside a circle) seems to have been dropped too. Should I use a custom icon? Are there any de facto standards?
I haven't seen this kind of UI element before on iOS but my exposure to the platform as a user is limited.
There is nothing wrong with doing an in-app preference (table)view. You won't be rejected for that (this point seems to be way too much exagerated outside the iOS community). There are guidelines that you can follow: iOS Human Interface Guidelines... or not. As long as you don't use private APIs (assuming you know how to access them anyway), you're fine! So you can use a custom icon, the "i" button, or any UI element that convey the reasonable meaning of providing access to more info/preference.
In your code, you can use the class NSUserDefaults (with the standardUserDefaults) to store your preferences.
Many apps have in-app settings. It's fine. Apple even states that it is fine. Just don't have both.
Use a custom icon. Many apps seem to use an icon that looks like a gear.
I want to show defaul Settings app. Before I could use method
NSURL*url=[NSURL URLWithString:#"prefs:root=WIFI"];
But now it's disabled, is there any way now in iOS7 to show Settings app?
Unfortunately this is not possible anymore, as apps were offering jailbreak like solutions through the app store(Settings shortcuts). See the following link iOS Launching Settings -> Restrictions URL Scheme. Infact, its been disable since iOS 5.1.
See the following link for an article that shows when and why this was removed in detail: http://www.idownloadblog.com/2011/11/29/iphone-5-1-disables-shortcuts/
I have seen that there are known apps, such as Twitter and Facebook, that display a "Turn Off Airplane Mode or Use Wi-Fi to Access Data" message within an alert view, with a button that switches to the Settings app, when no network is detected as the app goes foreground. This message is the same in all apps where I saw it, is this alert view a kind of predefined one that you can use? Similar to the one displayed when checking locationServicesEnabled...
I found some posts dealing with this issue some time ago, for example:
iOS UIAlertView button to go to Setting App, and it seems (or seemed) to be a way to read the values in the iOS' Settings app, but I couldn't find any of this in the Apple Developer's documentation... is there any public API for accessing those values? Would an app be rejected if accessing them as in the post I linked?
Thanks in advance
Till iOS 5.0, you can use the URL scheme to open the Settings App from third-party apps using the URLScheme like:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=WIFI"]];
Unfortunately, iOS 5.1 and iOS 6 not supports this feature.
You can use the Reachability for checking the Wi-Fi state.
For displaying the default alertview when the Wi-fi is off or in AirPlane mode you can use the Application uses Wi-Fi flag in the info.plist
Refer InfoPlistKeyReference for details:
UIRequiresPersistentWiFi
“Application uses Wi-Fi”
Specifies whether this app requires a Wi-Fi connection.