Closed sebasbose closed 6 years ago
@sebasbose Did you follow the guide? I know iOS setup is a bit complex, but it will work eventually,
I have followed the steps, the problem is that now the Debug Console and XCode are throwing a bunch of errors regarding RavePay's Swift code.
@sebasbose Take a look at the example repo and see if you can reproduce. I currently use this in production and the example repo contains the exact code i use.
I re-installed everything, followed the steps just as it is in the docs. Every error I got is now gone; nevertheless I'm still getting an error...
The error output:
fatal error: lipo: -extract x86_64 specified but fat file: /Users/sebasbose/Desktop/Voligg/voligg_marketplace/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Rave.framework/Rave does not contain that architecture Failed to extract x86_64 for /Users/sebasbose/Desktop/Voligg/voligg_marketplace/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Rave.framework/Rave. Running lipo -info: Architectures in the fat file: /Users/sebasbose/Desktop/Voligg/voligg_marketplace/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Rave.framework/Rave are: armv7 arm64
What am I supposed to do here?
Okay. This one is new to me. Maybe a quick search on google might prove useful. And like I said if you follow the example repo. It'll eventually work. Setting up on iOS is a bit tricky.
I have managed to get it working with the guid, I had to delete everything related to the pod and install it again following the guide. Everything worked so far but I am getting this error when trying to charge a card:
MissingPluginException(No implementation found for method chargeCard on channel ng.i.handikraft/flutter_ravepay)
Any ideas on what's going on?
@sebasbose I'd ask again, can you follow the example repo? It seems you haven't implemented in your AppDelegate
. See https://github.com/jogboms/flutter_ravepay/blob/master/example/ios/Runner/AppDelegate.swift
@jogboms I did add an AppDelegate.swift, the problem is that my Flutter project is written in Objective-C; maybe that's the problem...?
import UIKit
import Rave
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let config = RavePayConfig.sharedConfig()
config.publicKey = "KEY"
config.secretKey = "KEY"
config.isStaging = true // Default is true
return true
}
}
Oh @sebasbose. That could be it. I had issues then too.
I had to result to using Swift.
I even created an issue https://github.com/Flutterwave/Rave/issues/1
@jogboms Yeah, I think that's the conclusion... it is incompatible with Obj-C.... isn't there a way to implement Swift into Obj-C?? I am new to Obj-C, I've only developed with Swift, Java, and Dart; never with Obj-C...
Yeah. I couldn't too at that point so I just stuck with swift.
Well, I think I'll have to wait until it is compatible with Obj-C...
I hope it doesn't take too long though. You can follow up on that issue and let me know if any errors come up after that has been resolved.
How can I make RavePay work on iOS? It won't let me build the app because of issues with Swift. Thanks in advance!!
This is the Debug Console output: `Launching lib/main.dart on iPhone X in debug mode... Xcode build done. Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED Xcode's output: ↳ === BUILD TARGET firebase_database OF PROJECT Pods WITH CONFIGURATION Debug === /Users/sebasbose/Desktop/Voligg/voligg_marketplace/ios/Pods/Headers/Public/flutter_ravepay/FlutterRavepayPlugin.h:1:9: note: while building module 'Flutter' imported from /Users/sebasbose/Desktop/Voligg/voligg_marketplace/ios/Pods/Headers/Public/flutter_ravepay/FlutterRavepayPlugin.h:1:
import <Flutter/Flutter.h>
^