Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

iOS support has some problems #133

Closed
AlienegraGeek opened this issue Feb 10, 2023 · 1 comment
Closed

iOS support has some problems #133

AlienegraGeek opened this issue Feb 10, 2023 · 1 comment

Comments

@AlienegraGeek
Copy link

AlienegraGeek commented Feb 10, 2023

i pull ios_support branch, and run flutter pub run flutter_wasm:ios_setup(but readme.md says flutter pub run flutter_wasm:setup,should update?), then get this exception:

Unhandled exception:
RangeError (index): Invalid value: Valid value range is empty: 0
#0      List.[] (dart:core-patch/growable_array.dart:264:36)
#1      main (file:///Users/yuvan/Documents/github/wasm/flutter_wasm/bin/ios_setup.dart:98:32)
<asynchronous suspension>
pub finished with exit code 255

I read this file ios_setup.dart,Found several paths in the file that are absolute,for example:

final frameworkTemplatePath = '/Users/liama/dev/wasm/flutter_wasm/ios/FrameworkTemplate

Then I changed it to my local path,Run flutter pub run flutter_wasm:ios_setup again with a successful result:

Creating fat library for iphoneos at /Users/yuvan/Documents/github/wasm/flutter_wasm/example/.dart_tool/pub/bin/flutter_wasm/ios/build/iphoneos/flutter_wasm
FFFFF: /Users/yuvan/Documents/github/wasm/flutter_wasm/example/.dart_tool/pub/bin/flutter_wasm/ios_setup.dart-2.18.2.snapshot
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo -create /Users/yuvan/Documents/github/wasm/flutter_wasm/example/.dart_tool/pub/bin/flutter_wasm/ios/build/iphoneos/aarch64-apple-ios/libwasmer.dylib -output /Users/yuvan/Documents/github/wasm/flutter_wasm/example/.dart_tool/pub/bin/flutter_wasm/ios/build/iphoneos/flutter_wasm
Creating framework at /Users/yuvan/Documents/github/wasm/flutter_wasm/example/Frameworks/flutter_wasm.xcframework
FFFFF: /Users/yuvan/Documents/github/wasm/flutter_wasm/example/.dart_tool/pub/bin/flutter_wasm/ios_setup.dart-2.18.2.snapshot
xcrun xcodebuild -create-xcframework -framework /Users/yuvan/Documents/github/wasm/flutter_wasm/example/.dart_tool/pub/bin/flutter_wasm/ios/build/iphoneos/lib_wasm.framework -output /Users/yuvan/Documents/github/wasm/flutter_wasm/example/Frameworks/flutter_wasm.xcframework
xcframework successfully written out to: /Users/yuvan/Documents/github/wasm/flutter_wasm/example/Frameworks/flutter_wasm.xcframework

But when I run it next example/lib/main.dart,get this error

Error (Xcode): File not found: /Users/yuvan/Documents/github/wasm/flutter_wasm/example/ios/Pods/../.symlinks/plugins/flutter_wasm/ios/Frameworks/flutter_wasm.xcframework/ios-x86_64-simulator/flutter_wasm

I mean, are you sure the ios example is runnable? or rather ios is supported?

@AlienegraGeek AlienegraGeek changed the title ios support has some problems Ios support has some problems Feb 10, 2023
@liamappelbe
Copy link
Contributor

iOS is not supported yet. That branch is for this WIP pull request.

That PR is blocked on some build system issues. If you manually fiddle with the paths and copy files around, you might be able to get it to build, but the library isn't linked into the app and the symbols aren't found at runtime. I'm not actively working on fixing this at the moment, but there's a big improvement coming to the way FFI libraries are built that should solve the problem.

@AlienegraGeek AlienegraGeek changed the title Ios support has some problems iOS support has some problems Feb 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants