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

It crashes when I launch the app on iPHone6 iOS 12, but it doesn't crash on iOS 13 #2701

Closed
zyestin opened this issue Mar 8, 2024 · 1 comment

Comments

@zyestin
Copy link
Contributor

zyestin commented Mar 8, 2024

Description

After the ipa package is generated in archive.
It crashed every time I opened the app, on iPhone 6 / iOS 12.
However, there's no problem in debug.

It is possible that the minimum iOS version supported by swift is 13

Expected Behavior

App launched normally

Screenshots

IMG_5835.MOV

Environment:

  • react-native-iap: 12.13.0
  • react-native: 0.61.5
  • Platforms (iOS, Android, emulator, simulator, device): iOS 12

To Reproduce

Once the iap library is integrated into any project and archived to generate ipa.
Every time open the app on an iPhone 6 or iOS 12 machine, it crashes.


[Optional] Additional Context

Xcode run with Release, then get it's crash log

* thread #1, stop reason = signal SIGABRT
  * frame #0: 0x000000010564e418 dyld`__abort_with_payload + 8
    frame #1: 0x000000010564da58 dyld`abort_with_payload_wrapper_internal + 100
    frame #2: 0x000000010564da88 dyld`abort_with_payload + 12
    frame #3: 0x00000001056108f8 dyld`dyld::halt(char const*) + 304
    frame #4: 0x00000001056136e4 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 5396
    frame #5: 0x000000010560d044 dyld`_dyld_start + 68
@zyestin zyestin changed the title Crash on startup iPhone 6 iOS12.x, iOS 13 is OK Crash startup in iPhone 6 iOS12.x, iOS 13 is OK Mar 11, 2024
@zyestin zyestin changed the title Crash startup in iPhone 6 iOS12.x, iOS 13 is OK It Crashes when Launching the app on iPhone 6 iOS12.x, however iOS 13 works fine Mar 11, 2024
@zyestin zyestin changed the title It Crashes when Launching the app on iPhone 6 iOS12.x, however iOS 13 works fine It crashes when I launch the app on iPHone6 iOS 12, but it doesn't crash on iOS 13 Mar 11, 2024
@zyestin
Copy link
Contributor Author

zyestin commented Mar 11, 2024

Solution
I found the solution here 👉🏻 dyld: Library not loaded: /System/Library/Frameworks/SwiftUI.framework/SwiftUI

Do as below
image

Key info
Why I found solution by search dyld: Library not loaded: /System/Library/Frameworks/SwiftUI.framework/SwiftUI ?
Because I suspected it was caused by the storekit2 api, I deleted the storekit2 api code in RNIapIosSk2.swift. Then I run the app using Xcode with release config. It crashed with more infomation as below.

error: '...' is not a valid command.
dyld: Library not loaded: /System/Library/Frameworks/SwiftUI.framework/SwiftUI
  Referenced from: /var/containers/Bundle/Application/B09E8A00-DF05-4E67-A775-1C6B732BFD54/HuabenApp.app/HuabenApp
  Reason: image not found
(lldb) bt
* thread #1, stop reason = signal SIGABRT
  * frame #0: 0x0000000104e7a418 dyld`__abort_with_payload + 8
    frame #1: 0x0000000104e79a58 dyld`abort_with_payload_wrapper_internal + 100
    frame #2: 0x0000000104e79a88 dyld`abort_with_payload + 12
    frame #3: 0x0000000104e3c8f8 dyld`dyld::halt(char const*) + 304
    frame #4: 0x0000000104e3f6e4 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 5396
    frame #5: 0x0000000104e39044 dyld`_dyld_start + 68

So it is clearly about swiftUI.

hyochan pushed a commit that referenced this issue Mar 31, 2024
…#2702)

## Summary:

After the ipa package generated by Xcode archive was installed on on
iPhone 6 / iOS 12. It crashed every time I opened the app.

More information can be found here
[#2701](#2701)


## What was done:

Add a note in get-started.mdx. So developers know to do extra
configuration on iOS 12 to avoid crashes
@zyestin zyestin closed this as completed Apr 2, 2024
arthurgeron pushed a commit to arthurgeron/react-native-iap that referenced this issue Apr 2, 2024
…dooboolab-community#2702)

## Summary:

After the ipa package generated by Xcode archive was installed on on
iPhone 6 / iOS 12. It crashed every time I opened the app.

More information can be found here
[dooboolab-community#2701](dooboolab-community#2701)


## What was done:

Add a note in get-started.mdx. So developers know to do extra
configuration on iOS 12 to avoid crashes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant