iOS FAQs
General Questions
Is Xcode 11 and/or iOS 13.x libraries supported?
Yes, however before you build your iOS app with Xcode 11 (or with iOS 13.x libraries), you are required to integrate your iOS mobile app with Responsys SDK version 6.42.1 or later.
Why is this upgrade required?
If you build your app with Xcode 11 or iOS 13.x libraries and do not integrate your iOS app with Responsys SDK version 6.42.1 or later, your iOS mobile app users will not receive Push Notifications from Responsys. Xcode 11 and iOS 13.x libraries break the method used by Push Notification SDKs like the Responsys Push SDK to obtain a Push Notification token for apps.
By when do I need to upgrade my mobile app?
We recommend that you immediately upgrade your iOS app to use Responsys SDK version 6.42.1 or later. In doing so, you can ensure that your app will have the prerequisites required to build your app with Xcode 11 or iOS 13.x libraries and will avoid issues when upgrading to the latest Xcode versions.
iOS SDK Download Links:
As always, we recommend that you use the latest version of our Push SDKs when managing your Mobile solution. For questions, contact Oracle Support.
I received an email about PEM file expiration. What should I do?
Responsys sends email reminders before a PEM file used by an iOS app is about to expire. This allows Mobile App Developers to update the PEM file in the system. The email is sent to Account Primary Contacts and to the Responsys user who added the mobile app using the Mobile App Developer Console. PEM file expiration reminders are sent 30 days in advance, and if the file is not updated, they will repeat at 14 days and 7 days before the expiration date. If you prefer an authentication method without an expiry date, seeGenerating an APNs Auth Key to learn about Authentication Keys.
When you receive one of these emails, follow the instructions for logging into Responsys given in the email. Next, follow the instructions in one of the following topics, depending on the type of PEM file you need to update:
Important: If the PEM file expires, Responsys will be unable to send any Mobile App Channel campaigns to the mobile app users. This also impacts campaign launches scheduled or triggered through the Responsys Web Services API.
How do you retrieve the Device ID?
SDK puts several logs in the console when an app runs on a device using XCode. You can find the Device ID from the console log when an app runs on the device.
Sample Log:2022-02-15 21:36:02.876354+0530 Appnamet[1500:421084] [PushIOManager] Device ID: 2F8318BE-C42D-42BC-A220-5CEEDD5B8E01
To set the log level to verbose, see Debugging & Logging.
Also, an application calls the SDK API to get the Device ID and show it in the UI or any other format. Following are the APIs to access the Device ID:
NSString *deviceId = [[PushIOManager sharedInstance] getDeviceID];
let deviceID = PushIOManager.sharedInstance().getDeviceID
For more information, refer to Upgrade Guide.
Troubleshooting
Enabling Push Notification Capability
Error:[PushIOManager] Push token error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
Solution: Enable Push Notifications from Capabilities tab.
Adding linker flags
Error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString isBlank]: unrecognized selector sent to instance 0x10010d780'
Solution: Add other linker flags: -ObjC -all_load (in build settings)
Application Deployment Target Setting
Warning: object file (/../PushIOManager.framework/PushIOManager) was built for newer iOS version (8.0) than being linked (7.0)
Solution: SDK supports only iOS 8.0 onwards. Please update the application deployment target (8.0 minimum) to avoid this warning.
Media Attachment
Error: Undefined symbols for architecture arm64: "OBJC_METACLASS$_PIOMediaAttachmentServiceExtension", referenced from: OBJC_METACLASS$_NotificationService in NotificationService.o "OBJC_CLASS$_PIOMediaAttachmentServiceExtension", referenced from: OBJC_CLASS$_NotificationService in NotificationService.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Solution: Build Error :Select the target from the 'Target Panel'.Select the extension target.Click the general tab. Under linked frameworks and binaries check if the ‘PIOMediaAttachmentExtensionFramework’ is added. If not, drag the framework under the ‘linked frameworks and binaries’ heading.
Error: Application build is successful but crashes at launch. Debug log shows :
dyld: Library not loaded: /System/Library/Frameworks/UserNotifications.framework/UserNotifications Referenced from: /var/containers/Bundle/Application/.../HelloMediaNotifications.app/HelloMediaNotifications Reason: image not found (lldb)
Solution: This issue is encountered in devices running iOS versions below iOS 10.
Select the application target from the 'Target Panel'.Click the general tab. Remove the ‘PIOMediaAttachmentExtensionFramework’ from the ‘linked frameworks and binaries’ section to resolve the issue.
Error: /Users/………/Applications/HelloMediaNotifications.app/Frameworks/PIOMediaAttachmentExtension.framework: bundle format unrecognized, invalid, or unsuitable
Solution: This issue is encountered in devices running iOS versions below iOS 10.
Select the application target from the 'Target Panel'. Remove the ‘PIOMediaAttachmentExtensionFramework’ from the ‘embedded binaries’ section to resolve the issue.
Issue: Appstore Validation Error with PIOMediaAttachmentExtension.xcframework. This issue is caused due to an existing bug for nested frameworks in Xcode.
Solution: Please follow the below steps.
Note: This solution has been verified with Xcode 13.
-
Remove the Existing ‘PIOMediaAttachmentExtension.xcframework’ framework.
-
Drag and Drop ‘PIOMediaAttachmentExtension.xcframework’ in Frameworks Folder and only select the MAIN App TARGET (Unselect the media extension target).
-
Select Embed Without Singing in Main App Target for ‘PIOMediaAttachmentExtension.xcframework’ framework.
-
No framework will be added in Extension Target.
-
Archive and Build the app.
-
Verify the Rich Push is working.
Registration Completion Handler
Issue: Completion handler for 'registerForAllRemoteNotificationTypes' is not being called.
Solution: Ensure that PushIOManager Callbacks are implemented as follows in the AppDelegate.m file:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:
(NSData *)deviceToken
{
[[PushIOManager sharedInstance] didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
[[PushIOManager sharedInstance] didFailToRegisterForRemoteNotificationsWithError:error];
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
PushIOManager.sharedInstance().didRegisterForRemoteNotifications(withDeviceToken: deviceToken)
}
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
PushIOManager.sharedInstance().didFailToRegisterForRemoteNotificationsWithError(error)
}
Displaying Alerts While the App Is Running
Issue: When testing the mobile app on iOS, the push notification does not display while the app is running.
Solution: This is the expected default behavior. If you would like push notifications to display while the app is running, modify your mobile app as described in Displaying Alerts While App Is Running.
SDK Size Details
What is the size of Responsys Mobile SDK?
-
SDK on Disk Size
Framework | XCFramework |
---|---|
54.1 MB | 7.1 MB |
-
Memory Size ( Approx max size)
Framework | XCFramework |
---|---|
11.87 MB | 5 MB |
What is the size of OCXResponsys Mobile SDK?
-
SDK on Disk Size
Framework | XCFramework |
---|---|
13.3 MB | 7.7 MB |
-
Memory Size ( Approx max size)
Framework | XCFramework |
---|---|
5.4 MB | 5.3 MB |
What is the size of PIOMediaAttachment SDK?
-
SDK on Disk Size
Framework | XCFramework |
---|---|
434 KB | 298 KB |
-
Memory Size ( Approx max size)
Framework | XCFramework |
---|---|
85.56 KB | 117 KB |
What is the size of PIOContentExtension Mobile SDK?
-
SDK on Disk Size
Framework | XCFramework |
---|---|
3.1 MB | 546 KB |
-
Memory Size ( Approx max size)
Framework | XCFramework |
---|---|
627.67 KB | 285 KB |
Note: PushIOManager Frameworks contribute approximately 300 KB to IPA file size.