Kaiteki-Fedi / Kaiteki

The comfy SNS client for everything, everywhere
https://kaiteki.app
GNU Affero General Public License v3.0
489 stars 31 forks source link

iOS TestFlight/CI #177

Open AidanTheBandit opened 2 years ago

AidanTheBandit commented 2 years ago

The feature

I’ve been searching for a client for iOS and I found MissCat but it’s severely out of date and not translated. Is there any plans of porting Kaiteki to iOS?

Designs

Same as android probably

Resources

No response

Craftplacer commented 2 years ago

Kaiteki is on Flutter and it's insanely easy to port to iOS, since it literally only requires adding build workflows.

But since Apple is Apple, the problem is this:

As an alternative right now, I suggest using the web/PWA version of Kaiteki over at kaiteki.craftplacer.moe. Although I have noticed it's not starting anymore, so I have to get that fixed first.

Craftplacer commented 2 years ago

I don't mind someone doing the work required for building Kaiteki to macOS/iOS.

AidanTheBandit commented 2 years ago

Ok. Would building in a MacOS VM work? I have a VM running the newest version of MacOS that I could use to compile

Craftplacer commented 2 years ago

Anything that runs macOS should work. You can take a look at https://docs.flutter.dev/deployment/ios for instructions on how to get iOS builds going for Kaiteki. If you're completely new to using Flutter, check out https://docs.flutter.dev/get-started/install/macos as well.

AidanTheBandit commented 2 years ago

Ok. Thanks for the help. Tomorrow I'll try to get this working

Craftplacer commented 2 years ago

Any updates?

AidanTheBandit commented 2 years ago

I'm working on redoing the MacOS VM install since I accidentally bricked it

AidanTheBandit commented 2 years ago

@Craftplacer i got it to compile but since I don’t have a developer license I don’t think I’ll be able to test it. I used the site Codemagic to compile it

Craftplacer commented 2 years ago

Did you try things like https://altstore.io/ ?

AidanTheBandit commented 2 years ago

Yes but I can’t seem to get it to load onto my phone since the file needs to be an IPA. I’m looking into other ways of turning the file into an IPA

AidanTheBandit commented 2 years ago

@Craftplacer Good news! I think I can get this side loaded onto my phone with troll store. I am going to try later today

Craftplacer commented 2 years ago

Alright, let me know how it goes.

jaredallard commented 2 years ago

I’m happy to provide macOS CI through CircleCI and a developer program license once this is figured out :)

Craftplacer commented 2 years ago

GitHub Actions offer macOS runners, the questions is how to trigger an entire build through CLI and what files to deploy/upload.

AidanTheBandit commented 2 years ago

So after trying for a while TrollStore says that no app exists and AltStore pretty much says the same. I think I might actually just need to get a Mac mini or something

jaredallard commented 2 years ago

I'll give this a shot then, since I have mac hardware at the moment, will update soonish 👀

AidanTheBandit commented 2 years ago

Was there any updates? Trollstore doesn't want to work

wakest commented 1 year ago

anyone get this going on Mac or iOS yet? I am sure someone can lend a dev account to this project so it can be published on the App Store for free

Craftplacer commented 1 year ago

I haven't received any answer if anyone got a build running iOS yet.

If nothing's being done I might have to consider running a Hackintosh VM in order to test this on an old iPad or something

ThatOneCalculator commented 1 year ago

https://medium.com/team-rockstars-it/the-easiest-way-to-build-a-flutter-ios-app-using-github-actions-plus-a-key-takeaway-for-developers-48cf2ad7c72a

If you're serious about iOS builds I'll be happy to pay for half of a developer license.

AidanTheBandit commented 1 year ago

I just got a mac. Im going to try to compile now

AidanTheBandit commented 1 year ago

So I got this issue when trying to run pub get.

[src/kaiteki] flutter pub get
Generating synthetic localizations package failed with 1 error:

Exception: The 'template-arb-file', LocalFile: '/Users/aidanthebandit/Documents/Kaiteki/src/kaiteki/lib/l10n/app_en.arb', is not readable.
Please ensure that the user has read permissions.
exit code 1

Going to the folder shows nothing

ThatOneCalculator commented 1 year ago

git submodule update --init

Craftplacer commented 1 year ago

Gonna use this as a chance to update documentation on how to get Kaiteki going :woozy_face:

lelehier commented 1 year ago

Gonna use this as a chance to update documentation on how to get Kaiteki going 🥴

Could have saved me a lot of time yesterday 🗿. Anyways good to see that the build instructions are now up-to-date.

Craftplacer commented 1 year ago

Anyway, there's now a more in-depth guide on how to get Kaiteki compiled: https://github.com/Kaiteki-Fedi/Kaiteki/blob/master/BUILDING.md

AidanTheBandit commented 1 year ago
"de": 2 untranslated message(s).
"es": 177 untranslated message(s).
"fr": 19 untranslated message(s).
"he": 184 untranslated message(s).
"ja": 70 untranslated message(s).
"lv": 104 untranslated message(s).
"ru": 142 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Xcode build done.                                            6.9s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/cp/l75tsqs97xn3zfpp8wcyfc3h0000gn/T/flutter_tools.ifn6v3/flutter_ios_build_temp_dirHH6jAn/temporary_xcresult_bundle
: Error: No named parameter with the name 'onFocusChange'.
            onFocusChange: onFocusChange,
            ^^^^^^^^^^^^^
: Context: Found this candidate, but the arguments don't match.
      const SwitchListTile({
            ^^^^^^^^^^^^^^
: Error: Member not found: 'strokeAlignOutside'.
                            strokeAlign: BorderSide.strokeAlignOutside,
                                                    ^^^^^^^^^^^^^^^^^^
    Failed to package /Users/aidanthebandit/Documents/kaiteki/src/kaiteki.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Building targets in dependency order
    /Users/aidanthebandit/Documents/kaiteki/src/kaiteki/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftyGif' from project 'Pods')
    /Users/aidanthebandit/Documents/kaiteki/src/kaiteki/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SDWebImage' from project 'Pods')
    /Users/aidanthebandit/Documents/kaiteki/src/kaiteki/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'DKPhotoGallery-DKPhotoGallery' from project 'Pods')
    /Users/aidanthebandit/Documents/kaiteki/src/kaiteki/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'DKPhotoGallery' from project 'Pods')
    /Users/aidanthebandit/Documents/kaiteki/src/kaiteki/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'DKImagePickerController-DKImagePickerController' from project 'Pods')
    /Users/aidanthebandit/Documents/kaiteki/src/kaiteki/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'DKImagePickerController' from project 'Pods')
    warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
    warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Runner' from project 'Runner')
    Result bundle written to path:
        /var/folders/cp/l75tsqs97xn3zfpp8wcyfc3h0000gn/T/flutter_tools.ifn6v3/flutter_ios_build_temp_dirHH6jAn/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
Exited

Errors when trying to compile

Craftplacer commented 1 year ago

As mentioned in the BUILDING.md, we're now on the beta branch of Flutter:

flutter channel beta
flutter upgrade

should fix it

AidanTheBandit commented 1 year ago
"de": 2 untranslated message(s).
"es": 177 untranslated message(s).
"fr": 19 untranslated message(s).
"he": 184 untranslated message(s).
"ja": 70 untranslated message(s).
"lv": 104 untranslated message(s).
"ru": 142 untranslated message(s).
To see a detailed report, use the untranslated-messages-file
option in the l10n.yaml file:
untranslated-messages-file: desiredFileName.txt
<other option>: <other selection>
This will generate a JSON format file containing all messages that
need to be translated.
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00008112-0019259221F0C01E }
{ platform:macOS, arch:x86_64, id:00008112-0019259221F0C01E }
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FlutterAppDelegate", referenced from:
      _$s7kaiteki11AppDelegateCN in AppDelegate.o
  "_OBJC_CLASS_$_FlutterViewController", referenced from:
      objc-class-ref in MainFlutterWindow.o
  "_OBJC_METACLASS_$_FlutterAppDelegate", referenced from:
      _OBJC_METACLASS_$__TtC7kaiteki11AppDelegate in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **

Exception: Build process failed
Exited
AidanTheBandit commented 1 year ago

This happened after running those commands

Craftplacer commented 1 year ago

For this error, I have no idea what causes this, as it's already in the Apple domain.

Craftplacer commented 1 year ago

Perhaps check this https://stackoverflow.com/questions/67367961/flutter-undefined-symbols-for-architecture-arm64 ?

AidanTheBandit commented 1 year ago

It's now running on an iPhone 14 Pro max emulator as an app. Im going to try to load it onto my iPhone 12 mini

AidanTheBandit commented 1 year ago

It works but there is some issues like app icon and unreacreacting. I'll post a TestFlight thing soon image

ThatOneCalculator commented 1 year ago

Awesome!!! If you have a license and since we can get builds working now, can we hook it up to CI for TestFlight?

ThatOneCalculator commented 1 year ago

Also, I wonder if we can load Flutter's Cupertino (iOS) stylesheet instead of Material Design on iOS @Craftplacer

AidanTheBandit commented 1 year ago

Yes, I have a license. I'll work on uploading it to TestFlight. It takes a couple hour or a couple days for apple the review the app though so it might take some time

Craftplacer commented 1 year ago

Also, I wonder if we can load Flutter's Cupertino (iOS) stylesheet instead of Material Design on iOS @Craftplacer

We don't have a "stylesheet", we use components that are designed for one design system, we certainly can adapt to feel more like iOS (Material does this by default too to some extent, see https://m2.material.io/design/platform-guidance/cross-platform-adaptation), but in the end it's primarily going to be Material lol.

Yes, I have a license. I'll work on uploading it to TestFlight. It takes a couple hour or a couple days for apple the review the app though so it might take some time

So how are we going to update the app for iOS then? Is it going to be weekly? or do we need to push updates to a certain service?

AidanTheBandit commented 1 year ago

Building the app is relatively easy and only takes about a minute. As of right now I have no idea if there is a way to update automatically since I just got the dev license fairly recently

ThatOneCalculator commented 1 year ago

I think using Github's CI on a macOS runner would be good instead of doing it manually.

ThatOneCalculator commented 1 year ago

Also @Craftplacer, do you think M3 should be in by default on iOS? M2 always looks out of place on iOS imo

ThatOneCalculator commented 1 year ago

Any updates on a potential TestFlight?

AidanTheBandit commented 1 year ago

Im trying to get it to upload. It keeps failing for some reason. Ill work on it in a bit

CutestNekoAqua commented 1 year ago

hmm. okay, just for protocol I dont use iOS myself, but as I am invested in my users and I recommended kaiteki to everyone to keep an eye on, I will try to help as much as I can. I dont wanna annoy anyone but maybe @jaredallard just forgot and maybe wants to resume trying to get something tested too?~

Thanks for everyone helping :3

AidanTheBandit commented 1 year ago

After some fiddling around a bit I was able to upload this to TestFlight. It's being reviewed by apple and should be available soon. I'll send the link soon

Craftplacer commented 1 year ago

this unfortunately doesn't answer the question how we're going to deploy builds to iOS. is this going to be manual?

ThatOneCalculator commented 1 year ago

If we can get a testflight URL working, that means that we can use this (or something similar) for CI

ThatOneCalculator commented 1 year ago

@AidanTheBandit any update?

AidanTheBandit commented 1 year ago

Im trying to give the app the permissions apple says it needs. I just submitted a new build so hopefully this one will work

AidanTheBandit commented 1 year ago

I’m having some issues with the notification permissions. Ill send the email apple keeps sending me in a bit