profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/cameroncooke/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

cameroncooke/AppSearch 2

A demo project implementing the AppSearch API introduced in iOS 9

Jackstone92/CombineRx 2

Helpful bridging functions between RxSwift and Combine frameworks

cameroncooke/beebem-mac 1

This is the Mac port of BeebEm

cameroncooke/dotfiles 1

dotfiles for an iOS developer

cameroncooke/XcodeHeaders 1

Class dump of all Xcode 7 frameworks

notonthehighstreet/auth 1

👤 Authentication and Authorization framework for Fluent.

cameroncooke/apollo-ios 0

📱 A strongly-typed, caching GraphQL client for iOS, written in Swift

cameroncooke/autocomplete 0

Fig adds autocomplete to your terminal.

push eventnotonthehighstreet/gilded-rose

Cameron Cooke

commit sha 77a6a8eab0dbce404a871502b5ec07e4be26f174

Update Item.swift

view details

push time in 12 days

push eventnotonthehighstreet/gilded-rose

Cameron Cooke

commit sha 8505058102f97af107e1f39869f4dba27275230d

Update README.md

view details

push time in 12 days

PullRequestReviewEvent

pull request commentnotonthehighstreet/gilded-rose

Adding Kotlin version

Looks good, though I wonder if we should remove all but a single test as we do on the other language variants so it's down to the developer to think about adding test coverage?

tombruggenwirthnoths

comment created time in 13 days

startedpointfreeco/episode-code-samples

started time in 21 days

issue commentProxymanApp/Proxyman

Feature request: Show map remote/local details in Request Summary

Fantastic work! Thank you!

On Sun, 5 Sep 2021 at 09:52, Nghia Tran ***@***.***> wrote:

Good news is that this feature is implemented: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.32.0_Display_Debugging_tool.dmg

Proxyman will display a debugging tool, which the request/response is modified with some useful information.

[image: Proxyman Summary Tab] https://user-images.githubusercontent.com/5878421/132120741-a5df7be2-8258-476d-849c-83ad824b1138.png

[image: Proxyman Summary Tab] https://user-images.githubusercontent.com/5878421/132120743-b643612d-7045-460a-acd6-1cebd6d4ad37.png

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ProxymanApp/Proxyman/issues/940#issuecomment-913112438, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEZ6SJ3R5FZZZ5FAZPYVIDUAMVVRANCNFSM5ANJRQJA .

-- Cameron.

cameroncooke

comment created time in 22 days

push eventcameroncooke/autocomplete

Cameron Cooke

commit sha 06e3603d92d2858ee9039b16b7b9166c5ed4182e

git: sort branches by most recently committed

view details

push time in 24 days

fork cameroncooke/autocomplete

Fig adds autocomplete to your terminal.

https://fig.io

fork in 24 days

issue commentProxymanApp/Proxyman

Feature request: Add buttons to toolbar for quickly disabling/enabling breakpoints, map remote, map local and network conditions

Looks good only thing I would change is maybe some of the icons are a little unclear and the "small size" option doesn't really do anything much, might be good to have an option to show labels instead of the small option?

Cameron.

On Fri, 27 Aug 2021 at 16:05, Nghia Tran ***@***.***> wrote:

Hey @cameroncooke https://github.com/cameroncooke @robmathers https://github.com/robmathers @sleeve https://github.com/sleeve if you guys don't mind, please try this BETA build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.31.0_Customize_Toolbar.dmg

From now, you can customize the Toolbar and add your favorite Tool Toggle (Where you can enable/disable the tool easily) 👍

You can open it by right-clicking on the Toolbar -> Customize Toolbar...

[image: Screen_Shot_2021-08-27_at_20_55_48] https://user-images.githubusercontent.com/5878421/131148195-171af75d-639a-4ae5-ad5d-c9b3ba7afba1.png

Please let me know if it solves your problem 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProxymanApp/Proxyman/issues/939#issuecomment-907270054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEZ6SIXIXEPMRLPAPKPLOTT66STBANCNFSM5ANJMC3Q .

cameroncooke

comment created time in a month

issue commentProxymanApp/Proxyman

Response UI

Fix tabs?

;-)

Cameron.

On Fri, 27 Aug 2021 at 10:56, Nghia Tran ***@***.***> wrote:

I have a plan to revamp the UI of the main view soon 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ProxymanApp/Proxyman/issues/271#issuecomment-907080312, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEZ6SNEA4LUR6YS64SRJ4LT65ONBANCNFSM4IUCQFAA .

fishcharlie

comment created time in a month

issue commentProxymanApp/Proxyman

Response UI

Would be great if when collapsing the source list, hovering over the edge would show an overlay version as Xcode does, just gives you so much flexibility when working on smaller screen sizes like laptops. Also, I like that I can have the request/response panes left and right, I hadn't spotted that.

fishcharlie

comment created time in a month

issue commentProxymanApp/Proxyman

Response UI

I've knocked up a quick SwiftUI proof-of-concept of how I would love to be able to configure Proxyman panes like (couldn't quite get the animation working as I would have liked):

https://user-images.githubusercontent.com/630601/131029027-e8abb453-25c2-4153-939c-9dc8f8d8e0f5.mov

Even if this was just an option that would be great, Charles has an option to place the panes vertically or horotonally, also being able to collapse the navigator would be bonus and match many modern macOS apps.

fishcharlie

comment created time in a month

issue commentProxymanApp/Proxyman

Feature request: Show map remote/local details in Request Summary

Is this something that can be considered, would be helpful when debugging.

cameroncooke

comment created time in a month

startedpointfreeco/swift-custom-dump

started time in a month

issue commentpointfreeco/swift-snapshot-testing

Unable to use when tests don't have access to sources (Xcode Cloud)

Would it be possible to allow the use of run-time strings in assertSnapshot so we can use it in constrained environments where the current opinionated path logic doesn't work?

cameroncooke

comment created time in a month

issue openedwithfig/autocomplete

git

Sanity checks

  • [X] My issue relates to a specific CLI completion spec (e.g. git checkout is missing options in git completion spec). If your issue is more general, please create your issue here: withfig/fig
  • [X] I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue

What CLI tool does this relate to?

git

Which statement makes the most sense?

This completion spec isn't complete

Issue Details

$ git worktree add ~/Developer/SomeDirectory mainCould we support git worktree auto-completion?

This allows you to have multiple "worktrees" allowing you to check out multiple branches at the same time.

A use-case is you're working in a specific branch, but quickly need to check or work in another branch and don't want to have to stash or commit your changes, switch branches and then do the reverse when you're finished. You could clone the repo multiple times but they are hard to keep in sync. Worktrees don't consume any extra disk space for each brach checked out.

Basic use is via the add, remove and 'list' options.

Add a worktree for main:

$ git worktree add ~/Developer/SomeDirectory main

Remove a worktree:

$ git worktree remove ~/Developer/SomeDirectory

List worktrees:

$ git worktree list

From git worktree --help

       git-worktree - Manage multiple working trees

       git worktree add [-f] [--detach] [--checkout] [--lock] [-b <new-branch>] <path> [<commit-ish>]
       git worktree list [--porcelain]
       git worktree lock [--reason <string>] <worktree>
       git worktree move <worktree> <new-path>
       git worktree prune [-n] [-v] [--expire <expire>]
       git worktree remove [-f] <worktree>
       git worktree repair [<path>...]
       git worktree unlock <worktree>

created time in a month

issue openednalexn/ViewInspector

Checking for absent views

I've created a function to aid determining if a view is absent to reduce boilerplate in test cases:

func isViewAbsent<ViewType>(_ closure: @autoclosure () throws -> InspectableView<ViewType>) -> Bool {
    do {
        _ = try closure()
    } catch InspectionError.viewNotFound {
        return true
    } catch {}

    return false
}

Used like:

func testButtonIsShown() throws {

        let sut = MyView()
        XCTAssertTrue(isViewAbsent(try sut.inspect().button()))
}

This is useful when you've got views like:

struct MyView: View {
    
    @State var showButton = false

    var body: View {
         if showButton {
             Button(....)
         }
        ....
     }
}

Is there a simpler approach, I was hoping for something like:

    try sut.inspect().find(BackButton.self).button().isAbsent()

But couldn't find anything. Would be a useful method to have in the library?

created time in a month

issue commentnalexn/ViewInspector

Assert `UIViewRepresentable` state when updating bindings from TestCase

I agree around tooling, I think the issue here is that there are some intricacies with testing UIViewRepresentable views and about a million different ways of writing the tests but only one way works reliably in my experience, so ideally this would be abstracted away by the tooling so that mistakes can't be made the test site.

cameroncooke

comment created time in a month

issue commentnalexn/ViewInspector

Assert `UIViewRepresentable` state when updating bindings from TestCase

Right, I think I worked it out, it's a bit involved due to two specific limitations:

  1. You can't inspect the uiView() without waiting for the view to appear first so need to implement Approach #1 as detailed in the Guide.

  2. Need to use a Publisher to allow the @State properties to be updated from outside of the View using this Approach #2 but importantly this needs to be done within the closure of the didAppear call.

Here is my final implementation:

        var sut = BetterTextField.WrapperView(text: "Initial Value")
        sut.didAppear = { 

            let publisher = sut.publisher
            let exp1 = sut.inspection.inspect { view in

                // Assert inital value is set on the `UITextField` after the `View` has appeared
                let textField = try view.view(BetterTextField.self).actualView().uiView()
                XCTAssertEqual(textField.text, "Initial Value")

                // Update `@State var text` value to `New Value`
                publisher.send(("New Value", false))
            }

            // Important to drop first value on publisher otherwise we'll receive the initial value and the expectation will complete
            let exp2 = sut.inspection.inspect(onReceive: publisher.dropFirst()) { view in

                // Assert the `UITextField` text value is now set to `New Value`
                let textField = try view.view(BetterTextField.self).actualView().uiView()
                XCTAssertEqual(textField.text, "New Value")
            }

            defer { ViewHosting.expel() }
            ViewHosting.host(view: sut)

            self.wait(for: [exp1, exp2], timeout: 1)
        }

I also found out that I didn't need to introduce the Inspection class in the production target and instead could just create it in the Test target by importing the SwiftUI module.

extension BetterTextField {

    struct WrapperView: View, Inspectable {

        @State var text: String = ""
        let publisher = PassthroughSubject<String, Never>()

        var didAppear: ((BetterTextField) -> Void)?
        let inspection = Inspection<Self>()

        var body: some View {
            BetterTextField(text: $text)
                .onAppear {
                        DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
                            didAppear?(self)
                        }
                }
                .onReceive(publisher) { text = $0 }
                .onReceive(inspection.notice) { self.inspection.visit(self, $0) }
        }
    }
}

internal final class Inspection<V> {

    let notice = PassthroughSubject<UInt, Never>()
    var callbacks = [UInt: (V) -> Void]()

    func visit(_ view: V, _ line: UInt) {
        if let callback = callbacks.removeValue(forKey: line) {
            callback(view)
        }
    }
}

extension Inspection: InspectionEmissary { }
extension BetterTextField: Inspectable {}

IMO I kind of feel the primary use case for this library is testing 3rd party views as opposed to Apple views and the current documentation seems to lean more towards the latter. Would be good to have more detail like I've posted above on how to achieve testing of UIViewRepresentable views as it's a bit more involved and would save future me's going through the pain.

Also, I think putting the WrapperView in the Test target is far better than adding it to the app target.

Anyway, seems to work let me know if there are any further improvements I can make. Thanks!

cameroncooke

comment created time in a month

issue openednalexn/ViewInspector

Assert `UIViewRepresentable` state when updating bindings from TestCase

I'm really struggling to understand how to test a UIViewRepresentable, all my other tests are fine but the one test where I want to update the State values from the test and assert that the underlying UITextField is updated to reflect those states changes just won't work.

I've looked at other similar reported issues and all the documentation but I'm not really understanding the underlying implementation details to know what I need to do whether it's even possible. I can't see any examples in this repo where state bindings are updated by the test, only the other way around, perform a UI action and assert the bindings are updated.

I'm also seeing an Xcode run-time warning when running the below test:

Accessing State's value outside of being installed on a View. This will result in a constant Binding of the initial value and will not update.

The point of the test is to assert the default UITextField's state is correctly configured based on defaults on the @State properties and then to update the state and assert that the UITextField is updated accordingly.

In test target:

class Tests: XCTestCase {

    func test_updateBindingsUpdatesTextField() throws {

        let sut = BetterTextFieldContentView()
        ViewHosting.host(view: sut)

        var textField = try sut.inspect().find(BetterTextField.self).actualView().uiView()

        // Assert UITextField is configured based on binding defaults
        XCTAssertEqual(textField.text, "")
        XCTAssertFalse(textField.isFirstResponder)

        // Update state values
        sut.text = "Hello"
        sut.isFirstResponder = true

        // Wait a second to allow the view to update?
        let exp = sut.inspection.inspect(after: 1) { view in

            // get the next field again, not sure if we need to do this?
            textField = try view.find(BetterTextField.self).actualView().uiView()
        }

        wait(for: [exp], timeout: 1.1)

        // Assert that the values have been updated on the underlying UITextField
        XCTAssertEqual(textField.text, "Hello")
        XCTAssertTrue(textField.isFirstResponder)
    }
}

// Do we actually need this content view wrapper in order
// to use @State when testing?
struct BetterTextFieldContentView: View {

    @State var text = ""
    @State var isFirstResponder = false

    internal let inspection = Inspection<Self>()

    var body: some View {
        BetterTextField(text: $text, isFirstResponder: $isFirstResponder)
            .onReceive(inspection.notice) { self.inspection.visit(self, $0) }
    }
}

extension Inspection: InspectionEmissary {}
extension BetterTextFieldContentView: Inspectable {}
extension BetterTextField: Inspectable {}

In the main target:

// Would be defined outside of the test target
public struct BetterTextField: UIViewRepresentable {

    @Binding var isFirstResponder: Bool
    @Binding var text: String

    public init(text: Binding<String>,
                isFirstResponder: Binding<Bool>) {
        _text = text
        _isFirstResponder = isFirstResponder
    }

    public func makeUIView(context: Context) -> UITextField {
        ...
    }

    public func updateUIView(_ uiView: UITextField, context: Context) {
        uiView.text = text

        switch isFirstResponder {
        case true: uiView.becomeFirstResponder()
        case false: uiView.resignFirstResponder()
        }
    }

    ...
}

internal final class Inspection<V> {

    let notice = PassthroughSubject<UInt, Never>()
    var callbacks = [UInt: (V) -> Void]()

    func visit(_ view: V, _ line: UInt) {
        if let callback = callbacks.removeValue(forKey: line) {
            callback(view)
        }
    }
}

Any help would be greatly appreciated as I've spent two days on this now and getting nowhere. I know the actual implementation works from manual testing but trying to automate that here is just not working.

created time in 2 months

startednalexn/ViewInspector

started time in 2 months

startednicklockwood/LRUCache

started time in 2 months

create barnchnotonthehighstreet/ometria.ios_sdk

branch : xcode_13_compat

created branch time in 2 months

push eventnotonthehighstreet/ometria.ios_sdk

Catalin Demian

commit sha 745fb4fee00222fd83d58d9166d00c1dad213303

Merge tag 'v1.1.1' into develop v1.1.1

view details

Catalin Demian

commit sha 028e22632da6964441129e1f849e40d5e1d7bef3

refactor Swizzler implementation

view details

Catalin Demian

commit sha 56e3139310a10367b53321d188c5cb6a115a8bf2

add link to OmetriaBasket

view details

Catalin Demian

commit sha 97a870f04e2cc57e15662fa28f21b1986d2ca89c

Merge tag 'v1.1.2' into develop v1.1.2

view details

Catalin Demian

commit sha 1e52827625e0931703660794bd8ad6733bd1293e

Merge branch 'release/v1.1.2'

view details

Catalin Demian

commit sha c184f22d20642b8d6a1145d5c2adf09ab6408008

update swift Package firebase dependency version

view details

Catalin Demian

commit sha c4d473027f4dbd9653198632543bc27d34d15cb9

update to version 1.1.2

view details

Catalin Demian

commit sha ac275fef2c9918c4faca015d1f01712025cce86f

Merge tag 'v1.1.2' into develop v1.1.2

view details

Catalin Demian

commit sha 02d2dcd23f2ab11753ee8cfe28e44a2e36cfae04

Merge branch 'release/v1.1.2'

view details

Catalin Demian

commit sha 5edfd91e2322b93d12e2809cf2b48b2955ad4b04

update sdk version

view details

Catalin Demian

commit sha a2806c921a4802e73e9fb6b28450cefef5e4842d

convert event caching to synchronous execution on event handler queue

view details

Catalin Demian

commit sha c95424d15d7eb89d682040c77c6b219f2b153f6a

Merge branch 'release/v1.1.3'

view details

CataD256

commit sha 7520a0ae3689838f5ced3bba2781f9b0edaf4dd5

Update README.md (#12)

view details

push time in 2 months

startedMarcoEidinger/SwiftPlantUML

started time in 2 months

issue commentfirebase/firebase-ios-sdk

GoogleTagManager on Apple Silicon (M1)

Just adding my +1. This is becoming a real pain and might force us to migrate away from GA faster.

voidless

comment created time in 2 months

startedfaberNovel/xcresource-cli

started time in 2 months

PR closed Ometria/ometria.ios_sdk

Use Firebase version instead of unstable branch

See: https://github.com/Ometria/ometria.ios_sdk/issues/9

+1 -2

0 comment

1 changed file

cameroncooke

pr closed time in 2 months

startedDanTheMan827/ios-app-signer

started time in 2 months