Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS - prefences pane stays empty - just permissions like camera are shown... #76

Open
OliverTr54 opened this issue Jan 29, 2016 · 17 comments

Comments

@OliverTr54
Copy link

Hey there,

I really have an urgent issue.

I would like to create a prefence panel for my application, but it doesn't matter how and what I try - it's not working.

I followed the documentation, but the app prefence pane always shows the permissions - only, but not the preference of the app-settings.json. I left the app-settings.json like it was after I added the plugin.

[
    {
        "type":"group",
        "title":"Common",
        "items":[{
            "title":"Title",
            "type":"textfield",
            "key":"title"
        }, {
            "title":"Language",
            "type":"radio",
            "key":"lang",
            "default": "en",
            "items":[{
                "value":"**en**",
                "title":"English (US)"
            }, {
                "value":"de",
                "title":"Deutsch (DE)"
            }]
        }, {
            "title":"Debug",
            "type":"toggle",
            "default":false,
            "key":"debug"
        }]
    }
]

I also did a "phonegap prepare" afterwards and I build my package for IOS on build.phonegap...., but it still does not appear.

I use ng-cordova to access the preferences page - which works fine, but I'm not able to store any values or import the app-settings.json.

What's wrong?

The generated Settings.bundle is located in APPNAME/platforms/ios/Settings.bundle. It contain "Root.plist" the ".me.apla.apppreferences" file and a subfolder en.lproj.

I also tried it by moving it onto the APPNAME/platforms/ios/APPNAME/Resources folder but it won't work either.

I also added the plugin into the APPNAME/config.xml, by adding the following line:
<plugin name="cordova-plugin-app-preferences" spec="0.7.6" />

Do I have to add a "feature", e.g.

    <feature name="AppPreferences">
        <param name="ios-package" value="AppPreferences"/>
    </feature>

I tried really everthing but without any success :(

Just by the way - I use phonegap 5.3.10 and node 5.4.0.

Please let me know, if you have a solution to solve this issue.

Thanks,
Oliver

@OliverTr54
Copy link
Author

Is no one able to tell me any solution attached to this problem? I really need some help :( @apla

@apla
Copy link
Owner

apla commented Feb 4, 2016

Very strange issue. Probably Xcode thinks Settings.bundle is located elsewhere. Try to open Xcode after prepare, click on Settings.bundle and locate it.

Also, can you create test app and add a plugin. Do you see any preferences?

@OliverTr54
Copy link
Author

I currently develop this project with Phonegap and Angular + Ng-Cordova. The build is actually done by "build.phonegap.com" - I don't have Xcode running anywhere... is this the problem?

When I start my application it does show me the preference page, but it does not store any key, but it also does not throw any exception.

Thanks in advance,
Oliver

@apla
Copy link
Owner

apla commented Feb 4, 2016

I don't have experience with phonegap, do you have an access to the built files? If yes, then I need strings containing 'Settings.bundle' from your project file.

On unix, command grep 'Settings.bundle' platforms/ios/*.xcodeproj/project.pbxproj can do this.

@OliverTr54
Copy link
Author

It seems to be in there...

                EA419C208B1C4D2299117565 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = FAEEF545C4DC4D59855CC2B2 /* Settings.bundle */; };
                FAEEF545C4DC4D59855CC2B2 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = "Settings.bundle"; path = "Settings.bundle"; sourceTree = SOURCE_ROOT; };
                                FAEEF545C4DC4D59855CC2B2 /* Settings.bundle */,
                                EA419C208B1C4D2299117565 /* Settings.bundle in Resources */,

That's all I can grep for :(

I really have no idea what's wrong? Do I have to add something specific inside the projects "config.xml"? The plugin source is in here and the "feature" xml.

I only have the Settings.bundle in the root path of the platform project, e.g.
PROJECT/platform/ios/Settings.bundle (check)
PROJECT/platform/ios/PROJECT_NAME/Resources/Settings.bundle (MISSING!)

@apla
Copy link
Owner

apla commented Feb 4, 2016

The most important flag is sourceTree = SOURCE_ROOT, it defines that Settings.bundle is located in SOURCE_ROOT, which is usually platforms/ios. My test application has the same references.

As I understand, you're building app via phonegap, then you're uploading your app to the real device. Are you using Hydration feature? If so, Settings.bundle definitely won't be updated between builds.

@OliverTr54
Copy link
Author

I use https://build.phonegap.com/ which compiles the phonegap project to IOS and Android, but I don't use Hydration...
What else could it be? Do you know any phonegap developer with an issue like this?

@apla
Copy link
Owner

apla commented Feb 4, 2016

I will try to build test project on phonegap on Saturday to find out differences between cordova and phonegap

On Feb 4, 2016, at 6:56 PM, OliverTr54 notifications@github.com wrote:

I use https://build.phonegap.com/ which compiles the phonegap project to IOS and Android, but I don't use Hydration...
What else could it be? Do you know any phonegap developer with an issue like this?


Reply to this email directly or view it on GitHub.

@OliverTr54
Copy link
Author

Thank you! Please keep me up to date...

@OliverTr54
Copy link
Author

Any news available? @apla

@OliverTr54
Copy link
Author

Where you able to reproduce the error? @apla

@apla
Copy link
Owner

apla commented Feb 15, 2016

@OliverTr54 I have some issues with application installation from Phonegap.com service. Really limited on time last week, try to resolve it in a few days.

@OliverTr54
Copy link
Author

Alright. I'm really in the need to use your module in my application somehow...

@apla
Copy link
Owner

apla commented Feb 16, 2016

I've compiled and installed application using phonegap build ios and phonegap run ios and settings displays fine. Launching phonegap run ios after new preference generation I've faced empty preference screen. Removing app from device and install it again did the trick — now preferences displayed.

Also after inspecting phonegap build logs I've found this issue: phonegap/build#425. I don't know will this issue is about your situation or not.

@OliverTr54
Copy link
Author

I'll will try this. Hopefully it works @apla

@mark-roper
Copy link

mark-roper commented Dec 7, 2016

I'm having a similar problem, but I am compiling my app with xcode.

If I start with a "clean slate", i.e. do a hard reboot to ensure no apps are running on the iPad, then install the app, the preferences I've defined appear in Settings. So far so good.

If I un-install the app the preferences disappear from Settings. Also so far so good.

If I then re-install the app the preferences sometimes do not re-appear in Settings. Not good.

It appears if the Settings app is still running, even in the background, it can interfere with preferences being added. However it's not every time. Sometimes un-install / re-install re-adds preferences, sometimes it doesn't, and I can't come up with a scenario in which it always fails or always works.

This is on an iPad2 with iOS 9.3.5, I don't currently have an iPad to hand with iOS 10.

@jakob-lundberg
Copy link

I did a workaround to add Settings.bundle to Phonegap Build.
By creating a plugin the Settings.bundle can be added as a resource.

http://stackoverflow.com/questions/22511548/cordova-phonegap-ios-app-settings-bundle-possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants