Using the iOS Passbook framework, you can read userInfo, and the documentation says you can read "common data" without it stating what it means by "common".
What I'd like to know is whether using iOS Passbook - Is it possible to read the auxiliaryFields?
Many thanks
I figured it out.
You have to do this:
po [pass localizedValueForFieldKey:#"a2"]
Where a2 is the name of the key you want to access, given that:
{"key":"a2","value":"Super sale!","label":"Code","textAlignment":"PKTextAlignmentLeft"}]
Thanks
This is now resolved
Related
I'm trying create a list of all available alert sounds given in an iOS device.
In Xamarin's website, there's only one example:
https://developer.xamarin.com/recipes/ios/media/sound/syssound-example/
I would like to know which additional sounds can I access via my Apple device.
Edit:
How do I get the list of build-in alert sounds
Found the answer here :
https://www.theiphonewiki.com/wiki//System/Library/Audio/UISounds
e.g:
string NotificationSoundPath = #"/System/Library/Audio/UISounds/sms-received6.caf";
SystemSound notificationSound = SystemSound.FromFile(NotificationSoundPath);
notificationSound.AddSystemSoundCompletion(SystemSound.Vibrate.PlaySystemSound);
notificationSound.PlaySystemSound();
my app was rejected by Apple, because somehow my app uses private API's.
Apple said that my app uses
framework: '/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation': CFHashBytes
I couldn't find anything in the code, so I searched stackoverflow and fout out that I can use otool or strings.
With string I find two "hash" calls (wherever they are) and using nm, I get the following output:
nm Sporty\ Architect | grep hash
0000000100077490 T __TFO16Sporty_Architect12ActivityTypeg9hashValueSi
0000000100056240 T __TFO16Sporty_Architect12RotationModeg9hashValueSi
0000000100064480 T __TFO16Sporty_Architect13DraggedSliderg9hashValueSi
000000010003e3a0 T __TFO16Sporty_Architect8FileTypeg9hashValueSi
000000010003d910 T __TFO16Sporty_Architect9DateRangeg9hashValueSi
0000000100021360 T __TFO16Sporty_Architect9ModelModeg9hashValueSi
U __TFSig9hashValueSi
00000001000777b0 T __TTWO16Sporty_Architect12ActivityTypes8HashableS_FS1_g9hashValueSi
00000001000562e0 T __TTWO16Sporty_Architect12RotationModes8HashableS_FS1_g9hashValueSi
0000000100064500 T __TTWO16Sporty_Architect13DraggedSliders8HashableS_FS1_g9hashValueSi
000000010003e9d0 T __TTWO16Sporty_Architect8FileTypes8HashableS_FS1_g9hashValueSi
000000010003e080 T __TTWO16Sporty_Architect9DateRanges8HashableS_FS1_g9hashValueSi
0000000100021500 T __TTWO16Sporty_Architect9ModelModes8HashableS_FS1_g9hashValueSi
I think the U __TFSig9hashValueSi is it, isn't it? But now the question...how can i narrow this down any further?
It is beyond me, why Apple offers a validate button that shows that everything is OK and once the app is in review, it gets rejected for something, that could clearly be detected at compile time (or at least when it is submitted).
If you don't use any external API or framework, CFHashBytes is present only in Swift framework.
I had this issue with two Apps. I have sent this message to the Resolution Center and now both have been approved:
"Hello,
I think that there is an error. The only file that contains that non-public API is libswiftFoundation.dylib, framework used in Swift Apps. Xcode uses it automatically. Please, check it again.
Many thanks."
I hope this helps you.
I am wondering if the Facebook SDK for iOS provides a method for localizing the error messages.
From here: https://developers.facebook.com/docs/ios/errors/ I learned that there's an easy way to get a description of e.g. Login errors which you can display to the user:
[FBErrorUtility userMessageForError:error];
But that only returns an english version. Is there any way to automatically translate that to a different language? Or a different method to return a localized string? Otherwise this convenient method would be kind of useless for non-english apps.
Regards
Kim
Ok, I figured it out myself.
I had to create a bundle file, set it in the .plist under the key "FacebookBundleName" and overwrite the needed Error Message key/value pairs there.
Took me a while to get it running, but the Scrumptious sample helped me figure it out.
See "How can I localize the Facebook images and strings?" in
https://developers.facebook.com/docs/ios/troubleshooting/
In the HockeyApp SDK v. 3.5, they have shifted to a new method of user identification. In previous versions of the SDK, there was a callback method - (NSString*)userNameForCrashManager:(BITCrashManager *)crashManager which would set a string which would identify all crash reports sent from the client.
However, in version 3.5 of the SDK, it seems that this is deprecated, and it is preferred that you simply call:
[[BITHockeyManager sharedHockeyManager].authenticator authenticateInstallation];
This sets a unique ID for the user. But how can I access this identifier? I want to attach it to support emails so that I can search for crash reports the user has submitted.
You can use the following delegate to set the userName:
- (NSString *)userNameForHockeyManager:(BITHockeyManager *)hockeyManager componentManager:(BITHockeyBaseManager *)componentManager
This is documented in the header and help ofBITHockeyManagerDelegate and the replacement is also mentioned in the header and help of BITCrashManagerDelegate documentation.
BITAuthenticator is only used for beta distribution due to the fact that Apple removed the UDID calls from iOS 7. See the documentation and help. It is automatically disabled in App Store builds and without further setup creates anonymous IDs! Please read the mentioned documentation.
I think you are looking for publicInstallationIdentifier. That should return an NSString, unique for each user.
Look at this header file - BITAuthenticator.h .
Also, in the BITHockeyManager, there is a method called configureWithIdentifier: in which you can pass the identifier.
First ever SO question, woohoo.
I've integrated the AddThis SDK into an iOS app. I've set it up to share the App Store link to the App via various channels. All works well except the default text in the Twitter message appends "via #AddThis" to the end of the tweet. Although this text is editable by the user, I'd like to change it to "via #MyTwitterHandle".
AddThis' documentation says you can use:
[AddThisSDK setTwitterViaText:#"MyTwitterHandle"];
Except this doesn't work. It raises a warning that AddThisSDK may not respond to the method call and the app crashes when it reaches this line.
Examining the AddThisSDK header file, there's no such method outlined. I've searched their forums and FAQ etc to no avail. And I did run into other instances where the method names in their documentation were different from those in the SDK. If that's the case here I haven't found the correct name. Does anyone know how to do this?
Thanks in advance.
Do you have the latest version of the addthis iOS sdk? http://www.addthis.com/help/ios-quickstart
Please set setTwitterViaText before the sharing code.
This will work:
[AddThisSDK setTwitterViaText:#"My App"];
[AddThisSDK shareURL:myUrl withService:#"twitter" title:#"myTitle" description:myDescription];
This will not work:
[AddThisSDK shareURL:myUrl withService:#"twitter" title:#"myTitle" description:myDescription];
[AddThisSDK setTwitterViaText:#"My App"];