google / google/EarlGrey

EarlGrey 2 fails to compile in Xcode 16.3

Open
#2,083 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
5.7k
Forks
737
Avg merge
1d 20h
Merged PRs (30d)
5

Description

When trying to build a project using EarlGrey 2.2.2 in Xcode 16.3, I now get the error:

```
Cast from 'id Nullable ()(id Nullable strong, Ivar **Nonnull)' (aka 'id **Nullable ()(**strong id Nullable, struct objcivar * Nonnull)') to 'UITouchFlagsGetVariableFunction' (aka 'UITouchFlags ()(*_strong id, struct objc_ivar *)') converts to incompatible function type
```

on line 443 in `SetTouchFlagPropertyInUITouch` in the file `GREYTouchInjector.m`

The `UITouchFlagsSetVariableFunction` line (450) also causes the same sort of problem:

```
Cast from 'void (*)(id _Nullable __strong, Ivar _Nonnull, id _Nullable __strong)' (aka 'void (*)(__strong id _Nullable, struct objc_ivar * _Nonnull, __strong id _Nullable)') to 'UITouchSetVariableFunction' (aka 'void (*)(__strong id, struct objc_ivar *, UITouchFlags)') converts to incompatible function type
```

This is preventing me from being able to update the project to use Xcode 16.3.

Is there a safe workaround I can use for this? Thanks!

Contributor guide

Open the contributing guide

Research direction

Reproduce the EarlGrey 2.2.2 build with Xcode 16.3 and inspect GREYTouchInjector.m at lines 443 and 450, where the UITouch function-pointer casts fail. Check the surrounding function-pointer definitions and compiler diagnostics; done means the project compiles successfully under Xcode 16.3 without breaking touch injection.

Written by the indexing model from the issue text.

Assessment

Tech stack
objective-c
Domain
mobile-dev, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.