Problem: Invalid bundle. The “ UIInterfaceOrientationLandscap eLeft, UIInterfaceOrientationLandscap eRight, UIInterfaceOrientationPortrait ” orientations were provided for the UISupportedInterfaceOrientatio ns Info.plist key in the com.myapp bundle, but you need to include all of the “ UIInterfaceOrientationPortrait , UIInterfaceOrientationPortrait UpsideDown, UIInterfaceOrientationLandscap eLeft, UIInterfaceOrientationLandscap eRight” orientations to support iPad multitasking. For details, visit: https://developer.apple.com/ documentation/bundleresources/ information_property_list/ uisupportedinterfaceorientatio ns . (ID: something) Solution: In the above image you have to check the full screen option enabled.If not then enable and upload it will works.
Code: String (describing: nsnumbervalue ) (or) String (nsnumbervalue ) The above code is used to convert the NsNumber to String. NSDate To String String (describing: Date ) Combine NsNumber and string to String Code: String ( " \ ( nsnumbervalue ) km" ) Convert Float to String Code: String (describing: floatvalue )
If you are using location based values in all the screen of apps then its a better to implement as a singleton class.First import the core location.The class will be as follows. Code: import UIKit import CoreLocation protocol LocationServiceDelegate { func tracingLocation(currentLocation: CLLocation ) func tracingLocationDidFailWithError(error: NSError ) } class LocationSingleton: NSObject , CLLocationManagerDelegate { var locationManager: CLLocationManager ? var lastLocation: CLLocation ? var delegate: LocationServiceDelegate ? static let sharedInstance: LocationSingleton = { let instance = LocationSingleton () return instance }() override init () { super . init () self . locationManager = CLLocationManager () guard let locationManagers= self . locationManager else { return }
Comments
Post a Comment