Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash of the 1.6.0 on WatchOS 8 #178

Closed
djavan-bertrand opened this issue Jun 10, 2024 · 4 comments
Closed

Crash of the 1.6.0 on WatchOS 8 #178

djavan-bertrand opened this issue Jun 10, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@djavan-bertrand
Copy link

The SDK 1.6.0 crashes on watchOS 8.
The crash occurs at app startup:

dyld[87977]: Symbol not found: _$sSo13WKApplicationC8WatchKitE30didEnterBackgroundNotificationSo18NSNotificationNameavgZ
  Referenced from: /Users/djavan.bertrand/Library/Developer/CoreSimulator/Devices/E858B752-0788-40E6-9BD4-F16B5FF6579B/data/Containers/Bundle/Application/7BE69845-5B5D-4047-A6EB-18D887720C21/Watch-App-Sampler WatchKit App.app/PlugIns/Watch-App-Sampler WatchKit Extension.appex/Watch-App-Sampler WatchKit Extension
  Expected in: /Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS 8.5.simruntime/Contents/Resources/RuntimeRoot/usr/lib/swift/libswiftWatchKit.dylib

Please note that it does not crash with the 1.5.2.

Possible Solution

I don't have a solution, but this might be related to the changes brought in this PR: #163
Maybe using compiler directive or availability directives (something like if #available(watchOS 8.0, *) would solve this crash?

Steps to Reproduce

Please use the following sample project (it is just a watch OS app with a dependency on Amplitude-Swift 1.6.0):
Amplitude-Watch-Test.zip

  1. Run it on a watchOS 8 simulator or real device

Environment

  • SDK Version: 1.6.0
  • Xcode: Xcode 15.4
@djavan-bertrand djavan-bertrand added the bug Something isn't working label Jun 10, 2024
@thedavidharris
Copy link
Contributor

Oof, apparently this is... a mess. RevenueCat/purchases-ios#1895 I think has an example for how to fix this.

Will likely not get a chance tomorrow but can probably PR this before the end of the week. Sorry for the confusion here.

@crleona
Copy link
Collaborator

crleona commented Jun 11, 2024

HI @djavan-bertrand, @thedavidharris - I have a patch which should resolve this issue and another issue tracking sessions on watchOS.

@djavan-bertrand
Copy link
Author

@crleona Hi, thanks for this quick work. I've tried the patch on devices (simulator and real devices) and it seems to work. 💪

@crleona
Copy link
Collaborator

crleona commented Jun 12, 2024

This should be released in 1.6.1. @thedavidharris @djavan-bertrand thank you for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants