I Would like to open my app from safari, i am new with working with iOS and mobile application development. My Website is written in PHP, And i Am Using Objective-c for iOS development.
Asked
Active
Viewed 243 times
0
-
refer this link : https://www.appcoda.com/working-url-schemes-ios/ – SGDev Nov 07 '19 at 15:07
-
Refer this link : https://stackoverflow.com/questions/41935987/open-url-schemes-in-ios – Dhaval Raval Nov 07 '19 at 15:12
-
ok thanks mate i have already figured it out. will read up on that even though they are using swift i am sure i could pick up a few tricks or so – bots_developer_fix Nov 07 '19 at 15:13
-
@DhavalRaval thats between two apps, of which i wanted between app and website which will probably be on safari. but thanks anyways – bots_developer_fix Nov 07 '19 at 15:15
-
So are you looking for this? please look into it.. PHP to iOS : https://stackoverflow.com/questions/34750667/php-api-ios-launch-app-from-php-code – Dhaval Raval Nov 07 '19 at 15:21
-
yes something like that @DhavalRaval – bots_developer_fix Nov 07 '19 at 15:25
1 Answers
0
Ow figured it out was a mistake of not refreshing app here is an example of switching from browser totally using javascript
window.location = "myApp://";
This example call app to an iframe so as to preserve the state of the website: still in javascript:
var frame = document.createElement('iframe');
frame.src = 'myApp://';
frame.style.display = 'none';
document.body.appendChild(frame);
// avoid unnecessary iframe on the page
setTimeout(function() { document.body.removeChild(frame); }, 4);
Note that on this examples i have not put any parameters yet which would be like:
myApp://params
Objective-c End Looks more like this:
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options
Still have a long way to go but will get there thanks for you help.

bots_developer_fix
- 44
- 11