Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building for iOS Simulator, but linking in dylib built for iOS, #648

Closed
heshesh2010 opened this issue Apr 11, 2022 · 6 comments
Closed

Building for iOS Simulator, but linking in dylib built for iOS, #648

heshesh2010 opened this issue Apr 11, 2022 · 6 comments

Comments

@heshesh2010
Copy link

Hello,

I'm using both :
agora_rtc_engine: ^5.0.1. and agora_rtm: ^1.1.0

but I got an error when building ios simulator, I'm running with intel CPU .

I was searched with other issues here and I made all changes like exclude arm64 .. etc but still got same error

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.3.1 21E258 darwin-x64, locale en-EG)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.66.0)
[✓] Connected device (3 available)
! Error: iPhone is busy: Preparing the watch for development via iPhone. Xcode will continue when iPhone is finished. (code -10)
[✓] HTTP Host Availability

print screen :
https://share.getcloudapp.com/9Zumooly

@littleGnAl
Copy link
Contributor

This issue will be fixed in the next release.

@mnknedim
Copy link

mnknedim commented Apr 12, 2022

Hi,
Follow steps:
1- run flutter clean
2- run flutter create .
3- remove Podfile.lock in ios folder.
4- in Podfile change like that;
- remove commet symbol (#) for platform : iOS , '9.0' and change 14.0
- at the bottom, change like that

`post_install do |installer|

      installer.pods_project.targets.each do |target|
        flutter_additional_ios_build_settings(target)
        target.build_configurations.each do |config|
          config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
          config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "i386 arm64"
        end
      end
    end`

@heshesh2010
Copy link
Author

heshesh2010 commented Apr 12, 2022

> flutter create .

I followed all your steps and got this error log


Launching lib/main.dart on iPhone 13 Pro in debug mode...
Xcode build done.                                           25.7s
Failed to build iOS app
Error output from Xcode build:
↳
    2022-04-12 19:38:20.644 xcodebuild[5866:44037] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    2022-04-12 19:38:20.644 xcodebuild[5866:44037] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
    ** BUILD FAILED **
Xcode's output:
↳
    Writing result bundle at path:
    	/var/folders/l8/n4g273pj21796mgmgrggcr180000gn/T/flutter_tools.BUIlT5/flutter_ios_build_temp_dirpjr7GH/temporary_xcresult_bundle
Invalid depfile: /Users/hesham/Downloads/iqdoctors/.dart_tool/flutter_build/fc2229c6ccfbd3ae14462ceedf087ac0/kernel_snapshot.d
Invalid depfile: /Users/hesham/Downloads/iqdoctors/.dart_tool/flutter_build/fc2229c6ccfbd3ae14462ceedf087ac0/kernel_snapshot.d
Invalid depfile: /Users/hesham/Downloads/iqdoctors/.dart_tool/flutter_build/fc2229c6ccfbd3ae14462ceedf087ac0/kernel_snapshot.d
Invalid depfile: /Users/hesham/Downloads/iqdoctors/.dart_tool/flutter_build/fc2229c6ccfbd3ae14462ceedf087ac0/kernel_snapshot.d
: Error: Not found: 'dart:html'
    import 'dart:html';
           ^
: Error: Not found: 'dart:html'
    import 'dart:html' as html;
           ^
: Error: Not found: 'dart:html'
    import 'dart:html' as html;
           ^
: Error: Not found: 'dart:html'
    import 'dart:html';
           ^
: Error: Not found: 'dart:js'
    export 'dart:js' show allowInterop, allowInteropCaptureThis;
    ^
: Error: Not found: 'dart:js_util'
    export 'dart:js_util';
    ^
: Error: Type 'Element' not found.
      Future<dynamic> handleViewMethodCall(MethodCall call, Element element) async {
                                                            ^^^^^^^
: Error: Type 'html.EventListener' not found.
      external ui.VoidCallback addPopStateListener(html.EventListener fn);
                                                   ^^^^^^^^^^^^^^^^^^
: Error: Type 'html.Location' not found.
      html.Location get _location => html.window.location;
      ^^^^^^^^^^^^^
: Error: Type 'html.History' not found.
      html.History get _history => html.window.history;
      ^^^^^^^^^^^^
: Error: Type 'html.EventListener' not found.
      void addPopStateListener(html.EventListener fn) {
                               ^^^^^^^^^^^^^^^^^^
: Error: Type 'html.EventListener' not found.
      void removePopStateListener(html.EventListener fn) {
                                  ^^^^^^^^^^^^^^^^^^
: Error: Type 'AnchorElement' not found.
    final AnchorElement _urlParsingNode = AnchorElement();
          ^^^^^^^^^^^^^
: Error: Type 'Element' not found.
    final Element? _baseElement = document.querySelector('base');
          ^^^^^^^
: Error: Method not found: 'DivElement'.
          var element = DivElement();
                        ^^^^^^^^^^
: Error: Undefined name 'platformViewRegistry'.
        ui.platformViewRegistry.registerViewFactory('AgoraSurfaceView',
           ^^^^^^^^^^^^^^^^^^^^
: Error: The method 'allowInterop' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
            _engine(args).setEventHandler(allowInterop((String event, String data) {
                                          ^^^^^^^^^^^^
: Error: The method 'allowInterop' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'allowInterop'.
                .setEventHandler(allowInterop((String event, String data) {
                                 ^^^^^^^^^^^^
: Error: The method 'promiseToFuture' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'promiseToFuture'.
          return promiseToFuture(_engine(args).callApi(apiType, param));
                 ^^^^^^^^^^^^^^^
: Error: The method 'promiseToFuture' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'promiseToFuture'.
          return promiseToFuture(_engineMain.channel.callApi(apiType, param));
                 ^^^^^^^^^^^^^^^
: Error: The method 'promiseToFuture' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'promiseToFuture'.
          return promiseToFuture(
                 ^^^^^^^^^^^^^^^
: Error: The method 'promiseToFuture' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'promiseToFuture'.
          return promiseToFuture(
                 ^^^^^^^^^^^^^^^
: Error: 'Element' isn't a type.
      Future<dynamic> handleViewMethodCall(MethodCall call, Element element) async {
                                                            ^^^^^^^
: Error: The method 'promiseToFuture' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'promiseToFuture'.
            return promiseToFuture(_engine(data).callApi(
                   ^^^^^^^^^^^^^^^
: Error: The method 'promiseToFuture' isn't defined for the class 'AgoraRtcEngineWeb'.
- 'AgoraRtcEngineWeb' is from 'package:agora_rtc_engine/agora_rtc_engine_web.dart' ('../../.pub-cache/hosted/pub.dartlang.org/agora_rtc_engine-5.0.1/lib/agora_rtc_engine_web.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'promiseToFuture'.
            return promiseToFuture(_engine(data).callApi(
                   ^^^^^^^^^^^^^^^
: Warning: Operand of null-aware operation '??' has type 'Color' which excludes null.
     - 'Color' is from 'dart:ui'.
                      color: theme.backgroundColor ?? Colors.white,
                                   ^
: Error: Method not found: 'allowInterop'.
        getPath: allowInterop(strategy.getPath),
                 ^^^^^^^^^^^^
: Error: Method not found: 'allowInterop'.
        getState: allowInterop(strategy.getState),
                  ^^^^^^^^^^^^
: Error: Method not found: 'allowInterop'.
        addPopStateListener: allowInterop(strategy.addPopStateListener),
                             ^^^^^^^^^^^^
: Error: Method not found: 'allowInterop'.
        prepareExternalUrl: allowInterop(strategy.prepareExternalUrl),
                            ^^^^^^^^^^^^
: Error: Method not found: 'allowInterop'.
        pushState: allowInterop(strategy.pushState),
                   ^^^^^^^^^^^^
: Error: Method not found: 'allowInterop'.
        replaceState: allowInterop(strategy.replaceState),
                      ^^^^^^^^^^^^
: Error: Method not found: 'allowInterop'.
        go: allowInterop(strategy.go),
            ^^^^^^^^^^^^
: Error: 'EventListener' isn't a type.
      external ui.VoidCallback addPopStateListener(html.EventListener fn);
                                                        ^^^^^^^^^^^^^
: Error: Undefined name 'window'.
      html.Location get _location => html.window.location;
                                          ^^^^^^
: Error: Undefined name 'window'.
      html.History get _history => html.window.history;
                                        ^^^^^^
: Error: 'EventListener' isn't a type.
      void addPopStateListener(html.EventListener fn) {
                                    ^^^^^^^^^^^^^
: Error: Undefined name 'window'.
        html.window.addEventListener('popstate', fn);
             ^^^^^^
: Error: 'EventListener' isn't a type.
      void removePopStateListener(html.EventListener fn) {
                                       ^^^^^^^^^^^^^
: Error: Undefined name 'window'.
        html.window.removeEventListener('popstate', fn);
             ^^^^^^
: Error: 'AnchorElement' isn't a type.
    final AnchorElement _urlParsingNode = AnchorElement();
          ^^^^^^^^^^^^^
: Error: Method not found: 'AnchorElement'.
    final AnchorElement _urlParsingNode = AnchorElement();
                                          ^^^^^^^^^^^^^
: Error: 'Element' isn't a type.
    final Element? _baseElement = document.querySelector('base');
          ^^^^^^^
: Error: Undefined name 'document'.
    final Element? _baseElement = document.querySelector('base');
                                  ^^^^^^^^
: Error: Method not found: 'webOnlySetPluginHandler'.
        ui.webOnlySetPluginHandler(handleFrameworkMessage);
           ^^^^^^^^^^^^^^^^^^^^^^^
    Unhandled exception:
    FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file:* and data:* URIs)
#0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7)
#1      asFileUri (package:vm/kernel_front_end.dart:623:37)
#2      writeDepfile (package:vm/kernel_front_end.dart:763:21)
    <asynchronous suspension>
#3      FrontendCompiler.compile (package:frontend_server/frontend_server.dart:586:9)
    <asynchronous suspension>
#4      starter (package:flutter_frontend_server/server.dart:85:12)
    <asynchronous suspension>
#5      main (file:///opt/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:13:24)
    <asynchronous suspension>
    Failed to package /Users/hesham/Downloads/iqdoctors.
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order
    /Users/hesham/Downloads/iqdoctors/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.4.99. (in target 'FMDB' from project 'Pods')
    /Users/hesham/Downloads/iqdoctors/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.4.99. (in target 'AgoraIrisRTC_iOS' from project 'Pods')
    /Users/hesham/Downloads/iqdoctors/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.4.99. (in target 'AgoraRtm_iOS' from project 'Pods')
    Result bundle written to path:
    	/var/folders/l8/n4g273pj21796mgmgrggcr180000gn/T/flutter_tools.BUIlT5/flutter_ios_build_temp_dirpjr7GH/temporary_xcresult_bundle
Could not build the application for the simulator.
Error launching application on iPhone 13 Pro.
Exited (sigterm)

@littleGnAl
Copy link
Contributor

This issue is fixed, pls try upgrade agora_rtc_engine: 5.1.0
https://pub.dev/packages/agora_rtc_engine

@littleGnAl littleGnAl added the waiting for customer response waiting for customer response, or closed by no-reponse bot label Apr 15, 2022
@heshesh2010
Copy link
Author

This issue is fixed, pls try upgrade agora_rtc_engine: 5.1.0 https://pub.dev/packages/agora_rtc_engine

yes it works now

thanks

@github-actions github-actions bot removed the waiting for customer response waiting for customer response, or closed by no-reponse bot label Apr 16, 2022
@github-actions
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants