I have prepared a "Settings.bundle" file that contains plist with properties. However, after I compile and load the app, I can't find the those properties in [NSUserDefaults standardUserDefaults]. After I go to the settings and modify the properties there, all the modified properties can be found in [NSUserDefaults standardUserDefaults] (the unmodified ones are still missing). Is this a known problem in iOS 4.2? I tried the same program in iOS 3.2 and it was ok.
I wrote a library that duplicates the settings from setting.bundle inside the app, during that I discovered that the defaults in setting.bundle are not registered unless the user goes to the app's settings in the settings app. Here's the function I wrote that goes though the all the plists in the settings.bundle and registers the user defaults: http://bitbucket.org/keegan3d/inappsettings/src/2053acd0524e/InAppSettings/InAppSettingsReader.m
I'm not sure why it's working in iOS 3.2 for you but it might be that the settings are registered from a previous build.
Related
App Store Connect keeps blocking App upload by issuing
ITMS-90129: The bundle uses a bundle name or display name that is already taken.
So far I tried:
Changing the Display Name, Bundle Identifier (even with generated Hashcodes to make sure that the names really are not taken already)
Created alternative Profiles, Identifier and App in App Store Connect (also using the same mentioned hashcode)
Tried these changes in the Xcode input fields (under 'General') and also directly modifiyng the Info.Plist
Re-Exporting the project from Unity to XCode with the new naming (to make sure Unity is not writing some bundle id somewhere which is not visible in XCode)
(Update) Tried to Clean the build folder based on
minchaej suggestion
Additional information: The XCode project is exported from Unity and we're using Firebase which is installed via Pods.
I'm grateful for any hint where to continue looking - because I'm really running out of ideas. Thanks a lot for taking the time.
Cheers
vik
The solution for this (probably very Unity-to-XCode specific) issue was localization related:
I had to remove all but the English localization entry in the Localization section.
I'm not sure why there were other loca resources before (since we didn't set them up) but I assume these included an alternative app name which was causing the ITMS-90129 to pop up.
My salvation for ITMS-90129 is the next:
Remove definitions for
CFBundleName
CFBundleDisplayName
CFBundleSpokenName
for base(en) localisation InfoPlist.strings.
Setup this variables with single value $(PRODUCT_NAME) directly in Info.plist
Variable $(PRODUCT_NAME) define via root project Build Settings/Packaging/Product Name
Setup variable LSHasLocalizedDisplayName in YES value in Info.plist
Setup Russian (or other) localisation for variables
CFBundleName
CFBundleDisplayName
CFBundleSpokenName
via InfoPlist.strings
As I am personally assume, setup this variables via base localisation is the key of problems in which I am faced with
I'm doing an app and i try to have a setting that the user would be able to change from the iOS Settings page,
i opened a new settings.bundle in my app
and kept some of the default values, but i dont see it in my actual device settings
i tried reinstalling that app many tines, and i still dont see the app settings in my settings options on my iOS
here is my settings i created:
i kept the default values in the Root.plist
but also on the simulator and also on the actually device i dont see anything on the settings
what am i doing wrong ?
From the official docs at https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html:
A Settings bundle has the name Settings.bundle and resides in the
top-level directory of your app’s bundle. This bundle contains one or
more Settings page files that describe the individual pages of
preferences. It may also include other support files needed to display
your preferences, such as images or localized strings. Table 4-2 lists
the contents of a typical Settings bundle.
So renaming your settings bundle to Settings.bundle should fix the problem.
I’m implementing a settings bundle for a custom keyboard using the Apple Keyboard Extension documentation and the settings tutorial it links to.
This method works in the parent app, but when I implement it as identically as possible for the keyboard extension, the settings bundle does not appear to save any of the data, as shown in this video. It seems as if something is resetting the values near-constantly: any time I exit the settings view (e.g. Multitasking view, previous settings page), the values are set to zero (not default: empty, false, and zero respectively). This is the default settings bundle template, no edits, not referred to in code.
Is there a special implementation for extension settings not explicitly stated in the documentation (or that I missed) that is causing this?
For clarity, the steps I took (after creating the extension):
Created the bundle with New File –> Settings Bundle.
Named it, targeted the keyboard extension.
Built and ran.
These were the same steps I took for the parent app (targeting the app), which was able to save settings.
This is on a physical iOS 11.0 (15A5326a) device; app built with Xcode 9.0 (9M202q), Swift 4.
I've added the stock 'Settings.Bundle' into my App Bundle:
However, I get a different set of settings (shown in simulator):
* Revision *
The Settings.bundle is a member of the target:
Here's where the settings.bundle is located:
Note: I can see the new Settings after I do a 'reset' of the Simulator.
However I don't see any change on the actual device, even after removing the app and doing a cold restart.
How do I get my DEVICE version to recognize the updated/new Settings bundle?
Two requirements are:
Settings.bundle must be included in your target
Settings.bundle should be in the root of your app folder/bundle
Issue fixed,after relaunching the settings app.
Both of Dan's suggestions were needed to be on the right track. However as with having to reset the simulator to get the Settings to function correctly, I had to:
1) Remove the device app.
2) Do a cold restart of the device,
3) Re-install the revised-Setting application.
Once I did all that, I can see the revised Setting changes.
I was using CloudKit. The app appeared in the Settings app only after the app accessed CloudKit through:
[[CKContainer defaultContainer] accountStatusWithCompletionHandler:^(CKAccountStatus accountStatus, NSError *error) {
That makes sense. Try to use the function that requires some sort of permission suitable for inclusion in the Settings app
I have an app available at the app store and is running fine.
I have changed the app's project name from app1.xcodeproj to app2.xcodeproj.
Is it possible to submit app2.xcodeproj as the update for app1.xcodeproj.
I am done with the testing but now I am wondering if its possible to send it as an update.
The name of the Xcode project makes no difference. The only thing that has to be consistent when updating an app on Apple's App Store is the bundle identifier which is set in the info.plist file.