singular-labs / singular-flutter-sdk Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void io.flutter.plugin.common.MethodChannel.invokeMethod(java.lang.String, java.lang.Object)' on a null object reference
at com.singular.flutter_sdk.SingularSDK$1$1.run(SingularSDK.java:240)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:233)
at android.app.ActivityThread.main(ActivityThread.java:8068)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Observered in sdk version - 1.0.8
A Runnable
is being posted onto the UIThreadHandler when link is resolved. This could be unnecessary if the SingularLinkHandler.onResolved(linkParams)
is invoked in the main thread and could be the root cause.
uiThreadHandler.post(new Runnable() {
@Override
public void run() {
channel.invokeMethod("singularLinksHandlerName",linkParams); // NULL POINTER HERE!!! Due to NULL `channel`
}
});
If SingularLinkHandler.onResolved(linkParams)
is expected to be only called in main thread and only after the flutter engine is attached, then we can just remove the uiThreadHandler.post()
and directly invoke the method on the channel
If the link can be resolved from a background thread,
Then we'll need to do two things:
channel
is not null before invoking channel.invokeMethod("singularLinksHandlerName",linkParams)
null
, then queue this operation up and wait until the flutter engine is attached to invoke pending operationsError (Xcode): Undefined symbol: _objc_msgSend$database
Error (Xcode): Undefined symbol: _objc_msgSend$heartbeatTimestamp
Error (Xcode): Undefined symbol: _objc_msgSend$batchTimestamp
Error (Xcode): Undefined symbol: _objc_msgSend$apiReadyEvents
Error (Xcode): Undefined symbol: _objc_msgSend$sendEvents
Error (Xcode): Undefined symbol: _objc_msgSend$setExitThread:
Error (Xcode): Undefined symbol: _objc_msgSend$setPaused:
Error (Xcode): Undefined symbol: _objc_msgSend$initWithEventThread:
Error (Xcode): Undefined symbol: _objc_msgSend$setApiThread:
Error (Xcode): Undefined symbol: _objc_msgSend$setApiBufferedEvents:
Error (Xcode): Undefined symbol: _objc_msgSend$setApiReadyEvents:
Error (Xcode): Undefined symbol: _objc_msgSend$setApiSentEvents:
Error (Xcode): Undefined symbol: _objc_msgSend$setRetryInterval:
Error (Xcode): Undefined symbol: _objc_msgSend$heartbeatInterval
Error (Xcode): Undefined symbol: _objc_msgSend$setBatchTimestamp:
Error (Xcode): Undefined symbol: _objc_msgSend$resetHeartbeat
Error (Xcode): Undefined symbol: _objc_msgSend$apiThread
Error (Xcode): Undefined symbol: _objc_msgSend$apiKey
Error (Xcode): Undefined symbol: _objc_msgSend$apiSecret
Error (Xcode): Undefined symbol: _objc_msgSend$setCurrentSession:
Error (Xcode): Undefined symbol: _objc_msgSend$getSingularLink
Error (Xcode): Undefined symbol: _objc_msgSend$getReturnValue:
Error (Xcode): Undefined symbol: _objc_msgSend$instanceMethodSignatureForSelector:
Error (Xcode): Undefined symbol: _objc_msgSend$extractDeeplink:
Error (Xcode): Undefined symbol: _objc_msgSend$nextEvent:
Error (Xcode): Undefined symbol: _objc_msgSend$apiBufferedEvents
Error (Xcode): Undefined symbol: _objc_msgSend$getInitializedInstanceOfClass:
Error (Xcode): Undefined symbol: _objc_msgSend$methodSignatureForSelector:
Error (Xcode): Undefined symbol: _objc_msgSend$invocationWithMethodSignature:
Error (Xcode): Undefined symbol: _objc_msgSend$sendSynchronousRequest:returningResponse:error:
Error (Xcode): Undefined symbol: _objc_msgSend$buildEventInformation:
Error (Xcode): Undefined symbol: _objc_msgSend$setValuesForKeysWithDictionary:
Error (Xcode): Undefined symbol: _objc_msgSend$processTransaction:
Error (Xcode): Undefined symbol: _objc_msgSend$buildProduct:
Error launching application on iPhone (2).
The current documentation on iOS Prerequisite and Android Prerequisite uses Objective-C and Java code to integrate the SDK, flutter now by default makes the project with Swift, and Kotlin as the native compilation language for which the documentation needs to be updated.
Below are the links where this needs to be updated
Hi, I'm trying to integrate my app with Singular Flutter SDK, but when I add singular_flutter_sdk: ^1.0.8
to my pubspec dependencies and run my app after that, I'm getting this error:
Launching lib/main.dart on iPhone 8 in debug mode...
Running pod install... 1,788ms
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Using `ARCHS` setting to build architectures of target `Pods-ImageNotification`: (``)
Finding Podfile changes
A singular_flutter_sdk
- CSBehavior
- Firebase
- Flutter
- GoogleUtilities
- clevertap_plugin
- firebase_analytics
- firebase_core
- firebase_crashlytics
- firebase_messaging
- flutter_facebook_auth
- flutter_local_notifications
- flutter_native_splash
- flutter_secure_storage
- flutter_segment
- geolocator_apple
- google_maps_flutter_ios
- google_sign_in_ios
- package_info_plus
- path_provider_ios
- sign_in_with_apple
- social_share
- sqflite
- uni_links
- url_launcher_ios
- webview_flutter_wkwebview
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `clevertap_plugin` from `.symlinks/plugins/clevertap_plugin/ios`
-> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
firebase_analytics: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_crashlytics` from `.symlinks/plugins/firebase_crashlytics/ios`
Run script to upload symbols already exists.
firebase_crashlytics: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
firebase_messaging: Using Firebase SDK version '9.6.0' defined in 'firebase_core'
-> Fetching podspec for `flutter_facebook_auth` from `.symlinks/plugins/flutter_facebook_auth/ios`
-> Fetching podspec for `flutter_local_notifications` from `.symlinks/plugins/flutter_local_notifications/ios`
-> Fetching podspec for `flutter_native_splash` from `.symlinks/plugins/flutter_native_splash/ios`
-> Fetching podspec for `flutter_secure_storage` from `.symlinks/plugins/flutter_secure_storage/ios`
-> Fetching podspec for `flutter_segment` from `.symlinks/plugins/flutter_segment/ios`
-> Fetching podspec for `geolocator_apple` from `.symlinks/plugins/geolocator_apple/ios`
-> Fetching podspec for `google_maps_flutter_ios` from `.symlinks/plugins/google_maps_flutter_ios/ios`
-> Fetching podspec for `google_sign_in_ios` from `.symlinks/plugins/google_sign_in_ios/ios`
-> Fetching podspec for `package_info_plus` from `.symlinks/plugins/package_info_plus/ios`
-> Fetching podspec for `path_provider_ios` from `.symlinks/plugins/path_provider_ios/ios`
-> Fetching podspec for `sign_in_with_apple` from `.symlinks/plugins/sign_in_with_apple/ios`
-> Fetching podspec for `singular_flutter_sdk` from `.symlinks/plugins/singular_flutter_sdk/ios`
-> Fetching podspec for `social_share` from `.symlinks/plugins/social_share/ios`
-> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
-> Fetching podspec for `uni_links` from `.symlinks/plugins/uni_links/ios`
-> Fetching podspec for `url_launcher_ios` from `.symlinks/plugins/url_launcher_ios/ios`
-> Fetching podspec for `webview_flutter_wkwebview` from `.symlinks/plugins/webview_flutter_wkwebview/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_0_8_4.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/8/4/GoogleUtilities/7.10.0/GoogleUtilities.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/10.3.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/9.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_8_c_6.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/8/c/6/CleverTap-iOS-SDK/4.1.6/CleverTap-iOS-SDK.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/9.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/9.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_a_7_6.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/a/7/6/Analytics/4.1.6/Analytics.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_f_6_5.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/f/6/5/Segment-Amplitude/3.4.0/Segment-Amplitude.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_d_5_a.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/d/5/a/segment-appsflyer-ios/6.8.1/segment-appsflyer-ios.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_a_d_d.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/a/d/d/GoogleMaps/7.2.0/GoogleMaps.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/9.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/0/3/5/Firebase/9.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_d_4_0.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/d/4/0/GoogleSignIn/6.2.4/GoogleSignIn.podspec.json exists! Returning local because checking is only performed in repo update
[!] Unable to find a specification for `Singular-SDK` depended upon by `singular_flutter_sdk`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:389:in `find_cached_set'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:165:in `search_for'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `each'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_by!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:94:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `<main>'
Error output from CocoaPods:
↳
Ignoring ffi-1.15.5 because its extensions are not built. Try: gem pristine ffi --version 1.15.5
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
Error launching application on iPhone 8.
I already tried pod repo update
and pod install --repo-update
, cleaned all my cocoapods cache, and flutter pub cache.
If someone could help me, I would appreciate. thank you!
Thank you!
We have used flutter as module and We have integrated singular flutter 1.0.0 successfully. while integrating module gradle is not able to build.
`FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven5(http://maven.singular.net/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.0.2/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
I am integrating flutter plugin. When I'm adding
implementation 'com.google.android.gms:play-services:6.5.87'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:21.0.3'
I'm getting multiple duplicate class build errors.
duplicate class com.google.firebase.analytics.firebaseanalytics$userproperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime (com.google.firebase:firebase-analytics-impl:12.0.1) and jetified-play-services-measurement-api-20.0.2-runtime (com.google.android.gms:play-services-measurement-api:20.0.2)
my build.gradle is
implementation 'androidx.multidex:multidex:2.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
//implementation 'com.github.a914-gowtham:android-video-trimmer:1.7.0'
//implementation 'com.github.a914-gowtham:android-video-trimmer-litr:1.5.11'
//implementation 'com.karumi:dexter:6.2.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.5'
implementation 'com.tbruyelle.rxpermissions2:rxpermissions:0.9.4@aar'
implementation 'com.jakewharton:butterknife:10.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
//compile files('libs/aspectjrt-1.7.3.jar')
//compile files('libs/isoparser-1.0.6.jar')
implementation ('com.googlecode.mp4parser:isoparser:1.0.6'){
exclude group: 'com.googlecode.mp4parser', module: 'isoparser'}
implementation 'org.aspectj:aspectjrt:1.8.2'
implementation('com.github.AbedElazizShe:LightCompressor:1.0.0')
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1"
implementation 'com.google.android.gms:play-services-tagmanager:18.0.1'
implementation "com.truecaller.android.sdk:truecaller-sdk:2.6.0"
//implementation 'com.facebook.android:facebook-applinks:14.0.0'
implementation 'com.facebook.android:facebook-android-sdk:12.3.0'
implementation 'com.google.firebase:firebase-messaging:23.0.6'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.parse.bolts:bolts-tasks:1.4.0'
implementation 'com.parse.bolts:bolts-applinks:1.4.0'
implementation 'com.android.installreferrer:installreferrer:2.2'
implementation 'com.google.firebase:firebase-dynamic-links-ktx'
How to fix it.
After adding the below code block for SingularLink(singular_flutter_sdk: ^1.0.12) in the iOS AppDelegate, my Firebase Dynamic Links (firebase_dynamic_links: 5.0.11) stopped working. Removing the code block restores Firebase Dynamic Link functionality, but causes issues with SingularLink.
override func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
// Singular
if let singularAppDelegate = SingularAppDelegate.shared() {
singularAppDelegate.continueUserActivity(userActivity, restorationHandler: nil)
}
return true
}
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.2.1 22D68 darwin-arm, locale en-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
[✓] Connected device (5 available)
[✓] HTTP Host Availability
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.