i've configured this Info.plist for google and then facebook for signing in with social.
The problem when added facebook it works but google sign in not working. The console debugger it 'Your app is missing support for the following URL schemes: com.googleusercontent.apps.************************'
Here is my configuration Info.plist file content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.**********************</string>
</array>
</dict>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<!-- facebook -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb*************</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>***************</string>
<key>FacebookClientToken</key>
<string>****************</string>
<key>FacebookDisplayName</key>
<string>Nome app</string>
<!--Per usare una delle finestre di dialogo di Facebook (ad es. Accedi, Condividi, inviti a installare l'app ecc.) che consentono di eseguire il passaggio di un'app alle app Facebook-->
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-share-api</string>
</array>
</dict>
</plist>
Thanks for any appreciated help. I need for this morning please.
I had the similar issue but instead of google I had vk.
Still the solution is the same.
Initial code
<!-- VK Configuration -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>vk12345</string>
</array>
</dict>
</array>
<!-- -->
<key>LSApplicationQueriesSchemes</key>
<array>
<string>vk</string>
<string>vk-share</string>
<string>vkauthorize</string>
</array>
<!-- -->
<key>VKAppId</key>
<string>{YOUR_VK_ID}</string>
<!-- Facebook Config -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb{YOUR_FB_ID}</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>{YOUR_FB_ID}</string>
<key>FacebookClientToken</key>
<string>{YOUR_FB_TOKEN}</string>
<key>FacebookDisplayName</key>
<string>{YOUR_FB_NAME}</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-share-api</string>
</array>
<!-- -->
Merged code
<!-- MERGED -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>vk{YOUR_VK_ID}</string>
<string>fb{YOUR_FB_ID}</string>
</array>
</dict>
</array>
<!-- MERGED -->
<key>LSApplicationQueriesSchemes</key>
<array>
<string>vk</string>
<string>vk-share</string>
<string>vkauthorize</string>
<string>fbapi</string>
<string>fb-messenger-share-api</string>
</array>
<key>VKAppId</key>
<string>{YOUR_VK_ID}</string>
<!-- Facebook Config -->
<key>FacebookAppID</key>
<string>{YOUR_FB_ID}</string>
<key>FacebookClientToken</key>
<string>{YOUR_FB_TOKEN}</string>
<key>FacebookDisplayName</key>
<string>Katharsis</string>
<!-- -->
Related
I have a pdf that I want to analyze when I open it with my swiftui app (iOS 14.1).
I've configured the info.plist of my app to declare it can open pdf files
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>pdf</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>app.icns</string>
<key>CFBundleTypeName</key>
<string>public.pdf</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.pdf</string>
</array>
</dict>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
</array>
<key>UTTypeIdentifier</key>
<string>public.pdf</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>com.apple.ostype</key>
<string>PDF</string>
<key>public.filename-extension</key>
<array>
<string>pdf</string>
</array>
<key>public.mime-type</key>
<string>application/pdf</string>
</dict>
</dict>
</array>
</dict>
</plist>
Now, when I click on the pdf file (in file manager or in an email), and select my app in the 'share' menu, it opens my app exactly how I wanted.
But I have no clue about how to get the url of the file (or directly the file content) inside my app.
I've tried using .onOpenURL modifier but it never seems to be called.
Is it only called from schemes url?
I create app for iOS and macOS.
I set document types and icons on Xcode 11, but it doesn't be applied for iOS 14 and macOS Catalina.Also Xcode 12 seem delete setting view of document type icon.
If anyone know correct way to set document type icons, please let me know.
Xcode 11 setting window of document types:Xcode 11 setting window
Xcode 12 setting window of document types:Xcode 12 setting window
Part of info.plist for document types:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>zip</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>Document-ZIP.icns</string>
<key>CFBundleTypeIconFiles</key>
<array>
<string>filetype-zip-textonly</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/zip</string>
</array>
<key>CFBundleTypeName</key>
<string>Zip Archive</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.zip-archive</string>
</array>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>rar</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>Document-RAR.icns</string>
<key>CFBundleTypeIconFiles</key>
<array>
<string>filetype-rar-textonly</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/rar</string>
</array>
<key>CFBundleTypeName</key>
<string>RAR Archive</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.rarlab.rar-archive</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>rar</string>
</array>
</dict>
</dict>
</array>
<key>UTImportedTypeDeclarations</key>
<array>
<dict>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.archive</string>
</array>
<key>UTTypeDescription</key>
<string>RAR Archive</string>
<key>UTTypeIconFiles</key>
<array>
<string>filetype-rar-textonly</string>
</array>
<key>UTTypeIdentifier</key>
<string>com.rarlab.rar-archive</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>rar</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/x-rar</string>
<string>application/x-rar-compressed</string>
</array>
</dict>
</dict>
</array>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
<key>CFBundleIconFile</key>
<string>Document-ZIP</string>
<key>UTTypeConformsTo</key>
<array>
<string>com.pkware.zip-archive</string>
</array>
<key>UTTypeDescription</key>
<string>ZIP Archive</string>
<key>UTTypeIconFiles</key>
<array>
<string>filetype-zip-textonly</string>
</array>
<key>UTTypeIdentifier</key>
<string>public.zip-archive</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>zip</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/zip</string>
<string>application/octet-stream</string>
<string>application/x-zip-compressed</string>
</array>
</dict>
</dict>
<dict>
<key>CFBundleIconFile</key>
<string>Document-RAR</string>
<key>UTTypeConformsTo</key>
<array>
<string>public.data</string>
<string>public.archive</string>
</array>
<key>UTTypeDescription</key>
<string>RAR Archive</string>
<key>UTTypeIconFiles</key>
<array>
<string>filetype-rar-textonly</string>
</array>
<key>UTTypeIdentifier</key>
<string>com.rarlab.rar-archive</string>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<array>
<string>rar</string>
</array>
<key>public.mime-type</key>
<array>
<string>application/x-rar</string>
<string>application/x-rar-compressed</string>
</array>
</dict>
</dict>
</array>
...(continue plist)
I have an iOS app I've already associated with ZIP files like so:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>ZIP Archive</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>zip</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/zip</string>
<string>application/x-zip</string>
<string>application/x-zip-compressed</string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>com.pkware.zip-archive</string>
</array>
</dict>
</array>
And this works as expected. When a user clicks a ZIP to download in Safari, my app comes up as an app to "Open with".
I'd like the same functionality for MP3. I've tried the following to no avail (app doesn't come up in the list). I've also tried subtle variations:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFile</key>
<string>beer-mug.png</string>
<key>CFBundleTypeExtensions</key>
<array>
<string></string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>public.mp3</string>
</array>
<key>CFBundleTypeName</key>
<string>public.audio</string>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
</array>
This image sums up what I'm going for:
Are MP3 files "protected" or something? I need a way for users to be able to download/access MP3 files in my iOS app (use as sound effects).
Surprisingly searching is coming up empty. Ideally someone with this MP3 functionality in their app posting their info.plist would be super helpful.
Why is your setup for mp3 so different than your setup for zip? The following fixes should work:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>ZIP Archive</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>zip</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/zip</string>
<string>application/x-zip</string>
<string>application/x-zip-compressed</string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>com.pkware.zip-archive</string>
</array>
</dict>
<dict>
<key>CFBundleTypeName</key>
<string>MP3</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>mp3</string>
</array>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>audio/mpeg</string>
<string>audio/mpeg3</string>
<string>audio/mpg</string>
<string>audio/mp3</string>
</array>
<key>LSItemContentTypes</key>
<array>
<string>public.mp3</string>
</array>
</dict>
</array>
I have also added Siri uses description but my app is not listed on this list. Maybe I am missing something. Please help me with this. Thanks in advance.
You can see the respected image here.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ParameterVocabularies</key>
<array>
<dict>
<key>Parameter Names</key>
<array>
<string>INStartWorkoutIntent.workoutName</string>
</array>
<key>Parameter Vocabulary</key>
<array>
<dict>
<key>Vocabulary Item Identifire</key>
<string>step,wellness,sleep</string>
<key>Vocabulary Item Synonyms</key>
<array>
<dict>
<key>Vocabulary Item Phrase</key>
<string>Step Count</string>
<key>Vocabulary Item Examples</key>
<array>
<string>count my steps with Test</string>
<string>my wellness with Test</string>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</array>
<key>IntentPhrases</key>
<array>
<dict>
<key>Intent Name</key>
<string>INStartWorkoutIntent</string>
<key>Intent Examples</key>
<array>
<string>siri start my step count</string>
<string>log my workout with Test</string>
</array>
</dict>
</array>
</dict>
</plist>
You need to add an AppIntentVocabulary.plist file to your project and include some Intent Examples. Siri will show these to the user as examples.
This AppIntentVocabulary is working for me perfectly (all sensitive data replaced with placeholders):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IntentPhrases</key>
<array>
<dict>
<key>IntentName</key>
<string>INRequestRideIntent</string>
<key>IntentExamples</key>
<array>
<string>Book a ride with MyAppName.</string>
</array>
</dict>
</array>
<key>ParameterVocabularies</key>
<array>
<dict>
<key>ParameterNames</key>
<array>
<string>INRequestRideIntent.rideOptionName</string>
</array>
<key>ParameterVocabulary</key>
<array>
<string>Word</string>
<string>Word2</string>
<dict>
<key>VocabularyItemIdentifier</key>
<string>Word2</string>
<key>VocabularyItemSynonyms</key>
<array>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word2</string>
<key>VocabularyItemExamples</key>
<array>
<string>Get me a Word2 with MyAppName</string>
<string>Book a Word2 with MyAppName</string>
</array>
</dict>
</array>
</dict>
<dict>
<key>VocabularyItemIdentifier</key>
<string>Word1</string>
<key>VocabularyItemSynonyms</key>
<array>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word1</string>
<key>VocabularyItemExamples</key>
<array>
<string>Get me a Word1 with MyAppName</string>
<string>Book a Word1 with MyAppName</string>
</array>
</dict>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word3</string>
<key>VocabularyItemExamples</key>
<array>
<string>Get me a Word3 with MyAppName</string>
<string>Book a Word3 with MyAppName</string>
</array>
</dict>
<dict>
<key>VocabularyItemPhrase</key>
<string>Word2</string>
<key>VocabularyItemExamples</key>
<array>
<string>Book a Word2 with MyAppName.</string>
<string>Get me a Word2 with MyAppName</string>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
I'm making Facebook Login, I followed all the steps very well but Configuring my info.plist. My xml code is below:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb12345678</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>12345678</string>
<key>FacebookDisplayName</key>
<string>AppName</string>
I add this xml to the section of 'dict' at info.plist in my project not my projectTest.
So finally, I finished my .plist xml file
But I got an error
error: couldn't parse contents of '/Users/~/Desktop/app/app/myproject/Info.plist': The data couldn’t be read because it isn’t in the correct format.
How can I solve this?
UPDATE
Entire .plist is below :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.myproject.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
/*FACEBOOK XML IS JUST BELOW*/
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb12345678</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>12345678</string>
<key>FacebookDisplayName</key>
<string>AppName</string>
/**/
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
You are adding the snippet in wrong position:
<key>UIRequiredDeviceCapabilities</key> <<----- this one should go with
/*FACEBOOK XML IS JUST BELOW*/
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb12345678</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>12345678</string>
<key>FacebookDisplayName</key>
<string>AppName</string>
/**/
<array> << ------------- this one
<string>armv7</string>
</array>
Add fb snippet before
<key>UIRequiredDeviceCapabilities</key>
or after
<array> << ------------- this one
<string>armv7</string>
</array>