In the IOS Extensions, there are loads of declares that reference iOSView
But just as API2 messed up things by changing Window to DesktopWindow etc etc,
the move to making Xojo iOS into Xojo Mobile means that most windows and controls now are Mobilexxx
The IOS extension declares don’t work. Is there no way to cast a MobileScreen to an iOSView?
So… in iOSDesignExtensions, there’s a specific folder for API 1. That said, you’re going to have to upgrade at some point because you need to “compile” against a newer SDK and you can only do that with newer versions of Xojo, and only new versions are getting new features.
FWIW, transitioning is not terrible. The XDC app that Norman and I built took about a day.
however, the call i had hoped to get working (airdrop) seems to be absent from the api2 version:
dim controller as UIActivityViewController
dim url as Foundation.NSURL = Foundation.NSURL.FileURLWithPath(specialfolder.documents.child(filename).NativePath)
controller = new UIActivityViewController(NSArray.CreateWithObject(url),nil)
myscreen.PresentViewController(controller, True, nil)
The code you are referring to is from iOSKit (written by @Jason_King) not from iOSDesignExtensions (written by me).
iOSDesignExtensions Has an Api1 and Api2 folder. You can copy both to your project or only API2 if your project is Mobile everything.
I have plans on rewriting iOSKit entirely for API2. Unfortunately I did not take the time to do it yet. It is a massive project with thousands (2344 actually) of depreciations
Yeah for what it’s worth you can typically change any IOSView (or other control) reference to MobileView or equivalent with a find and replace. Xojo did not provide any good conversion path for API2 which makes converting the project a huge undertaking.
At this time I’m no longer doing iOS development with Xojo so the effort is simply not worth it for me. If anyone ever wants to update a piece of it and submit a pull request with the changes I’ll happily incorporate them so everyone can benefit. Jeremie, Greg and a few others have already done so