maps icon indicating copy to clipboard operation
maps copied to clipboard

Updating mapbox-maps-ios to 10.17.0 - May 1st iOS Privacy Manifest issue

Open fractalscape13 opened this issue 1 year ago • 23 comments

"May 1st is the deadline to have a proper privacy manifest on iOS to be able to release updates to apps which use this package, https://github.com/mapbox/mapbox-maps-ios/issues/2145 details the issue and it seems like the fix was released as part of mapbox-maps-ios 10.17.0"

It looks like mapbox-maps-flutter is releasing an upgrade soon: https://github.com/mapbox/mapbox-maps-flutter/issues/475

Will there be a similar release for rnmapbox?

fractalscape13 avatar Apr 04 '24 22:04 fractalscape13

It will only fix: ITMS-91056: Invalid privacy manifest

You can already use it:

ios/Podfile $RNMapboxMapsVersion = '= 10.17.0'

To scan for the other ITMS: https://github.com/Wooder/ios_17_required_reason_api_scanner

hexadecy avatar Apr 05 '24 15:04 hexadecy

@hexadecy after adding the following in ios/Podfile, I still got an email from Apple with other issues. Am I missing something?

Podfile:

$RNMapboxMapsImpl = 'mapbox' $RNMapboxMapsVersion = '= 10.17.0'

Email:

TMS-91053: Missing API declaration - Your app’s code in the “appName” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryDiskSpace. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

ITMS-91053: Missing API declaration - Your app’s code in the “appName” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategorySystemBootTime. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.

andreirat avatar Apr 25 '24 13:04 andreirat

@andreirat you need the PrivacyInfo.xcprivacy file.

It can be auto-created at the iOS Build step if you have a react-native version above these: 0.72.13 0.73.7 0.74.0-rc.9

For the DiskSpace, maybe you need to update this dep: https://github.com/react-native-device-info/react-native-device-info/releases/tag/v10.13.2

hexadecy avatar Apr 25 '24 16:04 hexadecy

Thanks @hexadecy, I'll give it a try.

andreirat avatar Apr 26 '24 12:04 andreirat

I am using @rnmapbox/maps 10.1.19 My ios files are updated to 10.17.0, I am still getting:

ITMS-91056: Invalid privacy manifest - The PrivacyInfo.xcprivacy file from the following path is invalid: “Frameworks/MapboxCommon.framework/PrivacyInfo.xcprivacy”

Edit: tried submission with @rnmapbox/maps 10.1.20 and I got the same warning email about 91056

Edit: the PrivacyInfo files don't seem to be updated during build/install, so I manually updated my files with the code from 10.17.0 and so far I haven't received the warning email.

fractalscape13 avatar Apr 29 '24 20:04 fractalscape13

Same issue here

RemiHin avatar Apr 30 '24 19:04 RemiHin

Also experiencing this issue.

In an Expo managed project, the Podfile is generated at build time, and it's not possible to safely modify it either, so the workaround of directly updating the Podfile will not work for these projects.

mattpetrie avatar May 01 '24 05:05 mattpetrie

You must purge the ios folder when you update mapbox-maps-ios.

"scripts": {
  "purge:ios": "rm -rf ios/Pods ios/build ~/Library/Caches/CocoaPods ~/Library/Developer/Xcode/DerivedData && cd ios && bundle exec pod cache clean --all && cd ..",
}

hexadecy avatar May 01 '24 13:05 hexadecy

any updates about this for expo devs?

zegenerative avatar May 02 '24 08:05 zegenerative

It seems as this lib is using UserDefaults in RNMBXModule.swift:111. This info might help someone by the creation of the PrivacyInfo.xcprivacy file.

Similar PR from a diff lib. for comparison. Though the privacy manifest will probably different due to the nature/content of the lib.

vanGalilea avatar May 03 '24 07:05 vanGalilea

Also experiencing this issue.

In an Expo managed project, the Podfile is generated at build time, and it's not possible to safely modify it either, so the workaround of directly updating the Podfile will not work for these projects.

@mattpetrie did you find solution to this?

I am getting invalid binary issue error for expo managed project. I have added version 10.1.20. Screenshot 2024-05-03 at 6 01 06 PM

kuldip-simform avatar May 03 '24 12:05 kuldip-simform

1.) Expo users can modify the version with config plugin setting, so no need to modify the Podfile for expo users. https://rnmapbox.github.io/docs/install?v11-insructions=expo#using-v11 2.) 10.1.20 defaults to 10.17.0, so you can use that without config plugin changes as well

mfazekas avatar May 03 '24 13:05 mfazekas

Expo managed flow using version > 11 in app.confing.ts or app.json

@mattpetrie or anyone who is using expo managed flow. if you are using version>=11 for RNMapboxMapsVersion in app.config.ts or app.json then update that to 11.3.0. even if your package.json says version 10.1.20 it will take version 11 for ios podfile. Issue of privacy manifest is resolved in version 11.3.0 for version 11.

'@rnmapbox/maps',
        {
            RNMapboxMapsImpl: 'mapbox',
            RNMapboxMapsDownloadToken: MAPBOX_API_KEY,
            RNMapboxMapsVersion: '11.3.0',
        },

That way it should solve this issue. https://github.com/mapbox/mapbox-maps-ios/issues/2145 https://github.com/mapbox/mapbox-maps-ios/releases/tag/v11.3.0

kuldip-simform avatar May 03 '24 13:05 kuldip-simform

Thank you @kuldip-simform! I can confirm that this does solve the issue in an Expo managed workflow project.

mattpetrie avatar May 03 '24 22:05 mattpetrie

Confirm that update to 10.17.0 fixed the warning

Remember to run purge:ios before yarn and pod install, thanks @hexadecy

"scripts": {
  "purge:ios": "rm -rf ios/Pods ios/build ~/Library/Caches/CocoaPods ~/Library/Developer/Xcode/DerivedData && cd ios && bundle exec pod cache clean --all && cd ..",
}

Dat-Mobile avatar May 04 '24 16:05 Dat-Mobile

Confirm that update to 10.17.0 fixed the warning

Remember to run purge:ios before yarn and pod install, thanks @hexadecy

"scripts": {
  "purge:ios": "rm -rf ios/Pods ios/build ~/Library/Caches/CocoaPods ~/Library/Developer/Xcode/DerivedData && cd ios && bundle exec pod cache clean --all && cd ..",
}

@Dat-Mobile

  • Is these steps for bare RN or Expo
  • Do we need to add the script in package.json every time we run the command before pod installation?
  • Do we need to update the package.json and pod files also .if yes, please share code snippet

Thanks in advance

Manikandan-saminathan avatar May 04 '24 17:05 Manikandan-saminathan

I am using @rnmapbox/maps 10.1.19 My ios files are updated to 10.17.0, I am still getting:

ITMS-91056: Invalid privacy manifest - The PrivacyInfo.xcprivacy file from the following path is invalid: “Frameworks/MapboxCommon.framework/PrivacyInfo.xcprivacy”

Edit: tried submission with @rnmapbox/maps 10.1.20 and I got the same warning email about 91056

Edit: the PrivacyInfo files don't seem to be updated during build/install, so I manually updated my files with the code from 10.17.0 and so far I haven't received the warning email.

Can you explain how you did this?

JackJBlundell avatar May 04 '24 19:05 JackJBlundell

For anybody using MapboxNavigation facing this, upgrade to 2.18!

MapboxNavigation", "~> 2.18"

JackJBlundell avatar May 05 '24 00:05 JackJBlundell

Confirm that update to 10.17.0 fixed the warning Remember to run purge:ios before yarn and pod install, thanks @hexadecy

"scripts": {
  "purge:ios": "rm -rf ios/Pods ios/build ~/Library/Caches/CocoaPods ~/Library/Developer/Xcode/DerivedData && cd ios && bundle exec pod cache clean --all && cd ..",
}

@Dat-Mobile

  • Is these steps for bare RN or Expo
  • Do we need to add the script in package.json every time we run the command before pod installation?
  • Do we need to update the package.json and pod files also .if yes, please share code snippet

Thanks in advance

@Manikandan-saminathan This steps looks like for RN workflow not Expo.

kuldip-simform avatar May 06 '24 03:05 kuldip-simform

I am using bare react-native application. I upgraded my react-native and mapbox and tried to submit the app.The submission was accepted.

Used versions

react-native : 0.73.8 @rnmapbox/maps : 10.1.21

Note: I did not specify and static version in Pod file

Manikandan-saminathan avatar May 06 '24 05:05 Manikandan-saminathan

I am getting the binary rejection from app store with the following versions:

react-native : 0.69.7 @rnmapbox/maps : 10.1.28

doneill avatar Aug 07 '24 01:08 doneill

I am getting the binary rejection from app store with the following versions:

react-native : 0.69.7 @rnmapbox/maps : 10.1.28

@doneill If you are using expo, can you please check my comment and see if this resolves your issue or not. Even if you are not using expo and just using v11 then this should put you in right direction.

kuldip-simform avatar Aug 07 '24 03:08 kuldip-simform

@kuldip-simform Not using expo

doneill avatar Aug 07 '24 03:08 doneill

I am using "@rnmapbox/maps": "^10.1.19", and got the same issue of Privacy Manifest after submitting the app to App Store and the app is rejected. Can someone help me with this?

Ravikiran-Avasarala avatar Nov 28 '24 11:11 Ravikiran-Avasarala

What version of react-native and mapbox do you use? It have nothing to do with this lib, it's a native thing.

hexadecy avatar Nov 28 '24 12:11 hexadecy

ITMS-91056: Invalid privacy manifest - The PrivacyInfo.xcprivacy file from the following path is invalid: “Frameworks/MapboxCommon.framework/PrivacyInfo.xcprivacy”. Keys and values in your app’s privacy manifests must be valid. For more details about privacy manifest files,

How can i fix this one

DikshitPatoliya avatar Feb 12 '25 14:02 DikshitPatoliya

@DikshitPatoliya use a more recent version

ios/Podfile $RNMapboxMapsVersion = '= 10.17.0'

Then purge the ios folder.

hexadecy avatar Feb 12 '25 17:02 hexadecy