简体   繁体   中英

google map javascript api v3 not working on app build by xcode 7

I'm updating the hybrid app developed by IBM Worklight 6.1.02-20150725 for android, ios and windows 8. The app includes a map feature using google map javascript api v3. I build for all environments in eclipse. After that compile for iOS using XCode 7. The map does not display. Once I compile the same code using XCode 6, the map has no issue. Android and Windows app are working fine.

Could anyone advice this issue or any link that I could get reference?

In head section in index.html, I'm using following link.

<script type="text/javascript"
    src="http://maps.googleapis.com/maps/api/js?v=3&sensor=true&language=en&libraries=geometry"></script>

If I use below code to check google map, it prompt the alert.

if(!(typeof google==='object' && typeof google.maps === 'object')){
        alert("error loading map.");
        return false;
    }

I do not believe this has anything to do with Worklight. If you are compiling in Xcode 7 then you also need to make sure that you have Bitcode disabled as well as have correctly setup the application with ATS support (or disabled it).

Read more here: https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM