HabitRPG / habitica-ios

Native iOS app for Habitica
GNU General Public License v3.0
703 stars 235 forks source link

Need help to compile habitica-ios for iPod touch running iOS 12.5.7 #1324

Closed diyoyo closed 3 months ago

diyoyo commented 11 months ago

Hi, I cloned this repo with the ambition to build the app for the old iPod Touch I am using with my daughter. I'd like to put our own instance of Habitica on it. I succeeded building the app for my android phone, but I'm a little rusty when it comes to iOS.

I downgraded the Minimal SDK version in XCode, removed all the Plugins (Apple Sign-in, Siri, etc.) that are forbidden to me as a personal developer.

Now I'm facing this new error : (fatal) module 'Realm' not found

image

Can anyone help me troubleshoot ? I'm using the latest XCode on macOS Sonoma. Out of despair , I did a npm install realm on my mac, but of course it didn't solve the issue.

phillipthelen commented 11 months ago

Packages/Dependencies are installed through SwiftPM. Did you install those? However, I do not think you will be easily able to make the app run under iOS 12. We use SwiftUI in multiple places, which requires iOS 13. As well as other features that require iOS 13 or 14.

diyoyo commented 11 months ago

I don't know what happened, I restarted XCode and opened the project only by double clicking on the workspace file, and the Realm error went away.

Now, as you highlighted, I have to deal with all the SwiftUI problems, starting with the widgets.

Is there a commit that could at least let me go back to the days before iOS13? Or will it be incompatible with the server anyways?

diyoyo commented 11 months ago

Packages/Dependencies are installed through SwiftPM. Did you install those? However, I do not think you will be easily able to make the app run under iOS 12. We use SwiftUI in multiple places, which requires iOS 13. As well as other features that require iOS 13 or 14.

Well, actually, now that I added a bunch of "@available" to hide SwiftUI errors, the Realm issue is back. What is SwiftPM (package manager?) ? Isn't it run automatically by XCode?

All the dependencies look like they are present...

image
diyoyo commented 11 months ago

Important info: Building for an iPhone 15 Pro simulator results in the same Realm Error.