xcode7

iOS Framework issue: Class is implemented in both

痴心易碎 提交于 2019-12-23 18:57:12
问题 I'm working on an iOS framework project which is using a third-party framework classes so I added third-party framework under Linked frameworks and libraries section. When I add my custom framework in my iOS app project, I'm getting this warning for each class objc[3139]: Class 'class_name' is implemented in both /private/var/containers/Bundle/Application/C131AF0F-7CF8-4360-8716-3E8A595169D6/'app_name'.app/Frameworks/'framework_name'.framework/'framework_name' and /var/containers/Bundle

Workaround to submit app to app store with Xcode 7

五迷三道 提交于 2019-12-23 18:05:33
问题 When trying to submit an app compiled with Xcode 7 to iTunes Connect for review, I get an error message Apps and app updates submitted to the App Store must be built with Xcode 5.1.1 or later, and iOS 7 SDK. Is there any workaround to this? I've already updated all of my code to Swift 2.0, and I would like to not have to convert it all back to Swift 1.2 to upload it. Setting the Deployment Target to iOS 8.0 doesn't work, either Are there any ways that I can compile the Swift 2.0 code in a way

Swift 2 iOS 9: Plist Reading and Writing

二次信任 提交于 2019-12-23 12:36:47
问题 I believe something has changed within Swift 2, because no tutorials on how to read and write to property lists seem to be working. Can anyone whose developing for iOS 9 share their method of R/W to Plists using Swift 2 on Xcode 7? 回答1: This is working for me on iOS 9 and Xcode 7: let filePath = NSBundle.mainBundle().pathForResource("FileName", ofType: "plist")! let stylesheet = NSDictionary(contentsOfFile:filePath) The only thing is that the result is NSDictionary and not Dictionary . 回答2:

How to scroll storyboard preview?

心不动则不痛 提交于 2019-12-23 10:10:32
问题 Storyboard has a horizontal scrollbar for you to scroll to view other scenes, but the scrollbar is not present when previewing the storyboard scene. How do you scroll storyboard preview? (Assuming I am not using magic mouse) 回答1: What about Shift + Mouse Scroll ? Or if you have Macbook, slide two fingers left or right on trackpad to scroll. 回答2: Just press and hold on the edge of the preview. 来源: https://stackoverflow.com/questions/33714764/how-to-scroll-storyboard-preview

Simulating pressing the Home button in Xcode 7 UI Automation

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 09:43:20
问题 I've got it down to: XCUIDevice.pressButton(noideawhatgoeshere) I've tried XCUIDeviceButtonHome, home, Home, 1 How do I simulate pressing the home button in Xcode on iOS? 回答1: You need to get the device instance first. So to simulate pressing the home button: XCUIDevice.sharedDevice().pressButton(XCUIDeviceButton.Home) should work (it does for me on a physical device) Thanks! Mazen Swift 5 Version: XCUIDevice.shared.press(XCUIDevice.Button.home) Also, verified it works in the simulator, at

Can't run app on device after upgrade to xcode 7

和自甴很熟 提交于 2019-12-23 08:58:08
问题 I updated my iphone 6 to ios 9 and I also updated Xcode to version 7.0. When I run my project on the simulator, the app works fine. When I try to run the app on my device the app crashes and I see this: dyld`dyld_fatal_error: -> 0x120049088 <+0>: brk #0x3 Originally I was using cocoapods and getting an error that said "Image not found" for each of my frameworks I had configured. I removed cocoapods and manually added all the frameworks but now I'm getting the error above. Any help would be

Xcode7: This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes

一曲冷凌霜 提交于 2019-12-23 08:39:30
问题 I got this messages,when I updated Xcode7. Can you tell me solution? Thank. This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release. Stack:( 0 CoreFoundation 0x250df883 <redacted> + 150 1 libobjc.A.dylib 0x367dedff objc_exception_throw + 38 2 CoreFoundation 0x250df7b1 <redacted> + 0 3 Foundation 0x25f7be63 <redacted> + 170 4 Foundation 0x25e21ba7 <redacted> + 38 5

Use Launch Image for Launch Screen

霸气de小男生 提交于 2019-12-23 06:37:46
问题 using xcode 7 I wanna to create a Launch Screen with the same image for all iPhones. In the application main target -> General -> App Icones and Launch Images -> Launch Image Source I have selected the "LaunchImage" In the assets I created a LaunchImage (App Icons & Launch Images->New iOS Launch Image) and I put all the images applicable to the various devices. When I start my app there isn't launch image. Anyone know why? Thanks to all 回答1: As i mentioned in the comment remove the Launch

xCode CGContextSaveGState: invalid context 0x0 Error

荒凉一梦 提交于 2019-12-23 05:22:50
问题 I just updated xCode to 7.0. My code was working before but now am I getting: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable. In my application I have an inbox that displays an image/video once the message cell is selected. Before the messages were displaying fine but upon updating they no longer show. Is this a valid error or an Apple bug? The involved code is placed below. InboxTableViewController.m -

Can't use Objective-C Pod Framework in Swift 2 project (“Use of undeclared type 'SMPageControl'”)

和自甴很熟 提交于 2019-12-23 05:07:33
问题 I have a Swift 2 project running on Xcode 7. I'm using CocoaPods (v 0.38.2 with use_frameworks! ) and have already managed to get those frameworks working: CryptoSwift Pluralize_swift Both Pods are written in Swift, so no problems so far. They work as charm. Now I'm trying to use SMPageControl which is written in Objective-C. I've seen it's possible to use Obj-C Pods with Swift 2, tried a lot of different combinations but I can't get it to work. SMPageControl class doesn't show on