xcode

Xcode - File is part of module, ignoring import

折月煮酒 提交于 2021-01-28 07:02:21
问题 I have existing iOS project, added Unit test target and created new test case file in tests folder. When i tried to import module i'm facing this issue. I referred the below stack overflow question but it did not solve my problem. Xcode - Test class File is part of module, ignoring import @testable import wl_pih // Error: File 'wl_pihTests.swifts' is part of module 'wl_pih'; ignoring import class wl_pihTests: XCTestCase { let loginController = INCLoginViewController() //Not accessable

Sources referencing each other in XCode Playgrounds

≯℡__Kan透↙ 提交于 2021-01-28 06:58:32
问题 I have code in my Sources/ directory in my Xcode Playground. I can reference them fine in my playground, but how do I allow them to reference each other? For example, suppose I have A.swift and B.swift files in the Sources/ directory. I would like to have A.swift access something from B.swift , but then I get an error saying that things from B.swift are undefined in A.swift . How can I accomplish this? 回答1: Add the public attribute to the classes, methods, and properties that you want to

Xcode wrong Path to Module

£可爱£侵袭症+ 提交于 2021-01-28 06:51:08
问题 If I start Metro with: react-native run ios --reset-cache , the app working well at my USB-Connected Device. If I start the App in Xcode, the App didn't work anymore (worked before). Now I got this error: 2019-02-07 09:49:34.188 [error][tid:NSOperationQueue 0x281c0ede0 (QOS: UNSPECIFIED)][RCTCxxBridge.mm:429] Failed to load bundle(http://169.254.10.166:8081/index.bundle?platform=ios&dev=true&minify=false) with error: (Unable to resolve module ../../../native-base-theme/components from /Users

Refresh JSON data after a few seconds in swift

回眸只為那壹抹淺笑 提交于 2021-01-28 06:30:46
问题 I want this to update every 4 seconds with fresh data form the url, but i dont know how to do this. This is what i have so far and it works fine but without the refresher! The Refresher needs to work like a youtube subscriber counter that update every 4 seconds or so. I have looked at a timer but i couldn't make it work because (i think) its a searchBarSearchButtonClicked function and the urlRequestid has to have a input! Please help! Thanks! func searchBarSearchButtonClicked(_ searchBar:

UIPickerView selection array Swift

∥☆過路亽.° 提交于 2021-01-28 05:49:58
问题 Currently, I got my code to work correctly, but the problem I'm having issue with the UIPickerView. Right now, If I select Cameron brand, it goes to var Cameron but if i select Shaffer brand, it still goes to var Cameron. How can I rewrite the code so when I pick a different brand, it select a different array? For example, if I select brand cameron, it select cameron, if i select brand Shaffer, it pick shaffer, etc. class Picker: UIViewController, UIPickerViewDelegate, UITextFieldDelegate {

Gigya Swift framework missing ios-framework-build.sh script

走远了吗. 提交于 2021-01-28 05:28:21
问题 My question is very simple, is anyone using Gigya Swift SDK Framework 1.0.11 noticed the missing file needed for the Run Script Build phase? How did you cope with that? Basically that's the file needed in the Run Script Build Phase, invoked this way: bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/Gigya.framework/ios-framework-build.sh" Gigya Thanks anyone providing an answer! 回答1: This is a normal script to removes unused architectures. You can take it from the old version and put in

How to set gradient color to view in Dark mode ios?

心已入冬 提交于 2021-01-28 05:19:49
问题 I want to change the gradient color in dark mode. But it not changing. Gradient set once the view is setup. Color not changing while switching between light and dark mode. if let layer = layer as? CAGradientLayer { if let startGradientColor = startGradientColor, let endGradientColor = endGradientColor { layer.colors = [startGradientColor.cgColor, endGradientColor.cgColor] } else { layer.colors = gradientColors.map {$0.cgColor} } layer.startPoint = CGPoint(x: 0, y: 0) // top layer.endPoint =

How to set canBecomeKeyWindow?

余生颓废 提交于 2021-01-28 05:06:56
问题 This may be very trivial question but I am not able to figure it out. I have removed titlebar of a window by- self.window?.styleMask = NSBorderlessWindowMask self.window?.movableByWindowBackground = true Now Any textfield is not working and are disabled because without title bar canBecomeKeyWindow is set to false. Please refer This How I can set it to true? I have tried self.window?.makeKeyWindow() But it is not working. Thanks for your help. 回答1: If a variable is read-only (i.e. { get } ,

How to set canBecomeKeyWindow?

混江龙づ霸主 提交于 2021-01-28 05:00:55
问题 This may be very trivial question but I am not able to figure it out. I have removed titlebar of a window by- self.window?.styleMask = NSBorderlessWindowMask self.window?.movableByWindowBackground = true Now Any textfield is not working and are disabled because without title bar canBecomeKeyWindow is set to false. Please refer This How I can set it to true? I have tried self.window?.makeKeyWindow() But it is not working. Thanks for your help. 回答1: If a variable is read-only (i.e. { get } ,

Duplicate Symbols when adding Realm Cocoapod

无人久伴 提交于 2021-01-28 04:49:17
问题 I’m trying to use Realm for the first time in a real project, and I’ve added it via Cocoapods successfully. I’m using Xcode 6.4, but have the Xcode 7.1 beta installed on the same machine (for other projects). When attempting to build the project or run unit tests (on the Simulator), I get a linker error saying that dozens of pairs of files are duplicated. Looks like one mentioned Bitcode and one doesn’t. I’m using Xcode 6.4 – why does it even know about Bitcode? Here’s a small sample of the