First good news. IOS is able to create mp4 file, Android is able to play it.
What I changed in your B4i code.
1) Before download/upload I added ftp.SendCommand ("TYPE", "BINARY")
2) testaudio.wav renamed to testaudio.mp4
3) replaced recorder.Initialize (...) to
Dim Settings As Map
Settings.Initialize
Settings.Put ("AVFormatIDKey", kAudioFormatMPEG4AAC)
Settings.Put ("AVEncoderAudioQualityKey", AVAudioQualityMax)
Settings.Put ("AVNumberOfChannelsKey", 1)
Settings.Put ("AVEncoderBitRateKey", 16000)
Settings.Put ("AVSampleRateKey", 16000)
recorder.Initialize2(shared, audioMessageName, Settings)
4) Constants (not all are needed) in Class_Globals:
Public Const kAudioFormatLinearPCM As Int = 1819304813
Public Const kAudioFormatAC3 As Int = 1633889587
Public Const kAudioFormat60958AC3 As Int = 1667326771
Public Const kAudioFormatAppleIMA4 As Int = 1768775988
Public Const kAudioFormatMPEG4AAC As Int = 1633772320
Public Const kAudioFormatMPEG4CELP As Int = 1667591280
Public Const kAudioFormatMPEG4HVXC As Int = 1752594531
Public Const kAudioFormatMPEG4TwinVQ As Int = 1953986161
Public Const kAudioFormatMACE3 As Int = 1296122675
Public Const kAudioFormatMACE6 As Int = 1296122678
Public Const kAudioFormatULaw As Int = 1970037111
Public Const kAudioFormatALaw As Int = 1634492791
Public Const kAudioFormatQDesign As Int = 1363430723
Public Const kAudioFormatQDesign2 As Int = 1363430706
Public Const kAudioFormatQUALCOMM As Int = 1365470320
Public Const kAudioFormatMPEGLayer1 As Int = 778924081
Public Const kAudioFormatMPEGLayer2 As Int = 778924082
Public Const kAudioFormatMPEGLayer3 As Int = 778924083
Public Const kAudioFormatTimeCode As Int = 1953066341
Public Const kAudioFormatMIDIStream As Int = 1835623529
Public Const kAudioFormatParameterValueStream As Int = 1634760307
Public Const kAudioFormatAppleLossless As Int = 1634492771
Public Const kAudioFormatMPEG4AAC_HE As Int = 1633772392
Public Const kAudioFormatMPEG4AAC_LD As Int = 1633772396
Public Const kAudioFormatMPEG4AAC_ELD As Int = 1633772389
Public Const kAudioFormatMPEG4AAC_ELD_SBR As Int = 1633772390
Public Const kAudioFormatMPEG4AAC_ELD_V2 As Int = 1633772391
Public Const kAudioFormatMPEG4AAC_HE_V2 As Int = 1633772400
Public Const kAudioFormatMPEG4AAC_Spatial As Int = 1633772403
Public Const kAudioFormatMPEGD_USAC As Int = 1970495843
Public Const kAudioFormatAMR As Int = 1935764850
Public Const kAudioFormatAMR_WB As Int = 1935767394
Public Const kAudioFormatAudible As Int = 1096107074
Public Const kAudioFormatiLBC As Int = 1768710755
Public Const kAudioFormatDVIIntelIMA As Int = 1836253201
Public Const kAudioFormatMicrosoftGSM As Int = 1836253233
Public Const kAudioFormatAES3 As Int = 1634038579
Public Const kAudioFormatEnhancedAC3 As Int = 1700998451
Public Const kAudioFormatFLAC As Int = 1718378851
Public Const kAudioFormatOpus As Int = 1869641075
Public Const kAudioFileWAVEType As Int = 1463899717
Public Const kAudioFileAIFFType As Int = 1095321158
Public Const kAudioFileAIFCType As Int = 1095321155
Public Const kAudioFileWAVEType As Int = 1463899717
Public Const kAudioFileSoundDesigner2Type As Int = 1399075430
Public Const kAudioFileNextType As Int = 1315264596
Public Const kAudioFileMP3Type As Int = 1297106739
Public Const kAudioFileMP2Type As Int = 1297106738
Public Const kAudioFileMP1Type As Int = 1297106737
Public Const kAudioFileAC3Type As Int = 1633889587
Public Const kAudioFileAAC_ADTSType As Int = 1633973363
Public Const kAudioFileMPEG4Type As Int = 1836069990
Public Const kAudioFileM4AType As Int = 1832149350
Public Const kAudioFileCAFType As Int = 1667327590
Public Const kAudioFile3GPType As Int = 862417008
Public Const kAudioFile3GP2Type As Int = 862416946
Public Const kAudioFileAMRType As Int = 1634562662
Public Const AVAudioQualityMin As Int = 0
Public Const AVAudioQualityLow As Int = 32
Public Const AVAudioQualityMedium As Int = 64
Public Const AVAudioQualityHigh As Int = 96
Public Const AVAudioQualityMax As Int = 127