Welcome to the Apple Developer Forums:

Post your questions, exchange knowledge, and connect with fellow developers and Apple engineers on a variety of software development topics.

For questions about using Apple hardware and services, visit Apple Support Communities

Posts

Sort by:
Post not yet marked as solved
6 Views

What is the best practise to build Safari Webpush for SaaS platform?

Hi Support, Our product hosts a large number of e-commerce sites and the current Safari Webpush configuration requires a Identifier and Certificate for each site which is not scaleable. Is there any way we can implement with single ID or Certificate? And if we are to have multiple Identifier and Certificate, what is the limit on one Developer Account? Thank you. Best Regards, Ronald
Asked
Post not yet marked as solved
5 Views

About flow between send and receive in Network.framework

Hi, I'm trying to build a Walki-talkie app using Swift. My Idea is... record user's voice by AVAudioEngine in device1 convert recorded file into Data type data send data from device1 to device2 using NWConnection.send receive data using NWConnection.receiveMessage play received data in device2 I am implementing this app using P2P option in Network.framework, so each device has both browser and listener. And I have to make each device to keep receiving incoming data, and to send recorded voices. At first I thought that if receiveMessage method was executed, it would wait for other device's send method to send data and receive it. But while debugging, program didn't stopped at receiveMessage method, it just went through and executed next line. I must be missing something, but I'm not sure what it is. Below is send and receive part of code I tried.     func sendRecordedAudio(data: Data) {         guard let connection = connection else {             print("connection optional unwrap failed: sendRecordedAudio")             return         }         connection.send(content: data, completion: .contentProcessed({ (error) in             if let error = error {                 print("Send error: \(error)")             }         }))     }     func receiveRecordedAudio() {                 guard let connection = connection else {             print("connection optional unwrap failed: receiveRecordedAudio")             return         }         connection.receiveMessage{ (data, context, isComplete, error) in             if let error = error {                 print("\(error) occurred in receiveRecordedAudio")             }             if let data = data {                 self.delegate?.receivedAudio(data: data)             }         }     } App is calling sendRecordAudio when recording audio is ended, and calling receiveRecordeAudio when user pressed receive button. Any help would be greatly appreciated!
Asked
by EricKwon.
Post not yet marked as solved
9 Views

How to get the sound played in the app?

In the app there is a webview which is a web game with sound and video @IBOutlet var webView: WKWebView! webView.navigationDelegate = self let url=URL(string: "https://www.crazygames.com/game/tap-tap-shots") webView.load(URLRequest(url: url!)) I use RPScreenRecorder import ReplayKit import UIKit class ViewController: UIViewController, RPPreviewViewControllerDelegate { override func viewDidLoad() { super.viewDidLoad() navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Start", style: .plain, target: self, action: #selector(startRecording)) } @objc func startRecording() { let recorder = RPScreenRecorder.shared() recorder.startRecording{ [unowned self] (error) in if let unwrappedError = error { print(unwrappedError.localizedDescription) } else { self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Stop", style: .plain, target: self, action: #selector(self.stopRecording)) } } } @objc func stopRecording() { let recorder = RPScreenRecorder.shared() recorder.stopRecording { [unowned self] (preview, error) in self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Start", style: .plain, target: self, action: #selector(self.startRecording)) if let unwrappedPreview = preview { unwrappedPreview.previewControllerDelegate = self self.present(unwrappedPreview, animated: true) } } } func previewControllerDidFinish(_ previewController: RPPreviewViewController) { dismiss(animated: true) } } Can record video, but no sound from webpage
Asked
by mtrucc.
Post not yet marked as solved
18 Views

Mac App Store url problem on Mac M1

Hello, I have an iOS application which has a "rate us" button. This button redirects to "Write review" section on the app's App Store. It is working great on both iPhone and iPad devices. The problem is on MacBook M1 - it is working, but once the App Store app for review is opened, my iOS app crashes :( UIApplication.shared.open(URL(string: "itms-apps://itunes.apple.com/us/app/app-name/id*****?action=write-review")!) Any ideas on how it can be fixed? Thanks!
Asked
by GeorgiD.
Post not yet marked as solved
21 Views

What is the correct workflow for scaling a development team? Automatically Manage Signing?

Hi all, first post. :) We're trying to unravel technical debt with our approach to building our iOS app. Back in the day everything was done very quickly and roughly because of pressure on the team. For example, people were sharing developer credentials and we didn't use Automatically Manage Signing, so the provisioning profiles were shared as well. You can imagine that this was difficult to maintain. Now we are trying to be smarter. Every dev who works on the app uses their own account. The first dev to try this had a developer provisioning profile created for him by an admin in our Apple Developer account (as per https://help.apple.com/developer-account/#/devf2eb157f8), and all works fine. But we now see that only admins can create developer provisioning profiles, and that doesn't seem scalable; it seems like a better idea to use the Automatically Manage Signing feature of XCode. The problem with that is that the bundle identifier was created way back as expected for a mature app in the App Store, and Automatically Manage Signing fails because it expects to create the bundle identifier. I see lots of Stack Overflow "answers" with "change the bundle identifier and it will work", but this feels hacky and brittle. What's the best practice for a small and growing team like ours? Should an admin really create the development provisioning profiles for every developer? Should developers use Automatically Manage Signing and munge the bundle identifier every time? Something else? Your insights will be appreciated, thanks in advance.
Asked
Post not yet marked as solved
20 Views

How to create simulator xcarchive when x86_64 and arm64 archs are excluded.

I've managed to build this locally via xcode but when trying to create xcframeworks of this, I am unable to create a simulator archive to add to the xcframework. Framework B has Excluded Architectures = [x86_64, arm64] for 'Any iOS Simulator SDK' Framework A imports Framework B but has Exclude Source File Names = FrameworkB.framework, FrameworkB.xcframework] for Any iOS Simulator SDK' So when using xcodebuild command /usr/bin/xcodebuild clean archive \   -scheme FrameworkB \   -archivePath PATH/FrameworkB-iphoneos.xcarchive \   -configuration Release \   -sdk iphoneos \   SKIP_INSTALL=NO \   BUILD_LIBRARY_FOR_DISTRIBUTION=YES \   BUILD_DIR=PATH/build \   DEVELOPMENT_TEAM=TEAMID \   GCC_PREPROCESSOR_DEFINITIONS=""\   SWIFT_ACTIVE_COMPILATION_CONDITIONS=""     /usr/bin/xcodebuild clean archive \ -scheme FrameworkB \ -archivePath PATH/FrameworkB-iphonesimulator.xcarchive \   -configuration Release \ -sdk iphonesimulator \ -destination='generic/platform=iOS Simulator' \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \   BUILD_DIR=PATH/build \   DEVELOPMENT_TEAM=TEAMID \   GCC_PREPROCESSOR_DEFINITIONS=""\   SWIFT_ACTIVE_COMPILATION_CONDITIONS="" /usr/bin/xcodebuild -create-xcframework \   -framework PATH/FrameworkB-iphoneos.xcarchive/Products/Library/Frameworks/FrameworkB.framework \ -framework PATH/FrameworkB-iphonesimulator.xcarchive/Products/Library/Frameworks/FrameworkB.framework \   -output PATH/FrameworkB.xcframework In the clean archive step for iOS Simulator I get warning: None of the architectures in ARCHS (arm64, x86_64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64e, i386, x86_64) which is not in EXCLUDED_ARCHS (arm64, x86_64). As I've excluded both them archs. This fails to produce a binary inside the xcarchive though. Which leads to error: unable to read the file at 'PATH/FrameworkB-iphonesimulator.xcarchive/Products/Library/Frameworks/FrameworkB.framework/FrameworkB' I would like to avoid all of this but this is the only way I've managed to get the project to build for arm64 simulator with the new M1 Macs. Before FrameworkB built using x86_64 but contains libraries which don't support arm64. I have to exclude both archs though since Exclude Source File Names you can only specify Any iOS Simulator SDK rather than Only ARM64 iOS Simulator. I've tried Excluding FrameworkB when importing the xcframework but I get While building for iOS Simulator, no library for this platform was found
Asked
by rmus18.
Post not yet marked as solved
9 Views

Xcode SPM will only search for my fork

Some time ago I was trying to use a Swift package, but there was an issue in the github repo, so I forked it, fixed it and pointed Xcode towards my fork. I contacted the team and they resolved the issue. I want to go back to using the official version, but Xcode will only pick up my fork. Even if I delete my fork, Xcode thinks it might be private access and is asking me for new credentials, rather than using the url i'm supplying. I've tried removing the dependency, clearing cache, derived data, package.resolved, restarted Xcode, restarted MacOS etc. Nothing seems to work. You can see in the below picture i've typed in https://github.com/airgap-it/... but its complaining that it can't find https://github.com/simonmcl/... Anyone have any idea how to clear whatever is lingering around?
Asked
by simonmcl.
Post not yet marked as solved
31 Views

Lost in Tiers

Hello, I'm lost in the different Tiers for my in-app purchases. I'd like to set the price of my in-app to $1.99 / 1.99€. For sure, Tier 2 looks appropriate. But when fetching the real price, when trying to pay this in-app, price is 2,29€ and not 1,99€. So I tried Alternate Tier 2. Price is then 2,99€ !!! Alternate Tier 1 will set the price to 1,99€ but the price will also be $0.99, and I'd like to have $1.99 too. So, I'm confused and don't know what to do. Any idea for me? Thanks in advance. Regards, Alexandre
Asked
by Alx.
Post not yet marked as solved
9 Views

How do I create a floating UISheetPresentationController?

I currently have the following screen, implemented through a UISheetPresentationController: I would prefer that the screen look like this (i.e. I'd like to preserve the UISheetPresentationController but make it not pinned to sides and bottom) I tried to use the sourceView property to do this, and followed all instructions in documentation but nothing worked. Is this possible without creating my own custom view that replicates a bottom sheet?
Asked
Post not yet marked as solved
11 Views

Apple developer and Apple developer Enterprise program for same account

My organization has a enterprise account where we hosts in-House application, now we would also like to subscribe for the Apple developer program for the same account to host application on the AppStore Is this possible ? having both Apple Developer Program and Apple Developer Enterprise Program for the same account? If it's possible how do i do it ?
Asked
by dadgadfg.
Post not yet marked as solved
11 Views

Enterprise and Developer program for same account

My organization has a enterprise account where we hosts in-House application, now we would also like to subscribe for the Apple developer program for the same account to host application on the AppStore Is this possible ? having both Apple Developer Program and Apple Developer Enterprise Program for the same account? If it's possible how do i do it ?
Asked
by dadgadfg.
Post not yet marked as solved
19 Views

Wrong price for in-app purchases

There is an issue with the price-setting on in-app purchases. The interface for setting the price of an IAP is out of sync with what is actually set. For instance, I changed the price to $6.99 and in the app it displayed $7.99. Later I changed it to $5.99 and the app displayed $6.99. I think the frontend is setting the wrong value in the backend (database).
Asked
Post not yet marked as solved
17 Views

App Store Localization is Rejected

Why is this rejection coming? I don't understand.I can't see anything in my mailbox.
Asked
Post not yet marked as solved
8 Views

HLS : interstitials for VOD are fetched right after playback

I tried using HLS interstitials for VOD. I tried both examples shown here https://developer.apple.com/streaming/GettingStartedWithHLSInterstitials.pdf and built player using AVFoundation APIs. There are 2 ways to do it use DATERANGE tag on server side, in this case AVPlayerInterstitialEvent will be created by Player automatically, whenever it encounters DATERANGE tag having interstitials. write code on player side and create AVPlayerInterstitialEvent object to schedule interstitials. I tried both approaches and observed that in case of VOD interstitials are scheduled and played correctly as per defined schedule. but interstitials are fetched right after playback. i.e manifest on load event example : let's say interstitial is scheduled after 20 minutes but player will fetch adURL right after playback starts. is this bug ? how can we delay fetch of adURL/interstitials
Asked
Post not yet marked as solved
22 Views

500 Unexpected Error happened when I create or edit a new IAP

Just now (2022-5-19) , when I try to delete a duplicate local version record of a new IAP , or I create a new IAP product , I both got an unexpected error (HTTP 500) response . So that , I can't continue to publish a new IAP product. this is response of delete local show text version: DELETE https://appstoreconnect.apple.com/iris/v1/inAppPurchaseLocalizations/a1fc6ad7-7fa1-4fe0-8f6e-2b288108b5a3 { "errors": [{ "status": "500", "code": "UNEXPECTED_ERROR", "title": "An unexpected error occurred.", "detail": "An unexpected error occurred on the server side. If this issue continues, contact us at https://developer.apple.com/contact/." }] } BTW: when click save button on creating IAP page, there is one sentence above screenshot update block ---- "doing with images" , maybe this is why save failed?
Asked