If I have the id of a Facebook post, how can I open it in the native Facebook app? I am able to open links using [UIApplication sharedApplication] but I cannot come up with the correct URL scheme. For instance, fb://profile/pidhere works to open the profile but I can't figure out how to open an individual post. Thanks a bunch!
It's been asked many times here. And the answer is: it's not possible.
There are methods to do this on Android, but that is not officially supported. You should not rely on it. This is the same for iOS. Some links work, but they are unsupported, can change any time and for some items, such as posts, it's not possible at all.
Related
I have a scenario where I need to open a browser to remove user cookies for logging out. So the process is:
Open browser (Chrome CustomTab or SFSafariView depending on OS) and point it towards my URL to delete cookies.
Send the user back to the mobile app login screen.
Where I'm having an issue is step 2. How do I go about closing/minimizing the browser without requiring user interaction? The only thing I have found so far is to run System.Diagnostics.Process.GetCurrentProcess().Kill(); which closes the entire app, but I have seen comments online that doing this might cause the app to get rejected by Google and/or Apple.
Any ideas on how I can solve this?
You can put SFSafariViewController inside the navigation controller and then you can dismiss the navigation controller. That's for iOS assuming that you already know when to call this code, just don't know how. For Android... no idea for now, probably you should ask it as a separate question not too many people are experts both for Android and iOS...
I have a legacy safari extension which I need to convert into Safari App Extension to submit into Extension Gallery. I am new to Xcode therefore, not familiar with it's build and run process. I tried looking into official documentation from developer.apple.com but it is so abstract.
Why do we need to create a parent app in Xcode before creating a
safari extension target?
If so what parent app template should I
choose? Cocoa App?
Where I can find starter tutorials on Xcode?
What is the submission process to Extension Gallery?
How can add the extension under development to my safari through xcode for testing?
I heard they need the URL for extension to approval, when we are submitting extension through developer account why to host it on URL?
Any documentation or answers to the above questions would be very helpful. Thank you.
On 2. and 3, I had the same struggles - I wrote up a tutorial on basic style sheet injection in Safari App Extensions here: https://ulyngs.github.io/blog/posts/2018-11-02-how-to-build-safari-app-extensions/
I'm converting the legacy safari extension to safari app extension too and have some answers for your questions:
Because app extension is more as functional extension then safari browser extension and could bring more features to you. And as per Apple says: safari app extension gives more communication and data exchange between Safari and your native app, docs.
But I have no more ideas if you only want an extension for safari why this is only way to do extensions.
Yes, you should use the Cocoa App template. If you don't need the window for your app, you can remove it simply in Main.storyboard or make app as a "service".
A lot of docs from Apple I've read but understood a bit then expected. So I found some youtube channels (they are 2 or more years old but some things seems don't changed) Some vieos here and the Osx Dev Daily playlist on this channel. And of course official swift docs if you select swift for your app as PL.
I haven't read about this, but think it must be submitted with your Cocoa App.
First of all you should to run your app target and only after this you should run your extension target and choose "Safari" in showed window to run in. If you have no the signing at the moment so ensure to enable "Allow unsigned extensions" in Development > Allow unsigned extensions in Safari app.
Don't meet this info, could you share it, pls? (sry, don't have enough knowledges)
Hope, it helps to you!
P.S. also recomend to see the converting docs, but it may be insufficient for converting :)
EDIT: it's seems to be incorrect to remove app window or change the default menus created by Cocoa App template for app submit for App Store. Some people got negative decision of app submit because of menus changes of redundant items or app have poor functionality or has not it at all. So consider to read the submit docs.
Please, share your experience when you'll have success app submit!
EDIT 2: Today I found template in Xcode 10.1 that can be used for Safari Extensions directly. It is as previous workflow (template Cocoa App + add extension target) but there is safari extension target already included
The app window and menu is simplified for developers:
So you don't need work with your app and you can concentrate on extension only.
I've built an Action Extension for my app, and when i choose to Open In... something from inside of my app, I appear as an extension for myself. This UX is kinda weird, but also, it doesnt even work when i try to be an extension of myself.
I dont see anything in the documentation that specifies responding apps aside from NSExtensionActivationRule?
This is not possible at the moment in iOS 8.0
i have this url:
If i open it up in the iphone or in the ipad, the uiwebview displays the step-by-step to reach the final place.
I want to display the MAP by default.
Is there any way to do that? I mean, with some kind of adaptation of the url?
I have the same question,
according to Apple URL Scheme Reference - Map Links
it seems that we don't have an option to do that.
besides, there's an article building a WEB APPs, I'll post the link in case it might be helpful
Location in iPhone Web Apps
I would like an iPhone simulator for Windows. Something similar to this one here:
http://css-tricks.com/video-screencasts/38-basics-tips-on-designing-for-the-iphone/
Note, this is NOT to test iPhone Apps... but rather, to test websites. I know I could just use a browser, but I was hoping for something with a bit more functionality ( specific to the touch interface ) that I could test some web pages on.
I've seen the beta project here: http://labs.blackbaud.com/NetCommunity/article?artid=662
Is this the best option at the moment? The article was from last year, that's why I ask.
Just to add additional information to this post:
found another one for both iphone and ipad: http://code.google.com/p/ibbdemo2/downloads/detail?name=iBBDemo2.air&can=4&q=
Google Chrome now has the ability to "Toggle Device Mode" by clicking the Phone icon in Dev Tools. This gives you a more touch-specific interface than just using the browser, allows you to throttle data, etc...
From here, you can choose the device:
You can do it all online, without a simulator:
http://iphonetester.com/
Keep in mind, it's not a real test on an iPhone, but if you use it with Safari or Chrome for Windows, you'll come really close to how it'll look on an iPhone.
UPDATE: iphonetester.com no longer exists.
That's the best I found: http://iphone4simulator.com/
There is a commercial successor to iBBDemo2 that's available for $40 - http://www.electricplum.com/studio.aspx