NativeScript / ios-jsc

NativeScript for iOS using JavaScriptCore
http://docs.nativescript.org/runtimes/ios
Apache License 2.0
298 stars 59 forks source link

Problem with MicrosoftCognitiveServicesSpeech #1260

Closed jibon57 closed 4 years ago

jibon57 commented 4 years ago

✔ Getting NativeScript components versions information... ⚠ Update available for component nativescript. Your current version is 6.4.0 and the latest available version is 6.4.1. ✔ Component tns-core-modules has 6.4.2 version and is up to date. ✖ Component tns-android is not installed. ✔ Component tns-ios has 6.4.2 version and is up to date.

I am trying to implement azure Speech SDK for NativeScript iOS following here but I am getting this error message during build:

ld: warning: ignoring file /Users/UserName/speechservice/nativescript-azure-cognitiveservices/platforms/ios/MicrosoftCognitiveServicesSpeech.framework/MicrosoftCognitiveServicesSpeech, missing required architecture i386 in file /Users/UserName/speechservice/nativescript-azure-cognitiveservices/platforms/ios/MicrosoftCognitiveServicesSpeech.framework/MicrosoftCognitiveServicesSpeech (2 slices)

I am able to use the service but having that problem. I have created a custom plugin & added in Podfile

pod 'MicrosoftCognitiveServicesSpeech-iOS', '~> 1.9.0'

As it was static frameworks so I have added necessary module.modulemap. I am OK to use the service but getting error message during build. Also in apple appstoreconnect showing This build is invalid. Any suggestion please? Thanks

To Reproduce Please check attached project. Run tns build ios

Sample project Archive.zip

jibon57 commented 4 years ago

@mbektchiev will you please have a look?

mbektchiev commented 4 years ago

MicrosoftCognitiveServicesSpeech framework is built only for arm64 and x86_64. I suppose you should disable 32-bit architectures via build.xcconfig like this:

VALID_ARCHS[sdk=iphoneos*] = arm64
VALID_ARCHS[sdk=iphonesimulator*] = x86_64
jibon57 commented 4 years ago

Thank you so much!