xcode9

Xcode 9 update Swift, purple warning

本小妞迷上赌 提交于 2021-02-18 07:46:28
问题 Not sure why after updating to Xcode 9 my project (originally created in Swift 3) is showing purple warnings: UITextField.text must be used from main thread only I'm only checking in If statement if text field is empty... attaching screenshot. 回答1: The login manager is running your closure on a thread other than the main thread and you can't use user interface elements off the main thread. Others have said that it's OK just to read UI properties on side threads and they are probably right,

Xcode 9 - Xcodebuild error - UI tests not running, Timed out waiting for AX loaded notification

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-10 04:12:46
问题 My tests do not start executing, and always timeout every time I try to use an xcodebuild command. The command that I used is the following: xcodebuild -workspace App.xcworkspace -scheme 'AppName' -sdk iphonesimulator -configuration 'UI_Automation' CODE_SIGN_STYLE='Manual' CODE_SIGN_IDENTITY='iPhone Developer: John Smith (XXXXXXXX)' PROVISIONING_PROFILE_SPECIFIER='John Smith PP Name' DEVELOPMENT_TEAM='ABC Company Apple DEV' -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2'

Xcode 9 - Xcodebuild error - UI tests not running, Timed out waiting for AX loaded notification

耗尽温柔 提交于 2021-02-10 04:11:57
问题 My tests do not start executing, and always timeout every time I try to use an xcodebuild command. The command that I used is the following: xcodebuild -workspace App.xcworkspace -scheme 'AppName' -sdk iphonesimulator -configuration 'UI_Automation' CODE_SIGN_STYLE='Manual' CODE_SIGN_IDENTITY='iPhone Developer: John Smith (XXXXXXXX)' PROVISIONING_PROFILE_SPECIFIER='John Smith PP Name' DEVELOPMENT_TEAM='ABC Company Apple DEV' -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.2'

add download button for pdf in wkwebview in swift 4

喜欢而已 提交于 2021-02-07 13:41:26
问题 I have done webview app using wkwebiew in xcode 9. In the website, there are some part need to download the pdf file, the pdf file can be view only but how to make it can be download to our iphone. can you share some tip to me, this is my code class ViewController: UIViewController,WKNavigationDelegate,UIWebViewDelegate { @IBOutlet weak var activityIndicator: UIActivityIndicatorView! @IBOutlet weak var webView: WKWebView! @IBOutlet var containerView: UIView? = nil @IBOutlet weak var

add download button for pdf in wkwebview in swift 4

好久不见. 提交于 2021-02-07 13:38:23
问题 I have done webview app using wkwebiew in xcode 9. In the website, there are some part need to download the pdf file, the pdf file can be view only but how to make it can be download to our iphone. can you share some tip to me, this is my code class ViewController: UIViewController,WKNavigationDelegate,UIWebViewDelegate { @IBOutlet weak var activityIndicator: UIActivityIndicatorView! @IBOutlet weak var webView: WKWebView! @IBOutlet var containerView: UIView? = nil @IBOutlet weak var

Xcode 9 Server exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}

谁说我不能喝 提交于 2021-02-07 12:29:44
问题 I upgraded to Xcode 9 Server recently and discovered a sudden problem. There were several other problems i had until i came to this error. I changed from automatic signing to manual singing back and forth. Now in my iOS project i've set it manually and on the server i tried both. The build is successful and it produces an archive (i can't download it though), but it also gives me the error: exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of

Xcode 9 Server exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}

为君一笑 提交于 2021-02-07 12:29:19
问题 I upgraded to Xcode 9 Server recently and discovered a sudden problem. There were several other problems i had until i came to this error. I changed from automatic signing to manual singing back and forth. Now in my iOS project i've set it manually and on the server i tried both. The build is successful and it produces an archive (i can't download it though), but it also gives me the error: exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of

Cannot rotate interface orientation to portrait upside down on iPhone X

偶尔善良 提交于 2021-02-07 07:27:20
问题 We have an app which makes use of an accessory connected to the audio jack(or lightning port in iPhone7 or later).It needs to be run in certain orientations, depending on iOS device. There are currently no issues setting device orientation in either simulator or actual device for any iPhone, except the iPhoneX simulator. Current code for setting orientation: - (BOOL)shouldAutorotate { return YES; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { //device checks omitted return

Cannot rotate interface orientation to portrait upside down on iPhone X

五迷三道 提交于 2021-02-07 07:27:18
问题 We have an app which makes use of an accessory connected to the audio jack(or lightning port in iPhone7 or later).It needs to be run in certain orientations, depending on iOS device. There are currently no issues setting device orientation in either simulator or actual device for any iPhone, except the iPhoneX simulator. Current code for setting orientation: - (BOOL)shouldAutorotate { return YES; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { //device checks omitted return

can I use a Gradient color in Launch screen xcode

柔情痞子 提交于 2021-01-28 12:14:22
问题 I want to know if it's possible to use gradient colors in the launchscreen.storyboards if so where can I edit it. I'm not looking to add images because it can make the app to heavy but maybe a transition to change the gradient from a-colors to b-colors. thanks in advance. 回答1: If you want to render gradients programmatically in a storyboard, you can generally define a UIView subclass to do that, but you cannot use custom classes in the launch screen. You’ll have to use an image. If your