question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS build tutorial results in: `Not implemented: TextInput.set_on_gain_focus`

See original GitHub issue

Describe the bug When following the iOS build tutorial, I’m facing the following when running the simulator. The app opens then crashes with the following in the terminal:

2022-11-22 00:10:21.279 Df Hello World[78988:37018d] (_ctypes.cpython-39-iphonesimulator.so) [iOS] Not implemented: TextInput.clear_error()
2022-11-22 00:10:21.280 Df Hello World[78988:37018d] (_ctypes.cpython-39-iphonesimulator.so) [iOS] Not implemented: TextInput.set_on_lose_focus()
2022-11-22 00:10:21.281 Df Hello World[78988:37018d] (_ctypes.cpython-39-iphonesimulator.so) [iOS] Not implemented: TextInput.set_on_gain_focus()

To Reproduce Steps to reproduce the behavior:

  1. Follow the Briefcase tutorial
  2. Follow the iOS build tutorial (5)
  3. Run briefcase run iOS -u (Selecting any ios simulator)
  4. See error

Expected behavior The app should run and provide a simple dialog.

Screenshots Screen Shot 2022-11-22 at 12 24 07 AM

Environment:

  • Operating System: MacOS
  • Python version: 3.9
  • Software versions:
    • Briefcase: 0.3.11
    • Toga: 0.3.0.dev39 (toga-cocoa)

Additional context The MacOS build works fine.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
freakboy3742commented, Nov 30, 2022

Eureka! I’ve found the problem.

In the recent iteration of updates to the Python support packages, we made some changes to the platform module that mean platform.machine() can be used to report that you’re on an iPhone, or an iPhone simulator.

However, Rubicon uses platform.machine() as part of an identification check to see if you’re on x86_64 hardware.

The change to the platform module has broken the x86_64 check, and as a result, Rubicon is using the wrong message passing API to invoke methods that return large structures (obc_msgSend_stret). This doesn’t affect M1 because the CPU identification check is slightly different.

If you had an older support package when running through Xcode, that might explain why the app would run; an older support package would have the older platform implementation.

I’m working on a fix for Rubicon ObjC now.

1reaction
freakboy3742commented, Nov 25, 2022

More investigation: It turns out the problem isn’t the deprecation (at least, that’s not the cause of the problem here); the x86 simulator is currently crashing on any property that returns type NSRect. This appears to only be a problem in the emulator; macOS apps are able to access properties of type NSRect (e.g, view.frame) without difficulty.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native: How to select the next TextInput after pressing ...
Set the second TextInput focus, when the previous TextInput 's onSubmitEditing is triggered. Try this. Adding a Ref to second TextInput
Read more >
iOS Text Field Tutorial - Accepting User Input - YouTube
My full length Udemy course: Saving Data in Your iOS App Using Core Data: https://bit.ly/30dcIjA Check out my new full length iOS ......
Read more >
Tutorial 1 : [Winforms] Not implemented: TextInput.set_font ...
Current Behavior when run Tutorial 1 , [Winforms] Not implemented: TextInput.set_font(), app can run , but , layout is wrong Steps to ...
Read more >
App Extension Programming Guide: Custom Keyboard
Describes how to develop an app extension, which is an executable that adds functionality to other apps.
Read more >
Testing iOS Applications on macOS - CircleCI
For supported Xcode versions on the Dedicated Hosts resource class, ... Switch Fastlane Match to readonly mode to make sure CI does not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found