Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Installation instructions #2

Open
grantneufeld opened this issue Jan 5, 2020 · 6 comments
Open

Documentation: Installation instructions #2

grantneufeld opened this issue Jan 5, 2020 · 6 comments

Comments

@grantneufeld
Copy link

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!

@Sadmansamee
Copy link

I was looking for it too, it is missing.

@joshualay
Copy link

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

@Sadmansamee
Copy link

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

@AkshayNG
Copy link

AkshayNG commented Jul 5, 2021

@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)

@rveruna
Copy link

rveruna commented Jan 20, 2022

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?

@william-james-pj
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants