iOS8 crash when try to use UIDocumentMenuViewController - xamarin

I use Xamarin.Forms to create iOS app and I use UIDocumentMenuViewController to Access iCloud file.
When I run program on iOS9+ program is run normally, But when I try my program with iOS8 emulator program is crash on
new UIDocumentMenuViewController(allowedUTIs, UIDocumentPickerMode.Import);
and message is saying
'Application initializing document picker is missing the iCloud entitlement. Is com.apple.developer.icloud-container-identifiers set?'
What wrong with my app and how can I fix this?
Thank you in advance.

You need to make sure that you have enabled the iCloud Entitlements as described here.
This is even mentioned in the official iOS documentation:
Before your app can use the document picker, you must turn on the iCloud Documents capabilities
If you haven't done so already, simply create a new Entitlements.plist file in the root of your project. Then simply enable the iCloud option.

Check that you have linked Entitlements.plist to your project...
I dont know why, but by default Entitlements.plist is not linked, you can do the same by going to option of project and assign custom Entitlement like this!

Related

Watch Extension iCloud capabilites, which target?

I added Core Data with iCloud support to my watch extension, but it's not syncing with the phone (phone and iPad do sync). I added the iCloud and notification capabilities to the My App Watch Extension target, but on Xcode, you don't seem able to add it to the My App Watch target? Could this be my issue, that the iCloud capability is only added to the one target on the watch instead than on both?
If you try add to ...Watch, you can't do it.
You should add it to ...Watch Extension.

Failed to create provisioning profile

I'm trying to create a project in Xcode, Version 8.0 beta 6 (8S201h) and I'm getting this error.
The apple account is a free one because I'm just playing around with Xcode but it is forcing me to set it as a Team. Any help?
Check the schemes menu at the top of the Xcode project window. Look at the destination you're trying to run in. If you run in the simulator, you don't need to sign your project.
If you run in a device, you need to attach the actual device. It must not say "generic device".
In my case this error disappeared when I changed the "Bundle Identifier" to something less generic (e.g. adding some random numbers at the end)
Change the bundle identifier to something more unique.
If you are following a tutorial and just put a generic identifier then adding a few numbers to the end will likely solve your issues.
i.e. if you had HelloWorld change it to HelloWorld12345
After struggling for an hour, I just unchecked the "Automatically manage signing" and went back to the old school way of specifying my profiles. Probably not the best thing to do but works.
Profiling your Phone takes a few minutes. . . watch the status bar on the top to be sure that your phone is being profiled on the top.
Next, be sure you choose YOUR PHONE as the target, not iPhone 7 or iPhone 8... your exact phone. This is done by choosing: Product > Destination > (pick your phone)
Your phone will only show up after it's been plugged in, turned on, and left running for a few minutes while Xcode creates a profile.
Check these things.
1.A device is connected to your system or not.
2.Deployment target in xcode. (General->Deployment info->Deployment target)
It should match with the ios version of your device.
3.Change your bundle identifier. Follow general rules of setting a unique bundle identifier for yourproject while running in device.
See this what is correct format of bundle identifier in iOS?
Also be careful with the number of bundle identifiers you set in the project. Please remember all bundle identifiers or note it down somewhere. Since you are using a free account you have limited access to the number of bundle id's.
You should also disable push notifications in the "Capabilities" section of the project. Try changing "App groups" as well in the format of group.com.someString.
These things helped me run my app in real device without any errors.
I had same problem with provisioning profile. If you have any kind of iPhone, you can connect to your Mac with cable and provisioning profile is automatically defined.
After some time with the same disturbing error and after I write a unique Bundle Identifier and it didn't help,
I searched the web and found here that my error was that I selected a virtual device and not an real device. The solution was:
1.I plugged my iPhone
2.I clicked on the button - set the active scheme. and there it was on the top - device iPhone.
the error has gone.
I have had this error multiple times and what solves it for me is the following:
In the list with the view of all certificates, right click on each row and move each certificate to trash (go to Xcode > Preferences > Choose account > Click View Details)
Go to member center download the right certificates again and click on them so
Restart Xcode
Go to build settings and set the right Code signing for debug/release - you should be able to see an option on the row that says "Identities from profile..."
If this doesn't work then you should consider revoking your certificate and then create a new one and the do the steps above again.
The issue behind this error is Unavailability of App ID with given Bundle Identifier
Solution: Change Bundle Identifier simple :)
Adding this because it took me 4 hours to figure out..
Xcode will fail to create the provisioning profile for a device with no name, i.e. "" or " ". When I changed my device name to something else, the steps above worked.
Both of these errors arise as a result of a provisioning profile not existing. To create one, simply do the following as suggested in the error message:
Plug in your Apple device
Choose the device from the schemes/simulator menu
Thereafter, provisioning profile will automatically be created
This error is because you selected a target rather than a project name, so please, at the left side of general in Xcode you will find your project name. Click on it and change it from target to project section.
Change Deployment Target to newer version and then solved
For me this happened when I was making a tvOS app and didn't have a appleTV registered.
In general, you need to plug in the device or have logged into it (connected to it)..then it shows up here: https://developer.apple.com/account/resources/devices/list
You can also add devices there..you need to click reset to be able to add a new device. the reset button should be labeled modify because it doesn't reset anything.
for example, if you need to make a tvOS app then you need to have an apple TV in the device list. Once you add that then you're good to go. kisses.
Manual:
Go to your apple developer account and hit certificates
Select devices from the left side
Add the device name and its UDID. Close Xcode and hit automatic signing
Automatic:
Attach your iPhone to Xcode. and run the app on that. Xcode will automatically create a profile.
To set up WITHOUT an iPhone, you can manually download certificates from Apple's website and create a profile. The certificates you install on the Mac and the Profile you import into XCode after download. It worked for me. Follow the links:
Documentation:
https://developer.apple.com/pt/support/certificates/
Certificates:
https://developer.apple.com/account/resources/certificates/list
Profile:
https://developer.apple.com/account/resources/profiles/list
It's just as it says.
To have xCode automate something, you need to get your own iPhone registered there with the UDID, which you can find on Finder or System Information (USB section) when you connect to your iPhone.
Failed to create provisioning profile. There are no devices registered in your account on the developer website. Select a device run destination to have Xcode register it.
Adding a fake device on Apple dev account helped me since I have no iPhone:
https://developer.apple.com/account/resources/devices/list
Example of device you can add:
Name: "NotARealDevice"
Device ID: "1234567890123456789012345678901234567890"
For me this happened when I tried to run on a device with a newer version of iOS than supported by the version of Xcode I was running.
There are basically two way to solve the issue.
Add a device on your mac. Then you can choose that device by selecting Product => Destination => Select your connected device. After this, Xcode will try to add the device in apple developer platform and also create a profile against the same.
Go to https://developer.apple.com/account/resources/devices/list. Add a iPhone device by providing device name and device UDID number. you can google it (How to get the UDID number for iphone). Then you can create the profile and then retry.
By adding my iphone device here solved my problem.
https://developer.apple.com/account/resources/devices/list
and getting apple UUID use this website https://udid.tech no need of xcode and itunes.
Change bundle identifier, Straight solution
What saved me from this error was when I changed my Bundle Identifier.
Try and do that

Invalid Bundle Error - "requires launch storyboard"

I keep getting this error when I try to submit my app to the store using Xcode:
ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch storyboard in bundle 'com.companyname.appname.'"
Anyone know what this error really means?
This is because you need to specify how your app is supposed to handle multitasking on iPad.
If you don't want to handle multitasking right now, you can simply disable it by going to the "General" tab of your target:
I solved the problem in this way, see here:
If you must opt out of Slide Over and Split View, do so explicitly by adding the UIRequiresFullScreen key to your Xcode project’s Info.plist file and apply the Boolean value YES.
You need to add a Launch Screen (Xcode > File > New).
Under iOS > User Interface you select "Launch Screen" to add it to the project.
For the iPad you need to support all 4 orientations.
Select in Xcode your target file, and under the General Tab, go to the "App icons and Launch Images".
Here you select the Launch Screen file you created.
When you launch the app you'll see the launch (bitmap) images are not used, but the Launch Screen Storyboard.
You can either do it as André showed or directly add:
<key>UIRequiresFullScreen</key>
<true/>
On your .plist file.
If you are using Cordova, you might want to use the cordova-ios-requires-fullscreen plugin (see How to disable iOS9 multitasking through Ionic/Cordova?)
Update: you can also use the cordova-plugin-ipad-multitasking, which seems to also prevent another issue (ITMS-90474)
Update: this should now be fixed using Cordova tools 5.4 without the need for these plugins.
In Xcode 14.2, setting the launch storyboard should be as simple as selecting the required storyboard as Launch Screen File in the "General" settings for the target. This not only avoids spelling mistakes, it also ensures that the storyboard is included in the bundle. However, I found that uploading to the App Store failed as per the OP if support for multiple windows is included (that is, if requires full screen is not checked).
If the storyboard has been configured in this way then the problem may be because the name of the storyboard includes a .storyboard extension, which it's not supposed to (see also post by Muhammad Ibrahim). This can be fixed without checking the box for requires full screen:
In Xcode, go to your build target and select the General tab.
In the section "App Icons and Launch Screen", check if a Storyboard file is selected and if it has a .storyboard extension.
If so -> tap the name of the storyboard to edit it, take off the .storyboard extension and press return.
That's it! The name of the storyboard will no longer show, but the problem will be fixed.
IF you ONLY want to set RequiresFullScreen For iPhone, and support iPad Multitasking, try this:
<key>UILaunchStoryboardName~ipad</key>
<string>LaunchScreenIPad.storyboard</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIRequiresFullScreen~ipad</key>
<false/>
LaunchScreenIPad.storyboard is the name of LaunchScreen for iPad.
iPhone will still use Launch Images Source pictures.
Apple Document Ref: Creating Platform- and Device-Specific Keys
If you want to support split views in iPad, in your info.plist file, set just "LaunchScreen" as the value for key "UILaunchStoryboardName", instead of "LaunchScreen.Storyboard" and you need to support all 4 orientations for iPad.

iTunesConnect Update app strange error

I am just trying to update the old version with the new one. I am using the latest version of Xcode (version 6.4) and I validate my app bundle before submitting the app.I submit it from Xcode to iTunes Connect.
After all the setup, when I clicked on the Submit for Review button I got error like below.
The app's Info.plist can't contain values for the UIRequiredDeviceCapabilities key that would prevent this app from opening on any iOS device.
I check in my project .plist file there is appear like following screenshot.
But I don't know why this error occurred during the submission of the app.
As some of the comments above state, you have two options here.
Option 1:
You delete the key from the plist entirely. Wouldn't recommend that as you want it to run only on devices with armv7
Option 2:
You can add the normal architecture of 64 to the plist. This will allow it to run on more devices, thus also getting it successfully submitted.
Lastly, you could try to use Application Loader. There's a small chance this will actually make a change, but it doesnt cot anything and is worth a try. If nothing works out, you can contact iTunes Connect at: ituesconnect#apple.com
Hope that helps, Julian
I did fixed this issue by I removed the UIRequiredDeviceCapabilities from Project Plist and then create IPA and upload it to iTunesConnect.
Then that will be submit without this error.
Maybe you must check your Build Settings. I have your same .plist and I don't have any trouble to upload to App Store.
Check this values:

com.apple.security.files.bookmarks.app-scope is missing from the entitlement key?

In my cocoa app I have the entitlement com.apple.security.files.bookmarks.app-scope added to my .entitlement
When I submit this app to the mac app store, I was asked to add entitlement. I click on the "entitlement" drop down, I just couldn't find this entitlement:
am I missing something here? or this entitlement doesn't need to be added when submitting app?
You don't need to declare the use of this entitlement when submitting to the App Store. You may no longer even need to include it in your app at all for bookmarks to work, but I don't know that always works and including it is harmless.

Resources