UBKAccessibilityKit icon indicating copy to clipboard operation
UBKAccessibilityKit copied to clipboard

Documentation: Installation instructions

Open grantneufeld opened this issue 4 years ago • 6 comments

The installation instructions in the README currently just describe how to include UBKAccessibilityKit in a project, assuming the kit is already installed for the project.

Is installation of the kit done as a Swift Package? CocoaPod? Download the git repository directly? …?

The documentation could do with clarification of that, please. Thanks!

grantneufeld avatar Jan 05 '20 02:01 grantneufeld

I was looking for it too, it is missing.

Sadmansamee avatar Jan 05 '20 12:01 Sadmansamee

I just downloaded the repo and dragged it into my project to get it up and running:

  1. Clone the repository
  2. Drag the nested folder UBKAccessibilityKit/UBKAccessibilityKit into my project and make sure copy items is checked image
  3. Follow the README instructions provided to add the override in AppDelegate
  4. Build and run

joshualay avatar Jan 06 '20 06:01 joshualay

@joshualay I do not want to add a dependency in this way. I need a more clean way, SwiftPM, Pod or Carthage.

Sadmansamee avatar Jan 06 '20 10:01 Sadmansamee

@joshualay I've installed in the same way as you described, but there I'm getting the error while building:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_UBKAccessibilityWindow", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

AkshayNG avatar Jul 05 '21 07:07 AkshayNG

I just downloaded the repo and dragged it into my project to get it up and running:

1. Clone the repository

2. Drag the nested folder `UBKAccessibilityKit/UBKAccessibilityKit` into my project and make sure copy items is checked
   ![image](https://user-images.githubusercontent.com/761841/71800746-e182e880-3093-11ea-9ff0-8613dfd3f593.png)

3. Follow the README instructions provided to add the override in AppDelegate

4. Build and run

why did you say nested folder? do i need to copy and paste the whole folder or just the one you have selected on the picture? and where do you paste it? in root? in ios folder?

rveruna avatar Jan 20 '22 16:01 rveruna

Get it running like this

  1. Clone the repository

  2. With your project open in Xcode, go to “File > Add files to…”. And add the UBKAccessibility.xcodeproj. UBK

  3. In your project's Targets, add UBKAccessibilityKit.framework as a dependency. Target

  4. Build

  5. Add the override:

  • If you are using Storyboard, in your SceneDelegate.swift file add the following code:
    //Swift usage
    import UBKAccessibilityKit
    
    class SceneDelegate: UIResponder, UIWindowSceneDelegate {
        var customWindow: UBKAccessibilityWindow?
        var window: UIWindow? {
            get {
                customWindow = customWindow ?? UBKAccessibilityWindow(frame: UIScreen.main.bounds)
                customWindow!.enableInspector = true
                return customWindow
            }
            set { }
        }
    
        func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
            window?.makeKeyAndVisible()
        }
        ...
    }
    
  • If you are using ViewCode, in your SceneDelegate.swift file add the following code:
    //Swift usage
    import UBKAccessibilityKit
    
    class SceneDelegate: UIResponder, UIWindowSceneDelegate {
        var window: UIWindow?
    
        func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
            guard let windowScene = (scene as? UIWindowScene) else { return }
    
            let window: UBKAccessibilityWindow = UBKAccessibilityWindow(windowScene: windowScene)
            window.enableInspector = true
    
            window.rootViewController = WelcomeViewController()
            self.window = window
            window.makeKeyAndVisible()
        }
        ...
    }
    
  1. Run

william-james-pj avatar Feb 08 '23 11:02 william-james-pj