相关疑难解决方法(0)

使用whatsapp分享链接

我在这个应用程序中使用这些代码进行共享应用程序链接,但在whatsapp的文本字段中没有任何内容.如果使用简单的文本然后它的工作.任何人都可以提出最终结果.

NSString *theTempMessage = @"whatsapp://send?text=https://itunes.apple.com/in/app/myapp/id1054375332?ls=1&mt=8";
NSString *theFinalMessage;

theTempMessage = [theTempMessage stringByReplacingOccurrencesOfString:@":" withString:@"%3A"];
theTempMessage = [theTempMessage stringByReplacingOccurrencesOfString:@"/" withString:@"%2F"];
theTempMessage = [theTempMessage stringByReplacingOccurrencesOfString:@"?" withString:@"%3F"];
theTempMessage = [theTempMessage stringByReplacingOccurrencesOfString:@"," withString:@"%2C"];
theTempMessage = [theTempMessage stringByReplacingOccurrencesOfString:@"=" withString:@"%3D"];
theFinalMessage = [theTempMessage stringByReplacingOccurrencesOfString:@"&" withString:@"%26"];

NSString * stringToSend=theFinalMessage;
NSURL *whatsappURL = [NSURL URLWithString:stringToSend];

if ([[UIApplication sharedApplication] canOpenURL: whatsappURL])

{
    [[UIApplication sharedApplication] openURL: whatsappURL];
}
Run Code Online (Sandbox Code Playgroud)

objective-c ios whatsapp

17
推荐指数
2
解决办法
1万
查看次数

'InvalidOperationException',原因:在LSApplicationQueriesSchemes下的Info.plist中缺少'fbauth2,iOS 9.0需要'

在您将此标记为重复之前,请注意我已在相关问题中尝试了所有解决方案.当我点击我的应用程序上的Facebook登录按钮时,应用程序崩溃时出现此错误

2015-10-28 18:31:05.277 retailcatalogue[96362:2057887] *** Terminating app due to uncaught exception 'InvalidOperationException', reason: 'fbauth2 is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0'
Run Code Online (Sandbox Code Playgroud)

我查看了可用的解决方案并更新了我的info.plist但它仍然无效.请帮忙,谢谢!

我的info.plist

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbapi</string>
    <string>fbapi20130214</string>
    <string>fbapi20130410</string>
    <string>fbapi20130702</string>
    <string>fbapi20131010</string>
    <string>fbapi20131219</string>
    <string>fbapi20140410</string>
    <string>fbapi20140116</string>
    <string>fbapi20150313</string>
    <string>fbapi20150629</string>
    <string>fbauth</string>
    <string>fbauth2 </string>
    <string>fb-messenger-api20140430</string>
    <string>fb-messenger-platform-20150128</string>
    <string>fb-messenger-platform-20150218</string>
    <string>fb-messenger-platform-20150305</string>
</array>
Run Code Online (Sandbox Code Playgroud)

facebook facebook-sdk-3.1 facebook-sdk-4.0 ios9 swift2

3
推荐指数
2
解决办法
6070
查看次数