Invalid info plist value while uploading build contains share extension - ios

My app contain image share extension while uploading build got error somthing like invalid info plist but validating it does not show any error or message.
code :
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>5</integer>
<key>NSExtensionActivationSupportsText</key>
<true/>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
</dict>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>

Make sure you change it NOT in the .plist file but in the Extention's info page (Between Resorce Tags and Build Settings)

Related

Ads SDK was initialized without an application ID

Terminating app due to uncaught exception 'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK was initialized without an application ID. Google AdMob publishers, follow instructions here: https://googlemobileadssdk.page.link/admob-ios-update-plist to set GADApplicationIdentifier with a valid App ID. Google Ad Manager publishers, follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist
you can work around it by adding the key-value pair in the documentation linked above to your Info.plist file.
Open your info.plist file and put that line:
key = GADIsAdManagerApp
value = true
An update is made, see the official link: https://firebase.google.com/docs/admob/ios/quick-start#add-app-id-to-info-plist
You should add the following pair (key, value) to your Info.plist file:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string><!-- add your AdMob app ID-->
I hope this will help.
Please make sure that you add your actual admob app id in Info.plist and not an ad id. If you use an ad id as app id in the Info.plist, the SDK will crash.
In my case, I misspelled -ObjC. Check the capital letters and the hyphen, as well as the position where you write it. You should write it in: Other Linker Flags in your project's build settings
As google mentioned in their guide under "Manual download" tab :
You must do the following :
Go to your project XCode >Targets > Build settings > Other linker flags
and add "-ObjC" as shown in the guide :
Comes to think of it every one is trying to use the Admob using CocoaPods, tend to jump the manual download tab, but the issue is that the section related to "Other Linked Flags" is inside this last, so it must be separated in order to make it visible as a "To Do" step to accomplish the guide.
Enjoy;
This way you can use. It worked for me for Google Mobile Ads SDK 8.1.0:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxYOUR_IDxxxxx</string>
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
</array>
<key>GADIsAdManagerApp</key>
<true/>
All Ad Networks added: (https://developers.google.com/admob/ios/ios14)
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxYOUR_IDxxxxx</string>
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>cstr6suwn9.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>4fzdc2evr5.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>2fnua5tdw4.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>ydx93a7ass.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>5a6flpkh64.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>p78axxw29g.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>v72qych5uu.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>c6k4g5qg8m.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>s39g8k73mm.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>3qy4746246.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>3sh42y64q3.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>f38h382jlk.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>hs6bdukanm.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>prcb7njmu6.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>wzmmz9fp6w.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>yclnxrl5pm.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>4468km3ulz.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>t38b2kh725.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>7ug5zh24hu.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>9rd848q2bz.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>n6fk4nfna4.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>kbd757ywx3.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>9t245vhmpl.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>2u9pt9hc89.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>8s468mfl3y.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>av6w8kgt66.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>klf5c3l5u5.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>ppxm28t8ap.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>424m5254lk.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>uw77j35x4d.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>e5fvkxwrpn.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>zq492l623r.skadnetwork</string>
</dict>
<dict>
<key>SKAdNetworkIdentifier</key>
<string>3qcr597p9d.skadnetwork</string>
</dict>
</array>
<key>GADIsAdManagerApp</key>
<true/>
Do not forget these steps on iOS. That solved the problem for me.
"This step is required as of Google Mobile Ads SDK version 7.42.0."
So, for my case, I had 2 targets, 1 pro app and another free app. And I added the GADthingamabob key in the Info.plist file found under left panel. Turns out this one only updates the Pro app info plist. What you need to do is to select the Lite target, and then goto Info panel and add the GADthingamabob there then it no longer crashes. I don't even need to add GADIsAdManagerApp thingy.
on info.plist always use your actual project
id.(ca-app-pub-xxxxYOUR_IDxxxxx)
and if you're debugging then at the time of instantiation of
GADBannerView, use the dummy
adUnitID("ca-app-pub-3940256099942544/2934735716")
make sure you replace this dummy adUnitID by your actual project id.
for more detailed information, please visit:- google admob documentation
To do it, simply
Go to Info.plist in your runner folder and click on the " + " button next to the properties list. Add GADApplicationIdentifier
property of type string and set its value to the AdMob app ID but not unit ID.
Again click on " + " next to the properties list. Add SKAdNetworkItems and change its type to an array.
Inside SKAdNetworkItems add a new property with the name SKAdNetworkIdentifier with the value cstr6suwn9.skadnetwork
It should work fine.
Delete 'GADApplicationIdentifier' and it's VALUE from Info.plist
Add 'GADApplicationIdentifier' and it's VALUE manually again
Build an App
Add key, value in info-plist
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-xxxxxxxxxxxx/xxxxxx</string>
<key>GADIsAdManagerApp</key>
<true/>

Action extension not available when sharing a PDF from Safari

Our apps Action Extension needs to support all types of attachments.
It works almost everywhere, the only case I can't get to work is when I try to share a PDF file opened in Safari. For example this one:
https://carlosicaza.com/swiftbooks/SwiftLanguage.pdf
The app is not even appearing on the Share Sheet in Safari, I think there must be something missing in the NSExtensionActivationRule in the info.plist of the Action Extension target.
This is what the NSExtensionActivationRule looks like at the moment. I tried several things but no luck so far.
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsAttachmentsWithMaxCount</key>
<integer>10</integer>
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
<integer>10</integer>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>10</integer>
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
<integer>10</integer>
<key>NSExtensionActivationSupportsText</key>
<true/>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
</dict>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>ShareSheet</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>

My share extension does not show up among the dropbox extensions

I have the following in my extension's plist
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsFileURLWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>1</integer>
</dict>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>
So my extension shows up in Photos and Snapchat, but not Dropbox.
What should I tweak to get listed in dropbox share choices?
And the documentation for the missing key is/was here:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/AppExtensionKeys.html#//apple_ref/doc/uid/TP40014212-SW11

Share extension app store upload issue

Hello fellow developers,
I'm uploading an app with share extension, extension should only accept images.
For some reason when I'm uploading app for beta testing i get an warning as below.
No values under NSExtensionActivationRule in bundle APPNAME.app/PlugIns/ShareOnAPPNAME.appex appear to trigger activation.
Also I got email saying below
Dear developer,
We have discovered one or more issues with your recent delivery for "APPNAME". Your delivery was successful, but you may wish to correct the following issues in your next delivery:
Unreachable Activation - No values under NSExtensionActivationRule in bundle APPNAME.app/PlugIns/ShareOnAPPNAME.appex appear to trigger activation.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.
My plist file in extension target looks like this...I tried adding all support key with value 0 except image and only image key with value 1...but warning persists...
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key> NSExtensionActivationSupportsImageWithMaxCount </key>
<integer>1</integer>
<key>NSExtensionActivationSupportsText</key>
<false/>
</dict>
</dict>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
<key>NSExtensionPrincipalClass</key>
<string>ShareOnAPPNAMEVC</string>
</dict>
Also App shows sharing option to each and every type i.e. movies, text, webpage etc. along with images.
Ok so I got it working, issue was copy pasted rule NSExtensionActivationSupportsImageWithMaxCount from developer side caused blank spaces in plist :( check below.
<key> NSExtensionActivationSupportsImageWithMaxCount </key>
I would suggest you to use this:
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationRule</key>
<string>TRUEPREDICATE</string>
<key>NSExtensionActivationSupportsFileWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsText</key>
<false/>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
</dict>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.share-services</string>
</dict>

How to handle NSExtensionActivationRule is truepredicate?

I got warning:
Embedded binary's NSExtensionActivationRule is TRUEPREDICATE. Before you submit your containing app to the App Store, be sure to replace all uses of TRUEPREDICATE with specific predicate statements or NSExtensionActivationRule keys. If any extensions in your containing app include TRUEPREDICATE, the app will be rejected
what can I do? I try to modify NSExtension, but I really don't figure out how to solve it.
You have to specify every data type you want to use in Info.plist of your App Extension.
See the documentation for the available keys. Look for NSExtensionActivationRule.
//UPDATE:
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationSupportsImageWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsMovieWithMaxCount</key>
<integer>1</integer>
<key>NSExtensionActivationSupportsWebURLWithMaxCount</key>
<integer>1</integer>
</dict>
I wanted my app to accept text only. This is what works:
...
<key>NSExtensionAttributes</key>
<dict>
<key>NSExtensionActivationUsesStrictMatching</key>
<integer>2</integer>
<key>NSExtensionActivationRule</key>
<dict>
<key>NSExtensionActivationDictionaryVersion</key>
<integer>2</integer>
<key>NSExtensionActivationSupportsText</key>
<true/>
</dict>
</dict>
...

Resources