Simultaneous accesses to 0x1c0a7f0f8, but modification requires exclusive access error on Xcode 9 beta 4

I think this ‘bug’ may be a Swift 4 ‘feature’, specifically something they call ‘Exclusive access to Memory’. Check out this WWDC video. Around the 50 minute mark, the long-haired speaker explains it. https://developer.apple.com/videos/play/wwdc2017/402/?time=233 You could try turning the thread sanitizer off in your scheme settings if you’re happy to ignore it. However, the debugger … Read more

Use Xcode 8 with iOS 11

As of now this is only for Debugging on iOS device, not Simulator Xcode 8 could not support unless you have the DeviceSupport folder for the iOS 11 version. You can download a Xcode 9 beta (latest Xcode 9) or get an DeviceSupport folder from other user. Simply copy it to your folder or create … Read more

UISearchBar increases navigation bar height in iOS 11

I got black line under NavigationBar with SearchBar in iOS 11 in two cases: when i pushed another ViewControllers from ViewController with UISearchBar when i dismissed ViewController with UISearchBar with “drag right to dismiss” My solution was: adding this code to my ViewController with UISearchBar: -(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; [self.navigationController.view setNeedsLayout]; // force update layout [self.navigationController.view … Read more

Location Services not working in iOS 11

It would appear that apple have added yet another privacy feature. The user is now able to override our requestAlwaysAuthorization and downgrade it to requestWhenInUseAuthorization – Which means as a developer we now have to supply both descriptions in the Info.plist I found that they have added a new key NSLocationAlwaysAndWhenInUseUsageDescription /* * Either the … Read more

Barcode on swift 4

I figured it out but Apple didn’t make it so obvious. The callback function from the delegate AVCaptureMetadataOutputObjectsDelegate has been renamed and the parameter names are different! So, replace func captureOutput(_ captureOutput: AVCaptureOutput!, didOutputMetadataObjects metadataObjects: [Any]!, from connection: AVCaptureConnection!) to func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) My view controller is now … Read more