xcode7

iOS Simulator takes extremely long time to boot first time

隐身守侯 提交于 2019-12-20 23:22:30
问题 I'm trying to run an iOS simulator (Xcode 7.0.1, OS X Yosemite). However, the first time I run the simulator, it takes a very long time to boot up (80-120 seconds), which is causing my automation testing to time out. If I close the simulator and re-launch the same one, it will boot up in about 5-8 seconds. Launching a different device will cause the long boot up time again. I have tried resetting the content and settings of the simulator, deleting and re-downloading simulators, and

Replicate pull to refresh in XCTest UI testing

こ雲淡風輕ζ 提交于 2019-12-20 16:39:40
问题 I am trying to replicate a pull to refresh on a UITableView using the new Xcode UI testing framework in Xcode 7 (beta 3) My current approach is dragging from the table to whatever element below the table I can find. This works when there is a fixed item below the table like a UIToolbar or UITabBar I would rather not rely on having a UITabBar or UIToolbar but I can't figure out a way to do the pull to refresh/drag action without using the method in XCUIElement . func pressForDuration(duration:

Replicate pull to refresh in XCTest UI testing

家住魔仙堡 提交于 2019-12-20 16:39:07
问题 I am trying to replicate a pull to refresh on a UITableView using the new Xcode UI testing framework in Xcode 7 (beta 3) My current approach is dragging from the table to whatever element below the table I can find. This works when there is a fixed item below the table like a UIToolbar or UITabBar I would rather not rely on having a UITabBar or UIToolbar but I can't figure out a way to do the pull to refresh/drag action without using the method in XCUIElement . func pressForDuration(duration:

Swift 2 - Xcode 7.0 Cannot Access HTTPS site with unstrusted SSL Certificate

风流意气都作罢 提交于 2019-12-20 12:40:06
问题 Experts, I'm a Beginner in IOS 9 / XCODE 7 / Swift 2 Development Kit I'm trying to create an ios app that simply route to Web Application in HTTPS protocol. Below is my code so far in ViewController.swift import UIKit class ViewController: UIViewController { @IBOutlet var myWebView: UIWebView! /** * Function to Display the Web Application initial URL */ func loadAppURL(){ let siteAddress = "https://domain:8443/path/to/page" let url = NSURL (string: siteAddress) let urlRequest = NSURLRequest

Paytm sdk ios integration to open Paytm payment form?

淺唱寂寞╮ 提交于 2019-12-20 11:34:48
问题 Integrated Paytm sdk 2.1 in iOS (Xcode 7) and configured to make payment . I have a form in which amount and other fields need to filled then there is a button for Payment . Here is code which i am using : //Step 1: Create a default merchant config object PGMerchantConfiguration *mc = [PGMerchantConfiguration defaultConfiguration]; //Step 2: If you have your own checksum generation and validation url set this here. Otherwise use the default Paytm urls mc.checksumGenerationURL = @"generate

Paytm sdk ios integration to open Paytm payment form?

放肆的年华 提交于 2019-12-20 11:33:24
问题 Integrated Paytm sdk 2.1 in iOS (Xcode 7) and configured to make payment . I have a form in which amount and other fields need to filled then there is a button for Payment . Here is code which i am using : //Step 1: Create a default merchant config object PGMerchantConfiguration *mc = [PGMerchantConfiguration defaultConfiguration]; //Step 2: If you have your own checksum generation and validation url set this here. Otherwise use the default Paytm urls mc.checksumGenerationURL = @"generate

How do I migrate from UIAlertView (deprecated in iOS8)

强颜欢笑 提交于 2019-12-20 11:05:28
问题 I currently have the following line of code in one of my apps. It is a simple UIAlertView . However, as of iOS 8, this is now deprecated: let alertView = UIAlertView(title: "Oops!", message: "This feature isn't available right now", delegate: self, cancelButtonTitle: "OK") How do I update this to work with iOS 8+? I believe I have to change something to UIAlertCotroller , though I'm not too sure what. 回答1: You need to use UIAlertController instead. To class documentation is pretty

Xcode 7 Warning! was built for newer iOS version (5.1.1) than being linked (5.1)

萝らか妹 提交于 2019-12-20 09:34:44
问题 I upgraded Xcode 6 project to Xcode 7 and started seeing the warning was built for newer iOS version (5.1.1) than being linked (5.1). How to fix this warning? 回答1: In my case, this warning was produced because the iOS-Deployment-Target of one of my XCode subprojects was higher (7.1) than in my baseproject (7.0). If you use cococapods, this misconfiguration can happen when you specify a wrong iOS platform version in your Podfile. In my example, I specified in my Podfile platform :ios, '7.1'

Why does Swift 2 favor forced unwrap over optionals?

南笙酒味 提交于 2019-12-20 06:38:12
问题 I no longer see Xcode complaining that certain things need optionals (the "?"). Now it is always forced unwrapped (the bang "!"). Is there any reason to use optionals anymore when we now have forced unwrap? 回答1: I don't really know what you mean when you write that you no longer see Xcode complaining that "certain things need optionals. Now it is always forced unwrapped" . These two sentences contradict eachother: You may have non-optional variables as much as you wish, but optional can

Xcode 7 created new branch, commit fails

人走茶凉 提交于 2019-12-20 06:09:30
问题 Recently upgraded to Xcode 7 with an in progress app. Got app running fine but when I went to commit first changes in Xcode 7, I got the below error: The working copy “App Name” failed to commit files. error: invalid object 100644 07ce6672fd469d5c7545e48b910cb3ff4508e9ca for 'App Name/App Name-Prefix.pch' error: invalid object 100644 07ce6672fd469d5c7545e48b910cb3ff4508e9ca for 'App Name/App Name-Prefix.pch' error: Error building trees I then noticed that I now have an additional branch under