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

Linker error while integrating files #12

Closed
intersilindia opened this issue Jul 8, 2014 · 11 comments
Closed

Linker error while integrating files #12

intersilindia opened this issue Jul 8, 2014 · 11 comments

Comments

@intersilindia
Copy link

screen shot 2014-07-08 at 3 43 44 pm

@davidmurray
Copy link
Owner

Link with CoreGraphics.framework and MobileWiFi.framework.

@intersilindia
Copy link
Author

Thanks for the reply...
I have added CoreGraphics.framework now the only problem is that I am not able to add MobileWiFi.framework,I have added the header files though(Maybe I need to specify the path of private framework here,not sure)
It would be really helpful if you could provide a sample code which includes the usage of MobileWiFi.framework

@davidmurray
Copy link
Owner

This project uses MobileWiFi.framework which should be a good example. Similarly, my other project, AirScan, uses it too (github.com/Cykey/airscan).

To link, check out this post: http://stackoverflow.com/a/13388225
Look for the instructions at the bottom.

@intersilindia
Copy link
Author

I have used the header files which you have mentioned inAirScan but it doesnt seem to work.Besides the stackoverflow link is also not helpful.
Can you please give me the link from where I can download MobileWifi.framework
Thanks...

@davidmurray
Copy link
Owner

MobileWiFi.framework is shipped with the iOS SDK.

It is located at this path:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/PrivateFrameworks/MobileWiFi.framework/

(Remember to change "7.1" to whatever SDK you are using.)

@intersilindia
Copy link
Author

I have integrated MobileWifi.framework and the code works fine now [thanks for that..:)]
I am trying to turn off the Wifi programatically using the following code snippet

WiFiManagerClientSetProperty(manager, CFSTR("AllowEnable"), kCFBooleanFalse);

But it doesnt seems to reflect,so can you please tell me what can be done inorder to achieve the above functionality using MobileWifi.framework.
Besides as an alternative I have also tried to modify Network.plist and com.apple.wifi.plist
I can read data from the above plist but cant modify it

I would really appreciate your input for the above mentioned criteria

@davidmurray
Copy link
Owner

Hi,

I think the issue is that your app is not properly signed using the required entitlements. When you launch the app, check the syslog for any errors regarding entitlements. The syslog can be viewed from Xcode's Organizer.

Thanks

@intersilindia
Copy link
Author

screen shot 2014-07-14 at 5 26 10 pm

screen shot 2014-07-14 at 5 31 56 pm

screen shot 2014-07-14 at 4 48 17 pm

I have added the above Entitlement.plist but now I am not able to link the new plist with the project it gives the above error

SYSlog prints the following:

Jul 14 13:24:04IiPhone securityd[87] : securityd_xpc_dictionary_handler XcodeDeviceMonit[6334] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)
Jul 14 13:24:04 iPhone XcodeDeviceMonitor[6334] : SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
Jul 14 13:24:07 iPhone backboardd[28] : HID: The 'Passive' connection 'preferenceSettin' access to protected services is denied.
Jul 14 13:24:11 iPhone wifid[15] : WiFi:[427017251.331721]: kern_return_t _wifi_manager_open(mach_port_t, int, int, mach_port_t, mach_port_t *, audit_token_t) Client preferenceSettin has no entitlement
Jul 14 13:24:11 iPhone preferenceSetting[6329] : WiFi:[427017251.332714]: Failed to open connection to WiFi Manager kr=2
Jul 14 13:24:11 Phone preferenceSetting[6329] : WiFi:[427017251.334952]: Failed to open connection to WiFi Manager kr=268435466
Jul 14 13:24:11 iPhone preferenceSetting[6329] : WiFi:[427017251.335626]: Failed to open connection to WiFi Manager kr=268435466
Jul 14 13:24:11 iPhone preferenceSetting[6329] : N

Also please check the entitlements.plist whether its proper or not

Thanks...

@davidmurray
Copy link
Owner

It seems correct to. I'm not really sure what could be causing the issues as I don't use Xcode often. Try searching on google for "Xcode ldid codesigning".

@Sopan
Copy link

Sopan commented Aug 5, 2014

Does it work for non-jail broken devices as well ?

@davidmurray
Copy link
Owner

If you manage to get it signed with the proper entitlements that I think that it should work.

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