Moving to 2021r1 for large iOS app, many basic declares not working

I’m coming from 2019r32 for this specific project. Just trying to run my app in the debugger, simple declares for setModalPresentationStyle, dismissViewControllerAnimated, and others are failing with “unrecognized selector sent to instance.”

It’s just using the iOSView.handle, such as:

Public Sub Dismiss(extends vv as iOSView, animated as Boolean=false)
  
  // Close the Modal view to return to the calling view
  Declare Sub dismissViewController Lib "UIKit" _
  Selector "dismissViewControllerAnimated:completion:" _
  (parentView As Ptr, animated As Boolean, completion As Ptr)
  
  dismissViewController(vv.Handle, animated, Nil)
  
End Sub

vv.ViewControllerHandle will fix this.

There was a bug in previous versions of Xojo where view.handle returned the same handle as view.ViewControllerHandle

2 Likes

Thank you!! This was it, thanks for being so quick with a fix.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.