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

Latest objective_c changes incompatible with cupertino_http #1298

Closed
kekland opened this issue Aug 28, 2024 · 5 comments · Fixed by #1218
Closed

Latest objective_c changes incompatible with cupertino_http #1298

kekland opened this issue Aug 28, 2024 · 5 comments · Fixed by #1218
Assignees
Labels
package:cupertino_http Issues related to package:cupertino_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@kekland
Copy link

kekland commented Aug 28, 2024

Hi!

I'm using objective_c (and ffigen) at 87e8f92. It seems like at that version doing anything from objective_c (even just creating an NSString) when cupertino_http is also installed instantly crashes the app with a segmentation fault.

I'm not exactly sure what the issue is. Version 1.1.0 (which is in pub) works fine. From the changelog:

1.2.0-wip
- Drop API methods that are deprecated in the oldest versions of iOS and macOS that flutter supports.
- Added ObjCBlock, which is the new user-facing representation of ObjC blocks.
- Migrate to ARC (Automatic Reference Counting).
- Enable ObjC objects and blocks to be sent between isolates.

My guess is that it's due to ARC. Here's an example project where the issue can be reproduced: https://github.com/kekland/cupertino_http_objc_issue

cc @liamappelbe (not sure whether it's relevant to you, but tagging just in case)

@kekland kekland added package:cupertino_http Issues related to package:cupertino_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Aug 28, 2024
@brianquinlan
Copy link
Collaborator

@liamappelbe Does the referenced version of package:objective_c require ARC?

@liamappelbe
Copy link

Yep, package:objective_c and ffigen now use ARC. I haven't released that version yet.

@brianquinlan
Copy link
Collaborator

@liamappelbe So are your clients required to switch to using ARC?

@liamappelbe
Copy link

Yeah. It's my understanding that this will become a requirement for all flutter plugin writers soon. It has something to do with flutter using the swift package manager.

@brianquinlan
Copy link
Collaborator

OK, I guess its time for me to try to get delegates to work in Dart again ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:cupertino_http Issues related to package:cupertino_http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants