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

IASK won't build/run on iOS 7... includes iOS 8-only symbols (e.g., _UIApplicationOpenSettingsURLString) #287

Closed
mdg-at-politico opened this issue Feb 3, 2015 · 12 comments

Comments

@mdg-at-politico
Copy link

I updated our pod spec recently to "Installing InAppSettingsKit 2.4.1 (was 2.3.4)"... but it won't link (or has a runtime Symbol Not Found – because it references iOS 8-only privacy constants:

dyld: Symbol not found: _UIApplicationOpenSettingsURLString
Expected in: /Applications/Xcode 6.1.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks/UIKit.framework/UIKit
in /Users/devuser/Library/Developer/CoreSimulator/Devices/65A9414B-26B2-4889-BAA2-676F5E807231/data/Applications/FDEA090D-2200-4356-AE63-FF79517DDF48/MyProject.app/MyProject

futuretap added a commit that referenced this issue Feb 4, 2015
futuretap added a commit that referenced this issue Feb 4, 2015
futuretap added a commit that referenced this issue Feb 4, 2015
@futuretap
Copy link
Owner

Please check if the last version fixes it for you. Put

pod 'InAppSettingsKit', :git => 'git@github.com:futuretap/InAppSettingsKit.git'

in your Podfile to select the git version until the cocoapods repo has been refreshed.
I had to switch to a Ruby-style podspec because the JSON podspec format apparently doesn't support the deployment_target parameter.

@mdg-at-politico
Copy link
Author

We added the podfile change, did a pod update (it updated to version 2.4.3), and trying running to an iOS 7.x Simulator Device... got the same runtime crash at startup:

dyld: Symbol not found: _UIApplicationOpenSettingsURLString

This symbol isn't available until iOS 8.

BTW - the podfile thing you suggested didn't work (because of the ssh), so we actually used this in the Podfile instead: pod 'InAppSettingsKit', :git => 'https://github.com/futuretap/InAppSettingsKit.git'

@mdg-at-politico mdg-at-politico changed the title IASK won't build/run on iOS 7... includes iOS 8-only symbols IASK won't build/run on iOS 7... includes iOS 8-only symbols (e.g., _UIApplicationOpenSettingsURLString) Feb 12, 2015
@futuretap futuretap reopened this Feb 25, 2015
@fernandomantoan
Copy link

Getting the same behavior here, using version 2.5.2.

@mdg-at-politico
Copy link
Author

This is still an issue…

This issue WAS fixed in a development branch, but never made it into the production builds, AFAIK.

Please fix, we’re getting close to release. Thanks!!

@fernandomantoan
Copy link

I was able to make it work by commenting the line that uses the UIApplicationOpenSettingsURLString constant.

...
                                   kIASKKey: @"IASKPrivacySettingsCellKey",
                                   kIASKType: kIASKOpenURLSpecifier,
                                   //kIASKFile: UIApplicationOpenSettingsURLString,
                                   } mutableCopy];
...

My guess is that having this piece of code, even though the privacySettingsSpecifiers is not called, will crash the application, but I don't know the side effects of removing it.

@futuretap
Copy link
Owner

Do you build against iOS 7? Normally you should build against the latest iOS version and just set the deployment target to the minimum iOS version you want to support.

@futuretap
Copy link
Owner

You could conditionally skip the method on iOS < 8:

- (NSArray*)privacySettingsSpecifiers {
    IASK_IF_IOS8_OR_GREATER
    (
     NSMutableDictionary *dict = [@{kIASKTitle: NSLocalizedStringFromTable(@"Privacy", @"IASKLocalizable", @"iOS 8+ Privacy cell: title"),
                                    kIASKKey: @"IASKPrivacySettingsCellKey",
                                    kIASKType: kIASKOpenURLSpecifier,
                                    kIASKFile: UIApplicationOpenSettingsURLString,
                                    } mutableCopy];
    NSString *subtitle = NSLocalizedStringWithDefaultValue(@"Open in Settings app", @"IASKLocalizable", [NSBundle mainBundle], @"", @"iOS 8+ Privacy cell: subtitle");
    if (subtitle.length) {
        dict [kIASKSubtitle] = subtitle;
    }

    return @[@[[[IASKSpecifier alloc] initWithSpecifier:@{kIASKKey: @"IASKPrivacySettingsHeaderKey", kIASKType: kIASKPSGroupSpecifier}],
               [[IASKSpecifier alloc] initWithSpecifier:dict]]];
     );
    return @[];
}

Let me know if that works better for you. Then we can add this to the master branch.

@fernandomantoan
Copy link

I build exactly like you said: deployment target is set to 7.0 and base SDK is set to the latest iOS version (8.3).

I tested with your code and I got the same result:

dyld: Symbol not found: _UIApplicationOpenSettingsURLString
  Referenced from: .../Library/Developer/CoreSimulator/Devices/73165D26-4F6C-470F-AB1E-DCF6EECFE45A/data/Applications/0929380A-677D-478B-9DD4-D101F55FCDD5/MyApp.app/MyApp
  Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/UIKit.framework/UIKit
 in .../Library/Developer/CoreSimulator/Devices/73165D26-4F6C-470F-AB1E-DCF6EECFE45A/data/Applications/0929380A-677D-478B-9DD4-D101F55FCDD5/MyApp.app/MyApp

@futuretap
Copy link
Owner

Can you supply a sample project exhibiting the issue? I can't reproduce the problem.

@fernandomantoan
Copy link

@futuretap I tried creating a plain new project but the error didn't show up. After some time, I figured out that the problem is not related to the InAppSettingsKit, but my Podfile. In the new project I defined my Podfile as:

platform :ios, '7.0'
pod 'InAppSettingsKit', '~> 2.5'

After some time trying to see the difference between the projects I found out that the other Podfile is defined as:

platform :ios, '8.0'

And that's the problem, just changing it to 7.0 solved it. Thanks for the support.

@futuretap
Copy link
Owner

Thanks for the info, totally makes sense.

@mdg-at-politico
Copy link
Author

Thanks a bunch!!! That completely fixed it now.
Mark

On Apr 29, 2015, at 5:06 PM, Ortwin Gentz, FutureTap <notifications@github.commailto:notifications@github.com> wrote:

Thanks for the info, totally makes sense.


Reply to this email directly or view it on GitHubhttps://github.com//issues/287#issuecomment-97585743.

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

No branches or pull requests

3 participants