iterable / swift-sdk Goto Github PK
View Code? Open in Web Editor NEWIterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
Home Page: https://iterable.com/
License: MIT License
Iterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
Home Page: https://iterable.com/
License: MIT License
I updated to the latest XCode release version 10.2 (10E125) today, and we're getting some build errors from the Iterable-iOS-SDK
pod (v6.0.6) now when we build our project. Can you get out a new release that fixes these errors?
It looks like the compiler is flagging the typedefs created in the IterableConstants.h file. Since one of those has the _Nullable type applied to it, it expects that all of the other typedefs in that file have either _Nullable or _Nonnull applied to them. So to fix this, we just modified line 24 to remove the use of _Nullable:
typedef void (^OnFailureHandler)(NSString *reason, NSData * data);
Of course the other fix would be to apply _Nullable or _Nonnull correctly in that file on all the typedefs, but I'll leave that to you to determine how you want to fix it.
Hi, I'm working on Mobile Inbox feature for our app. I have issue with presentation style when user selects a message in the inbox. Can you make setModalPresentationStyle(for viewController: UIViewController) in IterableInboxViewController public or provide a way how to change the presentation style? I need to use .overCurrentContext
value
When I tried to download sdk via carthage, project itself failed to compile.
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal armv7
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(4 failures)
Hello,
It could be possible to change the name of the class LogLevel since we have a conflict with another class in other SDK, we noticed that Google Analytics has defined their log level class as GAILogLevel so I wonder if you could do something similar, since we added Iterable SDK we have this conflict with another SDK from Nordic Semiconductor which we have been using since last year, we just added Iterable SDK to our project so it would be great if you could add that change, we will appreciate.
Describe the bug
The package is not compiling on Xcode 13 beta 3, shows this error: 'shared' is unavailable: not available on iOS (App Extension) - Use view controller based solutions where appropriate instead
Steps to reproduce the behavior:
Open your project using Xcode 13 beta 3
Clean project
Build Project
See error
Expected behavior:
Package compiles successfully
Versions
Xcode: 13.0 beta 3 (13A5192j)
Mac OS: 11.4
Library Version: 6.5.6
Additional context
There is a thread here https://forums.swift.org/t/set-application-extension-api-only-on-a-spm-package/39333/17 which explains the issue.
We ignore ghost push notifications to prevent inaccurate data in our internal analytics, but after updating the SDK, getPushMetadata and its isGhostPush var aren't available. Has this been moved or is the only way to get this information parsing the payload manually?
When adding Iterable using SPM, I get the following erros when trying to build:
Use of undeclared type 'UIUserInterfaceIdiom'
Use of undeclared type 'UIDevice'
Looks like UIKit import is missing?
I've attached a test project where I just added your package.
When running on a physical device, all works fine.
But when trying to run on simulator using M1 Apple Silicon processor and getting an error:
Could not find module 'IterableAppExtensions' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator
Xcode 12.5.1
Side note: my colleague runs on the same Xcode but with Intel processor and it works fine on the simulator.
Attempting to use Iterable using a Sub-project (We have a main app, then a "Networking" app), however, when attempting to use Iterable, end up with the error
'shared' is unavailable in application extensions for iOS: Use view controller based solutions where appropriate instead.
Was hoping for a fix
NOTES:
When I attempt to archive my app for a simulator, to upload to Saucelabs for automated UI testing, the build fails.
Command: xcodebuild -scheme Pinseeker -project ./Project.xcodeproj -configuration Adhoc -derivedDataPath scan_derived_data -destination 'platform=iOS Simulator,name=iPhone 13' -archivePath archives/simulator_build/Project.simulator\ 2022-02-10\ 17.43.43.xcarchive archive
Errors:
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'IterableSDK' from project 'IterableSDK')
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler (in target 'IterableSDK' from project 'IterableSDK')
CompileSwift normal i386 (in target 'IterableSDK' from project 'IterableSDK')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'IterableSDK' from project 'IterableSDK')
❌ /Users/me/GitHub/pinseeker-ios/scan_derived_data/spm/checkouts/swift-sdk/swift-sdk/swiftui/InboxViewRepresentable.swift:22:40: cannot find type 'Context' in scope
func makeUIViewController(context: Context) -> IterableInboxViewController {
^~~~~~~
❌ /Users/me/GitHub/pinseeker-ios/scan_derived_data/spm/checkouts/swift-sdk/swift-sdk/swiftui/InboxViewRepresentable.swift:34:91: cannot find type 'Context' in scope
func updateUIViewController(_ uiViewController: IterableInboxViewController, context: Context) {
^~~~~~~
❌ /Users/me/GitHub/pinseeker-ios/scan_derived_data/spm/checkouts/swift-sdk/swift-sdk/swiftui/InboxViewRepresentable.swift:11:32: cannot find type 'UIViewControllerRepresentable' in scope
struct InboxViewRepresentable: UIViewControllerRepresentable {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❌ /Users/me/GitHub/pinseeker-ios/scan_derived_data/spm/checkouts/swift-sdk/swift-sdk/swiftui/IterableInboxView.swift:73:27: cannot find type 'View' in scope
public var body: some View {
^~~~
❌ /Users/me/GitHub/pinseeker-ios/scan_derived_data/spm/checkouts/swift-sdk/swift-sdk/swiftui/IterableInboxView.swift:11:34: cannot find type 'View' in scope
public struct IterableInboxView: View {
I am trying to understand how I can use NoneLogDelegate
, so that I can turn Iterable logging off as appropraite. When in my AppDelegate I write
let iterableConfig = IterableConfig()
iterableConfig.logDelegate = NoneLogDelegate()
I get the error
'NoneLogDelegate' initializer is inaccessible due to 'internal' protection level
Is there a different way of initializing an IterableConfig
object with a NoneLogDelegate
to avoid this issue?
I get the below error on my xcode console when iterable is initialised with apns token.
IterableAPIInternal:defaultOnFailure(identifier:):630: registerToken failed:, Unable to find a push integration set up for application xx on APNS_SANDBOX, got response {"msg":"Unable to find a push integration set up for application xx on APNS_SANDBOX","code":"BadParams","params":null}
The resulting fat universal binary is missing simulator architectures from all frameworks for the past couple of months:
IterableSDK: Mach-O universal binary with 2 architectures: [arm_v7:Mach-O dynamically linked shared library arm_v7] [arm64]
IterableSDK (for architecture armv7): Mach-O dynamically linked shared library arm_v7
IterableSDK (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64
Note the absence of i386 and x86_64.
scripts/build-target-module-framework.sh is failing to trap/check error codes and lipo is failing with:
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: build/Release-iphonesimulator/IterableSDK.framework/IterableSDK and build/Release-iphoneos/IterableSDK.framework/IterableSDK have the same architectures (arm64) and can't be in the same fat output file
2 should be quick temporary solution until 3 can be done and should only impact folks with DTK/arm64 mac who try to use the simulator.
3 would additionally address the issue with DTK/arm64 macs, but might have a larger impact on all the current consumers of the frameworks forcing them to upgrade their toolchains and adjust their projects etc.
And of course both 2 and 3 could be done for maximum compatibility for some time, giving users a chance to migrate to the newer xcframework builds once available.
Getting this error when building as a static library. Using e.g #import IterableConstants.h
works as expected.
Is there something blocking you from converting these remaining bits of ObjC to Swift?
Carthage cannot build the latest version of the Iterable framework due to an archiving issue. Here is the Carthage log:
/usr/bin/xcrun xcodebuild -workspace /Users/gbrixey/Code/iOS/Carthage/Checkouts/swift-sdk/swift-sdk.xcworkspace -scheme ios9-tests -configuration Release -derivedDataPath /Users/gbrixey/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/swift-sdk/6.0.7 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/2c/hns7b5pj0szcl4sb4dpsddym0000gp/T/swift-sdk SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/gbrixey/Code/iOS/Carthage/Checkouts/swift-sdk)User defaults from command line:
IDEArchivePathOverride = /var/folders/2c/hns7b5pj0szcl4sb4dpsddym0000gp/T/swift-sdk
IDEDerivedDataPathOverride = /Users/gbrixey/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/swift-sdk/6.0.7
Build settings from command line:
CARTHAGE = YES
CLANG_ENABLE_CODE_COVERAGE = NO
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
ONLY_ACTIVE_ARCH = NO
SDKROOT = iphoneos12.2
SKIP_INSTALL = YES
STRIP_INSTALLED_PRODUCT = NO
note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: An empty identity is not valid when signing a binary for the product type 'Application'. (in target 'host-app')
** ARCHIVE FAILED **
Perhaps the host-app
target should not be part of the Archive step for the swift-sdk scheme.
Hello, I have successfully integrated Iterable-iOS-SDK, but when I tried to send push messages [Message Medium (Push)], if APP was running in the foreground(UIApplicationStateInactive), it found that the method of calling Iterable had no UI effect, received messages but did not show the UI, does SDK support this kind of display at present?
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler
{
[IterableAppIntegration application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
}
I tried to see the effect of SDK implementation, that in the active state, they are all direct breaks.
IterableAppIntegration:
func application(_ application: ApplicationStateProviderProtocol, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: ((UIBackgroundFetchResult)->Void)?) {
…..
switch application.applicationState {
case .active:
break
case .background:
break
…..
}
About 1/2 of my production crashes right now are from my app hanging on startup, on this line of code which is called when starting the Iterable SDK:
https://github.com/Iterable/swift-sdk/blob/master/swift-sdk/Internal/IterableAppIntegrationInternal.swift#L29
(I have to add, your spelling of semaphore
is not inspiring a lot of confidence, lol.)
This affects less than 0.5% of my sessions, but it is still high enough to get my attention. Crashes occur on iPhone & iPad devices running various versions of iOS 14 & 15. My app was running Iterable iOS SDK v6.3.3 for all of these crashes.
Here is a full stack trace from my crash reporter:
App Hang: The app was terminated while unresponsive
0 libsystem_kernel.dylib _semaphore_wait_trap
1 libdispatch.dylib __dispatch_sema4_wait
2 libdispatch.dylib __dispatch_semaphore_wait_slow
3 Trala notificationsEnabled.get (IterableAppIntegrationInternal.swift:29:24)
4 Trala notificationsEnabled.get (<compiler-generated>)
5 Trala register (InternalIterableAPI.swift:152:31)
6 Trala register (IterableAPI.swift:208:33)
7 Trala application (AppDelegate.swift:126:21)
8 Trala application (<compiler-generated>)
9 libdispatch.dylib __dispatch_call_block_and_release
10 libdispatch.dylib __dispatch_client_callout
11 libdispatch.dylib __dispatch_main_queue_callback_4CF
12 CoreFoundation ___CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
13 CoreFoundation ___CFRunLoopRun
14 CoreFoundation _CFRunLoopRunSpecific
15 GraphicsServices _GSEventRunModal
16 UIKitCore -[UIApplication _run]
17 UIKitCore _UIApplicationMain
18 Trala main (main.swift:29:1)
19 <unknown> 0x105315a20
Please let me know if you need more info.
Hi,
I have a question regarding ordering of in-app messages sent to a user. The docs mention that in-app messages are stored in a queue, which would imply a first in, first out (FIFO) behavior.
Let's say I send three in-app messages to user A, in the following order: M1
, M2
, M3
.
If I then do this: IterableAPI.inAppManager.getMessages().first
, which message would that be? The one that the user received first (M1), or the last one sent (M3)?
Thanks
Viktor
Following up from the discussion over on the Android SDK side of things (see here: Iterable/iterable-android-sdk#223), it would appear as though the Swift SDK is not adhering to the API contract that campaignId
is a long
.
When we receive an In-App message from a campaign, using an SSL proxy I can clearly see the campaignId
coming over as a naked number, but the SDK is trying to decode it as a String
. I am confident this is causing all messages received to have empty campaign ID strings. At least, it has been the case with all the messages I have tested with.
IterableInAppMessage
object.clientId
via your proxy.IterableInAppMessage
object with Xcode.IterableInAppMessage
clientId
is correct.IterableInAppMessage
clientId
is always an empty string.6.1.2
Hi
I see in the documentation that ios9 is supported
But when I added UNNotificationServiceExtension, it cannot run on ios9 devices.
I know that UNNotificationServiceExtension can only be run on devices after ios10, so the documentation does not lack the minimum version support instructions for UNNotificationServiceExtension? Still, there are some special settings for ios9 devices I haven't done right.
As the title states. Apple will start rejecting apps still using this. Below is the email I received.
We identified one or more issues with a recent delivery for your app, ________ . Your delivery was successful, but you may wish to correct the following issues in your next delivery:
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.
After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.
Best regards,
The App Store Team
After updating to Xcode 12, on startup now getting this error on iOS 14 devices:
Fatal error: authProvider is missing: file IterableSDK/ApiClient.swift, line 222
@objcMembers
public class IterableHtmlInAppContent : NSObject, IterableInAppContent, Codable {
is throwing the error:
Type 'IterableHtmlInAppContent' does not conform to protocol 'Decodable'
Looks like the init function needs to be change. I am on Swift 4 with XCode Version 10.1. This is for Iterable-iOS-SDK 6.1.0-beta3.
+[IterableSDK.IterableAPI updateSubscriptions:unsubscribedChannelIds:unsubscribedMessageTypeIds:subscribedMessageTypeIds:campaignId:templateId:]: unrecognized selector sent to class 0x11311e040
(null)
Hey gang-- after updating to v6.2.4 (and the issue remains in 6.2.5), I am getting the crash above when I try to call the above method.
I note that recently you updated the name of this method to change the campaignIds
parameter to campaignId
which is fine, but although the header seems correct (and Xcode compiles my calling of its new name correctly), the method implementation seems not to be renamed (?)
This line of code below sets responds
to YES
telling me that perhaps the old declaration is still in the implementation. Note the compaignIds
parameter with the s
still on it like in the old versions:
BOOL responds = [IterableAPI respondsToSelector:@selector(updateSubscriptions:unsubscribedChannelIds:unsubscribedMessageTypeIds:subscribedMessageTypeIds:campaignIds:templateId:)];
I may be missing something really obvious, but could you have a quick look and see if you see anything that might explain my crash? Thank you.
please remove public
from extension UIColor
as you conflicting with other implementations out there
Is there any way to get static framework of Iteratable instead of dynamic.
My purpose is to create a static library including iteratable framework.
I could not able to use iteratable dynamic framewok. So please share the static framework
In our application we are using Iterable version 'Iterable-iOS-SDK', '6.2.8' and we are seeing sporadic crashes. We can not reproduce the crash in a certain way. Currently we are not making any calls to [UIColor systemBackgroundColor]. After looking at the stack trace, we feel like Iterable SDK might be causing the issue.
We went over the list of release notes since there are newer version of the SDK however we haven't seen anything regarding this issue.
I was wondering if you guys had addressed such issue in the newer releases ? Any help would be appreciated.
Here's the stack trace (firebase - crashlytics)
Fatal Exception: NSInvalidArgumentException
[UIColor systemBackgroundColor]: unrecognized selector sent to class 0x23e240158 [NSOrderedSet orderedSetWithSet:]
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x204dfb180 __exceptionPreprocess
1 libobjc.A.dylib 0x203fd39f8 objc_exception_throw
2 CoreFoundation 0x204d1ca08 +[NSOrderedSet orderedSetWithSet:]
3 CoreFoundation 0x204e009c8 ___forwarding___
4 CoreFoundation 0x204e0265c _CF_forwarding_prep_0
5 IterableSDK 0x1023bcd38 (Missing)
6 IterableSDK 0x1023ca728 (Missing)
7 IterableSDK 0x1023d3898 (Missing)
8 IterableSDK 0x102408890 (Missing)
9 libdispatch.dylib 0x204838a38 _dispatch_call_block_and_release
10 libdispatch.dylib 0x2048397d4 _dispatch_client_callout
11 libdispatch.dylib 0x2047e7008 _dispatch_main_queue_callback_4CF$VARIANT$mp
12 CoreFoundation 0x204d8cb20 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
13 CoreFoundation 0x204d87a58 __CFRunLoopRun
14 CoreFoundation 0x204d86fb4 CFRunLoopRunSpecific
15 GraphicsServices 0x206f8879c GSEventRunModal
16 UIKitCore 0x23142ec38 UIApplicationMain
17 XoaInfoPlug1.dylib 0x1055ceb9c (Missing)
18 Project XXX 0x10040b840 main + 14 (main.m:14)
19 libdyld.dylib 0x20484a8e0 start
Hi,
I'm working to integrate this SDK in our app and I would like to have some more fine-grained feedback from the SDK on when in-app messages have finished displaying.
My use-case is this: We have a series of modal pop-ups in the app that may or may not display when the user logs in. We want to avoid displaying these modal pop-ups on top of each other, so each modal fires a callback when it is "done". It does this in two cases:
I would like to have the same functionality for Iterable in-app messages.
The documentation for release 6.0.6
says this:
To display the user's InApp notifications call spawnInAppNotification with a defined ITEActionBlock callback handler. When a user clicks a button on the notification, the defined handler is called and passed the action name defined in the InApp template.
A suggestion would be for this callback to be called even if there are no in-app messages to display. That way I know that when the callback has been called it is safe to continue displaying other modal pop-ups to the user.
I've seen that you're in the process of reworking how in-app messages work on the master
branch, so I would like for your new solution to be able to solve my use-case.
getting the below error when building
iOS sdk version 6.1.4
[09:20:31]: ▸ Copying IterableSDK.h
[09:20:36]: ▸ ❌ /Users/xx/platforms/ios/Pods/Iterable-iOS-SDK/swift-sdk/Internal/DeviceInfo.swift:57:15: type 'UIUserInterfaceIdiom' has no member 'mac'
[09:20:36]: ▸ case .mac:
[09:20:36]: ▸ ~ ^~~~~~~~~~~~~
Hi Iterable team,
I am working to update Iterable iOS SDK version to Swift project, At version 6.3.4, I encounter 2 warnings.
Could you help to resolve them?
2021-10-24 12:37:36.302653+0700 TiffsTreats[70452:6048708] ❤️ 12:37:36.3020:0x283194800:IterableCoreDataPersistence:createManagedObjectModel(fromBundle:):64: Could not find IterableDataModel.momd in bundle
2021-10-24 12:37:36.302883+0700 TiffsTreats[70452:6048708] ❤️ 12:37:36.3030:0x283194800:IterableCoreDataPersistence:create(fromBundle:):44: Could not initialize managed object model
Our swift project uses Cocoapods.
Would be nice to have complete instructions and it seems like there is something missing to get Action Buttons working.
Consider universal link www.example.com/samplePath.
When we create an email template with this link, Iterable check for AASA details and creates
mapping links2.example.com/12345 -> www.example.com/samplePath.
On clicking the rewritten link from email, app should be opened and we should get a call back in iterableURLDelegate method with original Url ie www.example.com/samplePath. As of now getting the mapped URL only, not the original one.
We have recently updated our project from using Carthage to using SPM for managing our dependencies.
We started with the Iterable SDK at version 6.2.10, because that's what we used under Carthage. Today, we updated to 6.2.13 and we got the following warning, under Resolve Package Graph
:
⚠️ found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
[DerivedDataRedacted]/SourcePackages/checkouts/swift-sdk/notification-extension/Info.plist
⚠️ found 1 file(s) which are unhandled; explicitly declare them as resources or exclude from the target
[DerivedDataRedacted]/SourcePackages/checkouts/swift-sdk/swift-sdk/Info.plist
I went back and checked each version between 6.2.10 and 6.2.13 inclusive and it appears that this was introduced with 6.2.12.
We like to run a zero-warning project if at all possible. What steps can I take on my side to resolve these warnings, outside of downgrading back to 6.2.11?
is there a way to have access to getInAppShowingWaitTimeInterval value? I need this value, but I couldn't find a way to get it
The track is not working with the latest SDK 6.1.0: i keep getting failure
2019-06-18 18:06:19.394765+0200 APP[328:11959] 💛 18:06:19.3940:IterableAppIntegration:userNotificationCenter(_:didReceive:withCompletionHandler:):39
2019-06-18 18:06:19.396186+0200 APP[328:11959] 💛 18:06:19.3950:IterableAppIntegrationInternal:userNotificationCenter(_:didReceive:withCompletionHandler:):166
2019-06-18 18:06:19.759885+0200 APP[328:12301] ❤️ 18:06:19.7580:IterableAPIInternal:defaultOnFailure(identifier:):611: trackPushOpen failed:, The operation couldn’t be completed. Software caused connection abort
Xcode 10.2 -> iOS 12.3.x, iOS 11.2.x
Hello, I've gone through the iOS integration guide a few times, and I'm still getting bad URL
errors for every request that the InterableSDK sends.
Details:
Here's what I see in the console in Xcode when filtering for "iterable" (some specifics replaced with generic strings):
2022-01-27 15:08:02.245900-0600 ApplicationName[1423:162685] 💛 15:08:02.2450:0x280a64840:InternalIterableAPI:init(apiKey:launchOptions:config:apiEndPointOverride:dependencyContainer:):521
2022-01-27 15:08:02.246370-0600 ApplicationName[1423:162685] 💛 15:08:02.2460:0x280a64840:InternalIterableAPI:start():537
2022-01-27 15:08:02.248341-0600 ApplicationName[1423:162685] ❤️ 15:08:02.2480:0x280a64840:IterableCoreDataPersistence:createManagedObjectModel(fromBundle:):63: Could not find IterableDataModel.momd in bundle
2022-01-27 15:08:02.248623-0600 ApplicationName[1423:162685] ❤️ 15:08:02.2480:0x280a64840:IterableCoreDataPersistence:create(fromBundle:):43: Could not initialize managed object model
2022-01-27 15:08:02.250546-0600 ApplicationName[1423:162685] 💛 15:08:02.2500:0x280a64840:InternalIterableAPI:checkRemoteConfiguration():617
2022-01-27 15:08:02.255050-0600 ApplicationName[1423:162685] 💛 15:08:02.2550:0x280a64840:InternalIterableAPI:setEmail(_:):99
), NSLocalizedDescription=bad URL, NSErrorFailingURLStringKey=https://api.iterable.com/api/mobile/getRemoteConfiguration?SDKVersion=6.4.1&systemVersion=15.2.1&packageName=com.companyName.ApplicationName&platform=iOS, NSErrorFailingURLKey=https://api.iterable.com/api/mobile/getRemoteConfiguration?SDKVersion=6.4.1&systemVersion=15.2.1&packageName=com.companyName.ApplicationName&platform=iOS, _kCFStreamErrorDomainKey=1}
2022-01-27 15:08:02.265379-0600 ApplicationName[1423:162945] ❤️ 15:08:02.2650:0x280a10ac0:InternalIterableAPI:checkRemoteConfiguration():625: Could not get remote configuration: bad URL, using saved value: false
), NSLocalizedDescription=bad URL, NSErrorFailingURLStringKey=https://api.iterable.com/api/inApp/[email protected]&SDKVersion=6.4.1&count=100&platform=iOS&systemVersion=15.2.1&packageName=com.companyName.ApplicationName, NSErrorFailingURLKey=https://api.iterable.com/api/inApp/[email protected]&SDKVersion=6.4.1&count=100&platform=iOS&systemVersion=15.2.1&packageName=com.companyName.ApplicationName, _kCFStreamErrorDomainKey=1}
), NSLocalizedDescription=bad URL, NSErrorFailingURLStringKey=https://api.iterable.com/api/inApp/getMessages?platform=iOS&packageName=com.companyName.ApplicationName&SDKVersion=6.4.1&count=100&systemVersion=15.2.1&[email protected], NSErrorFailingURLKey=https://api.iterable.com/api/inApp/getMessages?platform=iOS&packageName=com.companyName.ApplicationName&SDKVersion=6.4.1&count=100&systemVersion=15.2.1&[email protected], _kCFStreamErrorDomainKey=1}
), NSLocalizedDescription=bad URL, NSErrorFailingURLStringKey=https://api.iterable.com/api/users/registerDeviceToken?Api-Key=apiKey, NSErrorFailingURLKey=https://api.iterable.com/api/users/registerDeviceToken?Api-Key=apiKey, _kCFStreamErrorDomainKey=1}
Let me know if can provide any other details.
I am running Xcode 13.2 on both CI and on desktop.
When archiving my app with Iterable iOS SDK version 6.4.0 integrated using Swift Package Manager, either in CI or on desktop, I get the following compile errors (these errors were generated on CircleCI):
❌ /Users/distiller/project/Packages/checkouts/swift-sdk/swift-sdk/swiftui/InboxViewRepresentable.swift:22:40: cannot find type 'Context' in scope
func makeUIViewController(context: Context) -> IterableInboxViewController {
^~~~~
❌ /Users/distiller/project/Packages/checkouts/swift-sdk/swift-sdk/swiftui/InboxViewRepresentable.swift:34:91: cannot find type 'Context' in scope
func updateUIViewController(_ uiViewController: IterableInboxViewController, context: Context) {
^~~~~~~
❌ /Users/distiller/project/Packages/checkouts/swift-sdk/swift-sdk/swiftui/InboxViewRepresentable.swift:11:32: cannot find type 'UIViewControllerRepresentable' in scope
struct InboxViewRepresentable: UIViewControllerRepresentable {
^~~~~~~
❌ /Users/distiller/project/Packages/checkouts/swift-sdk/swift-sdk/swiftui/IterableInboxView.swift:73:27: cannot find type 'View' in scope
public var body: some View {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❌ /Users/distiller/project/Packages/checkouts/swift-sdk/swift-sdk/swiftui/IterableInboxView.swift:11:34: cannot find type 'View' in scope
public struct IterableInboxView: View {
^~~~
When not archiving (i.e. building on desktop or running tests on CI) the Iterable SDK builds correctly.
In the interim, I have rolled back to a previous version of the Iterable SDK to complete my build.
Please investigate.
The build log reads:
Touch /Users/carlos/Library/Caches/org.carthage.CarthageKit/DerivedData/13.2.1_13C100/swift-sdk/6.4.1/Build/Products/Release-iphonesimulator/IterableAppExtensions.framework (in target 'notification-extension' from project 'swift-sdk')
cd /Users/carlos/Documents/iOS_Projects/work/merryfield-ios/Carthage/Checkouts/swift-sdk
/usr/bin/touch -c /Users/carlos/Library/Caches/org.carthage.CarthageKit/DerivedData/13.2.1_13C100/swift-sdk/6.4.1/Build/Products/Release-iphonesimulator/IterableAppExtensions.framework
** BUILD FAILED **
The following build commands failed:
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler (in target 'swift-sdk' from project 'swift-sdk')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'swift-sdk' from project 'swift-sdk')
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler (in target 'swift-sdk' from project 'swift-sdk')
CompileSwift normal i386 (in target 'swift-sdk' from project 'swift-sdk')
Xcode 13.2.1
Carthage 0.38
Macbook Pro M1
`public extension Data {
//from: https://stackoverflow.com/questions/39075043/how-to-convert-data-to-hex-string-in-swift
func hexString() -> String {
let digits = Array("01234567890abcdef".utf16)
var chars: [UniChar] = []
chars.reserveCapacity(count * 2)
for byte in self {
chars.append(digits[Int(byte / 16)])
chars.append(digits[Int(byte % 16)])
}
return String(utf16CodeUnits: chars, count: chars.count)
}
}`
This code was added but doesn't work as expected. We are printing the hex bits before sending them to the iterable SDK and the values are not the same. Our method for printing the hex bits is below and when we use that value in place of the implementation above, our device tokens in iterable work with APNS and we actually receive push notifications.
let token = deviceToken.map { String(format: "%02.2hhx", $0) }.joined()
Hello Iterable Team,
I noticed a bug in the app that when a button has no "action" or "url" is empty the SDK add a IterableHtmlMessageViewController on top of the hierarchy blocking any interaction with the app, the user needs to force quit the app in order to continue using it, I wonder if could you add some validation in the SDK to prevent this behavior.
this is an example of the template I'm using:
<a class="btn" href="">LET ME SEE !</a> <a class="btn2" href="action://dismiss">I'M GOOD</a>
the button "I'M GOOD" close the in-app message but the button "LET ME SEE!" trigger to show the IterableHtmlMessageViewController with no content blocking the interaction with the app. I'm using the SDK 6.2.0
Thanks! and keep doing a great job with this SDK! we love it!
As mentioned in the automatic installation instructions I add the following to my pod file:
pod 'Iterable-iOS-SDK'
Then I do:
pod install
After that I open the workspace for my project, compile it, and I get the following compilation error:
Pods/Iterable-iOS-SDK/swift-sdk/IterableSDK.h:19:9: 'IterableSDK/IterableConstants.h' file not found
Is this a known issue? I'm on Xcode Version 10.1 (10B61).
Thanks!
There are quite a few areas inside of /swift-sdk/internal/
that leak into the public namespace. This causes naming conflicts when iterable is included with a project. One of the biggest and most common (as I can see) is the leak of Promise. These should probably be declared internal, or taken out of the internal directory and documented (though I feel this SDK should not provide tools such as these since it's not the focus of this SDK). Here's a list of files that have public declarations inside of the internal directory.
Promise.swift
Dwifft+UIKit.swift
IterableInboxImpression.swift
DateProvider.swift
AbstractDiffCalculator.swift
IterableActionRunner.swift
IterableUtil.swift
6.2.0 uses resource
in the podspec, which means this version cannot be used in projects that use static libraries due to a name conflict.
The cocoapods documentation strongly recommends using resource_bunldes instead to avoid this.
Unable to import the IterableSDK framework on Xcode 11.
Seems like the framework needs to be rebuilt using the latest Xcode 11 (now that it has been released) on the App Store.
I upgraded my version of Iterable from v6.0.6 to v6.0.8 and found the newest version wasn't compiling when targeting the iOS simulator. The error message Xcode provides is a bit misleading indicating the compiler can't find any symbols that are part of Iterable's SDK.
After investigation, in v6.0.8 each framework's *-Swift.h
file only the device platform is targeted (there's an elif defined(...)
at the top where this occurs). I'm not sure if this is a regression related to Iterable's release process or something with Xcode 10.2's build system.
It looks like this might at least be partially due to a known issue when building with Xcode 10.2. Apple has instructions for a workaround where each target should be built separately and then the headers combined using an #ifdef
preprocessor: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes#3136806
To test a fix, I built Iterable's SDK from source and used a run script
build phase with lipo
to merge the simulator and device frameworks into a single fat framework. Instructions for doing this can be found here: https://www.tirupatibalan.com/2019/01/05/create-fat-framework.html
The run script
phase outlined in the link above for generating the fat framework isn't sufficient to handle the workaround necessary for Xcode 10.2 so I added an additional step that merges the two framework swift headers (it's not pretty but it works):
# 9
# Workaround for known issue in Xcode 10.2: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_2_release_notes#3136806
# Merge the simulator and device headers for the now-merged framework.
HEADER_PATH="${OUTPUT_DIR}/${FRAMEWORK_NAME}.framework/Headers/${FRAMEWORK_NAME}-Swift.h"
rm "${HEADER_PATH}"
echo "#if TARGET_OS_SIMULATOR" >> "${HEADER_PATH}"
cat "${OUTPUT_DIR}/Build/Products/Release-iphonesimulator/${FRAMEWORK_NAME}.framework/Headers/${FRAMEWORK_NAME}-Swift.h" >> "${HEADER_PATH}"
echo "#else" >> "${HEADER_PATH}"
cat "${OUTPUT_DIR}/Build/Products/Release-iphoneos/${FRAMEWORK_NAME}.framework/Headers/${FRAMEWORK_NAME}-Swift.h" >> "${HEADER_PATH}"
echo "#endif" >> "${HEADER_PATH}"
I tested my solution in a sample application and both platforms built successfully. Since the application contains x86 and i386 architectures any application consuming the framework will need to strip these before submission (the link above has instructions for doing that as well).
Would it be possible to release the latest version of the framework as a fat framework using the approach outlined above?
Previously our app was able to use
ITEActionBlock
to get a resolved value of the useractivity's URL and pass it to getAndTrackDeeplink
for a custom action. This is now deprecated and would break our setup. Is there a way to just retrieve the resolved value when we receive the url inside of app delegate's
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler
?
Thanks.
Issue archiving with bitcode (for both main framework and extensions):
ld: bitcode bundle could not be generated because '...../Frameworks/IterableAppExtensions.framework/IterableAppExtensions' was built without full bitcode. All frameworks and dylibs for bitcode must be generated from Xcode Archive or Install build file '...../Frameworks/IterableAppExtensions.framework/IterableAppExtensions' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've followed the manual installation instructions https://github.com/Iterable/swift-sdk#manual-installation).
The project compiles but when trying to run it in the simulator I get:
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /Users/pedro/Library/Developer/CoreSimulator/Devices/B1720EDD-39FC-44D2-BDD7-61B2E9DE83F1/data/Containers/Bundle/Application/DA302F26-73DA-46D6-810E-C29E92AE862F/Chess.app/Frameworks/IterableSDK.framework/IterableSDK
Reason: no suitable image found. Did find:
/usr/lib/swift/libswiftCore.dylib: mach-o, but not built for iOS simulator
The instructions only state two things:
What am I missing? I tested with the framework found in IterableSDK.zip v6.0.8.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.