I am trying to open from my keyboard extension. I am having custom keyboard and I have add that keyboard from setting. On my custom keyboard there is one button “Show More”, and I want to open my app on this button click.So I have tried following code :let context = NSExtensionContext()
context.open(url! as URL, completionHandler: nil)
var responder = self as UIResponder?
while (responder != nil) {
if responder?.responds(to: Selector("openURL:")) == true {
responder?.perform(Selector("openURL:"), with: url)
}
responder = responder!.next
}It is working successfully, but as we know in swift Selector("method_name:") is deprecated and use #selector(classname.methodname(_:)) instead so it is giving warning. And I want to solve that warning. So I have tried as Xcode automatically suggested :if responder?.responds(to: #selector(UIApplication.openURL(_:))) == true {
responder?.perform(#selector(UIApplication.openURL(_:)), with: url)
}Also tried :if responder?.responds(to: #selector(NSExtensionContext.open(_:))) == true {
responder?.perform(#selector(NSExtensionContext.open(_:)), with: url)
}I have also tried others possible ways, but no luck. If anyone know how to do, please let me know.I referred this link, Julio Bailon’s answer : openURL not work in Action Extension
Post
Replies
Boosts
Views
Activity
I have one of my application, that is created in Xcode 8. I have used CoreLocation and MapKit in that app. I have update app with latest iOS till now. and it was working fine. Now I am updating application with iOS 13. So I hvae opened app with Xcode 11.0 and updated all the required code. Also updated setting that is suggested by Xcode "Perform Changes" and all that.Now I run application, but I am getting error like : Compiler error: Invalid library file. I have searched lot, but can't find any solution. Is this a bug in new Xcode or new iOS ?Is there anything I have to do extra changes or settings ? Please guide me.2019-10-18 10:34:39.899827+0530 MapLocation[1697:57778] Compiler error: Invalid library file2019-10-18 10:34:39.900098+0530 MapLocation[1697:57778] Compiler error: Invalid library file2019-10-18 10:34:39.915973+0530 MapLocation[1697:57778] Compiler error: Invalid library file2019-10-18 10:34:39.916228+0530 MapLocation[1697:57778] Compiler error: Invalid library file2019-10-18 10:34:39.920608+0530 MapLocation[1697:57778] Updated coordinate are : <+23.02055700,+72.50524900> +/- 5.00m (speed -1.00 mps / course -1.00) @ 10/18/19, 10:34:39 AM India Standard Time2019-10-18 10:34:39.920697+0530 MapLocation[1697:57778] Latitude:- 23.0206, Longitude:- 72.50522019-10-18 10:34:39.925441+0530 MapLocation[1697:57778] Entering in ----> (Latitude:- 23.0206, Longitude:- 72.5052), With Radius:- 300.002019-10-18 10:34:39.925546+0530 MapLocation[1697:57778] Stated in ----> (Latitude:- 23.0206, Longitude:- 72.5052), With Radius:- 300.002019-10-18 10:34:39.926582+0530 MapLocation[1697:57778] Exit from ----> (Latitude:- 23.0021, Longitude:- 72.4995), With Radius:- 300.002019-10-18 10:34:39.926683+0530 MapLocation[1697:57778] Stated in ----> (Latitude:- 23.0021, Longitude:- 72.4995), With Radius:- 300.002019-10-18 10:34:39.932080+0530 MapLocation[1697:57778] Compiler error: Invalid library file2019-10-18 10:34:39.932268+0530 MapLocation[1697:57778] Compiler error: Invalid library file2019-10-18 10:34:39.948942+0530 MapLocation[1697:57778] Compiler error: Invalid library file2019-10-18 10:34:39.949220+0530 MapLocation[1697:57778] Compiler error: Invalid library file
I am using CoreLocation in my application. I want to track significant changes in location and altitude. So I have used startMonitoringSignificantLocationChanges, but not getting altitude.
Here is my code :
public class MyLocationManager: NSObject {
		public var currentLocation = CLLocation()
		private var locationManager = CLLocationManager()
		public override init() {
super.init()
self.configureLocationManager()
}
		private func configureLocationManager() {
self.locationManager.delegate = self
				self.locationManager.pausesLocationUpdatesAutomatically = false
self.locationManager.allowsBackgroundLocationUpdates = true
				self.locationManager.requestAlwaysAuthorization()
}
		public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
self.currentLocation = locations.last ?? CLLocation()
let lat: Double = self.currentLocation.coordinate.latitude
let long: Double = self.currentLocation.coordinate.longitude
let alt: Double = self.currentLocation.altitude
let dateTime = self.currentLocation.timestamp
print("\n\nLatitude :---- \(lat)")
print("Longitude :---- \(long)")
print("Altitude :---- \(alt)")
print("Date :---- \(dateTime)")
		}
}
Then I run app.
Allow location for Always
Check for location update (Location is updating but not getting altitude)
Sent app in background (Location is updating but not getting altitude)
Kill app / Full closed / Remove from background / Terminated (Location is not updating sometime and not getting altitude)
Can anyone help me with this problem?
I am searching for Xcode 13 on https://developer.apple.com/download/all/ where I can see other tools to support Xcode 13 are available for downloads, but Xcode 13 itself.
I can see Xcode 13 is available in App Store.
Also somewhere else I can see download option, but clicking on that not redirecting to the right path.
One more thing, I noticed is that Xcode 13 is not listed under the support directory as well.
I am curious to know why Xcode 13 is not available for download on the official site?
Definitely, I can download from the App Store, but on my organization system App Store is not accessible for security concerns. So using the official website is the only option to download the latest Xcode - 13.