DaniilAlpha / minisound

A high-level real-time audio playback library for Flutter, based on miniaudio.
4 stars 1 forks source link

is not working on IOS #4

Open montenegroPatrick opened 4 months ago

montenegroPatrick commented 4 months ago

It's work well on Android, but i got this error 'Lexical or Preprocessor Issue (Xcode): '../../src/external/milo/src/milo.c' file not found /Users/patrickImusic/.pub-cache/hosted/pub.dev/minisound_ffi-1.3.8/ios/Classes/minisound_ffi.c:6:9' when i'm trying to run on IOS

DaniilAlpha commented 4 months ago

It seems I changed the file structure and forgot to change the ios imports. I've just uploaded an updated version, although I don't have a mac to test it on. Would be great if you could check if it works. (make sure the minisound_ffi in your dependency tree is version 1.3.9, minisound's stays as is)

montenegroPatrick commented 4 months ago

So it's ok for the ios import but i still can't run it.. I got a few errors of framework ios : `Could not build the precompiled application for the device. Parse Issue (Xcode): Expected identifier or '(' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:600:0

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:602:8

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:603:8

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:605:18

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:606:43

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:608:18

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:609:52

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:611:18

Modules Issue (Xcode): Missing '#include <objc/runtime.h>'; 'Protocol' must be declared before it is used /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:611:49

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:612:60

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:616:29

Semantic Issue (Xcode): Format argument not a string type /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:616:52

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:617:30

Semantic Issue (Xcode): Format argument not a string type /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:617:62

Parse Issue (Xcode): Module 'ObjectiveC.NSObject' requires feature 'objc' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/usr/include/objc/module.modulemap:7:9

Parse Issue (Xcode): Expected identifier or '(' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:8:0

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:18:62

Semantic Issue (Xcode): Unknown type name 'NSString' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSZone.h:19:18

Parse Issue (Xcode): Expected identifier or '(' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:8:0

Error (Xcode): too many errors emitted, stopping now

Parse Issue (Xcode): Could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/AVFoundation.framework/Headers/AVBase.h:12:8

Parse Issue (Xcode): Could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h: 9:8

Parse Issue (Xcode): Could not build module 'Foundation' /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/AVFAudio.framework/Headers/AVAudioTypes.h:10:8

Parse Issue (Xcode): Could not build module 'AVFoundation' /Users/patrickImusic/.pub-cache/hosted/pub.dev/minisound_ffi-1.3.9/src/external/miniaudio/src/miniaudio.c:20351:9 `

montenegroPatrick commented 4 months ago

Tell me if you want to do an other issue for this errors of library

DaniilAlpha commented 4 months ago

I think this is still 'not working on ios' so we'll continue here. I think i know what may be causing this, but to be 100% sure, can you show me the 600'th line of the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h? (a brief lookup on the internet didn't give any meaningful results)

montenegroPatrick commented 4 months ago

Hello here the line 570 to 618 thank you !

`#if TARGET_OS_IPHONE

define NSFoundationVersionNumber_iPhoneOS_2_0 678.24

define NSFoundationVersionNumber_iPhoneOS_2_1 678.26

define NSFoundationVersionNumber_iPhoneOS_2_2 678.29

define NSFoundationVersionNumber_iPhoneOS_3_0 678.47

define NSFoundationVersionNumber_iPhoneOS_3_1 678.51

define NSFoundationVersionNumber_iPhoneOS_3_2 678.60

define NSFoundationVersionNumber_iOS_4_0 751.32

define NSFoundationVersionNumber_iOS_4_1 751.37

define NSFoundationVersionNumber_iOS_4_2 751.49

define NSFoundationVersionNumber_iOS_4_3 751.49

define NSFoundationVersionNumber_iOS_5_0 881.00

define NSFoundationVersionNumber_iOS_5_1 890.10

define NSFoundationVersionNumber_iOS_6_0 992.00

define NSFoundationVersionNumber_iOS_6_1 993.00

define NSFoundationVersionNumber_iOS_7_0 1047.20

define NSFoundationVersionNumber_iOS_7_1 1047.25

define NSFoundationVersionNumber_iOS_8_0 1140.11

define NSFoundationVersionNumber_iOS_8_1 1141.1

define NSFoundationVersionNumber_iOS_8_2 1142.14

define NSFoundationVersionNumber_iOS_8_3 1144.17

define NSFoundationVersionNumber_iOS_8_4 1144.17

define NSFoundationVersionNumber_iOS_8_x_Max 1199

define NSFoundationVersionNumber_iOS_9_0 1240.1

define NSFoundationVersionNumber_iOS_9_1 1241.14

define NSFoundationVersionNumber_iOS_9_2 1242.12

define NSFoundationVersionNumber_iOS_9_3 1242.12

define NSFoundationVersionNumber_iOS_9_4 1280.25

define NSFoundationVersionNumber_iOS_9_x_Max 1299

endif

@class NSString, Protocol;

typedef NSString NSExceptionName NS_TYPED_EXTENSIBLE_ENUM; typedef NSString NSRunLoopMode NS_TYPED_EXTENSIBLE_ENUM;

FOUNDATION_EXPORT NSString NSStringFromSelector(SEL aSelector); FOUNDATION_EXPORT SEL NSSelectorFromString(NSString aSelectorName);

FOUNDATION_EXPORT NSString NSStringFromClass(Class aClass); FOUNDATION_EXPORT Class _Nullable NSClassFromString(NSString aClassName);

FOUNDATION_EXPORT NSString NSStringFromProtocol(Protocol proto) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); FOUNDATION_EXPORT Protocol _Nullable NSProtocolFromString(NSString namestr) API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));

FOUNDATION_EXPORT const char NSGetSizeAndAlignment(const char typePtr, NSUInteger _Nullable sizep, NSUInteger _Nullable alignp);

FOUNDATION_EXPORT void NSLog(NSString format, ...) NS_FORMAT_FUNCTION(1,2) NS_NO_TAIL_CALL; FOUNDATION_EXPORT void NSLogv(NSString format, va_list args) NS_FORMAT_FUNCTION(1,0) NS_NO_TAIL_CALL;`

montenegroPatrick commented 4 months ago

Hello do you find any solution ?

DaniilAlpha commented 4 months ago

Well, everything happens to be more complicated than i thought. I have never seen such problem before. In case you want a workaround, try if you can disable logging (which probably causing this) by passing CMake flag MILO_LVL to be 0. Although i am unsure if you will be able to redefine it though your app's CMakeLists, so maybe you'll need to modify local cache of the minisound_ffi package.

DaniilAlpha commented 3 months ago

Ok, i decided to disable logging as it is at most useless now, so i think you would be able to build to the iOS after upgrading packages.