Safari Services

RSS for tag

Enable web views and services in your app using Safari Services.

Posts under Safari Services tag

147 Posts

Post

Replies

Boosts

Views

Activity

Detect a SFSafariViewController vs Safari Browser with Javascript
Hello! We are looking for a way to detect if the user is in a SFSafariViewController or Safari Browser using Javascript. I was hoping for something in the window object, but there's nothing. I know some people have used window.innerHeight to do this for iOS versions up to iOS 14... but this does not work for iOS 15 & 16. And the only thing I could find on any forums are people saying that it cannot be done. I'm hoping that we could get a developer from Apple working on this ASAP, as we need to be able to do this.
1
3
1.1k
Oct ’22
Per-App VPN and apps using WKWebView vs SFSafariViewController
Is anyone aware whether there are any differences in the per-app VPN behavior when an app utilizes WKWebView vs SFSafariViewController libraries? Full disclosure, I'm not an iOS developer, but trying to understand the behavior to understand the limitations we may have in developing practical solutions. We frequently run into the business requirement to limit access to a specific 3rd party (SaaS) resource only via the SaaS's native iOS application, so we deploy the app via MDM with an attached per-app VPN policy. The browser-based authentication flow in the app occasionally seems to bypass the attached per-app VPN configuration, however if we use the Per-App VPN "Safari URLs" setting, the traffic will be passed over the VPN. Does this behavior (bypassing per-app VPN policy) relate to which of these web libraries are used? We do not want to share authentication tokens with the system's Safari browser.
1
0
868
Aug ’22
Could not distribute safari web extension due to messages.json error
ERROR ITMS-90862: "Invalid messages file. The messages.json validation failed for locale en in the Safari web extension bundle Lingocloud - Web Translation Extension.app/Contents/PlugIns/Lingocloud - Web Translation Extension Extension.appex. The description field must be present, of string type, and 112 or fewer characters long." I've checked the messages.json that all fields have a "description" field. Don't know what's wrong. Extension source is uploaded vie Feedback Assistant, id 9105992.
4
2
2.5k
Aug ’22
Finding out when a tab has finished loading
Hello, In order to handle some deep linking functionality, our Safari App Extension needs to know when tabs containing pages that the extension has access to have loaded, so we can do appropriate redirects, close temporary tabs, etc. Until now we had been using the SFSafariExtensionHandler function page(_ page: SFSafariPage, willNavigateTo url: URL?) for this purpose, but realized that several cases weren't being handled properly. Upon further inspection is appears that it's necessary to wait until the tabs in question have progressed to a certain point in the loading process, otherwise the tab returned by getContainingTab(completionHandler: @escaping (SFSafariTab) -> Void) may be incorrect, and in some cases logic may be unexpectedly run twice or more due to multiple tabs incorrectly matching url checking conditionals. Moving the logic into a DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) block, along with using the URL provided by a nested page.getContainingTab, containingTab.getActivePage, and page?.getPropertiesWithCompletion instead of of the URL function parameter fixes these issues almost entirely, but it feels ugly and brittle. Is there a better way to get handles for tabs once they're fully initialized? I've looked through the documentation several times and it seems like what's possible Swift-side is quite restricted. Thanks!
1
0
1.3k
Jul ’22
SFSafariViewController permission prompt not coming up
Context: I want to use SFSafariViewController to load a webpage which uses webRTC for a video based call. So the webpage internally uses navigator.mediaDevices.getUserMedia API to get the camera and microphone permissions. Issue: Now the issue is whenever the camera and microphone permissions are set to Ask which is the default permission, there is no permission prompt coming up and the permissions are automatically denied. Also, this issue is very inconsistent meaning sometimes the permission prompt is shown but sometimes its not shown. When the permissions for the particular webpage is set to Allow everything works fine. Code: #import <React/RCTLog.h> @implementation SafariWebViewModule RCT_EXPORT_MODULE(); RCT_EXPORT_METHOD(customWebView:(NSString *)url) { SFSafariViewController *safariViewController = [[SFSafariViewController alloc] initWithURL:[NSURL URLWithString:url] entersReaderIfAvailable:YES]; safariViewController.delegate = self; dispatch_async(dispatch_get_main_queue(), ^{ UIViewController *rootViewController = [[ [UIApplication sharedApplication] keyWindow] rootViewController]; [rootViewController presentViewController:safariViewController animated:YES completion: nil]; }); } -(void) safariViewControllerDidFinish:(nonnull SFSafariViewController *)controller { UIViewController *rootViewController = [ [[UIApplication sharedApplication] keyWindow] rootViewController]; [rootViewController dismissViewControllerAnimated:YES completion:nil]; } @end Help: If anyone has any idea about how to fix this issue please help, thanks in advance.
3
2
1.4k
Jul ’22
SafariBookmarksSyncAgent write too much to SSD
I have a 2020 M1 Macbook Air with macOS 12.4. SafariBookmarksSyncAgent trying to sync bookmarks with other Apple devices. But It is annoying that it write too much to SSD. And it is keep increasing. It does not make sense to write that much just for sync bookmarks with other devices. As a comparison, I checked my Intel-based Macbook Pro running macOS 11.6.1, it does not have this problem at all. SafariBookmarksSyncAgent writes to SSD only 356 KB and increase very slowly. Is this cause by a bug in macOS 12? Is there any solution to this problem?
1
1
1.9k
Jul ’22
What are the web applications called
I am very new to iOS programming. I am familiar with xcode and swift, but I want to do research on those web applications that come from websites. So you know how some websites are set to when you add them to the home screen of your iDevice, it creates a mini application on your device? I'm wanting to know what are those calls so I can start doing research on how to create them. I'm very good with web development but I haven't discovered how to create those yet. Any point in the proper direction will be greatful. Thank you.
1
0
700
Jul ’22
Is there a reason I can't access the state of a Safari Extension on iOS
On macOS we have SFSafariExtensionManager and class func getStateOfSafariExtension(withIdentifier: String, completionHandler: (SFSafariExtensionState?, Error?) -> Void) Which allows us to inform the user in the container app if the extension is currently enabled. This API is not available in iOS. Is there a technical reason or policy behind this or is it just a missing feature in which case I will raise a feature request?
0
1
742
Jul ’22
There is a problem with Swift Error type check on iOS16 beta.
My project and 3rd-party library have the following code, but it is working incorrectly on iOS16, so I tried debugging it. if let error = value as? Error { reject(error) } else { fulfill(Promise<Value>.asAnyObject(value)) } The cause of incorrect operation was recognized as 'Error' even though the value type was 'String'. The reproduction conditions are as follows. iOS16 Beta Add 'SafariServices.framework' to Xcode project Xcode version does not matter (13.4, 14.0 beta all occur) The key here is number2. If you create a sample project and add only 'SafariServices.framework' to the project, the result of the code below is true. let stringValue: String = "abc" print(stringValue is Error) So I'm guessing that the following code is in 'SafariServices.framework' of iOS16Beta. extension String: Error {} I wonder if this kind of code actually exists in the framework, and I wonder if this is intended. If so, this code is syntactically acceptable, but since it can affect the operation of the application a lot, I think that it should not be added in the core library such as 'SafariServices.framework'. If possible, I hope to fix it in the next iOS version.
4
0
2.6k
Jul ’22
Couldn't add Javascript code to iOS safari extension app
I am building a safari extension app. the code(html, css, javascript) for the safari extension that is in the AppExtension directory works good, but when I added button to Main.html to make an Action, to make the app dynamically change (the application itself not the extension), and I want to send data from the app to the extension on Safari. Could anyone help me to fix this issue. This my html code: <!--Main.html --> <!DOCTYPE html> <html> <head>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <meta http-equiv="Content-Security-Policy" content="default-src 'self'">     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">     <link rel="stylesheet" href="../Style.css">     <script src="../Script.js" defer></script> </head> <body> <!--The makeAction() function is defined in the `Script.js` file -->         <button onclick="makeAction()">Dropdown</button> </body> </html> And this is the files structure
1
1
1k
Jul ’22
IOS 15 SAFARI PROBLEM
Hi I have installed IOS 15 beta and have problem with safari. The problem occurred when I closed one of the browser tabs, but when I turned on safari again, this tab came back. after I closed this tab a few times, the safari stopped working and I couldn't even turn on safari. When i click on the safari icon it won't turn on, it looks like i was opening and closing applications immediately safari before it loads.
4
0
2.7k
Jul ’22
How to setup iOS Safari to be safe but work
I have used Safari as my primary browser for years now and it has evolved. Some very good updates and some bad. I have noticed since iOS 14 I believe when Apple started slowly implementing more security features that pages would show up wonky or unresponsive at times, but a clear browsing history and cookies would fix this issue. Then in iOS 15 and now 16b1 it’s become almost unusable on certain pages.  Again these issues have been ongoing since the updated security features started rolling out and in non beta releases For example. Some pages won’t load completely or when you try to use a drop down menu the pictures would overlap the drop down. Resets or clearing cookies/cache, history would not fix this issue. Even turning off some of the privacy features wouldn’t resolve this. Menus have become unresponsive, ie. registering a new user on a forum. The menus would are static with no way to change or update your dob or address.  I hope this makes sense so far. So here is what I have turned on and added extensions. Tracking is off in privacy & security [on] Block pop ups [on] Prevent cross-tracking [on] Hide IP and Address - Trackers & Websites // I can’t see it but I believe the Trackers & Websites is set to general location// [on] Fraudulent website warnings [on] Privacy Preserving Ad Measurements  All Advanced Safari settings are default and have not been touched  Extensions - 1Blocker (only these below are on) [on] Block Ads [on] Block Adult Sites [on] Block Annoyances [on] Block Trackers I have tested things for months now, toggling these off and back on. Trying to find the combination that works. I even removed all extensions and ran just the safari settings by themselves and it still renders some type of misfire with sites (menus being static or pictures over lapping drop down menus) The title says it all. How can I get safari back to working and have these privacy features on without the extra bugginess that Safari is doing? Thanks in advance!
1
0
1.1k
Jun ’22
Open Settings/Safari/Extension
I'm working on ContentBlocker safari extension to block URLs. when the extension is disabled I want to redirect users to Settings/Safari/Extension. I tried these. prefs:root=Safari prefs:root=SAFARI&path=Content%20Blockers none of them is working. Can any please provide me proper solution?
0
1
937
Jun ’22
Problem: There is a problem with Swift Error type check on iOS16 beta.
My project and 3rd-party library have the following code, but it is working incorrectly on iOS16, so I tried debugging it. if let error = result as? Error { reject(error) } else { fulfill(Promise<Value>.asAnyObject(result)) } The cause of incorrect operation was recognized as 'Error' even though the result type was 'String'. The reproduction conditions are as follows. iOS16 Beta Add 'SafariServices.framework' to Xcode project Xcode version does not matter (13.4, 14.0 beta all occur) The key here is number 3. If you create a sample project and add only 'SafariServices.framework' to the project, the result of the code below is true. let stringValue: String = "abc" print(stringValue is Error) So I'm guessing that the following code is in 'SafariServices.framework' of iOS16Beta. extension String: Error {} So, I wonder if this extension was added and if this was intended. I think this code is syntactically acceptable, but it should not be added in the core library such as 'SafariServices.framework' because it can affect the operation of the application a lot. If possible, I hope to fix it in the next iOS version.
0
0
775
Jun ’22
Is App Tracking Transparency required when displaying websites with a cookie policy within restricted browser APIs ASWebAuthenticationSession & SFSafariViewController
An iOS application of ours we develop for a client was recently rejected as it was claimed we violate Guideline 5.1.2. The App Review team's justification was: We noticed your app accesses web content you own where you collect cookies. Cookies may be used to track users, but you do not use App Tracking Transparency to request the user's permission before collecting data used to track. The App Review team included a screenshot of our client's website which they had navigated to via a button found in our client's SSO login flow. Their main website has a cookie policy which seems to be the cause of the rejection. Clearly our client's main website should not be accessible via their SSO login flow but this opens a wider question and concerns from our client. We open the SSO login flow within an ephemeral ASWebAuthenticationSession. The documentation of which states: Set prefersEphemeralWebBrowserSession to true to request that the browser doesn’t share cookies or other browsing data between the authentication session and the user’s normal browser session. https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/3237231-prefersephemeralwebbrowsersessio We interpret that and the fact that there is no API on ASWebAuthentication to extract cookies from it into the hosting iOS app to mean that we do not store cookies in our iOS app and are therefore not in violation of Guideline 5.1.2. We also assume the same thing applies to SFSafariViewController (which we also use to sometimes display pages from our client's website which, to reiterate, has a cookie policy). It's documentation states: The user's activity and interaction with SFSafariViewController are not visible to your app, which cannot access AutoFill data, browsing history, or website data https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller After having read the documentation we see no reason why accessing a website with a cookie policy within either an ephemeral ASWebAuthenticationSession or an SFSafariViewController would warrant the hosting app to include App Tracking Transparency. I am assuming that due to the nature of these APIs (as they do not give cookie access to the hosting app) that they are exempt. Could someone please either: Provide documentation that states if an ephemeral ASWebAuthenticationSession or an SFSafariViewController accesses a website with a cookie policy App Tracking Transparency is required. or Confirm that we are not in violation of of Guideline 5.1.2 and we should appeal the rejection. Many thanks
2
0
2.6k
Apr ’22
Detect a SFSafariViewController vs Safari Browser with Javascript
Hello! We are looking for a way to detect if the user is in a SFSafariViewController or Safari Browser using Javascript. I was hoping for something in the window object, but there's nothing. I know some people have used window.innerHeight to do this for iOS versions up to iOS 14... but this does not work for iOS 15 & 16. And the only thing I could find on any forums are people saying that it cannot be done. I'm hoping that we could get a developer from Apple working on this ASAP, as we need to be able to do this.
Replies
1
Boosts
3
Views
1.1k
Activity
Oct ’22
Per-App VPN and apps using WKWebView vs SFSafariViewController
Is anyone aware whether there are any differences in the per-app VPN behavior when an app utilizes WKWebView vs SFSafariViewController libraries? Full disclosure, I'm not an iOS developer, but trying to understand the behavior to understand the limitations we may have in developing practical solutions. We frequently run into the business requirement to limit access to a specific 3rd party (SaaS) resource only via the SaaS's native iOS application, so we deploy the app via MDM with an attached per-app VPN policy. The browser-based authentication flow in the app occasionally seems to bypass the attached per-app VPN configuration, however if we use the Per-App VPN "Safari URLs" setting, the traffic will be passed over the VPN. Does this behavior (bypassing per-app VPN policy) relate to which of these web libraries are used? We do not want to share authentication tokens with the system's Safari browser.
Replies
1
Boosts
0
Views
868
Activity
Aug ’22
Could not distribute safari web extension due to messages.json error
ERROR ITMS-90862: "Invalid messages file. The messages.json validation failed for locale en in the Safari web extension bundle Lingocloud - Web Translation Extension.app/Contents/PlugIns/Lingocloud - Web Translation Extension Extension.appex. The description field must be present, of string type, and 112 or fewer characters long." I've checked the messages.json that all fields have a "description" field. Don't know what's wrong. Extension source is uploaded vie Feedback Assistant, id 9105992.
Replies
4
Boosts
2
Views
2.5k
Activity
Aug ’22
I want to make more then 1 web view in my app!
Hello I want to make more then 1 web view in my app I researched but didn’t find anything online can anyone help me? i still use for my web view a code from YouTube! he works but just on the standard view controller! in Xcode with storyboard ! not in swift! Pls Thx
Replies
2
Boosts
1
Views
1.1k
Activity
Aug ’22
Finding out when a tab has finished loading
Hello, In order to handle some deep linking functionality, our Safari App Extension needs to know when tabs containing pages that the extension has access to have loaded, so we can do appropriate redirects, close temporary tabs, etc. Until now we had been using the SFSafariExtensionHandler function page(_ page: SFSafariPage, willNavigateTo url: URL?) for this purpose, but realized that several cases weren't being handled properly. Upon further inspection is appears that it's necessary to wait until the tabs in question have progressed to a certain point in the loading process, otherwise the tab returned by getContainingTab(completionHandler: @escaping (SFSafariTab) -> Void) may be incorrect, and in some cases logic may be unexpectedly run twice or more due to multiple tabs incorrectly matching url checking conditionals. Moving the logic into a DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) block, along with using the URL provided by a nested page.getContainingTab, containingTab.getActivePage, and page?.getPropertiesWithCompletion instead of of the URL function parameter fixes these issues almost entirely, but it feels ugly and brittle. Is there a better way to get handles for tabs once they're fully initialized? I've looked through the documentation several times and it seems like what's possible Swift-side is quite restricted. Thanks!
Replies
1
Boosts
0
Views
1.3k
Activity
Jul ’22
SFSafariViewController permission prompt not coming up
Context: I want to use SFSafariViewController to load a webpage which uses webRTC for a video based call. So the webpage internally uses navigator.mediaDevices.getUserMedia API to get the camera and microphone permissions. Issue: Now the issue is whenever the camera and microphone permissions are set to Ask which is the default permission, there is no permission prompt coming up and the permissions are automatically denied. Also, this issue is very inconsistent meaning sometimes the permission prompt is shown but sometimes its not shown. When the permissions for the particular webpage is set to Allow everything works fine. Code: #import <React/RCTLog.h> @implementation SafariWebViewModule RCT_EXPORT_MODULE(); RCT_EXPORT_METHOD(customWebView:(NSString *)url) { SFSafariViewController *safariViewController = [[SFSafariViewController alloc] initWithURL:[NSURL URLWithString:url] entersReaderIfAvailable:YES]; safariViewController.delegate = self; dispatch_async(dispatch_get_main_queue(), ^{ UIViewController *rootViewController = [[ [UIApplication sharedApplication] keyWindow] rootViewController]; [rootViewController presentViewController:safariViewController animated:YES completion: nil]; }); } -(void) safariViewControllerDidFinish:(nonnull SFSafariViewController *)controller { UIViewController *rootViewController = [ [[UIApplication sharedApplication] keyWindow] rootViewController]; [rootViewController dismissViewControllerAnimated:YES completion:nil]; } @end Help: If anyone has any idea about how to fix this issue please help, thanks in advance.
Replies
3
Boosts
2
Views
1.4k
Activity
Jul ’22
Safari doesnt open videos they stay black
Ios 15 iphone 7+ safari and chrome cant open videos they stay black
Replies
1
Boosts
0
Views
1k
Activity
Jul ’22
SafariBookmarksSyncAgent write too much to SSD
I have a 2020 M1 Macbook Air with macOS 12.4. SafariBookmarksSyncAgent trying to sync bookmarks with other Apple devices. But It is annoying that it write too much to SSD. And it is keep increasing. It does not make sense to write that much just for sync bookmarks with other devices. As a comparison, I checked my Intel-based Macbook Pro running macOS 11.6.1, it does not have this problem at all. SafariBookmarksSyncAgent writes to SSD only 356 KB and increase very slowly. Is this cause by a bug in macOS 12? Is there any solution to this problem?
Replies
1
Boosts
1
Views
1.9k
Activity
Jul ’22
What are the web applications called
I am very new to iOS programming. I am familiar with xcode and swift, but I want to do research on those web applications that come from websites. So you know how some websites are set to when you add them to the home screen of your iDevice, it creates a mini application on your device? I'm wanting to know what are those calls so I can start doing research on how to create them. I'm very good with web development but I haven't discovered how to create those yet. Any point in the proper direction will be greatful. Thank you.
Replies
1
Boosts
0
Views
700
Activity
Jul ’22
Is there a reason I can't access the state of a Safari Extension on iOS
On macOS we have SFSafariExtensionManager and class func getStateOfSafariExtension(withIdentifier: String, completionHandler: (SFSafariExtensionState?, Error?) -> Void) Which allows us to inform the user in the container app if the extension is currently enabled. This API is not available in iOS. Is there a technical reason or policy behind this or is it just a missing feature in which case I will raise a feature request?
Replies
0
Boosts
1
Views
742
Activity
Jul ’22
There is a problem with Swift Error type check on iOS16 beta.
My project and 3rd-party library have the following code, but it is working incorrectly on iOS16, so I tried debugging it. if let error = value as? Error { reject(error) } else { fulfill(Promise<Value>.asAnyObject(value)) } The cause of incorrect operation was recognized as 'Error' even though the value type was 'String'. The reproduction conditions are as follows. iOS16 Beta Add 'SafariServices.framework' to Xcode project Xcode version does not matter (13.4, 14.0 beta all occur) The key here is number2. If you create a sample project and add only 'SafariServices.framework' to the project, the result of the code below is true. let stringValue: String = "abc" print(stringValue is Error) So I'm guessing that the following code is in 'SafariServices.framework' of iOS16Beta. extension String: Error {} I wonder if this kind of code actually exists in the framework, and I wonder if this is intended. If so, this code is syntactically acceptable, but since it can affect the operation of the application a lot, I think that it should not be added in the core library such as 'SafariServices.framework'. If possible, I hope to fix it in the next iOS version.
Replies
4
Boosts
0
Views
2.6k
Activity
Jul ’22
Couldn't add Javascript code to iOS safari extension app
I am building a safari extension app. the code(html, css, javascript) for the safari extension that is in the AppExtension directory works good, but when I added button to Main.html to make an Action, to make the app dynamically change (the application itself not the extension), and I want to send data from the app to the extension on Safari. Could anyone help me to fix this issue. This my html code: <!--Main.html --> <!DOCTYPE html> <html> <head>     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">     <meta http-equiv="Content-Security-Policy" content="default-src 'self'">     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">     <link rel="stylesheet" href="../Style.css">     <script src="../Script.js" defer></script> </head> <body> <!--The makeAction() function is defined in the `Script.js` file -->         <button onclick="makeAction()">Dropdown</button> </body> </html> And this is the files structure
Replies
1
Boosts
1
Views
1k
Activity
Jul ’22
IOS 15 SAFARI PROBLEM
Hi I have installed IOS 15 beta and have problem with safari. The problem occurred when I closed one of the browser tabs, but when I turned on safari again, this tab came back. after I closed this tab a few times, the safari stopped working and I couldn't even turn on safari. When i click on the safari icon it won't turn on, it looks like i was opening and closing applications immediately safari before it loads.
Replies
4
Boosts
0
Views
2.7k
Activity
Jul ’22
How to setup iOS Safari to be safe but work
I have used Safari as my primary browser for years now and it has evolved. Some very good updates and some bad. I have noticed since iOS 14 I believe when Apple started slowly implementing more security features that pages would show up wonky or unresponsive at times, but a clear browsing history and cookies would fix this issue. Then in iOS 15 and now 16b1 it’s become almost unusable on certain pages.  Again these issues have been ongoing since the updated security features started rolling out and in non beta releases For example. Some pages won’t load completely or when you try to use a drop down menu the pictures would overlap the drop down. Resets or clearing cookies/cache, history would not fix this issue. Even turning off some of the privacy features wouldn’t resolve this. Menus have become unresponsive, ie. registering a new user on a forum. The menus would are static with no way to change or update your dob or address.  I hope this makes sense so far. So here is what I have turned on and added extensions. Tracking is off in privacy & security [on] Block pop ups [on] Prevent cross-tracking [on] Hide IP and Address - Trackers & Websites // I can’t see it but I believe the Trackers & Websites is set to general location// [on] Fraudulent website warnings [on] Privacy Preserving Ad Measurements  All Advanced Safari settings are default and have not been touched  Extensions - 1Blocker (only these below are on) [on] Block Ads [on] Block Adult Sites [on] Block Annoyances [on] Block Trackers I have tested things for months now, toggling these off and back on. Trying to find the combination that works. I even removed all extensions and ran just the safari settings by themselves and it still renders some type of misfire with sites (menus being static or pictures over lapping drop down menus) The title says it all. How can I get safari back to working and have these privacy features on without the extra bugginess that Safari is doing? Thanks in advance!
Replies
1
Boosts
0
Views
1.1k
Activity
Jun ’22
Open Settings/Safari/Extension
I'm working on ContentBlocker safari extension to block URLs. when the extension is disabled I want to redirect users to Settings/Safari/Extension. I tried these. prefs:root=Safari prefs:root=SAFARI&path=Content%20Blockers none of them is working. Can any please provide me proper solution?
Replies
0
Boosts
1
Views
937
Activity
Jun ’22
Problem: There is a problem with Swift Error type check on iOS16 beta.
My project and 3rd-party library have the following code, but it is working incorrectly on iOS16, so I tried debugging it. if let error = result as? Error { reject(error) } else { fulfill(Promise<Value>.asAnyObject(result)) } The cause of incorrect operation was recognized as 'Error' even though the result type was 'String'. The reproduction conditions are as follows. iOS16 Beta Add 'SafariServices.framework' to Xcode project Xcode version does not matter (13.4, 14.0 beta all occur) The key here is number 3. If you create a sample project and add only 'SafariServices.framework' to the project, the result of the code below is true. let stringValue: String = "abc" print(stringValue is Error) So I'm guessing that the following code is in 'SafariServices.framework' of iOS16Beta. extension String: Error {} So, I wonder if this extension was added and if this was intended. I think this code is syntactically acceptable, but it should not be added in the core library such as 'SafariServices.framework' because it can affect the operation of the application a lot. If possible, I hope to fix it in the next iOS version.
Replies
0
Boosts
0
Views
775
Activity
Jun ’22
Either Webview app can be accepted by Appstore or not?
I've made a web view app and it's live on the google play store I just want to ask can I publish it on AppStore or either it restricted?
Replies
0
Boosts
0
Views
673
Activity
Apr ’22
Is App Tracking Transparency required when displaying websites with a cookie policy within restricted browser APIs ASWebAuthenticationSession & SFSafariViewController
An iOS application of ours we develop for a client was recently rejected as it was claimed we violate Guideline 5.1.2. The App Review team's justification was: We noticed your app accesses web content you own where you collect cookies. Cookies may be used to track users, but you do not use App Tracking Transparency to request the user's permission before collecting data used to track. The App Review team included a screenshot of our client's website which they had navigated to via a button found in our client's SSO login flow. Their main website has a cookie policy which seems to be the cause of the rejection. Clearly our client's main website should not be accessible via their SSO login flow but this opens a wider question and concerns from our client. We open the SSO login flow within an ephemeral ASWebAuthenticationSession. The documentation of which states: Set prefersEphemeralWebBrowserSession to true to request that the browser doesn’t share cookies or other browsing data between the authentication session and the user’s normal browser session. https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession/3237231-prefersephemeralwebbrowsersessio We interpret that and the fact that there is no API on ASWebAuthentication to extract cookies from it into the hosting iOS app to mean that we do not store cookies in our iOS app and are therefore not in violation of Guideline 5.1.2. We also assume the same thing applies to SFSafariViewController (which we also use to sometimes display pages from our client's website which, to reiterate, has a cookie policy). It's documentation states: The user's activity and interaction with SFSafariViewController are not visible to your app, which cannot access AutoFill data, browsing history, or website data https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller After having read the documentation we see no reason why accessing a website with a cookie policy within either an ephemeral ASWebAuthenticationSession or an SFSafariViewController would warrant the hosting app to include App Tracking Transparency. I am assuming that due to the nature of these APIs (as they do not give cookie access to the hosting app) that they are exempt. Could someone please either: Provide documentation that states if an ephemeral ASWebAuthenticationSession or an SFSafariViewController accesses a website with a cookie policy App Tracking Transparency is required. or Confirm that we are not in violation of of Guideline 5.1.2 and we should appeal the rejection. Many thanks
Replies
2
Boosts
0
Views
2.6k
Activity
Apr ’22
How to run a safari as an app through save to home screen.
Hi, very new to Xcode and trying to learn. I have a website which I have created and have running in a stand alone app. I have however seen webpages which once saved to homescreen run as their own app. How do I do this? Is this Xcode related or is it through another means? Any help would be greatly appreciated. thanks
Replies
0
Boosts
0
Views
894
Activity
Apr ’22