Search code examples
codenameone

Codename one build IOS : fatal error: 'MapContainer.h' not found


I try to build my codename one code but there is an error during the build :

*/dist/app-src/com_codename1_googlemaps_InternalNativeMapsImpl.m:19:10: fatal error: 'com_codename1_googlemaps_MapContainer.h' file not found
#include "com_codename1_googlemaps_MapContainer.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I've tested it with an old version of GoogleMaps.cn1lib and the last one but it doesn't change anything, I still have the same error. I have this problem since I've modified the ios.plistInject, as necessary for my application :

codename1.arg.ios.plistInject=<key>NSBluetoothPeripheralUsageDescription</key><string>This app uses a BLE cardreader</string><key>UISupportedExternalAccessoryProtocols</key><array><string>com.test.reader</string></array>

I have to precise that "com.test.reader" is not the real value of course ...

I read this and I added hints in the build hints as it was said :

codename1.arg.ios.pods=GoogleMaps codename1.arg.ios.pods.platform=8.0,7.0 codename1.arg.ios.pods.sources=https://github.com/CocoaPods/Specs.git

But It still doesn't build it.


Solution

  • You added the google maps cn1lib without using it. You need to remove it or actually use it see: https://www.codenameone.com/blog/tip-uninstall-cn1lib.html