twilio / twilio-voice-react-native

Other
72 stars 27 forks source link

Critical Issue - iOS - Cannot upload app to the App Store #364

Closed omerts closed 1 month ago

omerts commented 4 months ago

Issue

Hello,

When trying to publish my app to the App Store, getting the following error:

ITMS-91056: Invalid privacy manifest - The PrivacyInfo.xcprivacy file from the following path is invalid: “Frameworks/TwilioVoice.framework/PrivacyInfo.xcprivacy”. Keys and values in any privacy manifest must be in a valid format. For more details about privacy manifest files, visit: https://developer.apple.com/documentation/bundleresources/privacy_manifest_files.

Pre-submission Checklist

Reproduction Steps

  1. Try to publish an app using this lib to the Apple App Store

Expected Behavior

App should be published as expected

Actual Behavior

App is denied.

Reproduction Frequency

100%

Software and Device Information

Please complete the following information.

sunil-sadasivan commented 4 months ago

+1 seeing the same behavior this morning.

dev3whistlebiz commented 4 months ago

+1 same issue here

MykolaKobetiakCloudGenie commented 4 months ago

+1 same issue

sunil-sadasivan commented 4 months ago

If it's helpful — a workaround that worked for me was to delete (or back up) the PrivacyInfo.xcprivacy file and build the archive to submit to testflight/app store.

 ./ios/Pods/TwilioVoice/TwilioVoice.xcframework/ios-arm64/TwilioVoice.framework/PrivacyInfo.xcprivacy
bobiechen-twilio commented 4 months ago

This is a known issue with the Voice iOS SDK 6.10.1 referenced in the twilio-voice-react-native.podspec. We are working on a new release of the iOS SDK to fix the privacy information, in the meantime to resolve the issue you can manually update the version to 6.10.4.

Sorry for the inconveniences.

MykolaKobetiakCloudGenie commented 4 months ago

for those who are using Expo

Her is an example of a plugin with a quick fix

`const { withDangerousMod } = require("@expo/config-plugins");

const fs = require("fs/promises"); const path = require("path");

module.exports = function withIntentActivity(config) { return withDangerousMod(config, [ "ios", async config => { const filePath = path.join( __dirname, "..", "node_modules", "@twilio", "voice-react-native-sdk", "twilio-voice-react-native.podspec", );

  let content = await fs.readFile(filePath, "utf-8");

  content = content.replace(
    `s.dependency "TwilioVoice", "6.10.1"`,
    `s.dependency "TwilioVoice", "6.10.4"`,
  );

  await fs.writeFile(filePath, content);

  return config;
},

]); };`

sshodges commented 4 months ago

Any update on the timeline of the next release to fix these bugs?

mhuynh5757 commented 4 months ago

Hi @sshodges we cannot give a concrete timeline at this point but it's high on our list of priorities. Thanks for your patience!

sshodges commented 4 months ago

Thanks @mhuynh5757. Totally understand, but is it possible get a rough timeline you're hoping for. Are we talking weeks or months? I just need to communicate the expectation internally

bobiechen-twilio commented 4 months ago

Hi everyone,

We have released the Twilio Voice iOS SDK 6.11.0, which includes an updated privacy manifest. While we are still working on updating the version reference in the React Native SDK repo, you can manually update the iOS SDK version in the twilio-voice-react-native.podspec file to download the latest iOS SDK for your iOS apps and resume the App Store submission.

devBjn commented 4 months ago

Hi @bobiechen-twilio , after change version in twilio-voice-react-native.podspec file, I run command pod install to update TwilioVoice version. However, xcode show some errors like the figure below

Screenshot 2024-05-22 at 23 07 13
bobiechen-twilio commented 4 months ago

Hi @devBjn

I forgot to mention there has been API changes in the native iOS SDK that have not been released in the React Native Voice SDK. We are currently working on updating the React Native Voice SDK to incorporate the latest native SDK changes and some great updates. Meanwhile to manually fix this you can update these two methods in TwilioVoiceReactNative+CallMessage.m

- (NSDictionary *)callMessageInfo:(TVOCallMessage *)callMessage {
    NSDictionary *callMessageInfoObject = @{
        kTwilioVoiceReactNativeVoiceEventSid: callMessage.voiceEventSid,
        kTwilioVoiceReactNativeCallMessageContent: callMessage.content,
        kTwilioVoiceReactNativeCallMessageContentType: callMessage.contentType,
        kTwilioVoiceReactNativeCallMessageMessageType: [self callMessageTypeString:callMessage.messageType]
    };

    return callMessageInfoObject;
}

- (NSString *)callMessageTypeString:(TVOCallMessageType)callMessageType {
    switch (callMessageType) {
        case TVOCallMessageUserDefinedMessage:
            return kTwilioVoiceReactNativeUserDefinedMessage;

        default:
            return kTwilioVoiceReactNativeUserDefinedMessage;
    }
}

to this

- (NSDictionary *)callMessageInfo:(TVOCallMessage *)callMessage {
    NSDictionary *callMessageInfoObject = @{
        kTwilioVoiceReactNativeVoiceEventSid: callMessage.voiceEventSid,
        kTwilioVoiceReactNativeCallMessageContent: callMessage.content,
        kTwilioVoiceReactNativeCallMessageContentType: callMessage.contentType,
        kTwilioVoiceReactNativeCallMessageMessageType: callMessage.messageType
    };

    return callMessageInfoObject;
}
devBjn commented 4 months ago

Thanks for your help @bobiechen-twilio

devBjn commented 4 months ago

Hi @bobiechen-twilio , after changing the version in node-modules, it works on my local. However, I use Expo to build on TestFlight, but it could npm i again cause a conflicting version TwilioVoice. How to fix it

sshodges commented 4 months ago

@devBjn I had to build and deploy through xcode instead of EAS, very annoying. Don't think it will work on EAS until they do this release. I followed these instructions: https://reactnative.dev/docs/publishing-to-app-store

ludvigbartholdsson commented 1 month ago

Also waiting for fix

sebastianpaz commented 1 month ago

I was able to push my Twilio Voice SDK app to TestFlight using EAS by applying the following patch (used yarn-patch but works for any patch package). This fix bypasses the PrivacyInfo issue y'all been experiencing, myself included.


index de83acf3300c0febd60a16bb9dd1d3cfcb1abdfd..424d040d8d6586e82db8c8165ea5f69eeef9f24e 100644
--- a/ios/TwilioVoiceReactNative+CallMessage.m
+++ b/ios/TwilioVoiceReactNative+CallMessage.m
@@ -62,6 +62,8 @@ - (void)messageFailedForCallSid:(NSString *)callSid voiceEventSid:(NSString *)vo

 #pragma mark - Utility

+// old way before privacy fix
+#if 0
 - (NSDictionary *)callMessageInfo:(TVOCallMessage *)callMessage {
     NSDictionary *callMessageInfoObject = @{
         kTwilioVoiceReactNativeVoiceEventSid: callMessage.voiceEventSid,
@@ -82,5 +84,17 @@ - (NSString *)callMessageTypeString:(TVOCallMessageType)callMessageType {
             return kTwilioVoiceReactNativeUserDefinedMessage;
     }
 }
+#else
+- (NSDictionary *)callMessageInfo:(TVOCallMessage *)callMessage {
+    NSDictionary *callMessageInfoObject = @{
+        kTwilioVoiceReactNativeVoiceEventSid: callMessage.voiceEventSid,
+        kTwilioVoiceReactNativeCallMessageContent: callMessage.content,
+        kTwilioVoiceReactNativeCallMessageContentType: callMessage.contentType,
+        kTwilioVoiceReactNativeCallMessageMessageType: callMessage.messageType
+    };
+    
+    return callMessageInfoObject;
+}
+#endif

 @end
\ No newline at end of file
diff --git a/twilio-voice-react-native.podspec b/twilio-voice-react-native.podspec
index 99216edb23544ec8a7754a80cbeac2a8a720b035..d6d359788b1349ab07f211196c5c4a85e90ddae6 100644
--- a/twilio-voice-react-native.podspec
+++ b/twilio-voice-react-native.podspec
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
   s.source_files = "ios/**/*.{h,m,mm}"

   s.dependency "React-Core"
-  s.dependency "TwilioVoice", "6.10.1"
+  s.dependency "TwilioVoice", "6.11.0"
   s.xcconfig  =  { 'VALID_ARCHS' => 'arm64 x86_64' }
   s.pod_target_xcconfig   = { 'VALID_ARCHS[sdk=iphoneos*]' => 'arm64', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'arm64 x86_64' }
 end
mhuynh5757 commented 1 month ago

Hi all, apologies for the delay. I've cut the Release Candidate for version 1.1.0-rc1 and we're running it by our QE team to ensure we don't have any regressions. I can't promise any timelines, but it's in the works. Thanks for your patience!

mhuynh5757 commented 1 month ago

Hey all, we released version 1.1.0 of the Twilio Voice RN SDK, which should resolve this issue. Please update at your earliest convenience. Thanks all for your patience and understanding.