xcode9

Why I am getting Lazy loading NSBundle MobileCoreServices.framework?

六眼飞鱼酱① 提交于 2019-12-03 15:41:27
问题 When I redirect from main viewController to another viewController I'm getting this Error: Lazy loading NSBundle MobileCoreServices.framework, Loaded MobileCoreServices.framework, System group container for systemgroup.com.apple.configurationprofiles path is /Users/develop/Library/Developer/CoreSimulator/Devices/083C0102-C85F-463A-96F4-CA1B9AC7919D/data/Containers/Shared/SystemGroup/ systemgroup.com.apple.configurationprofiles My code is... Appdelegate.m if (![[NSUserDefaults

The spoiled simulator xcode 9. As a broken TV

为君一笑 提交于 2019-12-03 15:41:25
Almost every launch of the application on any Xcode 9 simulator results in that in the screenshot: Maybe someone encountered this problem and solved it? You can try to switch render engine to OpenGl instead of metal Use this command in terminal. defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferRendererHint 2 (1 = Metal, 2 = force use of OpenGL, 3 = OpenGL) Or if your gpu is HD3000 you need to use defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferEmulationHint 1 来源: https://stackoverflow.com/questions/46831145/the-spoiled-simulator-xcode-9-as

Launch Image names of iPhoneX?

孤街浪徒 提交于 2019-12-03 14:50:37
问题 A question about iPhoneX. I want put Launch Image of iPhoneX( 1125px × 2436px) in common folder. Not in LaunchImage source. What's the Launch Image names of iPhoneX? just like 'Default-iOS8-736h@3x', I can not found the name in https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/launch-screen/ . 回答1: You can add static launch image for iPhone X, only add: Default-375w-812h@3x.png 回答2: Following the convention it should be named Default-812h@3x.png (and Default

How to add a safe area programmatically

ⅰ亾dé卋堺 提交于 2019-12-03 13:01:26
When you open the view, it will look like the image below, i Phone x open view i Phone 8 open view For iphone x, I would like to add a safe area programmatically in the current view. The source to try is as follows. UIView *view = self.view; if (@available(iOS 11.0, *)) { UILayoutGuide * guide = view.safeAreaLayoutGuide; [view.topAnchor constraintEqualToAnchor:guide.topAnchor].active = YES; [view.bottomAnchor constraintEqualToAnchor:guide.bottomAnchor].active = YES; } I suppose to apply this source, but I do not know what to do. please answer about my question.! Here is sample code for Safe

Profile is not an “iOS App Store” profile

天大地大妈咪最大 提交于 2019-12-03 12:26:24
Using Xcode 9 . Working on app store build validation. Created an app with app store profile. Archived successfully Trying to validate build in Organizer, I am getting the following error on selecting the profile. This is the same profile used to archive and it is an app store profile. 2 Queries How to identify a profile if it is ad-hoc or app store Why did this happen?Pretty sure this is an appstore profile. Just had the same issue All you need to do is to delete your provisioning profile and create another one on Apple Developer site . Queries: 1) The only info we have about it is the

How to create Named colors in Interface Builder?

狂风中的少年 提交于 2019-12-03 12:00:47
How do I setup & use custom named colors in Interface Builder? In Xcode9 you can add "New Color Set" to .xcassets files, where you can set rgba values or use IB's color picker. Then you can use that newly defined color from Interface Builder's color picker, it appears under the Named Colors section. Or you can use it from code like UIColor(named:"customColorName") . As for now, Xcode9 beta 1 does not support using string literal color names as UIColor (like it works with UIImages), but I hope it will work in a later release. Unfortunatelly it's only available for iOS11 and later. 来源: https:/

Xcode 9 GM - Export and Upload to App Store crashing

跟風遠走 提交于 2019-12-03 11:55:55
I'm trying to upload my app that uses ARKit (Unity build) to iTunes Connect for TestFlight distribution. While both exporting and uploading to app store processes from Xcode -> Organizer I see crash on "Stripping extended attributes for APPNAME.app". I checked all configuration of bitcode and symbols on/off, signing automatically, manually. Deployment target of my project is iOS 10, as 11 cannot be set. I also tried following steps from simillar thread ( https://forums.developer.apple.com/thread/83219 ) and added App Store 1024 icon to Images.xcassets. Any ideas why Xcode is crashing?

Swift 4 ,must be used from main thread only warning

落爺英雄遲暮 提交于 2019-12-03 10:40:49
问题 When I using Swift4 in Xcode 9 gives me UIApplication.delegate must be used from main thread only .... must be used from main thread only UI API called from background thread Group Purple Warning. My codes; var appDelegate = UIApplication.shared.delegate as! AppDelegate public var context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext let prefs:UserDefaults = UserDefaults.standard var deviceUUID = UIDevice.current.identifierForVendor!.uuidString Warning line

How to calculate iOS 11 size in different orientation?

我是研究僧i 提交于 2019-12-03 10:39:49
I calculate itemSize dependent on safe area for UICollectionView with horizontal scroll and custom layout. But for iPhone X safe area has different size for different orientation. My question is how should I calculate safe area size for landscape orientation in viewWillTransition function? Or how is it possible to do without this calculation? EDIT To get safe area size without creating any additional views, use this: view.safeAreaLayoutGuide.layoutFrame.size If you want to use viewWillTransition method you can use this: override func viewWillTransition(to size: CGSize, with coordinator: