Hi,
I assume you are using a third party to process your in app purchases?
In this case the 30% Apple commission does not apply to you.
Post
Replies
Boosts
Views
Activity
I'm not sure if I understand your question correctly. However, you should add these json files to your main bundle, make sure you add them to your project in Xcode. Collecting them should then look like this:
let jsonUrl = Bundle.main.url(forResource: "yourJson", withExtension: "json")!
I hope this helps you.
This is a known bug in Xcode 13.2. Please refer to: https://developer.apple.com/forums/thread/696504
To workaround this issue, please re-download Xcode 13.2 directly from Releases section of the Apple Developer website. This information is also captured in the Xcode 13.2 Release Notes.
This is possible, but you have to use a workaround. First of all you indeed need to set your permissions in the info.plist.
<key>NSMicrophoneUsageDescription</key>
<string>If you want to use the microphone, you have to give permission.</string>
<key>NSCameraUsageDescription</key>
<string>If you want to use the camera, you have to give permission.</string>
After this you have to inject Javascript at the start of the document of the WebView. You could to this by adding a .js document to your project. the code in here would look like this:
//injects this into webpage to listen to the camera request
(function() {
if (!window.navigator) window.navigator = {};
//if getuserMedia is called -> If the user requests native camera
window.navigator.getUserMedia = function() {
webkit.messageHandlers.callbackHandler.postMessage(arguments);
}
})();
In your viewController file, injecting this into the WebView would look like this:
override func loadView() {
let userScriptURL = Bundle.main.url(forResource: "UserScript", withExtension: "js")!
let userScriptCode = try! String(contentsOf: userScriptURL)
let userScript = WKUserScript(source: userScriptCode, injectionTime: .atDocumentStart, forMainFrameOnly: false)
let webConfiguration = WKWebViewConfiguration()
webConfiguration.userContentController.addUserScript(userScript)
}
This works for both camera and microphone use like you are trying to do.