Coder Social home page Coder Social logo

urbanairship / ios-library Goto Github PK

View Code? Open in Web Editor NEW
475.0 154.0 265.0 45.59 MB

Urban Airship iOS SDK

Home Page: http://urbanairship.com

License: Apache License 2.0

Objective-C 3.37% Shell 0.54% Swift 95.76% Ruby 0.19% Makefile 0.11% C 0.04%
urban-airship-sdk ios urbanairship

ios-library's Introduction

ios-library's People

Contributors

apekka avatar benjamin-benoit avatar brianbatchelder avatar chrisdickinson avatar crow avatar darrenclark avatar devinsmythe avatar gatlinhebert avatar grosch avatar hcrowell avatar ilitvinenko avatar jdee avatar jyaganeh avatar keimyplaza avatar khmmouna avatar lucky avatar madelgi avatar marc-scig avatar martinfua avatar mend-for-github-com[bot] avatar mhooge avatar michaeldclifford avatar oristanovic avatar rbaumbach avatar rlepinski avatar slund-airship avatar tahirmt avatar ulrico972 avatar vfuc avatar z0br0wn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-library's Issues

Crash in -[UAAnalytics resetEventsDatabaseStatus]

I just got this crash:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull doubleValue]: unrecognized selector sent to instance 0x3fc8e5e0'

With the following backtrace:

* thread #7: tid = 0x2403, 0x36b9232c libsystem_kernel.dylib`__pthread_kill + 8, stop reason = signal SIGABRT
    frame #0: 0x36b9232c libsystem_kernel.dylib`__pthread_kill + 8
    frame #1: 0x3350920e libsystem_c.dylib`pthread_kill + 54
    frame #2: 0x3350229e libsystem_c.dylib`abort + 94
    frame #3: 0x3385af6a libc++abi.dylib`abort_message + 46
    frame #4: 0x3385834c libc++abi.dylib`default_terminate() + 24
    frame #5: 0x33393356 libobjc.A.dylib`_objc_terminate + 146
    frame #6: 0x338583c4 libc++abi.dylib`safe_handler_caller(void (*)()) + 76
    frame #7: 0x33858450 libc++abi.dylib`std::terminate() + 20
    frame #8: 0x3385979e libc++abi.dylib`__cxa_throw + 122
    frame #9: 0x33393296 libobjc.A.dylib`objc_exception_throw + 94
    frame #10: 0x36f7fa9a CoreFoundation`-[NSObject doesNotRecognizeSelector:] + 174
    frame #11: 0x36f7e914 CoreFoundation`___forwarding___ + 300
    frame #12: 0x36ed9650 CoreFoundation`_CF_forwarding_prep_0 + 48
    frame #13: 0x00172ea2 ***`-[UAAnalytics resetEventsDatabaseStatus] + 182 at UAAnalytics.m:572
    frame #14: 0x00172ea2 ***`-[UAAnalytics resetEventsDatabaseStatus] + 182 at UAAnalytics.m:572
    frame #15: 0x001716bc ***`-[UAAnalytics initWithOptions:] + 364 at UAAnalytics.m:111
    frame #16: 0x0014985c ***`+[UAirship takeOff:] + 2052 at UAirship.m:253

Apparently, it is possible that [event objectForKey:@"time"] returns a NSNull object.

I’m using the v1.3.2 static library but this code has not changed in v1.3.7.

Crash in -[UA_ASIHTTPRequest handleNetworkEvent:]

I haven't seen this crash personally, but we've got crash logs from the field. This is with library version 1.1.1. We've just upgraded to 1.1.4, but that release won't be out until next week.

Crash occurred here:

UA_ASIHTTPRequest.m line 2950
-[UA_ASIHTTPRequest handleNetworkEvent:]

Stack trace.

libobjc.A.dylib      objc_msgSend + 15
App                  UA_ASIHTTPRequest.m line 2950
                     -[UA_ASIHTTPRequest handleNetworkEvent:] 
App                  UA_ASIHTTPRequest.m line 52 
                     ReadStreamClientCallBack
CoreFoundation       _signalEventSync + 76
CoreFoundation       _cfstream_solo_signalEventSync + 64
CoreFoundation       _CFStreamSignalEvent + 332
CoreFoundation       CFReadStreamSignalEvent + 10
CFNetwork            HTTPReadStream: :streamEvent(unsigned long) + 100
CFNetwork            HTTPReadStream: :_streamCB(__CFReadStream*, unsigned long, void*) + 30
CoreFoundation       _signalEventSync + 76
CoreFoundation       _cfstream_shared_signalEventSync + 204
CoreFoundation       __CFRunLoopDoSources0 + 382
CoreFoundation       __CFRunLoopRun + 230
CoreFoundation       CFRunLoopRunSpecific + 230
CoreFoundation       CFRunLoopRun + 48
CoreFoundation       __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 12
CoreFoundation       CFRunLoopRun + 48
App                  UA_ASIHTTPRequest.m line 4280
                     +[UA_ASIHTTPRequest runRequests] 
Foundation           -[NSThread main] + 44 
Foundation           __NSThread__main__ + 972 
libsystem_c.dylib    _pthread_start + 248

APNSRegistration skipped on restored new devices

I have come across an issue with the iOS SDK that is still present in 5.0.0 and have confirmed it has happened on three separate devices.

When the new iPhone 6 came out I restored it as a backup of my iPhone 5S (via iTunes) so I was good to go immediately. This has restored app preferences such as UA's use of NSUserDefaults.

When I call setUserPushNotificationsEnabled:YES the SDK checks the previous value from NSUserDefaults which returns YES as I previously had push notifications enabled on my 5S.

It then compares the previous value with the new value and skips registration if they are the same.

UAPush.m
if (enabled != previousValue) {
   self.shouldUpdateAPNSRegistration = YES;
   [self updateRegistration];
}

The problem is this is a new device and therefore a new push device token. It has kept my previous push enabled preference when the user defaults have been restored onto the new device and will never prompt or register this new device. So even though the SDK now thinks I have push enabled it was never registered.

Future calls to [[UAPush shared] updateRegistration]; will not rectify this issue as self.shouldUpdateAPNSRegistration is never triggered as being out of date so [self updateAPNSRegistration]; is never called.

This has happened on both AdHoc builds and Production AppStore releases. I understand the previous value check is in place to avoid registration every time however is there a way to avoid this with new devices?

ios5 badge on inboxmail header

if __IPHONE_OS_VERSION_MAX_ALLOWED <= __IPHONE_4_3

    UIView *aView = [((UIView *)[tabbar.subviews objectAtIndex:0]).subviews objectAtIndex:0];

else

    UIView *aView = [((UIView *)[tabbar.subviews objectAtIndex:1]).subviews objectAtIndex:0];

endif

urban airship library failed for veracode scanning

Hi Guys,

Have you ever tested urbanairship library for veracode scanning? I had scanned veracode for my app which has used urbanairship library. It's raised a few security related issues regarding with urbanairship library.
That will be nice if we can fix.

Here are the list of bugs from their report for urbanairship library. You can see the class names followed by line number at source column.
ua_veracode_result

If you need more info, please kindly let me know. Thanks a lot.

Cheers,
Ei Wai

1.0.6 crashes on 3Gs with iOS 4.1

The latest stable version crashes for me when running it on a iPhone 3Gs with iOS 4.1. It works when running it with the iPhone Simulator 4.3. I've tried to build it myself as well as the download from your site. Here's the last 10 lines from the log output:

2011-08-27 13:18:43.005 KVBTrouble[894:307] -[UAAnalytics resetEventsDatabaseStatus] [Line 478] Database size: 450
2011-08-27 13:18:43.015 KVBTrouble[894:307] -[UAAnalytics resetEventsDatabaseStatus] [Line 479] Oldest Event: 1314443598.018458
2011-08-27 13:18:43.026 KVBTrouble[894:307] Reachability Flag Status: -R -----l- networkStatusForFlags
2011-08-27 13:18:43.066 KVBTrouble[894:307] -[UAAnalytics addEvent:] [Line 344] Add event type=app_init time=1314443923.043369 data={
carrier = "T-Mobile";
"connection_type" = wifi;
"daylight_savings" = true;
"lib_version" = "1.0.6";
"notification_types" = (
badge,
sound,
alert
);
"os_version" = "4.1";
"package_version" = "3.0";
"time_zone" = 7200;
}
2011-08-27 13:18:43.095 KVBTrouble[894:307] -[UAAnalyticsDBManager addEvent:withSession:] [Line 91] DB Count 2
2011-08-27 13:18:43.101 KVBTrouble[894:307] -[UAAnalyticsDBManager addEvent:withSession:] [Line 92] DB Size 900
2011-08-27 13:18:43.106 KVBTrouble[894:307] -[UAUser migrateUser] [Line 187] Migrating User Info: (null)
2011-08-27 13:18:43.189 KVBTrouble[894:307] -[UAUser loadUser] [Line 268] User Info: (null)
2011-08-27 13:18:43.631 KVBTrouble[894:307] -[UAUser listenForDeviceTokenReg] [Line 951] ListenForDeviceTokenReg

With the self compiled version the crash occurred in UA_asi-http-request.m line 4280:

BOOL runAlways = YES; // Introduced to cheat Static Analyzer
while (runAlways) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
CFRunLoopRun();
[pool release];
}

libUAirship-1.1.4.a crashes on iPhone4 with iOS 5.1

Last night I updated my device OS version to 5.1 and my app start crashing frequently.

It looks like this issue linked with iOS5.1 and library needs to be updated. I have found 1 similar issue: #9

Here's my Device logs:

Mar  9 02:45:54 unknown kernel[0] : launchd[581] Builtin profile: container (sandbox)
Mar  9 02:45:54 unknown kernel[0] : launchd[581] Container: /private/var/mobile/Applications/C78FE48C-5674-42A6-863E-6578990935F6 69
Mar  9 02:45:55 unknown ProjectName[581] : +[UAirship takeOff:] [Line 206] App Key: MYAPPKEY
Mar  9 02:45:55 unknown ProjectName[581] : +[UAirship takeOff:] [Line 207] App Secret: MYSECRETKEY
Mar  9 02:45:55 unknown ProjectName[581] : +[UAirship takeOff:] [Line 208] Server: https://go.urbanairship.com
Mar  9 02:45:55 unknown ProjectName[581] : -[UAirship configureUserAgent] [Line 457] Setting User-Agent for UA requests to ProjectName 1.0 (iPhone; iPhone OS 5.1; UALib 1.1.4; 9w9oJKNDSv2PMA_WdWqEhA; en_US)
Mar  9 02:45:55 unknown ProjectName[581] : -[UAAnalytics initWithOptions:] [Line 216] Analytics logging not enabled
Mar  9 02:45:55 unknown ProjectName[581] : Reachability Flag Status: -R -----l- networkStatusForFlags
Mar  9 02:45:55 unknown ProjectName[581] : -[UAUser migrateUser] [Line 187] Migrating User Info: (null)
Mar  9 02:45:55 unknown ProjectName[581] : -[UAUser loadUser] [Line 268] User Info: (null)
Mar  9 02:45:55 unknown sandboxd[579] : ProjectName(581) deny file-write-create /Applications/.dat0245.000
Mar  9 02:45:55 unknown ProjectName[581] : libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0
Mar  9 02:45:56 unknown ProjectName[581] : libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0
Mar  9 02:45:57 unknown ProjectName[581] : -[UAUser listenForDeviceTokenReg] [Line 964] ListenForDeviceTokenReg
Mar  9 02:45:57 unknown ProjectName[581] : * Terminating app due to uncaught exception 'NSFileHandleOperationException', reason: '* -[NSConcreteFileHandle writeData:]: Bad file descriptor'
*** First throw call stack:
(0x3548688f 0x368ad259 0x35486789 0x354867ab 0x31301d15 0x312df2a3 0x1ad23 0x40ef 0x326d16f7 0x326d21c9 0x31604af9 0x3545a523 0x3545a4c5 0x35459313 0x353dc4a5 0x353dc36d 0x366d8439 0x324d2e7d 0x4061 0x400c)
Mar  9 02:45:58 unknown ReportCrash[584] : Formulating crash report for process ProjectName[581]
Mar  9 02:45:58 unknown com.apple.launchd[1] : (UIKitApplication:com.ProjectName.ios[0xc71a]) Job appears to have crashed: Abort trap: 6
Mar  9 02:45:58 unknown SpringBoard[52] : Application 'ProjectName' exited abnormally with signal 6: Abort trap: 6
Mar  9 02:45:59 unknown ReportCrash[584] : libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0
Mar  9 02:45:59 unknown ReportCrash[584] : Saved crashreport to /var/mobile/Library/Logs/CrashReporter/ProjectName_2012-03-09-024557_My-iPhone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0

error UALOG - called object type 'NSString *' is not a function or function pointer

Hello,
I've include in my project all files in the Airship/UI/Default directory, copied Airship directory (downloaded from here, master branch) into my ../myProject/ directory and updated the header search path (it's correct: ../Airship/ and recursive) .

I've always the same problem:

/Users/MyName/Documents/Projects/MyProject/Airship/UI/Default/Push/Classes/Shared/UALocationSettingsViewController.m:110:5: error: called object type 'NSString *' is not a function or function pointer
    UALOG(@"Get Location pressed");
    ^
In file included from /Users/MyName/Documents/Projects/MyProject/Airship/UI/Default/Push/Classes/Shared/UALocationSettingsViewController.m:28:
../Airship/Common/UAGlobal.h:70:15: note: expanded from macro 'UALOG'
#define UALOG UA_LDEBUG
              ^
../Airship/Common/UAGlobal.h:65:29: note: expanded from macro 'UA_LDEBUG'
#define UA_LDEBUG(fmt, ...) UA_LEVEL_LOG(UALogLevelDebug, @"D", fmt, ##__VA_ARGS__)
                            ^
../Airship/Common/UAGlobal.h:58:22: note: expanded from macro 'UA_LEVEL_LOG'
#define UA_LEVEL_LOG UA_LEVEL_LOG_NO_THREAD
                     ^
../Airship/Common/UAGlobal.h:50:19: note: expanded from macro 'UA_LEVEL_LOG_NO_THREAD'
            NSLog((@"[%@] %s [Line %d] " fmt), levelString, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
            ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/MyName/Documents/Projects/MyProject/Airship/UI/Default/Push/Classes/Shared/UALocationSettingsViewController.m:1:
/Users/MyName/Documents/Projects/MyProject/add14/add/add14-Prefix.pch:63:60: note: expanded from macro 'NSLog'
    #define NSLog(__FORMAT__, ...) NSLog((@"%s [Line %d] " __FORMAT__), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)

What I can do?
I've tried everything and searched on google and stackoverflow.

Can you help me?

Thanks in advance
Mattia

README should mention CoreLocation.framework

README should mention CoreLocation.framework as on of the required frameworks.
Otherwise link fails with errors like this

Undefined symbols for architecture armv7:
"OBJC_CLASS$_CLLocationManager", referenced from:
objc-class-ref in libUAirship-1.2.2.a(UALocationService.o)
objc-class-ref in libUAirship-1.2.2.a(UABaseLocationProvider.o)
"_kCLLocationAccuracyThreeKilometers", referenced from:
+[UAirship registerNSUserDefaults] in libUAirship-1.2.2.a(UAirship.o)
"_kCLDistanceFilterNone", referenced from:
-[UALocationService setSingleLocationProvider:] in libUAirship-1.2.2.a(UALocationService.o)
"_kCLLocationAccuracyHundredMeters", referenced from:
+[UAirship registerNSUserDefaults] in libUAirship-1.2.2.a(UAirship.o)
"_kCLLocationAccuracyBest", referenced from:
-[UALocationService standardLocationDidUpdateToLocation:fromLocation:] in libUAirship-1.2.2.a(UALocationService.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Aliases not getting updated

I am setting alias using the following code:

[UAPush shared].alias = @"MyAlias";
[[UAPush shared] updateRegistration];

Looking at the debug data described by the library, I am seeing:

2014-07-17 16:12:03.776 MyApp[24174:60b] [D] -[UADeviceRegistrar registerWithChannelID:channelLocation:withPayload:forcefully:] [Line 83] Ignoring duplicate update request.

At the audience on the web dashboard, the device token is not immediately seen as well as the alias is not updated. Device token appears after a while, but alias is not set and it remains as "None".

There is another application installed on the same phone, using the same, shared keychain. Looking into the code, a device ID is stored in keychain under the same key. Could this be the cause that alias is not updated? I even changed the library to forcefully push to UA server, but still Alias does not appear, even that the status from the server is success.

Code change to search product.description

// In Airship/UI/Default/Storefront/Classes/Shared/UAStoreFrontViewController.m:

  • (void)filterContentForSearchText:(NSString*)searchText {

    NSArray *productsArray = self.products;
    [filteredProducts removeAllObjects];
    int count = [productsArray count];
    for (int i = 0; i < count; i++) {
    UAProduct *product = [productsArray objectAtIndex:i];
    NSRange range = [product.title rangeOfString:searchText options:(NSCaseInsensitiveSearch |NSDiacriticInsensitiveSearch |NSWidthInsensitiveSearch)];
    if (range.location != NSNotFound) {
    [filteredProducts addObject:product];
    // SEARCH DESCRIPTION ADDITIONS FROM HERE ...
    continue;
    }
    range = [product.productDescription rangeOfString:searchText options:(NSCaseInsensitiveSearch |NSDiacriticInsensitiveSearch | NSWidthInsensitiveSearch)];
    if (range.location != NSNotFound) {
    [filteredProducts addObject:product];
    // ... TO HERE.
    }
    }
    }

Linking issue with CocoaPods installation

I installed the iOS library with CocoaPods:

pod 'UrbanAirship-iOS-SDK', '~> 4.0'

When linking the application, I get the following error:

Undefined symbols for architecture arm64:
  "_UANativeBridge_js_len", referenced from:
      -[UIWebView(UAAdditions) populateJavascriptEnvironment:] in libPods.a(UIWebView+UAAdditions.o)
  "_UANativeBridge_js", referenced from:
      -[UIWebView(UAAdditions) populateJavascriptEnvironment:] in libPods.a(UIWebView+UAAdditions.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

"Currently Registering" never goes away

"Currently Registering, will check cache state when current registration is complete" never goes away.

I was able to register my devices (development, tried 2 devices), but I cannot update registration (alias, re-register after removing all device tokens, etc) because the above message never goes away. Any time I try to register or update tags, or update alias, this message is logged, and the device is not registered or unregistered. It appears, looking at the source that this message comes from UAPush.m:

- (void)updateRegistration {
if (isRegistering) {
    UALOG(@"Currently registering, will check cache state when current registration is complete");
    return;
}
self.isRegistering = YES;

I'm not an objective-c developer, so I'm not certain, but that it sets self.isRegistering below, but checks just isRegistering above sets off an alarm to me - is this correct? Possibly something else going wrong?

ARC support

None of the UI files have exceptions for when ARC is enabled. This means that one has to make around 400+ little changes for the project to compile under ARC

fmdb files added to cocoapod.

You have introduced copy of fmdb libraty with your's prefix UA_fmdb. But It seems that you have forgot to exclude original fmdb lib from pod spec.
Simple adding 'files.exclude(//fmdb//)' should fix the issue here.

Warnings in Common code for iOS7

Hi UrbanAirship! Loving your service!

In my projects I have a zero warning policy, like every developer should. That is not too hard to do in my own code, it gets more annoying when it is in a third party library.
UrbanAirship iOS SDK is one of those. (I don't include the UI code, relieving me of about 35 warnings.)

In iOS7, the CLLocationManager property 'purpose' is deprecated, and has been replaced by a key in the Info.plist.

I am not into your code, so I would like to ask for an update of the SDK to fix this warning.
I think it will be not backward compatible: -[UABaseLocationprovider setPurpose:] can't do its functionality, so it is rendered useless. So I do understand it can't be put in 3.0.x. But I see even master (4.0.0?) has it.

Looking forward to a fix,

Me

Question about logic behind implementation of displayStoreFront:animated: in UAStoreFrontUI

I was wondering whether someone might be able to explain why displayStoreFront:animated: in ios-library/Airship/UI/Default/StoreFront/Classes/Shared/UAStoreFrontUI.m, rather than simply presenting a modal view controller on iPad, a new window is created, the Urban Airship view controller's view is added to it, and it is made the key window? As a result the view pops onto the screen instead of animating as it does on iPhone and this technique causes issues in the view controller hierarchy of the invoking context for view controllers that implement viewDidAppear:.

Thanks

Settings.bundle content being replaced by UA Settings.bundle

After updating to 5.0.0, we noticed that our Settings.bundle content is no longer appearing in iOS Settings.app. In it's place, we find "Reset User Next Launch" and "ID" properties, which I traced back to the UA CocoaPod library.

This happens in both iOS 7 and iOS 8. Updating the CocoaPod to 5.0.2 did not fix the problem.

ios simulator screen shot oct 5 2014 2 56 32 pm

Would you be open to supporting a CocoaPods podspec for just UA's Push capabilities?

The full UA SDK contains some code and other resources like XIBs that we don't use for basic push notifications. It would help improve build times by a modest amount to be able to omit these files. To achieve this, CocoaPods has "subspecs" which let you pull in smaller pieces of a project. For example, the AWS pod is broken up into subspecs for EC2, S3, STS, etc. The idea for UA is that CocoaPods users could write pod 'UrbanAirship-iOS-SDK/push', '~> 5.0'.

I edited a copy of the main UrbanAirship-iOS-SDK.podspec.json to pull in fewer resources and it worked well due the nice organization of the UA codebase. It was as simple as changing the source_files and resources fields:

"source_files": "Airship/{Common,External,Inbox,Push}/**/*.{h,m,c}",
"resources": "Airship/{Common,External,Inbox,Push}/**/*.{xib,jpg,png,bundle,strings}",

While I can maintain this on my own, I'd prefer to have it be part of the mainline podspec so it's synced with the official release and the structure of the codebase. Happy to send a PR if you're open to it.

(cc @crow - I see you added https://github.com/CocoaPods/Specs/blob/master/Specs/UrbanAirship-iOS-SDK/5.0.2/UrbanAirship-iOS-SDK.podspec.json)

embedded FMDB categories conflict when using FMDB as well (through cocoapods)

See here:

d: warning: instance method 'columnExists:columnName:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'getTableSchema:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'getSchema' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'tableExists:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'dateForQuery:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'dataForQuery:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'doubleForQuery:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'boolForQuery:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'longForQuery:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'intForQuery:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category
ld: warning: instance method 'stringForQuery:' in category from /Users/mwawrusch/Library/Developer/Xcode/DerivedData/Modeista-aggqgbfoffpczddhqaqwlhupqhzs/Build/Products/Debug-iphoneos/libPods.a(FMDatabaseAdditions-31B78ED446233EBB.o) conflicts with same method from another category

Object being released too soon in UAStoreKitObserver?

In my crash logs (live app on the store), I've noticed the following stack trace 2-3 times. The "NSCFString" part is changed out randomly with various objects, and the crash is always "unrecognized selector" -- sounds to me like something is being released too soon and the object space is filled with another object.

I can look into this more, but I just wanted to log it as an issue here.

I am using the static lib 1.0.5.

NSInvalidArgumentException: -[NSCFString transactionState]: unrecognized selector sent to instance 0x4642180
Msg: iPhone2,1 ; iOS4.2.1

-UAStoreKitObserver finishTransaction:
-UAStoreFrontDownloadManager verifyDidSucceed:
-UAStoreFrontDownloadManager requestDidSucceed:
-UADownloadManager downloadDidFinish:
-UA_ASIHTTPRequest requestFinished

Support for iOS8 in other branch?

It seem like you have plan to support iOS8 Notification Action, as seem to indicate [UAPush createUserNotificationSettings:types]
But this method set the categories to nil?

Do you have plan to support categories registration and action?
I would rather not implement your previous action support, and would like to just be able to add some categories to the registration.

Thank you

Crash on UAObservable.m line 56 -[ UAObservable notifyObservers:]

Hi

I'm getting a crash when - (void)registerDeviceTokenSucceeded:(UA_ASIHTTPRequest *)request calls the observer delegates at [UAObservable notifyObservers]

Thread 0

0    libobjc.A.dylib    objc_msgSend + 15
1    CoreFoundation -[NSObject performSelector:] + 38
2    Myapp ✭   UAObservable.m line 56-[ UAObservable notifyObservers:] + 56
3    Myapp     UAirship.m line 383 -[UAirship registerDeviceTokenSucceeded:] + 383
4    CoreFoundation -[NSObject performSelector:withObject:] + 42
5    Myapp   UA_ASIHTTPRequest.m line 2016 -[UA_ASIHTTPRequest reportFinished] + 2016

Thread 5

0    libsystem_kernel.dylib mach_msg_trap + 20
1    CoreFoundation __CFRunLoopServiceMachPort + 126
2    CoreFoundation __CFRunLoopRun + 882
3    CoreFoundation CFRunLoopRunSpecific + 300
4    CoreFoundation CFRunLoopRun + 98
5    Myapp   UA_ASIHTTPRequest.m line 4790 +[UA_ASIHTTPRequest runRequests] + 4790
6    Foundation -[NSThread main] + 72
7    Foundation __NSThread__main__ + 1048
8    libsystem_c.dylib

The observer is my main app delegate so it hasn't been deallocated.

This was noticed on:

iPad2,4 (the new 32nm iPad2)
Running 5.1.1

App was built with 5.1 targeting 5.0 with libUAirship-1.2.2 (armv7/386 only - I stripped the armv6 as I don't need it)

There are other network threads running at the same time, not any that use ASIHTTPRequest.

The signal was a SIGSEGV.

Any ideas?

thanks
James

Crash in UA_ASIHTTPRequest runRequests

In the subscription lib/feature implementation the app gets crash at following line.

13 SubscriptionSample 0x0001e786 +[UA_ASIHTTPRequest runRequests]

The crash is at line (UA_ASIHTTPRequest.m:4790).

Undefined symbols "_logging" on iOS 6 simulator

I had the UA lib working fine, today I updated it to 1.3.7 for iOS 6, then I got the error

Undefined symbols for architecture i386:
"_logging", referenced from:
-[UALocationSettingsViewController viewDidLoad] in UALocationSettingsViewController.o
-[UALocationSettingsViewController getLocationPressed:] in UALocationSettingsViewController.o
-[UALocationSettingsViewController tableView:cellForRowAtIndexPath:] in
....

but when I archived an adhoc build with v1.3.7 it worked. very strange. any idea? thanks

Steps to add Content over iTunes as well UrbanAirShip

Hello,

I am able to integrate UrbanAirShip for In-app Purchase in my Newsstand application.Everything is working fine including the APNS from UA too. But can anybody show me the steps to add the IAP/subscription content at iTunes as well as configuring UrbanAirship ?
Though I have added the content, but still the application only shows the Free Content & not able to display Paid content under the UAStore. I am able to get it where I have been missing for it. Since the Store only displays the Free Content.

Below are the points which I have taken care of :

  1. AppID doesn't contain any * (wild character).
  2. Added new application over iTunes
  3. Product Identifier is same over UA as iTunes Connect.
  4. Testing on Device

Thanks,

IAP: Download timeout retry fails

If an in-app-purchase download fails UADownloadManager downloadDidFail:, the download manager attempts to retry the download by calling:

174     [self download:content]

but this falls on the floor because download checks if there is already a download in progress:

227     if((downloadContent.downloadFileName != nil) && [self isDownloading:downloadContent]) { 
228         UALOG(@"Warning: %@ is downloading.", downloadContent.downloadFileName);
229         return;
230     } 

So then my app is stuck in the downloading state, since it's gotten no indication that anything has gone wrong.

I'm not sure what the correct solution is.

Please don't fast return from a method where we pass a success and failure block

On line 113 of UAInboxMessageList, you are fast returning from the method if no default user has been created, despite the fact that you provide the caller a failure block where an error can come back.

The problem is I am using a increment/decrement counter strategy to keep the application networking indicator up to date, and I am relying on getting one of those call backs.

I realize the documentation states this is a no op, but as a user of the API, I would expect this to be an error, not a no op.

Dispatch Async via GCD can cause unstable behaviour

In the new UA 2.0 (It worked in 1.x) if you load it via GCD in a dispatch_async call, even if you put it on the main queue. It seems to crash for no reason even though everything is loaded.

I get the following error:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* setObjectForKey: object cannot be nil (key: gena)'

It is triggered when the TakeOff Method is called.

The following code triggers it. I fixed it by taking it out of the dispatch block and into the main block for the didFinishLaunchingWithOptions Method.

 //Add onto main thread queue to excute asyncrously and to prevent Urban Airship Crashing
dispatch_async(dispatch_get_main_queue(), ^{
//Load Urban Airship
DLog(@"Loading Urban Airship...");

// Disable Push
[[UAPush shared] setPushEnabled:NO];

// Populate AirshipConfig.plist with your app's info from https://go.urbanairship.com
// or set runtime properties here.
UAConfig *config = [UAConfig defaultConfig];

config.developmentAppKey = UADevelopmentKey;
config.developmentAppSecret = UADevelopmentSecret;
config.productionAppKey = UAProductionKey;
config.productionAppSecret = UAProductionSecret;
config.detectProvisioningMode = YES;

#ifdef DEBUG
config.clearKeychain = YES;
#endif

// Call takeOff (which creates the UAirship singleton)
[UAirship takeOff:config];

DLog(@"Finished Loading Urban Airship");
});

Uncaught exception in UA_ASIAuthenticationDialog show

One of our users had this crash occur 4 times (3 times in 1 minute), though I haven't been able to reproduce it myself. This user is on an iPhone 4 using iOS 5.1.1. The exception occurs when UA attempts to display a modal dialog. We're using version 1.3.3 of libUAirship

Relevant stack trace:

Exception Type:  SIGABRT
Exception Codes: #0 at 0x3187d32c
Crashed Thread:  0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from <UA_ASIAutorotatingViewController: 0x6e04c0> to <UA_ASIAuthenticationDialog: 0xe025d80> while a transition is already in progress. Wait for viewDidAppear/viewDidDisappear to know the current transition has completed'
Last Exception Backtrace:
0   CoreFoundation                      0x376c688f ___exceptionPreprocess + 163
1   libobjc.A.dylib                     0x353cb259 _objc_exception_throw + 33
2   CoreFoundation                      0x376c6789 +[NSException raise:format:] + 1
3   Foundation                          0x37f053a3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 91
4   UIKit                               0x3147c971 -[UIWindowController transition:fromViewController:toViewController:target:didEndSelector:] + 181
5   UIKit                               0x3147c367 -[UIViewController presentViewController:withTransition:completion:] + 3123
6   UIKit                               0x314d76a7 -[UIViewController presentModalViewController:animated:] + 31
7   Anghami                             0x00322307 -[UA_ASIAuthenticationDialog show] (UA_ASIAuthenticationDialog.m:312)
8   Anghami                             0x00321321 +[UA_ASIAuthenticationDialog presentAuthenticationDialogForRequest:] (UA_ASIAuthenticationDialog.m:72)
9   CoreFoundation                      0x37654eef +[NSObject performSelector:withObject:] + 43
10  Foundation                          0x37f40747 ___NSThreadPerformPerform + 351
11  CoreFoundation                      0x3769aad3 ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
12  CoreFoundation                      0x3769a335 ___CFRunLoopDoSources0 + 365
13  CoreFoundation                      0x37699045 ___CFRunLoopRun + 653
14  CoreFoundation                      0x3761c4a5 _CFRunLoopRunSpecific + 301
15  CoreFoundation                      0x3761c36d _CFRunLoopRunInMode + 105
16  GraphicsServices                    0x33ddb439 _GSEventRunModal + 137
17  UIKit                               0x313c8cd5 _UIApplicationMain + 1081
18  Anghami                             0x000032cf main (main.m:13)
19  Anghami                             0x00003280 start + 40

UALandingPage has an error urlEncodedStringWithEncoding

Hi ,

I have downloaded the latest SDK for iOS (4.0.0) with podspec from cocoapods. I am getting an error on your library file. UALandingPage.m has an error on urlEncodedStringWithEncoding.
Please check this error and solve it.

Broken protocols.

version = 1.0.5
In the UAInboxMessageListObserver protocol defined optional methods:

This method never called from library:

  • (void)inboxCreatedWithUser:(NSString_)user andPassword:(NSString_)password;

    This OK:

  • (void)singleMessageMarkAsReadFinished:(id)m;
    but this never called:

  • (void)singleMessageMarkAsReadFailed:(id)m;
    Instead in UAInboxMessage.m:

  • (void)markAsReadFailed:(UA_ASIHTTPRequest*)request
    {
    [self requestWentWrong:request];
    [inbox notifyObservers:@selector(markAsReadFailed:) withObject:self];
    }

singleMessageMarkAsReadFailed???

This one is never called:

  • (void)newMessageArrived:(id)message delegate:(id)delegate;

Thanks.

Issue with UA_ASIHTTPRequest?

I am seeing several iPhone 4S's with iOS 5.0.1 crashing with SIGSEGV (SEGV_ACCERR):

0 libobjc.A.dylib 0x315d0fbc objc_msgSend + 15
1 Schools 0x00054d5f -UA_ASIHTTPRequest handleStreamError
2 Schools 0x0005518b -UA_ASIHTTPRequest scheduleReadStream
3 Foundation 0x31a21943 NSFireDelayedPerform + 414
4 CoreFoundation 0x37ac4a63 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
+ 14
5 CoreFoundation 0x37ac46c9 __CFRunLoopDoTimer + 364
6 CoreFoundation 0x37ac329f __CFRunLoopRun + 1206
7 CoreFoundation 0x37a464dd CFRunLoopRunSpecific + 300
8 CoreFoundation 0x37a463a5 CFRunLoopRunInMode + 104
9 GraphicsServices 0x375c4fcd GSEventRunModal + 156
10 UIKit 0x34ed6743 UIApplicationMain + 1090
11 Schools 0x0002686f -NotificationsViewController tappedModelRowAtIndexPath:

It looked like some work was done on UA_ASIHTTPRequest recently (problems with ASIHTTPRequest). I don't use the latter, but I have Crittercism (3.0.7rc) & they might.

Badge doesn't reset

Some of our users had experience that the badge keeps incrementing even though they open and closed the app.

I've manage to replicate it with the version (3.0.1). I'm not actually sure how I did it, but I tried to push with bad connection and also at the same time app goes to foreground.

runRequest:withData:succeedWhere:retryWhere:onSuccess:onFailure:forcefully: in UADeviceAPIClient is called but non of the callback blocks get called.

Log:
[D] -[UAInboxMessageList retrieveMessageListWithSuccessBlock:withFailureBlock:] [Line 119] Retrieving message list.
[D] -[UAInboxMessageList loadSavedMessages] [Line 110] Loaded saved messages: (
).
[D] -[UAPush setBadgeNumber:] [Line 383] Change Badge from 30 to 0
[D] -[UAPush setBadgeNumber:] [Line 391] Sending autobadge update to UA server.
[D] -[UADeviceAPIClient registerWithData:onSuccess:onFailure:forcefully:] [Line 139] Running device registration.
[D] void PrintReachabilityFlags(SCNetworkReachabilityFlags, const char *) [Line 79] Reachability Flag Status: -R -----l- networkStatusForFlags
[D] -[UADeviceAPIClient registerWithData:onSuccess:onFailure:forcefully:] [Line 139] Running device registration.
[D] -[UADeviceAPIClient runRequest:withData:succeedWhere:retryWhere:onSuccess:onFailure:forcefully:] [Line 128] Ignoring duplicate request.
[D] __75-[UAInboxMessageList retrieveMessageListWithSuccessBlock:withFailureBlock:]_block_invoke70 [Line 140] Retrieve message list succeeded with messages: (
)

<AirshipKit/AirshipLib.h> file not found

Hi guys,

I just updated (pod update) my urbanairship library and it broke the app for the most part. Its saying <AirshipKit/AirshipLib.h> file not found, which was imported in AirshipKit.h

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.