Athanax / fullscreen

MIT License
8 stars 13 forks source link

1.0.3 doesn't work on iOS #5

Open ShiBa-Shin opened 3 years ago

ShiBa-Shin commented 3 years ago

Android Studio 4.1.3 Flutter: 2.0.5 Xcode: 12.4 Simulator: iPhone 11 with iOS 14.4 cocoapods 1.10.1 fullscreen: 1.0.3

I've tested this plugin on Android 8, 9 and 10. It get the job done pretty well. But when I tried to run it on iOS simulator, the app crashes.

Here is the error info I got from console

Launching lib/main.dart on iPhone 11 in debug mode...
Running Xcode build...
Xcode build done.                                           15.8s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics'
    ld: warning: Could not find or use auto-linked library 'swiftDarwin'
    ld: warning: Could not find or use auto-linked library 'swiftUIKit'
    ld: warning: Could not find or use auto-linked library 'swiftFoundation'
    ld: warning: Could not find or use auto-linked library 'swiftCompatibility51'
    ld: warning: Could not find or use auto-linked library 'swiftMetal'
    ld: warning: Could not find or use auto-linked library 'swiftObjectiveC'
    ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation'
    ld: warning: Could not find or use auto-linked library 'swiftCompatibility50'
    ld: warning: Could not find or use auto-linked library 'swiftCoreImage'
    ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements'
    ld: warning: Could not find or use auto-linked library 'swiftDispatch'
    ld: warning: Could not find or use auto-linked library 'swiftCoreMedia'
    ld: warning: Could not find or use auto-linked library 'swiftQuartzCore'
    ld: warning: Could not find or use auto-linked library 'swiftCore'
    ld: warning: Could not find or use auto-linked library 'swiftCoreAudio'
    ld: warning: Could not find or use auto-linked library 'swiftSwiftOnoneSupport'
    Undefined symbols for architecture x86_64:
      "value witness table for Builtin.UnknownObject", referenced from:
          full type metadata for fullscreen.SwiftFullscreenPlugin in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements", referenced from:
          __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements_$_fullscreen)
      "__swift_FORCE_LOAD_$_swiftCompatibility51", referenced from:
          __swift_FORCE_LOAD_$_swiftCompatibility51_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility51_$_fullscreen)
      "__swift_FORCE_LOAD_$_swiftCompatibility50", referenced from:
          __swift_FORCE_LOAD_$_swiftCompatibility50_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCompatibility50_$_fullscreen)
      "__swift_FORCE_LOAD_$_swiftQuartzCore", referenced from:
          __swift_FORCE_LOAD_$_swiftQuartzCore_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftQuartzCore_$_fullscreen)
      "__swift_FORCE_LOAD_$_swiftCoreImage", referenced from:
          __swift_FORCE_LOAD_$_swiftCoreImage_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreImage_$_fullscreen)
      "__swift_FORCE_LOAD_$_swiftCoreGraphics", referenced from:
          __swift_FORCE_LOAD_$_swiftCoreGraphics_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreGraphics_$_fullscreen)
      "__swift_FORCE_LOAD_$_swiftCoreFoundation", referenced from:
          __swift_FORCE_LOAD_$_swiftCoreFoundation_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreFoundation_$_fullscreen)
      "_swift_getObjectType", referenced from:
          static fullscreen.SwiftFullscreenPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftUIKit", referenced from:
          __swift_FORCE_LOAD_$_swiftUIKit_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftUIKit_$_fullscreen)
      "_swift_allocObject", referenced from:
          @objc fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "static (extension in Foundation):Swift.String._unconditionallyBridgeFromObjectiveC(__C.NSString?) -> Swift.String", referenced from:
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "_swift_getInitializedObjCClass", referenced from:
          type metadata accessor for __C.FlutterMethodChannel in libfullscreen.a(SwiftFullscreenPlugin.o)
          type metadata accessor for fullscreen.SwiftFullscreenPlugin in libfullscreen.a(SwiftFullscreenPlugin.o)
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftFoundation", referenced from:
          __swift_FORCE_LOAD_$_swiftFoundation_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftFoundation_$_fullscreen)
      "__swift_FORCE_LOAD_$_swiftCoreAudio", referenced from:
          __swift_FORCE_LOAD_$_swiftCoreAudio_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreAudio_$_fullscreen)
      "static Swift.String.+ infix(Swift.String, Swift.String) -> Swift.String", referenced from:
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftDarwin", referenced from:
          __swift_FORCE_LOAD_$_swiftDarwin_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftDarwin_$_fullscreen)
      "_swift_unknownObjectRelease", referenced from:
          static fullscreen.SwiftFullscreenPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
          @nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libfullscreen.a(SwiftFullscreenPlugin.o)
          @objc static fullscreen.SwiftFullscreenPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
          reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () to @escaping @callee_guaranteed (@in_guaranteed Any?) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftDispatch", referenced from:
          __swift_FORCE_LOAD_$_swiftDispatch_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftDispatch_$_fullscreen)
      "_swift_release", referenced from:
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
          ___swift_destroy_boxed_opaque_existential_0 in libfullscreen.a(SwiftFullscreenPlugin.o)
          @objc fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "_swift_deallocObject", referenced from:
          l_objectdestroy in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftMetal", referenced from:
          __swift_FORCE_LOAD_$_swiftMetal_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftMetal_$_fullscreen)
      "_swift_retain", referenced from:
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftObjectiveC", referenced from:
          __swift_FORCE_LOAD_$_swiftObjectiveC_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftObjectiveC_$_fullscreen)
      "_swift_unknownObjectRetain", referenced from:
          @objc static fullscreen.SwiftFullscreenPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "Swift._bridgeAnythingToObjectiveC<A>(A) -> Swift.AnyObject", referenced from:
          reabstraction thunk helper from @escaping @callee_unowned @convention(block) (@unowned Swift.AnyObject?) -> () to @escaping @callee_guaranteed (@in_guaranteed Any?) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "_swift_getObjCClassMetadata", referenced from:
          type metadata accessor for __C.FlutterMethodChannel in libfullscreen.a(SwiftFullscreenPlugin.o)
          @objc static fullscreen.SwiftFullscreenPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "(extension in Foundation):Swift.String._bridgeToObjectiveC() -> __C.NSString", referenced from:
          @nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libfullscreen.a(SwiftFullscreenPlugin.o)
      "_swift_getObjCClassFromMetadata", referenced from:
          @nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libfullscreen.a(SwiftFullscreenPlugin.o)
      "__swift_FORCE_LOAD_$_swiftCoreMedia", referenced from:
          __swift_FORCE_LOAD_$_swiftCoreMedia_$_fullscreen in libfullscreen.a(SwiftFullscreenPlugin.o)
         (maybe you meant: __swift_FORCE_LOAD_$_swiftCoreMedia_$_fullscreen)
      "type metadata for Swift.String", referenced from:
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "_swift_bridgeObjectRelease", referenced from:
          @nonobjc __C.FlutterMethodChannel.__allocating_init(name: Swift.String, binaryMessenger: __C.FlutterBinaryMessenger) -> __C.FlutterMethodChannel in libfullscreen.a(SwiftFullscreenPlugin.o)
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
      "Swift.String.init(_builtinStringLiteral: Builtin.RawPointer, utf8CodeUnitCount: Builtin.Word, isASCII: Builtin.Int1) -> Swift.String", referenced from:
          static fullscreen.SwiftFullscreenPlugin.register(with: __C.FlutterPluginRegistrar) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
          fullscreen.SwiftFullscreenPlugin.handle(_: __C.FlutterMethodCall, result: (Any?) -> ()) -> () in libfullscreen.a(SwiftFullscreenPlugin.o)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner')
    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 14.4.99. (in target 'Flutter' from project 'Pods')

Could not build the application for the simulator.
Error launching application on iPhone 11.

Have I done something wrong?

Thanks for your efforts!

rafael-b-g commented 3 years ago

Having same issue.

rafael-b-g commented 3 years ago

I decided to just not use the plugin after all. Just use SystemChrome.setEnabledSystemUIOverlays([]) to enable full screen and SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values) to disable full screen.

ToniTornado commented 1 year ago

Thank you @rafael-b-g!

The syntax has changed only slightly since then: await SystemChrome.setEnabledSystemUIMode(SystemUiMode.immersiveSticky, overlays: []);