Open file in default application in iOS app running on Apple Silicon M1 Mac - xamarin

I am working currently on adapting our Email application written on Xamarin iOS to run correctly on Apple Silicon M1. I have faced the following problem that I can't solve so far. The problem is that our code written for iOS that uses UIDocumentInteractionController on Apple Silicon opens "Share to" menu, also if I try to change this to Launcher.OpenAsync() call from Xamarin.Essentials it also opens "Share to" menu instead of opening the file with default application. I tried to use Launcher.OpenAsync() from Xamarin.Mac application and run it directly on Apple Silicon from VS Mac and it works as expected this way - opens file with default application. However when running from iOS application installed on Apple Silicon it always opens "share to" menu. It is a big problem for us as we need to allow user to open attachments files from our email editor. Any ideas what I can try to do to solve the problem?

So in the end I replaced our UIDocumentInteractionController with Quick Look Preview Controller which works as expected both on iPhone and iOS application running on M1.

Related

Mac Catalyst, unable to create a Safari Extension

I've started a new iOS project enabling the option to deploy the same app in macOS (Catalyst). But when I try to create a Safari Extension in macOS, I get the following error
'Safari Extension.appex' is a Safari extension, which is not available when building for Mac Catalyst. You may need to restrict the platforms for which this app extension should be embedded in the target editor.
In the target editor Frameworks, Libraries and Embedded Content I've selected only the macOS platform in my Safari Extension, but I get the same error, any clue?
thanks for your time
I've received an answer from Apple
Embedding a Safari App Extension in a Catalyst app currently isn't
supported. If you could file a piece of Feedback in Feedback Assistant
that would be very helpful. Thanks!
https://forums.developer.apple.com/thread/122485

Mac app rejected as not open in new mac OS 10.14

I have submitted app twice in mac app store and they have rejected with below reason.
Guideline 2.3 - Performance
Your app does not achieve the core functionality described in your marketing materials or release notes.
Specifically, App does not launch from Finder. App icon momentarily appears on Dock but quit itself before being launched.
Best regards,
App Store Review
While I further followed up with apple then they have informed that app is not open in mac 10.14 OS.
Have any one face similar kind of issue and what is resolution steps for such kind of issue?

"View Device Logs" option does not show all the logs in Xcode on one Mac

I noticed when I develop apps using different Macs(i.e. office-Mac and home-Mac), every time I plug the iDevice(iPhone, iPod...) with Mac, click the View Device Logs button under Window -> Devices and Simulators option, there are some (crash)logs in one Mac and others in another Mac. Or sometimes
My question is:
why this is the case?
How can I view all the logs in one Mac?
Is there another way to view/analyze (crash) logs of iDevices correctly and conveniently without using Xcode?
Here is my environement:
macOS: High Sierra(home-Mac), Sierra(office-Mac)
Xcode: 9.2, 8.3.3
iDevice: iPhone SE(iOS 10.3.3), iPod Touch 5th-Gen(iOS 8.2)
Many thanks in advance.

Message from debugger: unable to attach error for osx app

I have been building mac app on my mac mini and it always worked well but today i faced this error, searched a lot but no luck.
Message from debugger: unable to attach
What i tried:
Clear derived data
Quit Xcode
Restart machine
installation directory set to blank and also to /Applications
Tried Skip Install No / Yes
Using developer Signing certs
M using only Developer certificates and not provisioning profile to sign my cocoa app
Xcode 8.2
OSX 10.12.1
Please help :)
This is what fixed it for me, perhaps it will help others but I do realize the question was for 8.2. I had it set to Xcode 9 "New Build System" disabling this and switching to "Standard Build System" in the Project Settings under the File Menu. I had tried all the other things like killing DerivedData, clean build, restarting Xcode. I also verified that my dependent libraries were set correctly. The only thing that worked was disabling new "New Build System"
I just had this problem today. I have little demo code in a mac project(created with Xcode 9.4). This error just started to occur after I upgraded system to macOS Mojave 10.14. However, in Xcode 10 this project runs no problem(without changing anything). If you can use Xcode 10 it will probably be fixed.
Unfortunately, the above solutions didn't work for me (although I am sure they work for some people).
Here is what worked for me, in case this helps anyone else:
Close Xcode
Open Xcode and Create a new Xcode project
In the iOS template, select Single View App then click Next
yes, I know you are trying to get a macOS app attaching to the debugger :).
Give the iOS app any product name and organization identifier you would like and click Next
Create the new project anywhere you would like (I saved it to my desktop)
Build and run (cmd + r) the iOS app on a simulator like the iPhone 8 (starting a simulator and running the iOS app will take a little time, so have patients)
After the iOS app runs in the simulator, click to stop it from running (the stop button is next to the run button)
Open your macOS app that you are having trouble connecting a debugger to, and build and run it (cmd + r)
This, for some reason, allowed me to connect to the debugger with my macOS app...
Xcode version: 10.1, macOS Mojave version: 10.14.2

How to install an app by drag-and-drop onto the Simulator window?

I have seen the following feature in the change log for Xcode 8.2
https://itunes.apple.com/us/app/xcode/id497799835?mt=12
Simulator installs an app by drag-and-drop onto the Simulator window
But I have tried drag-and-drop with .app file built for the Simulator, but nothing happens. Does anyone know how this feature is supposed to be used?
I wrote a small blog post about this.
In brief: use an .app that is built for iphonesimulator.

Resources