Software Archive
Read-only legacy content
17061 Discussions

iOS10 Content-Security-Policy and google maps

Daniele_A_
Beginner
397 Views

Dear team i use in older project that Content-Security-Policy and work about google maps permission..

      <meta http-equiv="Content-Security-Policy" content="
    default-src 'self' data: gap:
        *;
    script-src 'self' 'unsafe-inline' 'unsafe-eval'
        *;
    style-src 'self' 'unsafe-inline' 'unsafe-eval'
        *;
    media-src 'self' 'unsafe-inline' 'unsafe-eval'
        *;
    img-src 'self' 'unsafe-inline' 'unsafe-eval'
        *
    ">

 

Now in new iOS i use that...

<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src * 'unsafe-inline' 'unsafe-eval';media-src 'self' 'unsafe-inline' 'unsafe-eval'">

 

Seems work about my older project but not ok for google maps...

Any idea??

0 Kudos
5 Replies
PaulF_IntelCorp
Employee
397 Views

CSP rules do not impact geolocation permissions. Apple has made changes to the webview in iOS 10 which have impacted some developers applications. With the information you've provided, it's hard to say how this has impacted your application. Also, the latest versions of Cordova for iOS have changed the way the whitelist rules are interpreted by the Cordova for iOS framework. This also could be affecting your app. There are multiple threads on the forum related to both issues, I recommend you look at these to see if they might be related to your issue:

Screen Shot 2016-10-10 at 2.40.08 PM.png

0 Kudos
Daniele_A_
Beginner
397 Views

Paul i still use new cli version  6.2.0 my project ios dimension after was only 6 mb , now with new cli is 64 mb !! There is a way to compress ? Or i forget something ?

Seems intel xdk upload all screenshoot and icons and no compress that possible?

0 Kudos
PaulF_IntelCorp
Employee
397 Views

Daniele -- if you were NOT using Crosswalk and now ARE using Crosswalk ("Optimize for Crosswalk" is checked on Build Settings) that could explain the difference in size.

Otherwise, you may have added something to your project source. Sometimes I have seen people download their APK files into their source folder, which is not a good thing, but that will get added to their application build.

0 Kudos
Daniele_A_
Beginner
397 Views

Exscume but i can put all my media for store  windows, ios, and  android in  package-assets directory?
Becouse before i use a directory inside ..like  www --> image directory... this is a way to create app more light?

 
0 Kudos
PaulF_IntelCorp
Employee
397 Views

Daniele -- the package-assets folder is only good for storing package icons, splash screens and build certificates. Your app cannot access anything in that folder, so image assets that need to be part of your application directly (not part of the package/build) need to be located within your www folder. If you have assets that are specific to a particular target you should setup some sort of script, external to the XDK, that puts the right images into your www folder before you do a build to manage those. The XDK does not provide any such management tool.

0 Kudos
Reply